]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-06-08 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
f5679726 12008-06-08 Robert Millan <rmh@aybabtu.com>
2
3 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4 don't append the RAID prefix afterwards.
5 Reported by Clint Adams.
6
ce525529 72008-06-08 Robert Millan <rmh@aybabtu.com>
8
9 Based on description from Pavel:
10 * kern/disk.c (grub_disk_check_range): Rename to ...
11 (grub_disk_adjust_range): ... this. Add a comment explaining the
12 tasks performed by this function.
13
ad4936a0 142008-06-08 Robert Millan <rmh@aybabtu.com>
15
16 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
17 `num_serial' (for consistency with other variables).
18 (struct grub_ntfs_data): Add `uuid' member.
19 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
20 (grub_ntfs_uuid): New function.
21 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
22
dc20b0f9 232008-06-07 Pavel Roskin <proski@gnu.org>
24
25 * util/biosdisk.c (open_device): Revert last change to the
26 function, it broke installation. The sector needs to be
27 different dependent on which device is opened.
28
c5e3cfba 292008-06-06 Robert Millan <rmh@aybabtu.com>
30
31 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
32 rest of GRUB, and breakage doesn't happen if its value were modified.
33
34 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
35 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
36 a constant (same value).
37 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
38 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
39
26a1f8c4 402008-06-06 Robert Millan <rmh@aybabtu.com>
41
42 * util/biosdisk.c (open_device): Do not modify sector offset when
43 accessing a partition. kern/disk.c already handles this for us.
44
25d6b327 452008-06-06 Robert Millan <rmh@aybabtu.com>
46
47 * util/grub-emu.c (grub_machine_init): Move code in this function from
48 here ...
49 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
50 segfault in case grub_printf() is called).
51
52 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
53 grub_probe. Update all users not to explicitly add it again.
54 (grub_device): New variable; contains corresponding device for grubdir.
55 (fs_module, partmap_module, devabstraction_module): Pass
56 `--device ${grub_device}' to grub_probe to avoid traversing /dev
57 every time.
58
9ece62fb 592008-06-05 Robert Millan <rmh@aybabtu.com>
60
61 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
62 is found, print it (same layout as with labels).
63
1ad36d37 642008-06-04 Robert Millan <rmh@aybabtu.com>
65
66 * util/biosdisk.c (get_drive): Rename to ...
67 (find_grub_drive): ... this. Update all users.
68
69 (get_os_disk): Rename to ...
70 (convert_system_partition_to_system_disk): ... this. Update all users.
71
72 (find_drive): Rename to ...
73 (find_system_device): ... this. Update all users.
74
e6a30859 752008-06-04 Robert Millan <rmh@aybabtu.com>
76
77 * util/biosdisk.c (get_os_disk): Handle IDA devices.
78 * util/grub-mkdevicemap.c (get_mmc_disk_name)
79 (make_device_map): Likewise.
80
00c108a4 812008-06-01 Robert Millan <rmh@aybabtu.com>
82
83 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
84 before dereferencing it.
85
86 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
87 union with fat12/fat16-specific ones. Add some new fields, including
88 `num_serial' for both versions.
89 (struct grub_fat_data): Add `uuid' member.
90 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
91 names. Initialize `data->uuid' using `num_serial'.
92 (grub_fat_uuid): New function.
93 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
94
95 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
96 (grub_reiserfs_uuid): New function.
97 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
98 member.
99
100 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
101 (grub_xfs_uuid): New function.
102 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
103
1385c5bb 1042008-06-01 Robert Millan <rmh@aybabtu.com>
105
106 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
107 code that is backward compatible with pre-uuid search command.
108
c682dfd7 1092008-05-31 Robert Millan <rmh@aybabtu.com>
110
111 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
112 floppies after everything else, to ensure floppy drive isn't accessed
113 unnecessarily (patch from Bean).
114
b7db5d47 1152008-05-31 Robert Millan <rmh@aybabtu.com>
116
117 * commands/search.c (search_label, search_fs_uuid, search_file): Do
118 not print device names when we were asked to set a variable.
119
6e037aa9 1202008-05-31 Robert Millan <rmh@aybabtu.com>
121
122 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
123 using "cursor-on" and "cursor-off" commands (understood at least by
124 the Open Firmware flavour on OLPC).
125
41305bc8 1262008-05-31 Michael Gorven <michael@gorven.za.net>
127
128 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
129 on and off sequences.
130
69ba137e 1312008-05-31 Robert Millan <rmh@aybabtu.com>
132
133 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
134 * util/update-grub.in: Likewise.
135
520ae21b 1362008-05-30 Pavel Roskin <proski@gnu.org>
137
138 * util/biosdisk.c (linux_find_partition): Simplify logic and
139 make the code more universal. Keep special processing for
140 devfs, but use a simple rule for all other devices. If the
141 device ends with a number, append 'p' and the partition number.
142 Otherwise, append only the partition number.
143
5786569b 1442008-05-30 Robert Millan <rmh@aybabtu.com>
145
146 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
147 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
148 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
149 the `root' parameter to Linux.
150
51500452 1512008-05-30 Robert Millan <rmh@aybabtu.com>
152
153 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
154 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
155 --fs_uuid with --fs-uuid.
156 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
157 all filesystems support them).
158
811d3878 1592008-05-30 Robert Millan <rmh@aybabtu.com>
160
161 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
162 grub_printf() flags, since we're printing in units of 2 bytes.
163
cab63c95 1642008-05-30 Robert Millan <rmh@aybabtu.com>
165
166 * util/grub.d/00_header.in: Remove obsolete comment referencing
167 convert_system_path_to_grub_path().
168 * util/update-grub.in: Likewise.
169 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
170 (convert_system_path_to_grub_path): Add a warning message explaining
171 that this function is deprecated. Rely on is_path_readable_by_grub()
172 for the readability checks.
173 (font_path): Use is_path_readable_by_grub() for the readability
174 check rather than convert_system_path_to_grub_path().
175
972e2f7a 1762008-05-30 Robert Millan <rmh@aybabtu.com>
177
178 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
179 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
180 converting it first.
181 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
182 grub.cfg for access to font file, and afterwards call it again to set
183 the root device.
184
62191274 1852008-05-30 Robert Millan <rmh@aybabtu.com>
186
187 * commands/search.c (options): Add --fs_uuid option.
188 (search_fs_uuid): New function.
189 (grub_cmd_search): Fix --set argument passing.
190 Use search_fs_uuid() when requested via --fs_uuid.
191 (grub_search_init): Update help message.
192 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
193 and redeclare it as an array of 16-bit words.
194 (grub_ext2_uuid): New function.
195 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
196 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
197 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
198 (GRUB_DEVICE_BOOT_UUID): New variables.
199 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
200 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
201 whenever possible.
202 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
203 just assume `root' variable has the right value.
204 * util/grub.d/10_linux.in: Likewise.
205 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
206 via PRINT_FS_UUID.
207 (main): Recognise `-t fs_uuid' argument.
208
01b73ec8 2092008-05-30 Robert Millan <rmh@aybabtu.com>
210
211 * util/biosdisk.c (map): Redefine structure to hold information
212 about GRUB drive name.
213 (get_drive): Reimplement without assuming (and verifiing) BIOS-like
214 drive names.
215 (call_hook): Remove.
216 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
217 member. Assume drive has partitions.
218 (grub_util_biosdisk_open): Access device names via `.device' struct
219 member.
220 (open_device): Likewise.
221 (find_drive): Likewise.
222 (read_device_map): Adjust map[] usage to match the new struct
223 definition. Don't check for duplicates (still possible, but not cheap
224 anymore).
225 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
226 (make_device_name): Remove assumption of BIOS-like drive names.
227
22f16596 2282008-05-30 Pavel Roskin <proski@gnu.org>
229
230 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
231 compiling execute.c doesn't need grub_script.tab.h anymore.
232 (normal/command.c_DEPENDENCIES): Likewise.
233 (normal/function.c_DEPENDENCIES): Likewise.
234 * conf/i386-ieee1275.rmk: Likewise.
235 * conf/i386-linuxbios.rmk: Likewise.
236 * conf/i386-pc.rmk: Likewise.
237 * conf/powerpc-ieee1275.rmk: Likewise.
238 * conf/sparc64-ieee1275.rmk: Likewise.
239
528ad8f2 2402008-05-29 Pavel Roskin <proski@gnu.org>
241
d1dff95d 242 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
243 when scanning metadata for volume group name.
244
528ad8f2 245 * include/grub/script.h: Don't include grub_script.tab.h. It's
246 a generated file, which may only be included from the files with
247 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
248 use union YYSTYPE, as the later allows forward declaration.
249 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
250
47248e08 2512008-05-29 Robert Millan <rmh@aybabtu.com>
252
253 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
254 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
255 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
256 (grub_console_checkkey): Add grub_dprintf() call to report unknown
257 scan codes.
258
ee632529 2592008-05-29 Robert Millan <rmh@aybabtu.com>
260
261 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
262 control key combinations.
263
eee96e08 2642008-05-29 Robert Millan <rmh@aybabtu.com>
265
266 * util/powerpc/ieee1275/grub-install.in: Move from here ...
267 * util/ieee1275/grub-install.in: ... to here.
268 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
269 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
270 (grub_install_SOURCES): Likewise.
271
da9a6a94 2722008-05-29 Robert Millan <rmh@aybabtu.com>
273
274 * fs/affs.c: Update copyright year.
275 * fs/ext2.c: Likewise.
276 * fs/fshelp.c: Likewise.
277 * fs/hfsplus.c: Likewise.
278 * fs/ntfs.c: Likewise.
279 * fs/xfs.c: Likewise.
280 * include/grub/fshelp.h: Likewise.
281 * util/grub-mkdevicemap.c: Likewise.
282
12e65f3a 2832008-05-28 Robert Millan <rmh@aybabtu.com>
284
285 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
286 might need to be fatfs to support some firmware implementations
287 (e.g. OFW or EFI).
288
23023641 2892008-05-28 Robert Millan <rmh@aybabtu.com>
290
291 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
292 devices.
293 * util/grub-mkdevicemap.c (get_mmc_disk_name)
294 (make_device_map): Likewise.
295
887d2619 2962008-05-20 Bean <bean123ch@gmail.com>
297
298 * fs/fshelp.c (grub_fshelp_map_block): New function.
299 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
300 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
301
302 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
303 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
304 (grub_fshelp_journal): New structure.
305 (grub_fshelp_map_block): New function prototype.
306 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
307 (grub_fshelp_map_block): Likewise.
308
309 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
310 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
311 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
312 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
313 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
314 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
315 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
316 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
317 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
318 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
319 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
320 (grub_ext2_sblock): New members for journal support.
321 (grub_ext3_journal_header): New structure.
322 (grub_ext3_journal_revoke_header): Likewise.
323 (grub_ext3_journal_block_tag): Likewise.
324 (grub_ext3_journal_sblock): Likewise.
325 (grub_fshelp_node): New members logfile and journal.
326 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
327 grub_fshelp_map_block to get real block number.
328 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
329 number.
330 (grub_ext2_read_inode): Likewise.
331 (grub_ext3_get_journal): New function.
332 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
333 (grub_ext2_close): Release memory used by journal.
334
335 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
336 (REISERFS_MAGIC_DESC_BLOCK): New macro.
337 (grub_reiserfs_transaction_header): Renamed to
338 grub_reiserfs_description_block, replace field data with real_blocks.
339 (grub_reiserfs_commit_block): New structure.
340 (grub_reiserfs_data): New member journal.
341 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
342 number.
343 (grub_reiserfs_read_symlink): Likewise.
344 (grub_reiserfs_iterate_dir): Likewise.
345 (grub_reiserfs_open): Likewise.
346 (grub_reiserfs_read): Likewise.
347 (grub_reiserfs_get_journal): New function.
348 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
349 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
350 using grub_reiserfs_get_journal.
351 (grub_reiserfs_close): Release memory used by journal.
352
353 * fs/affs.c (grub_affs_read_block): Change block type to
354 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
355
356 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
357
358 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
359
360 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
361
362 * fs/udf.c (grub_udf_read_block): Change block type to
363 grub_disk_addr_t. Use type cast to avoid warning.
364
365 * fs/xfs.c (grub_xfs_read_block): Likewise.
366
b7c6bed5 3672008-05-16 Christian Franke <franke@computer.org>
368
369 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
370 to ensure that break with ESC will always work.
371 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
372 Remove ESC from keyboard queue.
373
eedf167f 3742008-05-16 Christian Franke <franke@computer.org>
375
376 * util/biosdisk.c: [__CYGWIN__] Add includes.
377 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
378 (get_os_disk): Move variable declarations to OS specific
379 parts to avoid warning.
380 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
381 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
382 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
383 Cygwin.
384 * util/getroot.c: [__CYGWIN__] Add includes.
385 (strip_extra_slashes): Fix "/" case.
386 [__CYGWIN__] (get_win32_path): New function.
387 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
388 [__CYGWIN__] (find_root_device): Disable.
389 [__CYGWIN__] (get_bootsec_serial): New function.
390 [__CYGWIN__] (find_cygwin_root_device): Likewise.
391 [__linux__] (grub_guess_root_device): Add early returns to simplify
392 structure.
393 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
394 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
395 check for Linux only.
396
a079699e 3972008-05-15 Bean <bean123ch@gmail.com>
398
399 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
400 keyboard hang problem in apple's intel mac.
401
1cf4059a 4022008-05-09 Robert Millan <rmh@aybabtu.com>
403
404 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
405 devices.
406 * util/grub-mkdevicemap.c (get_virtio_disk_name)
407 (make_device_map): Likewise.
408 Reported by Aurelien Jarno <aurel32@debian.org>
409
ed759390 4102008-05-07 Ian Campbell <ijc@hellion.org.uk>
411
412 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
413 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
414 (make_device_map): Output entries for xvd type disks.
415
b56c4eaa 4162008-05-07 Robert Millan <rmh@aybabtu.com>
417
418 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
419 devices.
420 * util/grub-mkdevicemap.c (get_cciss_disk_name)
421 (make_device_map): Likewise.
422 Reported by Roland Dreier <rdreier@cisco.com>
423
7f8866ed 4242008-05-07 Robert Millan <rmh@aybabtu.com>
425
426 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
427 grub_strstr() call. Correct a few mistakes in failure path handling.
428
b0346e0f 4292008-05-06 Robert Millan <rmh@aybabtu.com>
430
431 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
432 Do not print a trailing slash (therefore, the root directory is an
433 empty string).
434 (convert_system_path_to_grub_path): Do not remove trailing slash
435 from make_system_path_relative_to_its_root() output.
436
437 * util/i386/pc/grub-install.in: Add trailing slash to output from
438 make_system_path_relative_to_its_root().
439
6cf12cbd 4402008-05-06 Robert Millan <rmh@aybabtu.com>
441
442 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
443 ensures that output lines aren't intermangled with those sent to
444 stderr (via grub_util_info()).
445 * util/grub-probe.c (grub_refresh): Likewise.
446 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
447
0fbb3117 4482008-05-05 Christian Franke <franke@computer.org>
449
450 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
451 Add Cygwin device names.
452 (get_ide_disk_name) [__CYGWIN__]: Likewise.
453 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
454 (check_device): Return error instead of success on empty name.
455 (make_device_map): Move label inside linux specific code to
456 prevent compiler warning.
457
8124cdb7 4582008-04-30 Robert Millan <rmh@aybabtu.com>
459
460 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
461 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
462 first boot option.
463 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
464
094c01d0 4652008-04-29 Robert Millan <rmh@aybabtu.com>
466
467 * docs/grub.cfg: New file (example GRUB configuration).
468
f4b1fc02 4692008-04-26 Robert Millan <rmh@aybabtu.com>
470
329ce2a5 471 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
472 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
473 and `disk/ieee1275/nand.c'.
f4b1fc02 474
25f16ec1 4752008-04-25 Bean <bean123ch@gmail.com>
476
477 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
478 i386-linuxbios.
479
480 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
481 change the buffer size to 4096 for cdrom device.
482
483 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
484 and nand.mod.
485 (_linux_mod_SOURCES): New variable.
486 (_linux_mod_CFLAGS): Likewise.
487 (_linux_mod_LDFLAGS): Likewise.
488 (linux_mod_SOURCES): Likewise.
489 (linux_mod_CFLAGS): Likewise.
490 (linux_mod_LDFLAGS): Likewise.
491 (nand_mod_SOURCES): Likewise.
492 (nand_mod_CFLAGS): Likewise.
493 (nand_mod_LDFLAGS): Likewise.
494
495 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
496 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
497 type property. (nand device in olpc don't have this property)
498
499 * include/grub/disk.h (grub_disk_dev_id): New macro
500 GRUB_DISK_DEVICE_NAND_ID.
501
502 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
503 function prototype.
504 (grub_rescue_cmd_initrd): Likewise.
505
506 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
507 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
508 ofw_cif_handler and ofw_idt, adjust padding number.
509
510 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
511 GRUB_MACHINE_IEEE1275 is defined.
512
513 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
514 Use NESTED_FUNC_ATTR attribute on the hook parameter.
515
516 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
517 on nested function heap_init.
518 (grub_upper_mem): New variable for i386-ieee1275.
519 (grub_get_extended_memory): New function for i386-ieee1275.
520 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
521
522 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
523 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
524 property.
525
526 * loader/i386/ieee1275/linux.c: New file.
527
528 * loader/i386/ieee1275/linux_normal.c: New file.
529
530 * disk/ieee1275/nand.c: New file.
531
e89d61e9 5322008-04-18 Thomas Schwinge <tschwinge@gnu.org>
533
534 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
535 value.
536 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
537
602566f6 5382008-04-18 Robert Millan <rmh@aybabtu.com>
539
540 Restructures early code path on ieee1275 to unify grub_main() as
541 the first C function that is executed in every platform.
542
543 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
544 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
545 cmain().
546 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
547 * kern/ieee1275/cmain.c (cmain): Rename to ...
548 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
549 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
550 at the beginning.
551
57490c2b 5522008-04-18 Robert Millan <rmh@aybabtu.com>
553
554 * util/update-grub.in: Fix syntax error when setting
555 `GRUB_PRELOAD_MODULES'.
556 Reported by Stephane Chazelas <stephane@artesyncp.com>
557
1977517d 5582008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
559
560 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
561 section into account, newer toolchains generate unique build ids
562 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 563 we want build ids to be preserved
1977517d 564 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
565 far from other sections don't cause the raw binary images grow
566 size
567
bfb1f1a2 5682008-04-15 Robert Millan <rmh@aybabtu.com>
569
570 * disk/lvm.c: Update copyright year.
571 * kern/misc.c: Likewise.
572
01979850 5732008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
574
575 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
576 there is no memory left for physical volume name.
577
0a1150e2 5782008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
579
580 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
581 volume name mapping to support bigger than 9 character names properly.
582
82ead3fe 5832008-04-13 Robert Millan <rmh@aybabtu.com>
584
585 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
586 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
587
e54a72f5 5882008-04-13 Christian Franke <franke@computer.org>
589
590 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
591 to create a floppy emulation boot CD when non emulation mode
592 does not work.
593 Enable Joliet CD filesystem extension.
594
9fe86034 5952008-04-13 Robert Millan <rmh@aybabtu.com>
596
597 * kern/misc.c (grub_strncat): Fix off-by-one error.
598 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
599
600 * kern/env.c (grub_env_context_close): Clear current context, not
601 previous one.
602 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
603
604 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
605
7ceeee39 6062008-04-13 Robert Millan <rmh@aybabtu.com>
607
608 Improve robustness when handling LVM.
609
610 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
611 (and leave `*p' unmodified).
612 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
613 through it.
614 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
615 iterating through it.
616 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
617 through it.
618 (grub_lvm_scan_device): Check the return value (and fail gracefuly
619 when due) on each grub_lvm_getvalue() or grub_strstr() call.
620 Don't assume `vg->pvs != NULL' when iterating through it.
621
58cd3d85 6222008-04-13 Robert Millan <rmh@aybabtu.com>
623
624 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
625 * genmk.rb (partmap): New variable.
626 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
627 (#{partmap}): New target rule.
628 * genpartmaplist.sh: New file.
629 * Makefile.in (pkglib_DATA): Add partmap.lst.
630 (partmap.lst): New target rule.
631 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
632 modules (including all partition maps), instead of preloading them.
633
78b51059 6342007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
635
636 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
637 `linux-boot-prober' (if installed) to detect other operating
638 systems which are installed on the computer and add them to
639 the boot menu.
640 * conf/common.rmk: Build and install 30_os-prober.
641
a91627b4 6422008-04-12 Robert Millan <rmh@aybabtu.com>
643
644 * kern/powerpc/ieee1275/init.c: Move from here ...
645 * kern/ieee1275/init.c: ... to here. Update all users.
646
647 * kern/powerpc/ieee1275/cmain.c: Move from here ...
648 * kern/ieee1275/cmain.c: ... to here. Update all users.
649
650 * kern/powerpc/ieee1275/openfw.c: Move from here ...
651 * kern/ieee1275/openfw.c: ... to here. Update all users.
652
653 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
654 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
655
322562ea 6562008-04-10 Pavel Roskin <proski@gnu.org>
657
658 * configure.ac: Always use "_cv_" in cache variables for
659 compatibility with Autoconf 2.62.
660
a02a73c5 6612008-04-07 Robert Millan <rmh@aybabtu.com>
662
663 Revert grub/machine/init.h addition by Pavel (since it breaks on
664 i386-ieee1275 and others):
665 * util/i386/pc/misc.c: Remove grub/machine/init.h.
666 * util/powerpc/ieee1275/misc.c: Likewise.
667
25c024b1 6682008-04-07 Robert Millan <rmh@aybabtu.com>
669
670 * util/grub-probe.c (probe): Improve error message.
671
3cbd2f98 6722008-04-07 Robert Millan <rmh@aybabtu.com>
673
674 * util/biosdisk.c (read_device_map): Skip devices that don't exist
675 (this prevents the presence of a bogus entry from ruining the whole
676 thing).
677
87a297bf 6782008-04-06 Pavel Roskin <proski@gnu.org>
679
36747a62 680 * util/biosdisk.c: Include grub/util/biosdisk.h.
681 * util/grub-fstest.c (execute_command): Make static.
682 * util/grub-mkdevicemap.c (check_device): Likewise.
683 * util/i386/pc/misc.c: Include grub/machine/init.h.
684 * util/powerpc/ieee1275/misc.c: Likewise.
685 * util/lvm.c: Include grub/util/lvm.h.
686 * util/misc.c: Include grub/kernel.h, grub/misc.h and
687 grub/cache.h.
688 * util/raid.c: Include grub/util/raid.h.
689 (grub_util_getdiskname): Make static.
690
87a297bf 691 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
692 grub_hostfs_fini(), as they are called from grub_init_all() and
693 grub_fini_all() respectively. This fixes an infinite loop in
694 grub-fstest due to double registration of hostfs.
695 Reported by Christian Franke <Christian.Franke@t-online.de>
696
f6ce7629 6972008-04-05 Pavel Roskin <proski@gnu.org>
698
699 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
700 all 8 functions. Otherwise, probe function 0 only.
701
070e49e4 7022008-04-04 Pavel Roskin <proski@gnu.org>
703
8b088a4c 704 * commands/lspci.c (grub_lspci_iter): Print the bus number
705 correctly.
706
4f657021 707 * commands/lspci.c (grub_pci_classes): Fix typos.
708 (grub_lspci_iter): Don't print func twice. Print vendor ID
709 before device ID, as it's normally done.
710
070e49e4 711 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
712 Fix signedness warnings.
713 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
714 Likewise.
715 * util/ieee1275/get_disk_name.c: Include config.h so that
716 _GNU_SOURCE is defined and getline() is declared. Mark an
717 unused argument as such. Fix a signedness warning.
718
ba7328dc 7192008-04-02 Pavel Roskin <proski@gnu.org>
720
26887f22 721 * genkernsyms.sh.in: Use more robust assignments for CC and
722 srcdir. Quote srcdir.
723 * gensymlist.sh.in: Likewise. Assert at the compile time that
724 the symbol table is not empty.
725
ba7328dc 726 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
727 * fs/cpio.c (grub_cpio_read): Likewise.
728
0f582c6b 7292008-04-01 Pavel Roskin <proski@gnu.org>
730
4b6e1995 731 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
732 * disk/host.c (grub_host_open): Likewise.
733 * disk/loopback.c (grub_loopback_open): Likewise.
734 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
735 disk->id as in disk/host.c, not a multi-character constant.
736
828a2768 737 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
738 later is obsolete, potentially dangerous and sets a bad example.
739 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
740 * util/misc.c (grub_util_get_image_size): Likewise.
741
2bb4fb47 742 * disk/loopback.c (options): Improve help for "--partitions".
743
0f582c6b 744 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
745 options to align them with the short options, e.g. "echo -e".
746
a33224e0 7472008-03-31 Bean <bean123ch@gmail.com>
748
749 * video/reader/png.c (grub_png_data): New member is_16bit and
750 image_data.
751 (grub_png_decode_image_header): Detect 16 bit png image.
752 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
753 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
754 (grub_video_reader_png): Release memory occupied by image_data.
755
756 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
757 4096 bytes.
758 (grub_nfs_mount): Skip the test for sector per cluster.
759
760 * include/grub/ntfs.h (MAX_SPC): Removed.
761
86cb4f54 7622008-03-31 Bean <bean123ch@gmail.com>
763
764 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
765 (grub_probe_SOURCES): Add fs/afs.c.
766 (grub_fstest_SOURCES): Likewise.
767 (afs_mod_SOURCES): New variable.
768 (afs_mod_CFLAGS): Likewise.
769 (afs_mod_LDFLAGS): Likewise.
770
771 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
772 (grub_emu_SOURCES): Likewise.
773
774 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
775
776 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
777
778 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
779
780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
781
782 * fs/afs.c: New file.
783
17c74c21 7842008-03-30 Pavel Roskin <proski@gnu.org>
785
4cb68e89 786 * disk/host.c: Include grub/misc.h to fix a warning.
787 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
788 warnings about implicit declarations.
789
8790bb04 790 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
791 variable.
792 * include/grub/i386/loader.h: Change declaration of
793 grub_linux_boot() to match what grub_loader_set() expects.
794 * util/getroot.c (grub_guess_root_device): Return const char* to
795 fix a warning.
796 * util/grub-probe.c (probe): Fix a warning about uninitialized
797 abstraction_name variable.
798 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
799 second argument as unused to fix a warning.
800
9a3f3296 801 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
802 missing grub_error() call.
803
0ecef90d 804 * util/update-grub_lib.in: Define datarootdir, since Autoconf
805 2.60 and newer uses it to define datadir.
806
0bf6d401 807 * commands/sleep.c: Fix warning about implicit declaration.
808 * disk/memdisk.c: Likewise.
809 * loader/aout.c: Likewise.
810 * loader/i386/bsd_normal.c: Likewise.
811 * util/grub-probe.c: Likewise.
812
7cdacf97 813 * commands/i386/cpuid.c (has_longmode): Make static.
814 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
815 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
816
17c74c21 817 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
818 GDT. This is more robust, as %ds can change.
819 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
820 calling real_to_prot().
821 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
822
80a3e68b 8232008-03-28 Pavel Roskin <proski@gnu.org>
824
825 * kern/i386/pc/startup.S: Assert that uncompressed functions
826 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
827 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
828 code, as they push parts of the code (error handlers) beyond
829 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
830 code as correctness and size.
831
77bcd272 8322008-03-28 Pavel Roskin <proski@gnu.org>
833
834 * kern/i386/pc/startup.S
835 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
836 data block address to the real mode, keep offset minimal. This
837 works around a bug in AWARD BIOS on old Athlon systems, which
838 makes CD detection hang.
839
c5dfd43b 8402008-03-26 Pavel Roskin <proski@gnu.org>
841
842 * normal/color.c (grub_parse_color_name_pair): Make `name' a
843 const.
844 * include/grub/normal.h: Add grub_parse_color_name_pair()
845 declaration.
846
bf962df2 8472008-03-24 Bean <bean123ch@gmail.com>
848
849 * disk/i386/pc/biosdisk.c (cd_start): Removed.
850 (cd_count): Removed.
851 (cd_drive): New variable.
852 (grub_biosdisk_get_drive): Don't check for (cdN) device.
853 (grub_biosdisk_call_hook): Likewise.
854 (grub_biosdisk_iterate): Change cdrom detection method.
855 (grub_biosdisk_open): Replace cd_start with cd_drive.
856 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
857 detect cdrom device.
858
859 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
860 Removed.
861 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
862 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
863 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
864 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
865 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
866 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
867 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
868 (grub_biosdisk_cdrp): New structure.
869 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
870
871 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
872
873 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
874 device.
875
876 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
877 New function.
878
68e7fc7a 8792008-03-20 Robert Millan <rmh@aybabtu.com>
880
881 Remove 2 TiB limit in ata.mod.
882 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
883 (grub_ata_dumpinfo): Print sector count with 0x%llx.
884 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
885 grub_uint64_t instead of grub_uint32_t.
886
38ad2cf5 8872008-03-05 Bean <bean123ch@gmail.com>
888
889 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
890 (grub_multiboot): Set boot device.
891
892 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
893
2b89344e 8942008-03-02 Bean <bean123ch@gmail.com>
895
896 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
897 symlink_buffer.
898
87a95d1f 8992008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
900
901 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
902 texinfo.tex.
903
904 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
905 modified.
906
907 * docs/fdl.texi: New file.
908
909 * docs/mdate-sh: New file. Copied from gnulib.
910 * docs/texinfo.tex: Likewise.
911
912 * config.guess: Updated from gnulib.
913 * install-sh: Likewise.
914
7dc15d8e 9152008-02-28 Robert Millan <rmh@aybabtu.com>
916
917 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
918 (aout_mod_SOURCES): New variable.
919 (aout_mod_CFLAGS): Likewise.
920 (aout_mod_LDFLAGS): Likewise.
921
922 * conf/i386-ieee1275.rmk: Likewise.
923
b00ab696 9242008-02-28 Robert Millan <rmh@aybabtu.com>
925
926 * util/update-grub.in: Reorganise terminal validity check. Accept
927 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
928 Based on suggestion by Franklin PIAT.
929
79ca2d78 9302008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
931
932 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
933 function.
934 * util/getroot.c (grub_util_check_block_device): New function that
935 returns the given argument if it is a block device and returns NULL else.
936 * util/grub-probe.c (argument_is_device): New variable.
937 (probe): Promote device_name from a variable to an argument. Receive
938 device_name from grub_util_check_block_device() if path is NULL and from
939 grub_guess_root_device() else. Do not free() device_name anymore.
940 (options): Introduce new parameter '-d, --device'.
941 (main): Add description of the new parameter to the help screen.
942 Rename path variable to argument. Set argument_is_device if the '-d'
943 option is given. Pass argument to probe() depending on
944 argument_is_device.
945
0d16e571 9462008-02-24 Bean <bean123ch@gmail.com>
947
948 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
949 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
950 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
951 (GRUB_ISO9660_VOLDESC_PART): Likewise.
952 (GRUB_ISO9660_VOLDESC_END): Likewise.
953 (grub_iso9660_primary_voldesc): New member escape.
954 (grub_iso9660_data): New member joliet.
955 (grub_iso9660_convert_string): New function.
956 (grub_iso9660_mount): Detect joliet extension.
957 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
958 (grub_iso9660_iso9660_label): Likewise.
959
960 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
961 (grub_setup_SOURCES): Add fs/udf.c.
962 (grub_fstest_SOURCES): Likewise.
963 (udf_mod_SOURCES): New variable.
964 (udf_mod_CFLAGS): Likewise.
965 (udf_mod_LDFLAGS): Likewise.
966
967 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
968 (grub_emu_SOURCES): Likewise.
969
970 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
971
972 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
973
974 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
975
976 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
977
978 * fs/udf.c: New file.
979
8a594a17 9802008-02-24 Robert Millan <rmh@aybabtu.com>
981
982 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
983 (normal/lexer.c_DEPENDENCIES): New variables.
984 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
985 (normal/lexer.c_DEPENDENCIES): Likewise.
986 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
987 (normal/lexer.c_DEPENDENCIES): Likewise.
988 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
989 (normal/lexer.c_DEPENDENCIES): Likewise.
990 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
991 (normal/lexer.c_DEPENDENCIES): Likewise.
992 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
993 (normal/lexer.c_DEPENDENCIES): Likewise.
994
2dc33c03 9952008-02-23 Robert Millan <rmh@aybabtu.com>
996
997 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
998 since they were intended to be in hex. This didn't break previously
999 because of a bug in gpt_partition_map_iterate() (see below).
1000
1001 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
1002 when checking the validity of GPT header.
1003 Remove `partno', since it always provides the same information as `i'.
1004
f6f4cfb0 10052008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
1006
1007 * include/grub/efi/time.h: Fix a wrong comment.
1008
79ff665f 10092008-02-19 Pavel Roskin <proski@gnu.org>
1010
1011 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
1012 message.
1013
d38e24c2 10142008-02-19 Bean <bean123ch@gmail.com>
1015
1016 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
1017 (aout_mod_SOURCES): New variable.
1018 (aout_mod_CFLAGS): Likewise.
1019 (aout_mod_LDFLAGS): Likewise.
1020 (_bsd_mod_SOURCES): New variable.
1021 (_bsd_mod_CFLAGS): Likewise.
1022 (_bsd_mod_LDFLAGS): Likewise.
1023 (bsd_mod_SOURCES): New variable.
1024 (bsd_mod_CFLAGS): Likewise.
1025 (bsd_mod_LDFLAGS): Likewise.
1026
1027 * include/grub/aout.h: New file.
1028
1029 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
1030
1031 * include/grub/i386/bsd.h: New file.
1032
1033 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
1034 to make it public.
1035
1036 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
1037 function is called, so that it's possible to change it inside the hook.
1038 (grub_elf64_load): Likewise.
1039 (grub_elf_file): Don't close the file if elf header is not found.
1040 (grub_elf_close): Close the file if grub_elf_file fails (The new
1041 grub_elf_file won't close it).
1042 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
1043 (grub_elf64_size): Likewise.
1044
1045 * kern/i386/loader.S (grub_unix_real_boot): New function.
1046
1047 * loader/aout.c: New file.
1048
1049 * loader/i386/bsd.c: New file.
1050
1051 * loader/i386/bsd_normal.c: New file.
1052
1053 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
1054
1055 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
1056 can test othe formats.
1057
b93bdb0f 10582008-02-19 Robert Millan <rmh@aybabtu.com>
1059
1060 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
1061 (grub_gpt_partition_type_empty): Redefine with macro from
1062 `<grub/gpt_partition.h>'.
1063 (gpt_partition_map_iterate): Adjust partition type comparison.
1064
1065 Export `entry' as partmap-specific `part.data' struct.
1066 (grub_gpt_header, grub_gpt_partentry): Move from here ...
1067
1068 * include/grub/gpt_partition.h (grub_gpt_header)
1069 (grub_gpt_partentry): ... to here (new file).
1070
1071 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
1072
1073 (grub_gpt_partition_type_bios_boot): New const variable, defined
1074 with macro from `<grub/gpt_partition.h>'.
1075
1076 (setup): Replace `first_start' with `embed_region', which keeps
1077 track of the embed region (and is partmap-agnostic).
1078
1079 Replace find_first_partition_start() with find_usable_region(),
1080 which finds a usable region for embedding using partmap-specific
1081 knowledge (supports PC/MSDOS and GPT).
1082
1083 Fix all assumptions that the embed region start at sector 1, using
1084 `embed_region.start' from now on. Similarly, use `embed_region.end'
1085 rather than `first_start' to calculate available size.
1086
1087 In grub_util_info() message, replace "into after the MBR" with an
1088 indication of the specific sector our embed region starts at.
1089
66cb40f6 10902008-02-19 Robert Millan <rmh@aybabtu.com>
1091
1092 * DISTLIST: Replace `commands/ieee1275/halt.c' and
1093 `commands/ieee1275/reboot.c' with `commands/halt.c' and
1094 `commands/reboot.c'.
1095 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1096 (halt_mod_SOURCES): Likewise.
1097 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1098 (halt_mod_SOURCES): Likewise.
1099
b7202015 11002008-02-17 Christian Franke <franke@computer.org>
1101
1102 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
1103
32b0fc49 11042008-02-17 Robert Millan <rmh@aybabtu.com>
1105
1106 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1107 set `first_start' to 0 for non-PC/MSDOS partition maps.
1108
aca63502 11092008-02-16 Robert Millan <rmh@aybabtu.com>
1110
1111 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1112 do not assume partition map is PC/MSDOS before performing checks that
1113 are specific to that layout.
1114
0de8be86 11152008-02-13 Robert Millan <rmh@aybabtu.com>
1116
1117 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
1118 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
1119 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
1120
c3db8364 11212008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
1122
1123 * configure.ac: Only a cosmetic change on the handling of
1124 -fno-stack-protector.
1125
f714229e 11262008-02-12 Alexandre Boeglin <alex@boeglin.org>
1127
c3db8364 1128 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
1129 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
1130 reboot.c.
f714229e 1131 (grub_install_SOURCES): Add halt.mod and reboot.mod.
1132 (halt_mod_SOURCES): New variable.
1133 (halt_mod_CFLAGS): Likewise.
1134 (halt_mod_LDFLAGS): Likewise.
1135 (reboot_mod_SOURCES): Likewise.
1136 (reboot_mod_CFLAGS): Likewise.
1137 (reboot_mod_LDFLAGS): Likewise.
1138
c3db8364 1139 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
1140 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
1141 reboot.c.
f714229e 1142 (halt_mod_SOURCES): Likewise.
1143 (reboot_mod_SOURCES): Likewise.
1144
c3db8364 1145 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
1146 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 1147 (reboot_mod_SOURCES): Likewise.
1148
1149 * commands/i386/pc/reboot.c: merge this file ...
1150
1151 * commands/ieee1275/reboot.c: ... and this file ...
1152
1153 * commands/reboot.c: ... to this file.
c3db8364 1154 Add some precompiler directive to include the correct header for
1155 each machine.
f714229e 1156
1157 * commands/ieee1275/halt.c: move this file ...
1158
1159 * commands/halt.c: ... to here.
c3db8364 1160 Add some precompiler directive to include the correct header for
1161 each machine.
f714229e 1162
1163 * include/grub/efi/efi.h (grub_reboot): New function declaration.
1164 (grub_halt): Likewise.
1165
1166 * kern/efi/efi.c (grub_reboot): New function.
1167 (grub_halt): Likewise.
1168
c74493e0 11692008-02-12 Robert Millan <rmh@aybabtu.com>
1170
1171 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
1172 /dev (like it is done for /dev/mapper). This doesn't provide support
1173 for EVMS, but at least it is now easy to identify the problem when it
1174 arises.
1175
d0db4b04 11762008-02-11 Robert Millan <rmh@aybabtu.com>
1177
1178 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
1179 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
1180 comparing it with -1, not 0.
1181
bf748642 11822008-02-10 Robert Millan <rmh@aybabtu.com>
1183
1184 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
1185 `disk/lvm.c'.
1186 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1187 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1188
1189 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
1190 `disk/lvm.c' to the end of the list.
1191 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1192 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1193
b5db202a 11942008-02-10 Robert Millan <rmh@aybabtu.com>
1195
1196 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
1197 grub_print_error() instead. This will let user know why we're entering
1198 rescue mode.
1199 Based on suggestions from Sam Morris.
1200
83abee31 12012008-02-10 Alexandre Boeglin <alex@boeglin.org>
1202
1203 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
1204 on remaining N args, instead of "--" arg N times.
1205
78d5a08b 12062008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
1207
1208 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
1209 (fill_with_default_glyph): Changed to use unknown_glyph for fill
1210 pattern for unknown glyphs.
1211
68807e5f 12122008-02-09 Robert Millan <rmh@aybabtu.com>
1213
1214 * configure.ac: Probe for `help2man'.
1215 * Makefile.in (builddir): New variable.
1216 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
1217 or otherwise add a few flags/options to it.
1218 (install-local): For every executable utility or script that is
1219 installed, invoke $(HELP2MAN) to install a manpage based on --help
1220 output.
1221
1222 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
1223 that it doesn't prevent --help from working in build tree.
1224
1225 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
1226 with `bug-grub@gnu.org'.
1227 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
1228 * util/update-grub.in (usage): New function.
1229 Implement proper argument check, with support for --help and --version
1230 (as well as existing -y).
1231
12322008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 1233
1234 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
1235 avoid overwriting previous output.
1236 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
1237
c1962162 12382008-02-09 Robert Millan <rmh@aybabtu.com>
1239
1240 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
1241 drawing the menu.
1242
3dac2e3f 12432008-02-09 Robert Millan <rmh@aybabtu.com>
1244
1245 * commands/sleep.c: New file.
1246 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
1247 (sleep_mod_SOURCES): New variable.
1248 (sleep_mod_CFLAGS): Likewise.
1249 (sleep_mod_LDFLAGS): Likewise.
1250
7a634e08 12512008-02-09 Robert Millan <rmh@aybabtu.com>
1252
1253 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
1254 situations in which we can deduce the RAID size and the superblock
1255 doesn't match it.
1256
b92f0c18 12572008-02-09 Robert Millan <rmh@aybabtu.com>
1258
1259 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
1260 and return a grub_diskmemberlist_t composed of LVM physical volumes.
1261 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
1262
1263 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
1264 and return a grub_diskmemberlist_t composed of physical array members.
1265 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
1266
1267 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
1268 prototype.
1269 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
1270 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
1271 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
1272
1273 * util/grub-probe.c (probe): Move partmap probing code from here ...
1274 (probe_partmap): ... to here.
1275 (probe): Use probe_partmap() once for the disk we're probing, and
1276 additionally, when such disk contains a memberlist() struct member,
1277 once for each disk that is contained in the structure returned by
1278 memberlist().
1279
91a4bf68 12802008-02-09 Robert Millan <rmh@aybabtu.com>
1281
1282 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
1283 environment variable to 'all' in order to obtain debug output from
1284 non-util/ code.
1285 * util/i386/pc/grub-setup.c (main): Likewise.
1286
a96f9caa 12872008-02-08 Robert Millan <rmh@aybabtu.com>
1288
1289 * disk/raid.c (grub_raid_scan_device): Check for
1290 `array->device[sb.this_disk.number]' rather than for
1291 `array->device[sb.this_disk.number]->name', since the latter is not
1292 garanteed to be accessible.
1293
b37a9222 12942008-02-08 Robert Millan <rmh@aybabtu.com>
1295
1296 * disk/raid.c: Update copyright.
1297 * fs/cpio.c: Likewise.
1298 * include/grub/raid.h: Likewise.
1299 * loader/i386/pc/multiboot.c: Likewise.
1300 * util/hostfs.c: Likewise.
1301
5626aee1 13022008-02-08 Robert Millan <rmh@aybabtu.com>
1303
1304 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
1305 to a grub_disk_t array.
1306 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
1307 `device[x]'.
1308 (grub_raid_scan_device): Replace `device[x].name' accesses with
1309 `device[x]->name'. Simplify initialization of `array->device[x]'.
1310
554f0187 13112008-02-08 Robert Millan <rmh@aybabtu.com>
1312
1313 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
1314 grub_dprintf() calls.
1315 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
1316 error message.
1317
1ec8425d 13182008-02-07 Christian Franke <franke@computer.org>
1319
1320 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
1321 instead of fseek and ftell to support large files.
1322 (grub_hostfs_read): Likewise.
1323
f2156fda 13242008-02-07 Robert Millan <rmh@aybabtu.com>
1325
1326 Patch from Jeroen Dekkers.
1327 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
1328 failure, since succesfuly reading all array members might not be
1329 required.
1330
9216e0e7 13312008-02-06 Robert Millan <rmh@aybabtu.com>
1332
1333 * util/grub-probe.c (probe): Simplify partmap probing (with the
1334 assumption that the first word up to the underscore equals to
1335 the module name).
1336
b0dfd29a 13372008-02-06 Christian Franke <franke@computer.org>
1338
1339 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
1340 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
1341 last block of a cpio or tar stream.
1342 Check for "TRAILER!!!" instead of any empty data
1343 block to detect last block of a cpio stream.
1344 (grub_cpio_dir): Fix constness of variable np.
1345 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
1346 cpio or tar trailer is detected. This fixes a crash
1347 on open of a non existing file.
1348
c32865bf 13492008-02-05 Bean <bean123ch@gmail.com>
1350
1351 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
1352 address of entry.
1353 (grub_multiboot_load_elf64): Likewise.
1354 (grub_multiboot): Initialize mbi structure.
1355
1356 * util/grub-fstest.c: Don't include unused header file script.h.
1357
1358 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
1359 of file.
1360 (grub_fstest_SOURCES): Likewise.
1361
409480b7 13622008-02-05 Robert Millan <rmh@aybabtu.com>
1363
1364 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
1365 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
1366 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
1367 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
1368
1369 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
1370 (translation_table): Replace hardcoded values with macros
1371 provided by `<grub/term.h>'.
1372
1373 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
1374 (keyboard_map): Correct/add a few values, with macros provided
1375 by `<grub/term.h>'.
1376 (keyboard_map_shift): Zero values that don't differ from their
1377 `keyboard_map' equivalents.
1378 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
1379 Discard the second scan code that is always sent by Caps lock.
1380 Only use `keyboard_map_shift' when it provides a non-zero value,
1381 otherwise fallback to `keyboard_map'.
1382
99fadbaa 13832008-02-04 Bean <bean123ch@gmail.com>
1384
1385 * Makefile.in (enable_grub_fstest): New variable.
1386
1387 * conf/common.rmk (grub_fstest_init.lst): New rule.
1388 (grub_fstest_init.h): Likewise.
1389 (grub_fstest_init.c): Likewise.
1390 (util/grub-fstest.c_DEPENDENCIES): New variable.
1391 (grub_fstest_SOURCES): Likewise.
1392
1393 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
1394
1395 * util/grub-fstest.c: New file.
1396
bf567c50 13972008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1398
1399 Make grub-setup handle a separate root device.
1400
1401 * util/i386/pc/grub-setup.c (setup): Always open the root device,
1402 so that the root device can be compared with the destination
1403 device.
1404 When embedding the core image, if the root and destination devices
1405 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
1406 0xFF.
1407 When not embedding, set ROOT_DRIVE to 0xFF.
1408
9be6b98b 14092008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1410
1411 Add support for having a grub directory in a different drive. This
1412 is still only the data handling part.
1413
1414 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
1415 (codestart): Save %dh in GRUB_ROOT_DRIVE.
1416 (grub_root_drive): New variable.
1417
1418 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
1419 instead of GRUB_BOOT_DRIVE to construct a device name. Set
1420 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
1421 as it was.
1422
1423 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
1424
1425 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
1426 macro.
1427 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
1428
1429 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
1430 is bogus, because PXE booting does not specify any drive
1431 correctly.
1432
1433 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
1434 am not sure if this is really correct.
1435
1436 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
1437 is always identical to the boot drive when booting from a CD.
1438
1439 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
1440 longer.
1441 (root_drive): New variable.
1442 (real_start): Unconditionally set %dh to ROOT_DRIVE.
1443 (setup_sectors): Push %dx right after popping it, because %dh will
1444 be modified later.
1445 (copy_buffer): Restore %dx.
1446
e0ca0677 14472008-02-03 Robert Millan <rmh@aybabtu.com>
1448
1449 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
1450 use `cdboot.img' for cdrom images.
1451
3b3f6629 14522008-02-03 Robert Millan <rmh@aybabtu.com>
1453
1454 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
1455 only setup gfxterm when `font' command has succeeded.
1456
d42b3672 14572008-02-03 Robert Millan <rmh@aybabtu.com>
1458
1459 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
1460 (grub_rescue_cmd_multiboot_loader)
1461 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
1462
fa370ea6 14632008-02-03 Pavel Roskin <proski@gnu.org>
1464
e0c5dacb 1465 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 1466 %edx and %esi from stack only after grub_gate_a20() is called.
1467 grub_gate_a20() clobbers %edx.
1468
f2a76e1d 14692008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1470
1471 * configure.ac (AC_INIT): Bumped to 1.96.
1472
1473 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
1474 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
1475 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
1476 video/readers/png.c.
1477
90fd32d1 14782008-02-03 Bean <bean123ch@gmail.com>
9be665dd 1479
1480 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
1481 (cdboot_img_SOURCES): New variable.
1482 (cdboot_img_ASFLAGS): New variable.
1483 (cdboot_img_LDFLAGS): New variable.
1484
1485 * boot/i386/pc/cdboot.S: New file.
1486
1487 * disk/i386/pc/biosdisk.c (cd_start): New variable.
1488 (cd_count): Likewise.
1489 (grub_biosdisk_get_drive): Add support for cd device.
1490 (grub_biosdisk_call_hook): Likewise.
1491 (grub_biosdisk_iterate): Likewise.
1492 (grub_biosdisk_open): Likewise.
1493 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
1494 (grub_biosdisk_rw): Support reading from cd device.
1495 (GRUB_MOD_INIT): Iterate cd devices.
1496
1497 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
1498 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
1499 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
1500
1501 * kern/i386/pc/init.c (make_install_device): Check for cd device.
1502
4020aa53 15032008-02-02 Robert Millan <rmh@aybabtu.com>
1504
1505 * commands/read.c: New file.
1506 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
1507 (read_mod_SOURCES): New variable.
1508 (read_mod_CFLAGS): Likewise.
1509 (read_mod_LDFLAGS): Likewise.
1510
e03a1132 15112008-02-02 Robert Millan <rmh@aybabtu.com>
1512
1513 * normal/main.c (grub_normal_execute): Check for `menu->size' when
1514 determining whether menu has to be displayed.
1515
58c69220 15162008-02-02 Marco Gerards <marco@gnu.org>
1517
1518 * bus/pci.c: New file.
1519
1520 * include/grub/pci.h: Likewise.
1521
1522 * include/grub/i386/pc/pci.h: Likewise.
1523
1524 * commands/lspci.c: Likewise.
1525
1526 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
1527 `lspci.mod'.
1528 (pci_mod_SOURCES): New variable.
1529 (pci_mod_CFLAGS): Likewise.
1530 (pci_mod_LDFLAGS): Likewise.
1531 (lspci_mod_SOURCES): Likewise.
1532 (lspci_mod_CFLAGS): Likewise.
1533 (lspci_mod_LDFLAGS): Likewise.
1534
c004e1b4 15352008-02-02 Bean <bean123ch@gmail.com>
1536
1537 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
1538 (grub_ufs_get_file_block): Fix indirect block calculation problem.
1539
1540 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
1541 (grub_xfs_btree_node): New structure.
1542 (grub_xfs_btree_root): New structure.
1543 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
1544 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
1545 (GRUB_XFS_EXTENT_BLOCK): Likewise.
1546 (GRUB_XFS_EXTENT_SIZE): Likewise.
1547 (grub_xfs_read_block): Support btree format type.
1548 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
1549 Use directory block as basic unit.
1550
1551 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
1552
1553 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
1554 __attribute__ ((__regparm__ (1))).
1555
f95562bf 15562008-02-01 Robert Millan <rmh@aybabtu.com>
1557
1558 Correct a mistake in previous commit.
1559
1560 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
1561 top.
1562 (normal/command.c_DEPENDENCIES): New variable.
1563
7d31f41f 15642008-02-01 Robert Millan <rmh@aybabtu.com>
1565
1566 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
1567 top.
1568 (normal/command.c_DEPENDENCIES): New variable.
1569 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
1570 * conf/i386-ieee1275.rmk: Likewise.
1571 * conf/i386-linuxbios.rmk: Likewise.
1572 * conf/i386-pc.rmk: Likewise.
1573 * conf/sparc64-ieee1275.rmk: Likewise.
1574 * conf/powerpc-ieee1275.rmk: Likewise.
1575 (grub_emu_SOURCES): Add `fs/fshelp.c'.
1576
1577 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
1578
60b6be74 15792008-02-01 Robert Millan <rmh@aybabtu.com>
1580
1581 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
1582 call at beginning of function.
1583
078522ab 15842008-01-31 Pavel Roskin <proski@gnu.org>
1585
1586 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 1587 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
1588 (grub_mkrescue_SOURCES): Likewise.
078522ab 1589 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
1590
ccaa8a5f 15912008-01-30 Robert Millan <rmh@aybabtu.com>
1592
1593 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
1594 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
1595 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
1596 (grub_probe_SOURCES): ... to here.
1597
1598 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
1599 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
1600 * conf/i386-ieee1275.rmk: Likewise.
1601 * conf/i386-linuxbios.rmk: Likewise.
1602 * conf/powerpc-ieee1275.rmk: Likewise.
1603
ae5a9cd7 16042008-01-30 Tristan Gingold <gingold@free.fr>
1605
1606 * kern/rescue.c: Silently accept empty lines.
1607
70bc2ef2 16082008-01-29 Bean <bean123ch@gmail.com>
1609
1610 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
1611 (real_code_2): Code cleanup and change comment style.
1612 (move_memory): Avoid using 32-bit address mode.
1613
6a4d50ea 16142008-01-29 Bean <bean123ch@gmail.com>
1615
1616 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
1617 (png_mod_SOURCES): New variable.
1618 (png_mod_CFLAGS): Likewise.
1619 (png_mod_LDFLAGS): Likewise.
1620
1621 * video/readers/png.c: New file.
1622
11cc30ac 16232008-01-28 Robert Millan <rmh@aybabtu.com>
1624
1625 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
1626 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
1627 `ifndef GRUB_MOD_GAP' hack.
1628 * util/elf/grub-mkimage.c (add_segments): Likewise.
1629
3abc589f 16302008-01-27 Robert Millan <rmh@aybabtu.com>
1631
1632 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
1633 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 1634 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 1635
e1907778 16362008-01-27 Robert Millan <rmh@aybabtu.com>
1637
1638 Get grub-emu to build again (including parallel builds).
1639
1640 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
1641 Split into ...
1642 (util/grub-emu.c_DEPENDENCIES): ... this, ...
1643 (normal/execute.c_DEPENDENCIES): ... this, ...
1644 (grub-emu_DEPENDENCIES): ... and this.
1645
1646 * conf/i386-efi.rmk: Likewise.
1647 * conf/i386-linuxbios.rmk: Likewise.
1648 * conf/i386-ieee1275.rmk: Likewise.
1649 * conf/powerpc-ieee1275.rmk: Likewise.
1650 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
1651
2216b101 16522008-01-27 Robert Millan <rmh@aybabtu.com>
1653
1654 * NEWS: Add a few items.
1655
f75172d9 16562008-01-27 Robert Millan <rmh@aybabtu.com>
1657
1658 Fix parallel builds with grub-emu. Based on earlier commit for
1659 grub-probe and grub-setup.
1660
1661 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1662 (util/grub-emu.c_DEPENDENCIES): ... this.
1663 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1664 (util/grub-emu.c_DEPENDENCIES): ... this.
1665 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1666 (util/grub-emu.c_DEPENDENCIES): ... this.
1667 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1668 (util/grub-emu.c_DEPENDENCIES): ... this.
1669 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1670 (util/grub-emu.c_DEPENDENCIES): ... this.
1671
3f51de77 16722008-01-27 Pavel Roskin <proski@gnu.org>
1673
1674 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
1675 to create a gap between _end and the modules added to the image
1676 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
1677 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
1678 * util/elf/grub-mkimage.c (add_segments): Likewise.
1679
2033f53e 16802008-01-26 Pavel Roskin <proski@gnu.org>
1681
1682 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
1683 just return an error.
1684
22da1f6f 16852008-01-26 Bean <bean123ch@gmail.com>
1686
1687 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
1688 (grub_reiserfs_get_item): Save offset of the next item.
1689 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
1690
2a9525e6 16912008-01-25 Robert Millan <rmh@aybabtu.com>
1692
1693 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
1694 make all filesystem sources appear together (possibly fixing omissions
1695 while at it).
1696 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1697 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1698 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1699 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1700
1701 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
1702 add `kern/file.c'.
1703 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
1704 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1705 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
1706 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1707
1708 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
1709 (probe): Add a sanity check to make sure of our ability to read
1710 requested files when probing for filesystem type.
1711
1712 * genmk.rb: Update copyright year (2007).
1713
1714 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
1715 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
1716 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
1717 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
1718 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
1719 : Remove function prototypes.
1720
b95f71b5 17212008-01-25 Robert Millan <rmh@aybabtu.com>
1722
1723 Revert my previous commits (based on wrong assumption of how grub_errno
1724 works).
1725
1726 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
1727 * kern/file.c (grub_file_open): Likewise.
1728
d08bbb49 17292008-01-24 Pavel Roskin <proski@gnu.org>
1730
1731 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
1732 that hang if GRUB tries to setup colors.
1733 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
1734 colors for firmwares that don't support it.
1735 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
1736 Recognize Open Hack'Ware, set flags to work around its
1737 limitations.
1738
605e36ed 17392008-01-24 Robert Millan <rmh@aybabtu.com>
1740
1741 * kern/file.c (grub_file_open): Do not account previous failures of
1742 unrelated functions when grub_errno is checked for.
1743 Reported by Oleg Strikov.
1744
bac332a1 17452008-01-24 Bean <bean123ch@gmail.com>
1746
1747 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
1748 (grub_ufs_sblock): New member volume name.
1749 (grub_ufs_find_file): Fix string copy bug.
1750 (grub_ufs_label): Implement this function properly.
1751
1752 * fs/hfs.c (grub_hfs_cnid_type): New enum.
1753 (grub_hfs_iterate_records): Use the correct file number for extents
1754 and catalog file. Fix problem in next index calculation.
1755 (grub_hfs_find_node): Replace recursive function call with loop.
1756 (grub_hfs_iterate_dir): Replace recursive function call with loop.
1757
15c80c09 17582008-01-23 Robert Millan <rmh@aybabtu.com>
1759
1760 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1761 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1762 (grub_multiboot2_real_boot): New function prototype.
1763
1764 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1765 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1766
1767 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1768 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1769
305338fd 17702008-01-23 Robert Millan <rmh@aybabtu.com>
1771
1772 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1773 #ifdef'ed out grub_printf().
1774
3ea52685 17752008-01-23 Robert Millan <rmh@aybabtu.com>
1776
1777 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1778 grub_dprintf calls, since they make "debug=all" mode unusable.
1779 (grub_console_checkkey): Likewise.
1780
5882ae4b 17812008-01-23 Robert Millan <rmh@aybabtu.com>
1782
1783 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1784 `term/i386/pc/at_keyboard.c'.
1785 (pkglib_MODULES): Add `serial.mod'.
1786 (serial_mod_SOURCES): New variable.
1787 (serial_mod_CFLAGS): Likewise.
1788 (serial_mod_LDFLAGS): Likewise.
1789
1790 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1791 `<grub/powerpc/ieee1275/console.h>'.
1792 (grub_keyboard_controller_init): New function prototype.
1793 (grub_console_checkkey): Likewise.
1794 (grub_console_getkey): Likewise.
1795
1796 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1797 keyboard on i386.
1798
1799 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1800 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1801
06ab5303 18022008-01-23 Robert Millan <rmh@aybabtu.com>
1803
1804 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1805 present, "(memdisk)/boot/grub" becomes the default prefix.
1806
1807 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1808 a memdisk tarball with all the modules. Add --overlay=DIR option that
1809 allows users to overlay additional files into the image.
1810
dbb475a4 18112008-01-23 Robert Millan <rmh@aybabtu.com>
1812
1813 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1814 and `machine/memory.h'.
1815 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1816 (_multiboot_mod_SOURCES): New variable.
1817 (_multiboot_mod_CFLAGS): Likewise.
1818 (_multiboot_mod_LDFLAGS): Likewise.
1819 (multiboot_mod_SOURCES): Likewise.
1820 (multiboot_mod_CFLAGS): Likewise.
1821 (multiboot_mod_LDFLAGS): Likewise.
1822
1823 * include/grub/i386/ieee1275/loader.h: New file.
1824
1825 * include/grub/i386/ieee1275/machine.h: Likewise.
1826
1827 * include/grub/i386/ieee1275/memory.h: Likewise.
1828
1829 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1830 variable declaration.
1831 (grub_os_area_size): Likewise.
1832
1833 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1834 (grub_lower_mem, grub_upper_mem): New variables.
1835 (grub_stop_floppy): New function (just to make
1836 grub_multiboot2_real_boot() happy).
1837
1838 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1839 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1840 (grub_stop): New function.
1841 Include `"../realmode.S"' and `"../loader.S"'.
1842
1843 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1844 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1845
1846 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1847 rely on grub_multiboot2_real_boot() for final boot.
1848
25638629 18492008-01-22 Robert Millan <rmh@aybabtu.com>
1850
1851 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1852 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1853 device that doesn't look like an SD card.
1854 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1855 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1856 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1857 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1858 found.
1859
9dad816d 18602008-01-22 Robert Millan <rmh@aybabtu.com>
1861
1862 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1863 avoid claiming over our own code.
1864
34842f2d 18652008-01-22 Bean <bean123ch@gmail.com>
1866
1867 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1868 (jpeg_mod_SOURCES): New variable.
1869 (jpeg_mod_CFLAGS): Likewise.
1870 (jpeg_mod_LDFLAGS): Likewise.
1871
1872 * video/readers/jpeg.c : New file.
1873
44023a28 18742008-01-22 Bean <bean123ch@gmail.com>
1875
1876 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1877 there are no more items.
1878
bc2d8ac6 18792008-01-21 Robert Millan <rmh@aybabtu.com>
1880
1881 * kern/mm.c (grub_mm_init_region): Improve debug message.
1882
261bd4bc 18832008-01-21 Robert Millan <rmh@aybabtu.com>
1884
1885 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1886 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1887 address.
1888 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1889 a C macro.
1890 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1891 Indicates start of upper memory.
1892 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1893 (generate_image): Abort when image size is big enough to corrupt
1894 upper memory.
1895
1896 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1897 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1898 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1899 instead of hardcoding 0xA0000.
1900 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1901 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1902 instead of hardcoding 0xA0000.
1903
f970b55e 19042008-01-21 Robert Millan <rmh@aybabtu.com>
1905
1906 * disk/memdisk.c (memdisk_size): New variable.
1907 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1908 `memdisk_size'.
1909 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1910 image to dynamic memory.
1911 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1912 `memdisk_size'. Free memdisk block.
1913
1a8b0526 19142008-01-21 Robert Millan <rmh@aybabtu.com>
1915
1916 Fix detection of very small filesystems (like tar).
1917
1918 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1919 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1920 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1921 a problem with this disk).
1922
6e9b4aab 19232008-01-21 Robert Millan <rmh@aybabtu.com>
1924
1925 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1926 on grub_biosdisk_rw_standard() error.
1927
0d8837b2 19282008-01-21 Robert Millan <rmh@aybabtu.com>
1929
1930 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1931 recent changes.
1932 * kern/elf.c: Likewise.
1933 * kern/ieee1275/ieee1275.c: Likewise.
1934 * kern/powerpc/ieee1275/openfw.c: Likewise.
1935 * term/ieee1275/ofconsole.c: Likewise.
1936
ffd36e34 19372008-01-21 Robert Millan <rmh@aybabtu.com>
1938
1939 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1940
3f0093d0 1941 * include/grub/kernel.h (grub_arch_memdisk_addr)
1942 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 1943
3f0093d0 1944 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1945 (grub_arch_memdisk_size): ... to here.
ffd36e34 1946
6c391b21 19472008-01-21 Robert Millan <rmh@aybabtu.com>
1948
1949 Mostly based on bugfix from Bean.
1950
1951 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1952 attribute with hook() parameter.
1953 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1954 declaration.
1955 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1956 attribute with hook() parameter.
1957 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1958 declaration.
1959
55a581dc 19602008-01-21 Robert Millan <rmh@aybabtu.com>
1961
1962 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1963 (pkglib_MODULES): Add `memdisk.mod'.
1964 (memdisk_mod_SOURCES): New variable.
1965 (memdisk_mod_CFLAGS): Likewise.
1966 (memdisk_mod_LDFLAGS): Likewise.
1967
1968 * disk/memdisk.c: New file.
1969
1970 * include/grub/disk.h (grub_disk_dev_id): Add
1971 `GRUB_DISK_DEVICE_MEMDISK_ID'.
1972
1973 * include/grub/i386/pc/kernel.h
1974 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1975 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1976 (grub_kernel_image_size): New variable declaration.
1977 (grub_total_module_size): Likewise.
1978 (grub_memdisk_image_size): Likewise.
1979
1980 * include/grub/i386/pc/memory.h
1981 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1982
1983 * include/grub/kernel.h: Include `<grub/symbol.h>'.
1984 (grub_arch_memdisk_addr): New variable declaration.
1985 (grub_arch_memdisk_size): Likewise.
1986
1987 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1988 (grub_arch_memdisk_size): Likewise.
1989
1990 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1991 (codestart): Replace hardcoded `0x100000' with
1992 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1993
1994 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1995 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
1996 not NULL, append the contents of the file it refers to, at the end of
1997 the compressed kernel image. Initialize `grub_memdisk_image_size'
1998 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1999 (options): Add "memdisk"|'m' option.
2000 (main): Parse --memdisk|-m option, and pass user-provided path as
2001 parameter to generate_image().
2002
3d7f54c9 20032008-01-20 Robert Millan <rmh@aybabtu.com>
2004
2005 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
2006 grub_dprintf() calls from here ...
2007 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
2008
0bf74728 20092008-01-20 Robert Millan <rmh@aybabtu.com>
2010
2011 Fix detection of "real mode" when /options/real-mode? doesn't exist.
2012
2013 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
2014 declaration.
2015 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
2016 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
2017 `GRUB_IEEE1275_FLAG_REAL_MODE'.
2018 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
2019 property).
2020 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
2021 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
2022
33bf70a7 20232008-01-19 Robert Millan <rmh@aybabtu.com>
2024
2025 Get rid of confusing function (superceeded by
2026 `grub_ieee1275_get_integer_property')
2027 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
2028 prototype.
2029 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
2030 function.
2031 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
2032 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
2033 in native endianess from grub_ieee1275_get_integer_property().
2034
e2da7d26 20352008-01-19 Robert Millan <rmh@aybabtu.com>
2036
2037 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
2038 command after "shut-down", since implementations differ on which
2039 the command for halt is.
2040
59f1fd8d 20412008-01-19 Robert Millan <rmh@aybabtu.com>
2042
2043 * include/grub/i386/linuxbios/console.h: Add header protection.
2044 (grub_keyboard_controller_init): New function prototype.
2045 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
2046 (KEYBOARD_COMMAND_READ): Likewise.
2047 (KEYBOARD_COMMAND_WRITE): Likewise.
2048 (KEYBOARD_SCANCODE_SET1): Likewise.
2049 (grub_keyboard_controller_write): New function.
2050 (grub_keyboard_controller_read): Likewise.
2051 (grub_keyboard_controller_init): Likewise.
2052
2053 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
2054 (grub_console_init): On coreboot/LinuxBIOS, call
2055 grub_keyboard_controller_init().
2056
5f5a7c15 20572008-01-19 Robert Millan <rmh@aybabtu.com>
2058
2059 PowerPC changes provided by Pavel Roskin.
2060
2061 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
2062 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
2063 don't rely on cmain() doing it.
2064 * kern/i386/ieee1275/startup.S (_start): Store %eax in
2065 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
2066
1210e168 20672008-01-16 Robert Millan <rmh@aybabtu.com>
2068
2069 * include/grub/i386/linuxbios/memory.h
2070 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
2071 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
2072 receive `table_header' as argument. Instead, probe for it in the
2073 known memory ranges where it can be present.
2074 (grub_available_iterate): Do not pass a fixed `table_header' address
2075 to grub_linuxbios_table_iterate().
2076
3d04eab8 20772008-01-15 Robert Millan <rmh@aybabtu.com>
2078
2079 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
2080 * conf/i386-ieee1275.rmk: New file.
2081 * include/grub/i386/ieee1275/console.h: Likewise.
2082 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
2083 * include/grub/i386/ieee1275/kernel.h: Likewise.
2084 * include/grub/i386/ieee1275/time.h: Likewise.
2085 * kern/i386/ieee1275/init.c: Likewise.
2086 * kern/i386/ieee1275/startup.S: Likewise.
2087
d1bc1b73 20882008-01-15 Robert Millan <rmh@aybabtu.com>
2089
2090 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
2091 when pointers are 32-bit (but still do set it to one when they are
2092 64-bit).
2093
66a65807 20942008-01-15 Robert Millan <rmh@aybabtu.com>
2095
2096 * include/grub/ieee1275/ieee1275.h
2097 (grub_ieee1275_get_integer_property): New function prototype.
2098
2099 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
2100 (grub_ieee1275_get_integer_property): New function. Wraps around
2101 grub_ieee1275_get_property() to handle endianess.
2102
2103 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
2104 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
2105 where appropiate.
2106 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
2107 (grub_map): Likewise.
2108 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
2109
a83ccafd 21102008-01-15 Bean <bean123ch@gmail.com>
2111
2112 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
2113 (grub_script_execute_cmdline): Reset grub_errno.
2114
2115 * normal/main.c (read_config_file): Reset grub_errno.
2116
2117 * normal/parse.y (script_init): New.
2118 (script): Move function and menuentry here.
2119 (delimiter): New.
2120 (command): Add delimiter at the end of command.
2121 (commands): Adjust to match the new command.
2122 (commandblock): Remove grub_script_lexer_record_start.
2123 (menuentry): Add grub_script_lexer_record_start, use the new commands.
2124 (if): Use the new commands.
2125
2126 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
2127
df6ecfc6 21282008-01-15 Robert Millan <rmh@aybabtu.com>
2129
2130 * normal/menu.c (run_menu): Move timeout message from here ...
2131 (print_timeout): ... to here.
2132 (run_menu): Use print_timeout() once during initial draw to print
2133 the whole message, and again in every clock tick to update only
2134 the number of seconds.
2135
87ae25eb 21362008-01-15 Robert Millan <rmh@aybabtu.com>
2137
2138 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
2139 actual size of `available' from grub_ieee1275_get_property(), and
2140 restrict parsing to that bound.
2141
47bf09a4 21422008-01-15 Christian Franke <franke@computer.org>
2143
2144 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
2145 (argp_program_version): Remove variable.
2146 (argp_program_bug_address): Likewise.
2147 (options): Convert from struct argp_option to struct option.
2148 (struct arguments): Remove.
2149 (parse_opt): Remove.
2150 (usage): New function.
2151 (main): Replace struct args members by simple variables.
2152 Replace argp_parse() by getopt_long().
2153 Add switch to evaluate options.
2154 Add missing "(...)" around root_dev in prefix string.
2155
c86f1469 21562008-01-14 Robert Millan <rmh@aybabtu.com>
2157
2158 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
2159 for grub_ieee1275_exit(), in order to improve portability.
2160
e622c559 21612008-01-14 Robert Millan <rmh@aybabtu.com>
2162
2163 * util/grub.d/10_linux.in (prefix): Define.
2164 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
2165
44cb1ec8 21662008-01-13 Pavel Roskin <proski@gnu.org>
2167
2168 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
2169 grub_errno if no errors have been detected.
2170
1eb8c802 21712008-01-12 Robert Millan <rmh@aybabtu.com>
2172
2173 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
2174 (grub_util_get_dev_abstraction): New function prototype.
2175
2176 * util/getroot.c: Include `<grub/util/getroot.h>'
2177 (grub_util_get_grub_dev): Move detection of abstraction type to ...
2178 (grub_util_get_dev_abstraction): ... here (new function).
2179
2180 * util/grub-probe.c: Convert PRINT_* to an enum. Add
2181 `PRINT_ABSTRACTION'.
2182 (probe): Probe for abstraction type when requested.
2183 (main): Understand `--target=abstraction'.
2184
2185 * util/i386/efi/grub-install.in: Add abstraction module to core
2186 image when it is found to be necessary.
2187 * util/i386/pc/grub-install.in: Likewise.
2188 * util/powerpc/ieee1275/grub-install.in: Likewise.
2189
2190 * util/update-grub_lib.in (font_path): Return system path without
2191 converting to GRUB path.
2192 * util/update-grub.in: Convert system path returned by font_path()
2193 to a GRUB path. Use `grub-probe -t abstraction' to determine what
2194 abstraction module is needed for loading fonts (if any). Export
2195 that as `GRUB_PRELOAD_MODULES'.
2196 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
2197 insmod commands).
2198
52bd3de9 21992008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
2200
2201 Remove some unused code from reiserfs.
2202
2203 * fs/reiserfs.c (struct grub_reiserfs_key)
2204 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
2205 (struct grub_reiserfs_node_body): Removed.
2206 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2207 Likewise.
2208 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2209 Likewise.
2210 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2211 Likewise.
2212 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2213 Likewise.
2214 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2215 Likewise.
2216 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
2217 Likewise.
2218 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2219 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2220 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2221
2f80039d 22222008-01-10 Robert Millan <rmh@aybabtu.com>
2223
2224 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
2225 Determines if a file is garbage left by packaging systems, etc.
2226 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
2227 for processing /etc/grub.d scripts.
2228 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
2229 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
2230 as a condition for processing Linux images.
2231
87888032 22322008-01-10 Pavel Roskin <proski@gnu.org>
2233
2234 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
2235 to compile reiserfs.c on PowerPC.
2236
7e54fced 22372008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 2238
2239 * kern/device.c (grub_device_iterate): Do not abort device iteration
2240 when one of the devices cannot be opened.
2241 * kern/disk.c (grub_disk_open): Do not account previous failures of
2242 unrelated functions when grub_errno is checked for.
2243
5aa541e6 22442008-01-08 Robert Millan <rmh@aybabtu.com>
2245
2246 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
2247 `! grub_linux_is_bzimage', change order of address comparison to make
2248 it more intuitive, and improve "too big zImage" error message.
2249
7076340d 22502008-01-08 Robert Millan <rmh@aybabtu.com>
2251
2252 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
2253 `$(update-grub_DATA)'.
2254 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
2255 targets.
2256
9ca70333 22572008-01-07 Robert Millan <rmh@aybabtu.com>
2258
2259 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
2260 which instruction is modified by grub-setup during installation
2261 (since it wasn't obvious by only looking at this file).
2262
38ccf575 22632008-01-07 Robert Millan <rmh@aybabtu.com>
2264
2265 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
2266 listing actual TODO items.
2267
f5db4291 22682008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2269
868967cf 2270 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
2271 correctly.
2272 (grub_reiserfs_get_key_offset): Likewise.
2273 (grub_reiserfs_set_key_offset): Likewise.
2274 (grub_reiserfs_set_key_type): Likewise.
2275 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
2276
2277 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
2278 better to remove the bitfield version completely.
2279
22802008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2281
f5db4291 2282 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
2283 allocated from the heap, due to the fshelp implementation.
2284 (grub_reiserfs_dir): Free NODE, due to the same reason.
2285
492e6d9d 22862008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2287
2288 Mostly from Vincent Pelletier:
2289
2290 * fs/reiserfs.c: New file.
2291
2292 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
2293 (reiserfs_mod_SOURCES): New variable.
2294 (reiserfs_mod_CFLAGS): Likewise.
2295 (reiserfs_mod_LDFLAGS): Likewise.
2296
2297 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
2298 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
2299 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
2300 normal/color.c.
2301
9ce3e7c1 23022008-01-06 Robert Millan <rmh@aybabtu.com>
2303
2304 * normal/color.c: Remove `<grub/env.h>'.
2305
f3b58148 23062008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
2307
2308 * include/grub/normal.h: Include <grub/env.h>.
2309
7ac3bcfa 23102008-01-05 Robert Millan <rmh@aybabtu.com>
2311
2312 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
2313 usage example with `(hd0,1)'.
fb358190 2314 Reported by Samuel Thibault.
7ac3bcfa 2315
c8ee99d7 23162008-01-05 Robert Millan <rmh@aybabtu.com>
2317
2318 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
2319 (grub_linux_boot_zimage): Rename to ...
2320 (grub_linux_boot): ... this.
2321 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
2322 (grub_linux_boot_zimage): Conditionalize zImage copy.
2323
2324 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
2325 (grub_linux_boot_bzimage): Remove prototype.
2326 (grub_linux_boot_zimage): Rename to ...
2327 (grub_linux_boot): ... this.
2328
2329 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
2330 (grub_linux_boot): Remove function.
2331
0ece25b1 23322008-01-05 Robert Millan <rmh@aybabtu.com>
2333
2334 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
2335 (grub_env_write_color_highlight): Likewise.
2336 (grub_wait_after_message): Likewise.
2337
2338 * normal/color.c: New file.
2339
2340 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2341 (normal_mod_DEPENDENCIES): Likewise.
2342
2343 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2344 (normal_mod_DEPENDENCIES): Likewise.
2345
2346 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2347 (normal_mod_DEPENDENCIES): Likewise.
2348
2349 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2350 (normal_mod_DEPENDENCIES): Likewise.
2351
2352 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
2353 for waiting after a message is printed.
2354 * normal/main.c (read_config_file): Likewise.
2355 (grub_normal_init): Register grub_env_write_color_normal() and
2356 grub_env_write_color_highlight() hooks. Mark `color_normal' and
2357 `color_highlight' variables as global.
2358
2359 * normal/menu.c (grub_wait_after_message): New function.
2360 (grub_color_menu_normal): New variable. Replaces ...
2361 (GRUB_COLOR_MENU_NORMAL): ... this macro.
2362 (grub_color_menu_highlight): New variable. Replaces ...
2363 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
2364 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
2365 `GRUB_TERM_COLOR_STANDARD'.
2366 (print_message): Use `grub_setcolorstate' to reload colors. Rename
2367 `normal_code' and `highlight_code' to `old_color_normal' and
2368 `old_color_highlight', respectively.
2369 (grub_menu_init_page): Update colors when drawing the menu, based on
2370 `menu_color_normal' and `menu_color_highlight' variables.
2371 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
2372 a message is printed.
2373
182dd4e5 23742008-01-05 Robert Millan <rmh@aybabtu.com>
2375
2376 * kern/env.c (grub_env_context_open): Propagate hooks for global
2377 variables to new context.
2378
2379 * kern/main.c (grub_set_root_dev): Export `root' variable.
2380
ddf8f6ad 23812008-01-05 Robert Millan <rmh@aybabtu.com>
2382
2383 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
2384 discs unconditionaly, since udev and others have options to provide
2385 them.
2386
d8b43d9b 23872008-01-05 Robert Millan <rmh@aybabtu.com>
2388
2389 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
2390
2bff2de3 23912008-01-04 Christian Franke <franke@computer.org>
2392
2393 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
2394 of eisa_mmap.
2395
97eab917 23962008-01-03 Pavel Roskin <proski@gnu.org>
2397
2398 * kern/i386/linuxbios/init.c: Put "void" to all function
2399 declarations with no arguments.
2400 * kern/powerpc/ieee1275/init.c: Likewise.
2401 * term/i386/pc/at_keyboard.c: Likewise.
2402 * term/i386/pc/vga_text.c: Likewise.
2403 * util/grub-mkdevicemap.c: Likewise.
2404
b9416d00 24052008-01-02 Robert Millan <rmh@aybabtu.com>
2406
2407 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
2408 message when loaded image is out of bounds.
2409 (grub_multiboot_load_elf64): Likewise.
2410
92695df9 24112008-01-02 Pavel Roskin <proski@gnu.org>
2412
2413 * util/grub.d/10_linux.in: Try version without ".old" when
2414 looking for initrd. It's better to use initrd from the newer
2415 kernel of the same version than no initrd at all.
2416
d98d9cad 24172008-01-01 Robert Millan <rmh@aybabtu.com>
2418
2419 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
2420
dbfdce36 24212008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
2422
2423 * include/grub/video.h: Added grub_video_unmap_color and
2424 grub_video_get_active_render_target.
2425 (grub_video_adapter): Added unmap_color and get_active_render_target.
2426
2427 * video/video.c: Added grub_video_unmap_color and
2428 grub_video_get_active_render_target.
2429 (grub_video_get_info): Changed method to accept NULL pointer as an
2430 argument to allow detection of active video adapter.
2431
2432 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
2433 grub_video_vbe_unmap_color_int.
2434 Added grub_video_vbe_unmap_color and
2435 grub_video_vbe_get_active_render_target.
2436 (grub_video_vbe_adapter): Added unmap_color and
2437 get_active_render_target.
2438
2439 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
2440 with grub_video_vbe_unmap_color_int.
2441
2442 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
2443 (DEFAULT_NORMAL_COLOR): Likewise.
2444 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
2445 (DEFAULT_FG_COLOR): Removed.
2446 (DEFAULT_BG_COLOR): Likewise.
2447 (DEFAULT_CURSOR_COLOR): Changed value.
2448 (grub_virtual_screen): Added standard_color_setting,
2449 normal_color_setting, highlight_color_setting and term_color.
2450 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
2451 (bitmap_width): Added.
2452 (bitmap_height): Likewise.
2453 (bitmap): Likewise.
2454 (set_term_color): Likewise.
2455 (grub_virtual_screen_setup): Changed to use new terminal coloring
2456 settings.
2457 (grub_gfxterm_init): Added init for bitmap.
2458 (grub_gfxterm_fini): Added destroy for bitmap.
2459 (redraw_screen_rect): Updated to use background bitmap and new
2460 terminal coloring.
2461 (scroll_up): Added optimization for case when there is no bitmap.
2462 (grub_gfxterm_cls): Fixed to use correct background color.
2463 (grub_virtual_screen_setcolorstate): Changed to use new terminal
2464 coloring.
2465 (grub_virtual_screen_setcolor): Likewise.
2466 (grub_virtual_screen_getcolor): Added.
2467 (grub_gfxterm_background_image_cmd): Likewise.
2468 (grub_video_term): Added setcolor and getcolor.
2469 (MOD_INIT): Added registration of background_image command.
2470 (MOD_TERM): Added unregistration for background_image command.
2471
c3c20931 24722007-12-30 Pavel Roskin <proski@gnu.org>
2473
2474 * loader/multiboot_loader.c: Fix multiboot command
2475 unregistration. Fix all typos in the word "multiboot".
2476
df266716 24772007-12-29 Pavel Roskin <proski@gnu.org>
94239199 2478
2479 * util/grub.d/10_linux.in: Refactor search for initrd. Add
2480 support for initrd names used in Fedora.
2481
fc6e896c 24822007-12-26 Bean <bean123ch@gmail.com>
2483
2484 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
2485 (cpio_mod_SOURCES): New variable.
2486 (cpio_mod_CFLAGS): Likewise.
2487 (cpio_mod_LDFLAGS): Likewise.
2488
2489 * fs/cpio.c: New file.
2490
2491 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
2492
2493 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2494
2495 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2496
2497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2498
533110ad 24992007-12-25 Robert Millan <rmh@aybabtu.com>
2500
2501 * include/grub/term.h (struct grub_term): Add `getcolor' function.
2502 (grub_getcolor): New function.
2503
2504 * kern/term.c (grub_getcolor): New function.
2505 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
2506 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
2507 (print_entry): Set normal and highlight colors to
2508 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
2509 respectively, before printing and restore them to old
2510 values afterwards.
2511 (grub_menu_init_page): Likewise. Fill an additional colored space
2512 that would otherwise be left blank.
2513
2514 * term/efi/console.c (grub_console_getcolor): New function.
2515 (struct grub_console_term.getcolor): New variable.
2516 * term/i386/pc/console.c (grub_console_getcolor): New function.
2517 (struct grub_console_term.getcolor): New variable.
2518 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
2519 (struct grub_console_term.getcolor): New variable.
2520
2521 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
2522 (struct grub_console_term.setcolor): Remove variable.
2523 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
2524 (struct grub_console_term.setcolor): Remove variable.
2525 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
2526 (struct grub_console_term.setcolor): Remove variable.
2527 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
2528 (struct grub_console_term.setcolor): Remove variable.
2529
4931827f 25302007-12-25 Robert Millan <rmh@aybabtu.com>
2531
2532 * configure.ac: Search for possible unifont.hex locations, and
2533 define UNIFONT_HEX if found.
2534
2535 * Makefile.in (UNIFONT_HEX): Define variable.
2536 (DATA): Rename to ...
2537 (PKGLIB): ... this. Update all users.
2538 (PKGDATA): New variable.
2539 (pkgdata_IMAGES): Rename to ...
2540 (pkglib_IMAGES): ... this. Update all users.
2541 (pkgdata_MODULES): Rename to ...
2542 (pkglib_MODULES): ... this. Update all users.
2543 (pkgdata_PROGRAMS): Rename to ...
2544 (pkglib_PROGRAMS): ... this. Update all users.
2545 (pkgdata_DATA): Rename to ...
2546 (pkglib_DATA): ... this. Update all users.
2547 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
2548 (unicode.pff, ascii.pff): New rules.
2549 (all-local): Add `$(PKGDATA)' dependency.
2550 (install-local): Process `$(PKGDATA)'.
2551
2552 * util/update-grub_lib.in (font_path): Search for *.pff files in
2553 a few more locations, including `${pkgdata}'.
2554
57e57e31 25552007-12-23 Robert Millan <rmh@aybabtu.com>
2556
2557 Patch from Bean <bean123ch@gmail.com>:
2558 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
2559 `size'.
2560
4bc72aa9 25612007-12-21 Bean <bean123ch@gmail.com>
2562
2563 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
2564 (ntfscomp_mod_SOURCES): New variable.
2565 (ntfscomp_mod_CFLAGS): Likewise.
2566 (ntfscomp_mod_LDFLAGS): Likewise.
2567
2568 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
2569 (grub_probe_SOURCES): Likewise.
2570 (grub_emu_SOURCES): Likewise.
2571
2572 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2573 (grub_emu_SOURCES): Likewise.
2574
2575 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2576 (grub_emu_SOURCES): Likewise.
2577
2578 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2579 (grub_emu_SOURCES): Likewise.
2580
2581 * fs/ntfs.c (grub_ntfscomp_func): New variable.
2582 (read_run_list): Renamed to grub_ntfs_read_run_list.
2583 (decomp_nextvcn): Moved to ntfscomp.c.
2584 (decomp_getch): Likewise.
2585 (decomp_get16): Likewise.
2586 (decomp_block): Likewise.
2587 (read_block): Likewise.
2588 (read_data): Partially moved to ntfscomp.c.
2589 (fixup): Change unsigned to grub_uint16_t.
2590 (read_mft): Change unsigned long to grub_uint32_t.
2591 (read_attr): Likewise.
2592 (read_data): Likewise.
2593 (read_run_data): Likewise.
2594 (read_run_list): Likewise.
2595 (read_mft): Likewise.
2596
2597 * fs/ntfscomp.c: New file.
2598
2599 * include/grub/ntfs.h: New file.
2600
af680a87 26012007-12-16 Robert Millan <rmh@aybabtu.com>
2602
2603 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
2604 IDE disk check, since Linux is known to support 20 IDE disks.
2605 Reported by Colin Watson.
2606
84be7599 26072007-12-15 Bean <bean123ch@gmail.com>
2608
2609 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
2610 (lnxboot_img_SOURCES): New variable.
2611 (lnxboot_img_ASFLAGS): Likewise.
2612 (lnxboot_img_LDFLAGS): Likewise.
2613
2614 * boot/i386/pc/lnxboot.S: New file.
2615
6af9db01 26162007-11-24 Pavel Roskin <proski@gnu.org>
2617
2618 * configure.ac: Test if '--build-id=none' is supported by the
2619 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
2620 objcopy to generate incorrect binary files (binutils
2621 2.17.50.0.18-1 as shipped by Fedora 8).
2622 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
2623 linking, so that build ID doesn't break the test.
2624
7361cfe6 26252007-11-24 Pavel Roskin <proski@gnu.org>
2626
2627 * include/grub/i386/time.h: use "void" in the argument list
2628 of grub_cpu_idle().
2629 * include/grub/powerpc/time.h: Likewise.
2630 * include/grub/sparc64/time.h: Likewise.
2631
1593e10c 26322007-11-18 Christian Franke <franke@computer.org>
2633
2634 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
2635 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
2636 This fixes the problem that function keys did not work in grub-emu.
2637
3b8db1a8 26382007-11-18 Christian Franke <franke@computer.org>
2639
2640 * disk/host.c (grub_host_open): Remove attribute unused from
2641 name parameter. Add check for "host". This fixes the problem
2642 that grub-emu does not find partitions.
2643
2e29408d 26442007-11-18 Christian Franke <franke@computer.org>
2645
2646 * util/hostfs.c (is_dir): New function.
2647 (grub_hostfs_dir): Handle missing dirent.d_type case.
2648 (grub_hostfs_read): Add missing fseek().
2649 (grub_hostfs_label): Clear label pointer. This fixes a crash
2650 of grub-emu on "ls (host)".
2651
398cd047 26522007-11-18 Christian Franke <franke@computer.org>
2653
2654 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
2655 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
2656 to 64 bit boundary by default.
2657
c405c391 26582007-11-18 Bean <bean123ch@gmail.com>
2659
2660 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
2661 (hexdump_mod_SOURCES): New variable.
2662 (hexdump_mod_CFLAGS): Likewise.
2663 (hexdump_mod_LDFLAGS): Likewise.
2664
2665 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2666
2667 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2668
2669 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2670
2671 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2672
2673 * include/grub/hexdump.h: New file.
2674
2675 * commands/hexdump.c: New file.
2676
5cced7fd 26772007-11-10 Robert Millan <rmh@aybabtu.com>
2678
2679 * commands/i386/pc/play.c (beep_off): Switch order of arguments
2680 in grub_outb() calls.
2681 (beep_on): Likewise.
2682
8b714eb0 26832007-11-10 Christian Franke <franke@computer.org>
2684
2685 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
2686 (grub_menu_run): Likewise.
2687
ce0f1839 26882007-11-10 Robert Millan <rmh@aybabtu.com>
2689
2690 * include/grub/i386/efi/machine.h: New file.
2691 * include/grub/i386/linuxbios/machine.h: Likewise.
2692 * include/grub/i386/pc/machine.h: Likewise.
2693 * include/grub/powerpc/ieee1275/machine.h: Likewise.
2694 * include/grub/sparc64/ieee1275/machine.h: Likewise.
2695
2696 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
2697 (serial_hw_io_addr): New variable.
2698 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
2699 instead of `(unsigned short *) 0x400'.
2700
270c237d 27012007-11-10 Bean <bean123ch@gmail.com>
2702
2703 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2704
a87783bf 27052007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2706
2707 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
2708 (vga_mod_SOURCES): Added.
2709 (vga_mod_CFLAGS): Likewise.
2710 (vga_mod_LDFLAGS): Likewise.
2711
2712 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
2713 grub_outb() calls.
2714 (set_map_mask): Likewise.
2715 (set_read_map): Likewise.
2716 (set_read_address): Likewise.
2717 (vga_font): Removed variable.
2718 (get_vga_glyph): Removed function.
2719 (invalidate_char): Likewise.
2720 (write_char): Changed to use grub_font_get_glyph() for font
2721 information.
2722 (grub_vga_putchar): Likewise.
2723 (grub_vga_getcharwidth): Likewise.
2724
6433b448 27252007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2726
2727 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
2728 flags.
2729 (pxeboot_img_LDFLAGS): Likewise.
2730 (diskboot_img_LDFLAGS): Likewise.
2731 (kernel_img_LDFLAGS): Likewise.
2732
49178511 27332007-11-06 Robert Millan <rmh@aybabtu.com>
2734
2735 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
2736 in grub_outb() calls.
2737 (serial_hw_init): Likewise.
2738
53b052de 27392007-11-05 Robert Millan <rmh@aybabtu.com>
2740
2741 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
2742 spaces. Skip non-regular files.
2743
5ab33bba 27442007-11-05 Robert Millan <rmh@aybabtu.com>
2745
2746 * kern/disk.c (grub_disk_firmware_fini)
2747 (grub_disk_firmware_is_tainted): New variables.
2748
2749 * include/grub/disk.h (grub_disk_firmware_fini)
2750 (grub_disk_firmware_is_tainted): Likewise.
2751
2752 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
2753 (grub_disk_biosdisk_fini): ... to here.
2754 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
2755 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
2756 is set. Register grub_disk_biosdisk_fini() in
2757 `grub_disk_firmware_fini'.
2758
2759 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
2760 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2761 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2762 to finish existing firmware disk interface.
2763
2764 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2765 (ata_mod_SOURCES): New variable.
2766 (ata_mod_CFLAGS): Likewise.
2767 (ata_mod_LDFLAGS): Likewise.
2768
0149ab7c 27692007-11-05 Robert Millan <rmh@aybabtu.com>
2770
2771 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2772 (grub_ata_wait): Reimplement using grub_millisleep().
2773
2774 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2775 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2776
be7ac41e 27772007-11-03 Marco Gerards <marco@gnu.org>
2778
2779 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2780 (CRTC_ADDR_PORT): New macro.
2781 (CRTC_DATA_PORT): Likewise.
2782 (CRTC_CURSOR): Likewise.
2783 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2784 (CRTC_CURSOR_ADDR_LOW): Likewise.
2785 (update_cursor): New function.
2786 (grub_console_real_putchar): Call `update_cursor'.
2787 (grub_console_gotoxy): Likewise.
2788 (grub_console_cls): Set the default color when clearing the
2789 screen.
2790 (grub_console_setcursor): Implemented.
2791
bb06ab2e 27922007-11-03 Marco Gerards <marco@gnu.org>
2793
2794 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2795 become activate.
2796 (grub_ata_pio_write): Likewise.
2797
2798 (grub_atapi_identify): Wait after issuing an ATA command.
2799 (grub_atapi_packet): Likewise.
2800 (grub_ata_identify): Likewise.
2801 (grub_ata_readwrite): Likewise.
2802
cf8f780b 28032007-11-03 Marco Gerards <marco@gnu.org>
2804
2805 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2806 (grub_ata_pio_write): Likewise.
2807 (grub_ata_readwrite): Use `grub_error', instead of
2808 returning `grub_errno'.
2809
ed649e54 28102007-11-03 Marco Gerards <marco@gnu.org>
2811
2812 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2813 grub_ata_pio_write once for every single sector, instead of for
2814 multiple sectors.
2815
ca25d8f0 28162007-10-31 Robert Millan <rmh@aybabtu.com>
2817
2818 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2819
2820 * conf/i386-linuxbios.rmk: New file.
2821
2822 * kern/i386/pc/hardware.c: Likewise.
2823 * term/i386/pc/at_keyboard.c: Likewise.
2824 * term/i386/pc/vga_text.c: Likewise.
2825
2826 * include/grub/i386/linuxbios/boot.h: Likewise.
2827 * include/grub/i386/linuxbios/console.h: Likewise.
2828 * include/grub/i386/linuxbios/init.h: Likewise.
2829 * include/grub/i386/linuxbios/kernel.h: Likewise.
2830 * include/grub/i386/linuxbios/loader.h: Likewise.
2831 * include/grub/i386/linuxbios/memory.h: Likewise.
2832 * include/grub/i386/linuxbios/serial.h: Likewise.
2833 * include/grub/i386/linuxbios/time.h: Likewise.
2834
2835 * kern/i386/linuxbios/init.c: Likewise.
2836 * kern/i386/linuxbios/startup.S: Likewise.
2837 * kern/i386/linuxbios/table.c: Likewise.
2838
e911ecc1 28392007-10-31 Marco Gerards <marco@gnu.org>
2840
2841 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2842 (ata_mod_SOURCES): New variable.
2843 (ata_mod_CFLAGS): Likewise.
2844 (ata_mod_LDFLAGS): Likewise.
2845
2846 * disk/ata.c: New file.
2847
2848 * include/grub/disk.h (grub_disk_dev_id): Add
2849 `GRUB_DISK_DEV_ATA_ID'.
2850
7f66d0e0 28512007-10-31 Robert Millan <rmh@aybabtu.com>
2852
2853 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2854 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2855
2856 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2857 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2858
2859 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2860 `<grub/types.h>'.
2861
2862 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2863
5cd7dd46 28642007-10-27 Robert Millan <rmh@aybabtu.com>
2865
3236ca65 2866 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 2867
2ebfc90f 28682007-10-22 Robert Millan <rmh@aybabtu.com>
2869
2870 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2871 `"../realmode.S"'.
2872 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2873
73fcb0f3 28742007-10-22 Robert Millan <rmh@aybabtu.com>
2875
2876 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2877 (pkgdata_MODULES): Add `biosdisk.mod'.
2878 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2879 variables.
2880
2881 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2882 (grub_biosdisk_init): Replace with ...
2883 (GRUB_MOD_INIT(biosdisk)): ... this.
2884 (grub_biosdisk_fini): Replace with ...
2885 (GRUB_MOD_FINI(biosdisk)): ... this.
2886
2887 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2888 (grub_machine_init): Remove call to grub_biosdisk_init().
2889 (grub_machine_fini): Remove call to grub_machine_fini().
2890
2891 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2892
3381d274 28932007-10-22 Robert Millan <rmh@aybabtu.com>
2894
2895 * include/grub/time.h: New file.
2896 * include/grub/i386/time.h: Likewise.
2897 * include/grub/powerpc/time.h: Likewise.
2898 * include/grub/sparc64/time.h: Likewise.
2899
2900 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2901 instances to ...
2902 (KERNEL_MACHINE_TIME_HEADER): ... this.
2903 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2904 instances to ...
2905 (KERNEL_MACHINE_TIME_HEADER): ... this.
2906 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2907 instances to ...
2908 (KERNEL_MACHINE_TIME_HEADER): ... this.
2909
2910 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2911 (grub_millisleep): New function.
2912 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2913 (grub_millisleep): New function.
2914 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2915 Remove `grub/machine/time.h' include.
2916 (grub_millisleep): New function.
2917 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2918 Remove `grub/machine/time.h' include.
2919 (grub_millisleep): New function.
2920
2921 * include/grub/misc.h (grub_div_roundup): New function.
2922
2923 * kern/misc.c: Include `<grub/time.h>'.
2924 (grub_millisleep_generic): New function.
2925
2926 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2927 Add `time.h'.
2928 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2929 Add `time.h'.
2930 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2931 `machine/time.h'. Add `time.h'.
2932 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2933
a39a0312 29342007-10-21 Robert Millan <rmh@aybabtu.com>
2935
2936 * include/grub/misc.h (grub_max): New function.
2937
2aad70e2 29382007-10-21 Robert Millan <rmh@aybabtu.com>
2939
2940 * util/misc.c (grub_util_info): Call fflush() before returning.
2941
54b71c4b 29422007-10-20 Robert Millan <rmh@aybabtu.com>
2943
2944 * genmk.rb (Image): Copy `extra_flags' from here ...
2945 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
2946
2947 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2948 to `argc' and `args' arguments.
2949
a979f513 29502007-10-17 Robert Millan <rmh@aybabtu.com>
2951
2952 * kern/i386/loader.S: New file.
2953
2954 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2955 * kern/i386/loader.S (grub_linux_prot_size)... to here.
2956 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2957 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2958 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2959 * kern/i386/loader.S (grub_linux_real_addr)... to here.
2960 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2961 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2962 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2963 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2964 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2965 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2966 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2967 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2968
2969 * kern/i386/realmode.S: New file.
2970
2971 * kern/i386/pc/startup.S (protstack): Moved from here ...
2972 * kern/i386/realmode.S (protstack)... to here.
2973 * kern/i386/pc/startup.S (gdt): Moved from here ...
2974 * kern/i386/realmode.S (gdt)... to here.
2975 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2976 * kern/i386/realmode.S (prot_to_real)... to here.
2977
2978 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2979 `kern/i386/realmode.S'.
2980
825fc8fd 29812007-10-17 Robert Millan <rmh@aybabtu.com>
2982
2983 * include/grub/i386/loader.h: New file.
2984
2985 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2986 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2987 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2988 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2989 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2990 * include/grub/i386/loader.h (grub_linux_prot_size)
2991 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2992 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2993 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2994 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2995
2996 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2997
e179b2f4 29982007-10-15 Robert Millan <rmh@aybabtu.com>
2999
3000 * normal/misc.c (grub_normal_print_device_info): Do not probe for
3001 filesystem when dev->disk is unset.
3002 Do probe for filesystem even when dev->disk->has_partitions is set.
3003 In case a filesystem is found, always report it.
3004 In case it isn't, if dev->disk->has_partitions is set, report that
3005 a partition table was found instead of reporting that no filesystem
3006 could be identified.
3007
5db82af6 30082007-10-12 Robert Millan <rmh@aybabtu.com>
3009
3010 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
3011 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
3012
68f6ac74 3013 * include/grub/types.h (grub_host_to_target16): New macro.
3014 (grub_host_to_target32): Likewise.
3015 (grub_host_to_target64): Likewise.
3016 (grub_target_to_host16): Likewise.
3017 (grub_target_to_host32): Likewise.
3018 (grub_target_to_host64): Likewise.
5db82af6 3019
3020 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3021 Renamed from to ...
3022 (GRUB_MOD_ALIGN): ...this. Update all users.
3023
68f6ac74 3024 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
3025 grub_host_to_target32.
3026 Replace grub_be_to_cpu32 with grub_target_to_host32.
3027 (load_modules): Likewise.
3028 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
3029 Replace grub_be_to_cpu32 with grub_target_to_host32.
3030 Replace grub_cpu_to_be16 with grub_host_to_target16.
3031 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 3032
3cf497cc 30332007-10-12 Robert Millan <rmh@aybabtu.com>
3034
3035 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
3036 * util/elf/grub-mkimage.c: ... here.
3037
3038 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
3039 `util/powerpc/ieee1275/grub-mkimage.c'.
3040
c8cc3692 30412007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 3042
c8cc3692 3043 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
3044 and make it easier to figure out.
3045 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
3046 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
3047 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
3048 leave us with less than HEAP_MIN_SIZE total heap.
3049 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 3050
5c58b791 30512007-10-03 Robert Millan <rmh@aybabtu.com>
3052
3053 * include/grub/i386/io.h: New file.
3054 * commands/i386/pc/play.c (inb): Removed.
3055 (outb): Removed.
3056 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3057 with grub_outb().
afcd2ef8 3058 * term/i386/pc/serial.c (inb): Removed.
3059 (outb): Removed.
3060 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3061 with grub_outb().
3062 * term/i386/pc/vga.c (inb): Removed.
3063 (outb): Removed.
3064 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3065 with grub_outb().
5c58b791 3066
1a477ed6 30672007-10-02 Robert Millan <rmh@aybabtu.com>
3068
3069 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
3070 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3071 Reported by Marcin Kurek.
3072
6b5d80fa 30732007-09-07 Robert Millan <rmh@aybabtu.com>
3074
3075 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
3076 SmartFirmware version updates (as released by Sven Luther), and avoid
3077 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
3078 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
3079 known broken.
3080
5618afbf 30812007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3082
3083 From Hitoshi Ozeki:
3084 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
3085 when merging two regions.
3086
6139dcd9 30872007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3088
508e39ee 3089 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
3090 * normal/completion.c (grub_normal_do_completion): Likewise.
3091 Reported by Hitoshi Ozeki.
3092
30932007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3094
6139dcd9 3095 Do not use devices at boot in chainloading.
3096
3097 * loader/i386/pc/chainloader.c (boot_drive): New variable.
3098 (boot_part_addr): Likewise.
3099 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
3100 with BOOT_DRIVE and BOOT_PART_ADDR.
3101 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
3102 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
3103
38da6516 31042007-08-29 Robert Millan <rmh@aybabtu.com>
3105
3106 Patch from Simon Peter <dn.tlp@gmx.net>:
3107 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
3108 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
3109 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
3110 util/i386/pc/grub-setup.c_DEPENDENCIES.
3111 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
3112 util/grub-probe.c_DEPENDENCIES.
3113 * conf/powerpc-ieee1275.rmk: Likewise.
3114
29d0928c 31152007-08-28 Robert Millan <rmh@aybabtu.com>
3116
3117 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
3118 to tell grub-mkdevicemap how to name devices.
3119 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
3120 feature).
3121
3122 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
3123 util/i386/get_disk_name.c.
3124 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
3125 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
3126 util/ieee1275/get_disk_name.c.
3127
3128 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
3129
3130 * DISTLIST: Add util/i386/get_disk_name.c and
3131 util/ieee1275/get_disk_name.c.
3132
3133 * util/grub-mkdevicemap.c: Replace device naming logic with
3134 grub_util_get_disk_name() calls.
3135
5a0d3cca 31362007-08-20 Robert Millan <rmh@aybabtu.com>
3137
3138 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
3139 (so that it works for both plural and singular quantities).
3140
8b72db2f 31412007-08-05 Robert Millan <rmh@aybabtu.com>
3142
3143 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
3144 so that [xz] isn't taken into account when determining order.
3145
352466bf 31462007-08-02 Marco Gerards <marco@gnu.org>
3147
3148 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
3149 `include/multiboot2.h', `include/grub/elfload.h',
3150 `include/multiboot.h', `include/grub/multiboot.h',
3151 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
3152 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
3153 `kern/elf.c', `loader/multiboot_loader.c',
3154 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
3155 `loader/i386/pc/multiboot2.c',
3156 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
3157 `util/i386/pc/grub-mkrescue.in'. Remove
3158 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
3159 `include/grub/i386/pc/util/biosdisk.h' and
3160 `include/grub/powerpc/ieee1275/multiboot.h'.
3161
8f096014 31622007-08-02 Bean <bean123ch@gmail.com>
3163
3164 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
3165 (ntfs_mod_SOURCES): New variable.
3166 (ntfs_mod_CFLAGS): Likewise.
3167 (ntfs_mod_LDFLAGS): Likewise.
3168
3169 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
3170 (grub_probe_SOURCES): Likewise.
3171 (grub_emu_SOURCES): Likewise.
3172
3173 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3174 (grub_emu_SOURCES): Likewise.
3175
3176 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3177 (grub_emu_SOURCES): Likewise.
3178
3179 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
3180
3181 * fs/ntfs.c: New file.
3182
9959f7db 31832007-08-02 Bean <bean123ch@gmail.com>
3184
3185 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
3186
3187 * file.h (grub_file): Likewise.
3188
3189 * fshelp.h (grub_fshelp_read_file): Likewise.
3190
3191 * util/i386/pc/grub-setup.c (setup): Likewise.
3192 (save_first_sector): Likewise.
3193 (save_blocklists): Likewise.
3194
3195 * fs/affs.c (grub_affs_read_file): Likewise.
3196
3197 * fs/ext2.c (grub_ext2_read_file): Likewise.
3198
3199 * fs/fat.c (grub_fat_read_data): Likewise.
3200
3201 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
3202
3203 * fs/hfs.c (grub_hfs_read_file): Likewise.
3204
3205 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
3206
3207 * fs/jfs.c (grub_jfs_read_file): Likewise.
3208
3209 * fs/minix.c (grub_minix_read_file): Likewise.
3210
3211 * fs/sfs.c (grub_sfs_read_file): Likewise.
3212
3213 * fs/ufs.c (grub_ufs_read_file): Likewise.
3214
3215 * fs/xfs.c (grub_xfs_read_file): Likewise.
3216
3217 * command/blocklist.c (read_blocklist): Likewise.
3218 (print_blocklist): Likewise.
3219
0a203f83 32202007-08-02 Marco Gerards <marco@gnu.org>
3221
3222 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
3223 `util/hostfs.c'.
3224
3225 * disk/host.c: New file.
3226
3227 * util/hostfs.c: Likewise.
3228
3229 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
3230 return `GRUB_ERR_BAD_FS'.
3231 * fs/sfs.c (grub_sfs_mount): Likewise.
3232 * fs/xfs.c (grub_xfs_mount): Likewise.
3233
3234 * include/grub/disk.h (enum grub_disk_dev_id): Add
3235 `GRUB_DISK_DEVICE_HOST_ID'.
3236
3237 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
3238
e5dfe777 32392007-07-24 Jerone Young <jerone@gmail.com>
3240
3241 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
3242 modules for compilation.
3243 * conf/powerpc-ieee1275.rmk: Likewise.
3244
3245 * include/multiboot.h: Move multiboot definitions to one file. Rename
3246 many definitions to not get grub specific.
3247 * include/multiboot2.h: Create header with multiboot 2 definitions.
3248 * include/grub/multiboot.h: Header for grub specific function
3249 prototypes and definitions.
3250 * include/grub/multiboot2.h: Likewise.
3251 * include/grub/multiboot_loader.h: Likewise.
3252 * include/grub/i386/pc/multiboot.h: Removed.
3253 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
3254
3255 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
3256 and 2 to allow for one multiboot and module commands.
3257 * loader/multiboot2.c: Add multiboot2 functionality.
3258 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
3259 and definition names.
3260 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
3261 2 functions.
3262 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
3263 ieee1275 specific multiboot2 code.
3264
3265 * kern/i386/pc/startup.S: Change headers and definition names for
3266 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
3267
daf0f0ba 32682007-07-22 Robert Millan <rmh@aybabtu.com>
3269
3270 * geninitheader.sh: Process file specified in first parameter rather
3271 than hardcoding grub_modules_init.lst.
3272 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
3273 than hardcoding grub_modules_init.h.
3274
3275 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
3276 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
3277 grub_probe_init.[ch] and grub_setup_init.[ch].
3278
3279 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
3280 grub_modules_init.h with grub_emu_init.h.
3281 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
3282 grub_probe_init.[ch] files.
3283 * conf/i386-efi.rmk: Likewise.
3284 * conf/i386-pc.rmk: Likewise.
3285 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
3286 grub_setup_init.[ch] files.
3287
3288 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
3289 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
3290 to initialize modules rather than a list of hardcoded functions.
3291 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
3292 grub_init_all() to initialize modules rather than a list of hardcoded
3293 functions.
3294
54cdc1cc 32952007-07-22 Robert Millan <rmh@aybabtu.com>
3296
3297 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
3298 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
3299
ad0686cc 33002007-07-22 Robert Millan <rmh@aybabtu.com>
3301
3302 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3303 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
3304 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
3305 flag when running on SmartFirmware.
3306 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
3307 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
3308 was set.
3309
3310 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3311 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
3312 rather than decreasing it.
3313
3314 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
3315 there's not enough space to do it, fail in the same way as when it
3316 can't be done because there are no partitions.
3317
3318 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
3319 when nvsetenv failed.
3320
969c02ec 33212007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3322
3323 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
3324 because this rule is automatically generated.
3325 (grub-mkrescue): Removed for the same reason as above.
3326
5a79f472 33272007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3328
3329 Migrate to GNU General Public License Version 3.
3330
3331 * COPYING: Replaced with the plain text version of GPLv3.
3332
3333 * config.guess: Updated from gnulib.
3334 * config.sub: Likewise.
3335
3336 * geninit.sh: Output a GPLv3 copyright notice.
3337 * geninitheader.sh: Likewise.
3338 * genmodsrc.sh: Likewise.
3339 * gensymlist.sh.in: Likewise.
3340
3341 * boot/i386/pc/boot.S: Upgraded to GPLv3.
3342 * boot/i386/pc/diskboot.S: Likewise.
3343 * boot/i386/pc/pxeboot.S: Likewise.
3344 * commands/blocklist.c: Likewise.
3345 * commands/boot.c: Likewise.
3346 * commands/cat.c: Likewise.
3347 * commands/cmp.c: Likewise.
3348 * commands/configfile.c: Likewise.
3349 * commands/echo.c: Likewise.
3350 * commands/help.c: Likewise.
3351 * commands/ls.c: Likewise.
3352 * commands/search.c: Likewise.
3353 * commands/terminal.c: Likewise.
3354 * commands/test.c: Likewise.
3355 * commands/videotest.c: Likewise.
3356 * commands/i386/cpuid.c: Likewise.
3357 * commands/i386/pc/halt.c: Likewise.
3358 * commands/i386/pc/play.c: Likewise.
3359 * commands/i386/pc/reboot.c: Likewise.
3360 * commands/i386/pc/vbeinfo.c: Likewise.
3361 * commands/i386/pc/vbetest.c: Likewise.
3362 * commands/ieee1275/halt.c: Likewise.
3363 * commands/ieee1275/reboot.c: Likewise.
3364 * commands/ieee1275/suspend.c: Likewise.
3365 * disk/loopback.c: Likewise.
3366 * disk/lvm.c: Likewise.
3367 * disk/raid.c: Likewise.
3368 * disk/efi/efidisk.c: Likewise.
3369 * disk/i386/pc/biosdisk.c: Likewise.
3370 * disk/ieee1275/ofdisk.c: Likewise.
3371 * font/manager.c: Likewise.
3372 * fs/affs.c: Likewise.
3373 * fs/ext2.c: Likewise.
3374 * fs/fat.c: Likewise.
3375 * fs/fshelp.c: Likewise.
3376 * fs/hfs.c: Likewise.
3377 * fs/hfsplus.c: Likewise.
3378 * fs/iso9660.c: Likewise.
3379 * fs/jfs.c: Likewise.
3380 * fs/minix.c: Likewise.
3381 * fs/sfs.c: Likewise.
3382 * fs/ufs.c: Likewise.
3383 * fs/xfs.c: Likewise.
3384 * hello/hello.c: Likewise.
3385 * include/grub/acorn_filecore.h: Likewise.
3386 * include/grub/arg.h: Likewise.
3387 * include/grub/bitmap.h: Likewise.
3388 * include/grub/boot.h: Likewise.
3389 * include/grub/cache.h: Likewise.
3390 * include/grub/device.h: Likewise.
3391 * include/grub/disk.h: Likewise.
3392 * include/grub/dl.h: Likewise.
3393 * include/grub/elfload.h: Likewise.
3394 * include/grub/env.h: Likewise.
3395 * include/grub/err.h: Likewise.
3396 * include/grub/file.h: Likewise.
3397 * include/grub/font.h: Likewise.
3398 * include/grub/fs.h: Likewise.
3399 * include/grub/fshelp.h: Likewise.
3400 * include/grub/gzio.h: Likewise.
3401 * include/grub/hfs.h: Likewise.
3402 * include/grub/kernel.h: Likewise.
3403 * include/grub/loader.h: Likewise.
3404 * include/grub/lvm.h: Likewise.
3405 * include/grub/misc.h: Likewise.
3406 * include/grub/mm.h: Likewise.
3407 * include/grub/net.h: Likewise.
3408 * include/grub/normal.h: Likewise.
3409 * include/grub/parser.h: Likewise.
3410 * include/grub/partition.h: Likewise.
3411 * include/grub/pc_partition.h: Likewise.
3412 * include/grub/raid.h: Likewise.
3413 * include/grub/rescue.h: Likewise.
3414 * include/grub/script.h: Likewise.
3415 * include/grub/setjmp.h: Likewise.
3416 * include/grub/symbol.h: Likewise.
3417 * include/grub/term.h: Likewise.
3418 * include/grub/terminfo.h: Likewise.
3419 * include/grub/tparm.h: Likewise.
3420 * include/grub/types.h: Likewise.
3421 * include/grub/video.h: Likewise.
3422 * include/grub/efi/api.h: Likewise.
3423 * include/grub/efi/chainloader.h: Likewise.
3424 * include/grub/efi/console.h: Likewise.
3425 * include/grub/efi/console_control.h: Likewise.
3426 * include/grub/efi/disk.h: Likewise.
3427 * include/grub/efi/efi.h: Likewise.
3428 * include/grub/efi/pe32.h: Likewise.
3429 * include/grub/efi/time.h: Likewise.
3430 * include/grub/i386/linux.h: Likewise.
3431 * include/grub/i386/setjmp.h: Likewise.
3432 * include/grub/i386/types.h: Likewise.
3433 * include/grub/i386/efi/kernel.h: Likewise.
3434 * include/grub/i386/efi/loader.h: Likewise.
3435 * include/grub/i386/efi/time.h: Likewise.
3436 * include/grub/i386/pc/biosdisk.h: Likewise.
3437 * include/grub/i386/pc/boot.h: Likewise.
3438 * include/grub/i386/pc/chainloader.h: Likewise.
3439 * include/grub/i386/pc/console.h: Likewise.
3440 * include/grub/i386/pc/init.h: Likewise.
3441 * include/grub/i386/pc/kernel.h: Likewise.
3442 * include/grub/i386/pc/loader.h: Likewise.
3443 * include/grub/i386/pc/memory.h: Likewise.
3444 * include/grub/i386/pc/multiboot.h: Likewise.
3445 * include/grub/i386/pc/serial.h: Likewise.
3446 * include/grub/i386/pc/time.h: Likewise.
3447 * include/grub/i386/pc/vbe.h: Likewise.
3448 * include/grub/i386/pc/vbeblit.h: Likewise.
3449 * include/grub/i386/pc/vbefill.h: Likewise.
3450 * include/grub/i386/pc/vbeutil.h: Likewise.
3451 * include/grub/i386/pc/vga.h: Likewise.
3452 * include/grub/ieee1275/ieee1275.h: Likewise.
3453 * include/grub/ieee1275/ofdisk.h: Likewise.
3454 * include/grub/powerpc/libgcc.h: Likewise.
3455 * include/grub/powerpc/setjmp.h: Likewise.
3456 * include/grub/powerpc/types.h: Likewise.
3457 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
3458 * include/grub/powerpc/ieee1275/console.h: Likewise.
3459 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
3460 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
3461 * include/grub/powerpc/ieee1275/loader.h: Likewise.
3462 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
3463 * include/grub/powerpc/ieee1275/time.h: Likewise.
3464 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
3465 * include/grub/sparc64/libgcc.h: Likewise.
3466 * include/grub/sparc64/setjmp.h: Likewise.
3467 * include/grub/sparc64/types.h: Likewise.
3468 * include/grub/sparc64/ieee1275/console.h: Likewise.
3469 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
3470 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
3471 * include/grub/sparc64/ieee1275/time.h: Likewise.
3472 * include/grub/util/biosdisk.h: Likewise.
3473 * include/grub/util/getroot.h: Likewise.
3474 * include/grub/util/lvm.h: Likewise.
3475 * include/grub/util/misc.h: Likewise.
3476 * include/grub/util/raid.h: Likewise.
3477 * include/grub/util/resolve.h: Likewise.
3478 * io/gzio.c: Likewise.
3479 * kern/device.c: Likewise.
3480 * kern/disk.c: Likewise.
3481 * kern/dl.c: Likewise.
3482 * kern/elf.c: Likewise.
3483 * kern/env.c: Likewise.
3484 * kern/err.c: Likewise.
3485 * kern/file.c: Likewise.
3486 * kern/fs.c: Likewise.
3487 * kern/loader.c: Likewise.
3488 * kern/main.c: Likewise.
3489 * kern/misc.c: Likewise.
3490 * kern/mm.c: Likewise.
3491 * kern/parser.c: Likewise.
3492 * kern/partition.c: Likewise.
3493 * kern/rescue.c: Likewise.
3494 * kern/term.c: Likewise.
3495 * kern/efi/efi.c: Likewise.
3496 * kern/efi/init.c: Likewise.
3497 * kern/efi/mm.c: Likewise.
3498 * kern/i386/dl.c: Likewise.
3499 * kern/i386/efi/init.c: Likewise.
3500 * kern/i386/efi/startup.S: Likewise.
3501 * kern/i386/pc/init.c: Likewise.
3502 * kern/i386/pc/lzo1x.S: Likewise.
3503 * kern/i386/pc/startup.S: Likewise.
3504 * kern/ieee1275/ieee1275.c: Likewise.
3505 * kern/powerpc/cache.S: Likewise.
3506 * kern/powerpc/dl.c: Likewise.
3507 * kern/powerpc/ieee1275/cmain.c: Likewise.
3508 * kern/powerpc/ieee1275/crt0.S: Likewise.
3509 * kern/powerpc/ieee1275/init.c: Likewise.
3510 * kern/powerpc/ieee1275/openfw.c: Likewise.
3511 * kern/sparc64/cache.S: Likewise.
3512 * kern/sparc64/dl.c: Likewise.
3513 * kern/sparc64/ieee1275/init.c: Likewise.
3514 * kern/sparc64/ieee1275/openfw.c: Likewise.
3515 * loader/efi/chainloader.c: Likewise.
3516 * loader/efi/chainloader_normal.c: Likewise.
3517 * loader/i386/efi/linux.c: Likewise.
3518 * loader/i386/efi/linux_normal.c: Likewise.
3519 * loader/i386/pc/chainloader.c: Likewise.
3520 * loader/i386/pc/chainloader_normal.c: Likewise.
3521 * loader/i386/pc/linux.c: Likewise.
3522 * loader/i386/pc/linux_normal.c: Likewise.
3523 * loader/i386/pc/multiboot.c: Likewise.
3524 * loader/i386/pc/multiboot_normal.c: Likewise.
3525 * loader/powerpc/ieee1275/linux.c: Likewise.
3526 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3527 * normal/arg.c: Likewise.
3528 * normal/cmdline.c: Likewise.
3529 * normal/command.c: Likewise.
3530 * normal/completion.c: Likewise.
3531 * normal/execute.c: Likewise.
3532 * normal/function.c: Likewise.
3533 * normal/lexer.c: Likewise.
3534 * normal/main.c: Likewise.
3535 * normal/menu.c: Likewise.
3536 * normal/menu_entry.c: Likewise.
3537 * normal/misc.c: Likewise.
3538 * normal/parser.y: Likewise.
3539 * normal/script.c: Likewise.
3540 * normal/i386/setjmp.S: Likewise.
3541 * normal/powerpc/setjmp.S: Likewise.
3542 * normal/sparc64/setjmp.S: Likewise.
3543 * partmap/acorn.c: Likewise.
3544 * partmap/amiga.c: Likewise.
3545 * partmap/apple.c: Likewise.
3546 * partmap/gpt.c: Likewise.
3547 * partmap/pc.c: Likewise.
3548 * partmap/sun.c: Likewise.
3549 * term/gfxterm.c: Likewise.
3550 * term/terminfo.c: Likewise.
3551 * term/efi/console.c: Likewise.
3552 * term/i386/pc/console.c: Likewise.
3553 * term/i386/pc/serial.c: Likewise.
3554 * term/i386/pc/vesafb.c: Likewise.
3555 * term/i386/pc/vga.c: Likewise.
3556 * term/ieee1275/ofconsole.c: Likewise.
3557 * util/biosdisk.c: Likewise.
3558 * util/console.c: Likewise.
3559 * util/genmoddep.c: Likewise.
3560 * util/getroot.c: Likewise.
3561 * util/grub-emu.c: Likewise.
3562 * util/grub-mkdevicemap.c: Likewise.
3563 * util/grub-probe.c: Likewise.
3564 * util/lvm.c: Likewise.
3565 * util/misc.c: Likewise.
3566 * util/raid.c: Likewise.
3567 * util/resolve.c: Likewise.
3568 * util/update-grub.in: Likewise.
3569 * util/update-grub_lib.in: Likewise.
3570 * util/grub.d/00_header.in: Likewise.
3571 * util/grub.d/10_hurd.in: Likewise.
3572 * util/grub.d/10_linux.in: Likewise.
3573 * util/i386/efi/grub-install.in: Likewise.
3574 * util/i386/efi/grub-mkimage.c: Likewise.
3575 * util/i386/pc/grub-install.in: Likewise.
3576 * util/i386/pc/grub-mkimage.c: Likewise.
3577 * util/i386/pc/grub-mkrescue.in: Likewise.
3578 * util/i386/pc/grub-setup.c: Likewise.
3579 * util/i386/pc/misc.c: Likewise.
3580 * util/powerpc/ieee1275/grub-install.in: Likewise.
3581 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
3582 * util/powerpc/ieee1275/misc.c: Likewise.
3583 * video/bitmap.c: Likewise.
3584 * video/video.c: Likewise.
3585 * video/i386/pc/vbe.c: Likewise.
3586 * video/i386/pc/vbeblit.c: Likewise.
3587 * video/i386/pc/vbefill.c: Likewise.
3588 * video/i386/pc/vbeutil.c: Likewise.
3589 * video/readers/tga.c: Likewise.
3590
3572d015 35912007-07-02 Robert Millan <rmh@aybabtu.com>
3592
3593 * conf/i386-efi.rmk: Replace obsolete reference to
3594 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
3595 with util/getroot.c.
3596 * conf/powerpc-ieee1275.rmk: Likewise.
3597 * conf/sparc64-ieee1275.rmk: Likewise.
3598
3599 * util/grub-emu.c (main): Fix unchecked pointer handling.
3600
2c2a681b 36012007-07-02 Robert Millan <rmh@aybabtu.com>
3602
3603 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
3604 invocation to fail, in order to support partition-less media.
3605
3606 * util/i386/pc/grub-install.in: Likewise.
3607
3608 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
3609 which fs or partmap modules are needed (akin to its sister scripts).
3610
3611 Also use grub-probe to get rid of unportable /proc/mounts check.
3612
3613 Print the same informational message that the other scripts do, before
3614 exitting.
3615
6193defe 36162007-06-23 Robert Millan <rmh@aybabtu.com>
3617
3618 * util/update-grub_lib.in (font_path): New function. Determine wether
3619 a font file can be found and, if so, echo the GRUB path to it.
3620
3621 * util/update-grub.in: Handle multiple terminals depending on user
3622 input, platform availability and font file presence. Propagate
3623 variables of our findings to /etc/grub.d/ children.
3624
3625 * util/grub.d/00_header.in: Handle multiple terminals, based on
3626 environment setup by update-grub.
3627
eface1dc 36282007-06-23 Robert Millan <rmh@aybabtu.com>
3629
ba50d28f 3630 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 3631
bf697e28 36322007-06-21 Robert Millan <rmh@aybabtu.com>
3633
3634 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
3635 indicate end of data section in kernel image.
3636 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
3637 GRUB_KERNEL_MACHINE_DATA_END.
3638
3639 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
3640 space for it.
3641 * kern/i386/efi/startup.S: Likewise.
3642
3643 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
3644 during image generation. Implement --prefix option to override this
3645 patch.
3646 * util/i386/efi/grub-mkimage.c: Likewise.
3647
3648 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
3649 code to make path relative to its root into a separate function.
3650
3651 * util/i386/pc/grub-install.in: Use newly provided
3652 make_system_path_relative_to_its_root() to convert ${grubdir}, then
3653 pass the result to grub-install --prefix.
3654
baa574b4 36552007-06-13 Robert Millan <rmh@aybabtu.com>
3656
3657 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
3658 DEFAULT_DEVICE_MAP.
3659 * util/grub-emu.c: Use above definitions from misc.h instead of
3660 defining them.
3661 * util/grub-mkdevicemap.c: Likewise.
3662 * util/i386/pc/grub-setup.c: Likewise.
3663 * util/grub-probe.c: Likewise.
3664 (probe): Abort with grub_util_error() when either
3665 grub_guess_root_device or grub_util_get_grub_dev fails.
3666
0215dcbf 36672007-06-12 Robert Millan <rmh@aybabtu.com>
3668
3669 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
3670 "pager" assignment.
3671 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
3672 "pcdata".
3673 * util/grub-probe.c (probe): Likewise for "drive_name".
3674
8af2ab7b 36752007-06-11 Robert Millan <rmh@aybabtu.com>
3676
3677 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
3678 not just the cdrom one.
3679
59d31694 36802007-06-11 Robert Millan <rmh@aybabtu.com>
3681
3682 * util/i386/pc/grub-mkrescue.in: Add "set -e".
3683 Add --pkglibdir=DIR option to override pkglibdir.
3684 Mention --image-type=TYPE in help output.
3685 Fix --grub-mkimage (it was a no-op).
3686 Abort gracefuly when no parameter is given.
3687
7ee367e4 36882007-06-11 Robert Millan <rmh@aybabtu.com>
3689
3690 * util/i386/pc/grub-mkrescue.in: New file.
3691 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
3692 * Makefile.in: Handle bin_SCRIPTS.
3693
29b0ed46 36942007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
3695
3696 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
3697 list of video modes.
3698
c0f90770 36992007-06-06 Robert Millan <rmh@aybabtu.com>
3700
3701 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
3702 file doesn't exist, or if it is in a filesystem grub can't read.
3703
3704 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
3705 not abort if GRUB_DRIVE could not be defined. Rearrange generated
3706 header comment to fit in 80 columns when the variables are resolved.
3707
3708 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
3709 could be identified by update-grub. Remove redundant check for
3710 unifont.pff existance (since convert_system_path_to_grub_path now
3711 handles that).
3712
fb36dc26 37132007-06-04 Robert Millan <rmh@aybabtu.com>
3714
3715 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
3716
3717 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
3718
3719 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
3720
0c68c93e 37212007-06-04 Robert Millan <rmh@aybabtu.com>
3722
3723 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
3724
3725 * include/grub/partition.h: Declare grub_apple_partition_map_init and
3726 grub_apple_partition_map_fini.
3727
3728 * util/biosdisk.c
3729 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
3730 to access >2 TiB disks).
3731
3732 Print disk->total_sectors with %llu instead of %lu, since this
3733 variable is always 64-bit (prevents wrong disk size from being displayed
3734 on either >2 TiB disk or big-endian CPU).
3735
3736 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
3737 into a generic case that supports all (sane) partition maps.
3738
3739 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
3740 breaks big-endian.
3741
3742 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
3743 and grub_apple_partition_map_fini() after that.
3744
0f23eb74 37452007-06-01 Robert Millan <rmh@aybabtu.com>
3746
3747 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
3748
3749 * util/grub.d/00_header.in: Only enable gfxterm when
3750 convert_system_path_to_grub_path() succeeds.
3751
42c71976 37522007-05-20 Robert Millan <rmh@aybabtu.com>
3753
3754 * util/update-grub_lib.in: New file.
3755 * DISTLIST: Add update-grub_lib.in.
3756 * conf/common.rmk: Generate update-grub_lib and install it in
3757 $(lib_DATA).
3758 * Makefile.in: Add install routine for $(lib_DATA).
3759
3760 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3761 function provided by update-grub_lib to support arbitrary paths of
3762 unifont.pff.
3763 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3764 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3765
5beb2291 37662007-05-19 Robert Millan <rmh@aybabtu.com>
3767
3768 * commands/i386/cpuid.c: New module.
3769 * DISTLIST: Add it.
3770 * conf/i386-efi.rmk: Enable cpuid.mod.
3771 * conf/i386-pc.rmk: Likewise.
3772
7262eca1 37732007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3774
3775 * kern/disk.c (grub_disk_read): Check return value of
3776 grub_realloc().
3777
260ba823 37782007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3779
3780 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3781 arrays.
3782 * disk/raid.c (grub_raid_open): Likewise.
3783
1ecb6cf2 37842007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3785
3786 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3787 stack instead of on the heap.
3788
3789 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3790 before doing a read on it.
3791
3792 * configure.ac: Only use -fno-stack-protector for the target
3793 environment.
3794
21c8cbb1 37952007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3796
3797 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3798 __attribute_ ((unused)) to mode_type argument.
3799
3800 * util/getroot.c (grub_guess_root_device): Fix #endif.
3801
3802 * kern/misc.c (memcmp): Fix prototype.
3803
3804 * include/grub/partition.h [GRUB_UTIL]
3805 (grub_gpt_partition_map_init): Add prototype.
3806 (grub_gpt_partition_map_fini): Likewise.
3807
3808 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3809 at the right place.
3810
3811 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3812 (grub_fat_read_data): Likewise.
3813 (grub_fat_find_dir): Likewise.
3814
3815 * font/manager.c (find_glyph): Make table a const.
3816 (grub_font_get_glyph): Remove bitmap from if statement.
3817
849d55d3 38182007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3819
3820 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3821 code, first search for device in /dev/mapper, then in /dev.
3822 (grub_util_get_grub_dev): New function.
3823 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3824 prototype.
3825 * util/grub-probe.c (probe): Remove check for RAID, call
3826 grub_util_get_grub_dev() instead of
3827 grub_util_biosdisk_get_grub_dev().
3828 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3829 grub_util_biosdisk_get_grub_dev().
3830 * util/i386/pc/grub-setup.c (main): Likewise.
3831
8fff7c2f 38322007-05-16 Robert Millan <rmh@aybabtu.com>
3833
3834 * DISTLIST: Update for the latest changes.
3835 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3836 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3837 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3838 grub/util/biosdisk.h.
3839 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3840 grub/util/biosdisk.h.
3841
48e12b52 38422007-05-16 Robert Millan <rmh@aybabtu.com>
3843
3844 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3845
46b9d128 38462007-05-16 Robert Millan <rmh@aybabtu.com>
3847
3848 * util/i386/efi/grub-install.in: New.
3849 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3850 newly added grub-install.
3851 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3852 include.
3853 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3854 grub/util/biosdisk.h.
3855 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3856 grub/util/biosdisk.h.
3857
2d1a40a9 38582007-05-16 Robert Millan <rmh@aybabtu.com>
3859
3860 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3861 * include/grub/util/biosdisk.h: ... here.
3862 * util/i386/pc/biosdisk.c: Moved to ...
3863 * util/biosdisk.c: ... here.
3864 * util/i386/pc/getroot.c: Moved to ...
3865 * util/getroot.c: ... here.
3866 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3867 * util/grub-mkdevicemap.c: ... here.
3868 * util/i386/pc/grub-probe.c: Moved to ...
3869 * util/grub-probe.c: ... here.
3870
9e26e3bc 38712007-05-15 Robert Millan <rmh@aybabtu.com>
3872
3873 * util/update-grub.in: Remove duplicated line in grub.cfg header
3874 message.
3875
57f96397 38762007-05-13 Robert Millan <rmh@aybabtu.com>
3877
3878 * util/update-grub.in: Fix a few assumptions about the devices holding
3879 /, /boot and /boot/grub being the same.
3880 * util/grub.d/00_header.in: Likewise.
3881 * util/grub.d/10_hurd.in: Likewise.
3882 * util/grub.d/10_linux.in: Likewise.
3883
3884 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3885 patterns. Use that to define the `.old' suffix as older than `'.
3886
3887 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3888
3889 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3890 the grub.cfg header message.
3891
2e610d62 38922007-05-11 Robert Millan <rmh@aybabtu.com>
3893
3894 * util/update-grub.in: Create device.map if it doesn't already exist,
3895 before attempting to run grub-probe.
3896 Check for grub-probe and grub-mkdevicemap with the same code
3897 grub-install is using.
3898 Remove test mode.
3899
3f6a10ef 39002007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3901
3902 * Makefile.in: Add the datarootdir autoconf variable.
3903
02e7b75e 39042007-05-09 Robert Millan <rmh@aybabtu.com>
3905
3906 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3907 fail gracefuly if dev->disk->partition == NULL.
3908
75f396cc 39092007-05-07 Robert Millan <rmh@aybabtu.com>
3910
3911 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3912 determine partition map module.
3913 * util/i386/pc/grub-install.in: Use this feature to decide which
3914 partition module to load, instead of hardcoding pc and gpt.
3915
da65cb36 39162007-05-07 Robert Millan <rmh@aybabtu.com>
3917
3918 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3919 source directory differs from build directory.
3920
b57d6a91 39212007-05-05 Robert Millan <rmh@aybabtu.com>
3922
3923 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3924 initialisation.
3925
509d00f1 39262007-05-05 Robert Millan <rmh@aybabtu.com>
3927
3928 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3929
c48f23ef 39302007-05-05 Robert Millan <rmh@aybabtu.com>
3931
3932 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3933 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3934
20b97658 39352007-05-05 Robert Millan <rmh@aybabtu.com>
3936
3937 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3938 (grub_probe_SOURCES): Likewise.
3939 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3940 GPT and initialize dos_part and bsd_part accordingly.
3941 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3942 install_bsd_part.
3943 (main): Activate gpt module for use during partition identification,
3944 and deactivate it afterwards.
3945 * util/i386/pc/grub-install.in: Add gpt module to core.img.
3946 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3947 partition identification, and deactivate it afterwards.
3948
99123174 39492007-05-05 Robert Millan <rmh@aybabtu.com>
3950
3951 * term/i386/pc/console.c (grub_console_fini): Call
3952 grub_term_set_current() before grub_term_unregister().
3953
ebd97f6e 39542007-05-04 Robert Millan <rmh@aybabtu.com>
3955
3956 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3957 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3958 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
3959 and update-grub_DATA.
3960 * conf/common.rmk: Build and install update-grub components.
3961 * conf/common.mk: Regenerate.
3962 * util/update-grub.in: New. Core of update-grub.
3963 * util/grub.d/00_header.in: New. Generates grub.cfg header.
3964 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
3965 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
3966 * util/grub.d/README: New. Document grub.d directory layout.
3967
b06a264d 39682007-05-01 Robert Millan <rmh@aybabtu.com>
3969
3970 * util/grub-emu.c: Move initialization functions
3971 grub_util_biosdisk_init() and grub_init_all() before
3972 grub_util_biosdisk_get_grub_dev(), which relies on them.
3973
41f0050e 39742007-04-19 Robert Millan <rmh@aybabtu.com>
3975
3976 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3977 it is used later.
3978
04582bb3 39792007-04-18 Jerone Young <jerone@gmail.com>
3980
3981 * kernel/elf.c: Add missing parenthesis for conditional statement
3982 stanza.
3983
08db4632 39842007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 3985
08db4632 3986 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3987 continue on and look for device node with real device name.
3988
801b76be 39892007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 3990
3991 * configure.ac: Add argument for autoconf to use tranformation
3992 ability.
3993 * Makefile.in: Add autoconf package transformation code.
3994 * util/i386/pc/grub-install.in: Likewise.
3995 * util/powerpc/ieee1275/grub-install.in: Likewise.
3996
6795c4e1 39972007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3998
3999 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
4000 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
4001 (EXT2_REVISION): Likewise.
4002 (EXT2_INODE_SIZE): Likewise.
4003 (struct grub_ext2_block_group): Added a missing member
4004 "used_dirs".
4005 (grub_ext2_read_inode): Divide by the inode size in a superblock
4006 instead of 128 to obtain INODES_PER_BLOCK.
4007 Use the macro EXT2_INODE_SIZE instead of directly using
4008 SBLOCK->INODE_SIZE.
4009
d70af616 40102007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
4011
4012 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
4013 superblock instead of the structure size to compute an
4014 offset. This fixes the problem that GRUB could not read a
4015 filesystem when inode size is different from 128-byte.
4016
3b801603 40172007-03-05 Marco Gerards <marco@gnu.org>
4018
4019 * normal/main.c (read_config_file): When "menu" is not set, create
4020 an initial context.
4021
4785bfe4 40222007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4023
4024 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
4025 (HEAP_LIMIT): New macro.
4026 (grub_claim_heap): Claim memory up to `heaplimit'.
4027
a0cbb023 40282007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4029
4030 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
4031 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
4032 (_start): Likewise.
4033 (grub_arch_modules_addr): Return address after `_end'.
4034 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
4035 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
4036 (add_segments): Calculate `_end' from phdr size and location.
4037 (ALIGN_UP): Moved to ...
4038 * include/grub/misc.h: here.
4039 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4040 New macro.
4041 (GRUB_IEEE1275_MODULE_BASE): Removed.
4042
fd7d8eba 40432007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4044
4045 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
4046 loop boundary.
4047
9b09e6fc 40482007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4049
4050 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
4051 All users updated.
4052 (grub_elf64_load_hook_t): Likewise.
4053 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
4054 debug output.
4055
3ce27299 40562007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4057
4058 * kern/mm.c: Update copyright.
4059 (grub_mm_debug): Correct syntax error.
4060 (grub_mm_dump_free): New function.
4061 (grub_debug_free): Call `grub_free'.
4062 * include/grub/mm.h: Update copyright.
4063 (grub_mm_dump_free): Add declaration.
4064
077d5fee 40652007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4066
4067 * include/grub/ieee1275/ieee1275.h: Update copyright.
4068 * kern/powerpc/ieee1275/init.c: Likewise.
4069 * kern/powerpc/ieee1275/openfw.c: Likewise.
4070
4071 * loader/powerpc/ieee1275/linux.c: Likewise.
4072 * include/grub/elfload.h: Likewise.
4073 * kern/elf.c: Likewise.
4074 (grub_elf32_load): Pass `base' and `size' parameters. Update all
4075 callers.
4076 (grub_elf64_load): Likewise.
4077 (grub_elf32_load_segment): Move to a nested function.
4078 (grub_elf64_load_segment): Likewise.
4079
dc946850 40802007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4081
4082 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
4083 prototype.
4084 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
4085 (grub_heap_len): Likewise.
4086 (HEAP_SIZE): New macro.
4087 (grub_claim_heap): New function.
4088 (grub_machine_init): Don't claim heap directly. Call
4089 `grub_claim_heap'.
4090 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
4091 (grub_available_iterate): New function.
4092
baa2a121 40932007-02-03 Thomas Schwinge <tschwinge@gnu.org>
4094
4095 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
4096 * configure.ac: Use it for testing the HOST and TARGET compilers.
4097
4fe9862e 40982006-12-13 Thomas Schwinge <tschwinge@gnu.org>
4099
4100 * Makefile.in (enable_grub_emu): New variable.
4101 * configure.ac (--enable-grub-emu): New option.
4102 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
4103 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
4104 * conf/i386-pc.rmk: Likewise.
4105 * conf/powerpc-ieee1275.rmk: Likewise.
4106 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
4107
a8aa5762 41082006-12-12 Marco Gerards <marco@gnu.org>
4109
4110 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
4111
4112 * kern/env.c (grub_env_unset): Don't free the member `value' when
4113 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
4114 pointer.
4115
4116 * normal/main.c (current_menu): Removed.
4117 (free_menu): Unset the `menu' environment variable.
4118 (grub_normal_menu_addentry): Make use of the environment variable
4119 `menu', instead of using the global `current_menu'. Allocate
4120 memory for the sourcecode of this entry.
4121 (read_config_file): New argument `nested', changed all callers.
4122 Only in the case of a new context, initialize a new menu. Set the
4123 `menu' environment variable.
4124 (grub_normal_execute): Don't set and unset the environment
4125 variable `menu' here anymore. Only free the menu when leaving the
4126 context.
4127
4128 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
4129 leak.
4130
957b3a3e 41312006-12-11 Marco Gerards <marco@gnu.org>
4132
4133 * normal/menu_entry.c (run): Fix off by one bug so the last line
4134 is executed. Move the loader check to outside the loop.
4135
ef875714 41362006-12-08 Hollis Blanchard <hollis@penguinppc.org>
4137
4138 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
4139
4e739985 41402006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
4141
4142 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
4143 the number of sectors. Reported by Andrey Shuvikov
4144 <mr_hyro@yahoo.com>.
4145
790707f2 41462006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
4147
4148 * kern/disk.c (grub_disk_read): When there is a read error, always
4149 try to read only the necessary data.
4150
4151 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
4152 disk/raid.c.
4153 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
4154 prototype.
4155 [GRUB_UTIL] (grub_raid_fini): Likewise.
4156 [GRUB_UTIL] (grub_lvm_init): Likewise.
4157 [GRUB_UTIL] (grub_lvm_fini): Likewise.
4158 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
4159 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
4160 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
4161 and grub_raid_fini().
4162
03e58196 41632006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
4164
4165 * include/grub/types.h (__unused): Rename to UNUSED.
4166 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
4167 (grub_elf64_size): Likewise.
4168
ae4f23bf 41692006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4170
4171 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
4172 grub_error_push and grub_error_pop in the error-handling path.
4173 (grub_elf32_load_segment): Only call grub_file_read with non-zero
4174 length.
4175
2166cc83 41762006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4177
4178 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
4179 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4180 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4181 (kernel_elf_SOURCES): Likewise.
4182 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
4183 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
4184 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4185 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4186 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
4187 (elf_mod_SOURCES): New variable.
4188 (elf_mod_CFLAGS): Likewise.
4189 (elf_mod_LDFLAGS): Likewise.
4190 * include/grub/types.h (__unused): New macro.
4191 * include/grub/elfload.h: New file.
4192 * kern/elf.c: Likewise.
4193 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
4194 (ELF32_LOADMASK): New macro.
4195 (ELF64_LOADMASK): Likewise.
4196 (vmlinux): Removed.
4197 (grub_linux_load32): New function.
4198 (grub_linux_load64): Likewise.
4199 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
4200 Use grub_elf_t instead of grub_file_t.
4201
a09d5aa5 42022006-11-02 Hollis Blanchard <hollis@penguinppc.org>
4203
4204 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
4205 `catch_result' to struct set_color_args.
4206
d976fc51 42072006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4208
4209 * normal/menu.c: Include grub/script.h.
4210 * normal/menu_entry.c: Likewise.
4211 * include/grub/normal.h: Do not include grub/script.h.
4212
67507549 42132006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4214
4215 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
4216
69203a99 42172006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4218
4219 * kern/disk.c (grub_disk_open): Print debug messages when opening a
4220 disk.
4221 (grub_disk_close): Print debug messages when closing a disk.
4222 (grub_disk_read): Print debug messages when disk read fails.
4223 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
4224 filesystem type.
4225 * kern/partition.c: Include misc.h.
4226 (grub_partition_iterate): Print debug messages when detecting
4227 partition type.
4228
e2b8278c 42292006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4230
4231 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
4232 is negative.
4233 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
4234
97b2f2ff 42352006-10-26 Hollis Blanchard <hollis@penguinppc.org>
4236
4237 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4238 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
4239
6555d655 42402006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
4241
4242 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
4243 instead of sizeof(lv). Patch by Michael Guntsche.
4244
4d42b77f 42452006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
4246
4247 * disk/lvm.c: Rename VGS to VG_LIST.
4248 (grub_lvm_iterate): Change VGS->LV to VG-LV.
4249 (grub_lvm_open): Likewise.
4250 Thanks to Michael Guntsche for finding this bug.
4251
5d74d927 42522006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4253
4254 * configure.ac (AC_INIT): Bumped to 1.95.
4255
a1bb27e4 42562006-10-14 Robert Millan <rmh@aybabtu.com>
4257
4258 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
4259 with "/dev/.static/dev/md".
4260
e0994b8b 42612006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4262
4263 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
4264 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
4265 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
4266 DRIVE_NAME are always freed.
4267
4268 * util/i386/pc/biosdisk.c (make_device_name): Add one into
4269 DOS_PART, as a DOS partition is counted from one instead of zero
4270 now. Reported by Robert Millan.
4271
ddd5cee9 42722006-10-14 Robert Millan <rmh@aybabtu.com>
4273
4274 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
4275 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
4276 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
4277 string returned by grub_guess_root_device.
4278 * util/i386/pc/grub-setup.c: Likewise.
4279 * util/i386/pc/grub-probefs.c: Likewise.
4280
4281 * util/i386/pc/grub-probefs.c: Rename to ...
4282 * util/i386/pc/grub-probe.c: ... this.
4283 * DISTLIST: Remove grub-probefs, add grub-probe.
4284 * conf/i386-efi.rmk: Likewise.
4285 * conf/i386-pc.rmk: Likewise.
4286 * util/i386/pc/grub-install.in: Likewise.
4287
4288 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
4289 choose which information we want to print.
4290
2b002173 42912006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4292
4293 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
4294 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
4295 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
4296 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
4297 video/readers/tga.c and video/i386/pc/vbeutil.c.
4298
42992006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
4300
4301 Added support for RAID and LVM.
4302
4303 * disk/lvm.c: New file.
4304 * disk/raid.c: Likewise.
4305 * include/grub/lvm.h: Likewise.
4306 * include/grub/raid.h: Likewise.
4307 * include/grub/util/lvm.h: Likewise.
4308 * include/grub/util/raid.h: Likewise.
4309 * util/lvm.c: Likewise.
4310 * util/raid.c: Likewise.
4311
4312 * include/grub/disk.h (grub_disk_dev_id): Add
4313 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
4314 (grub_disk_get_size): New prototype.
4315 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
4316 returns a partition.
4317 (grub_disk_get_size): New function.
4318
4319 * kern/i386/pc/init.c (make_install_device): Copy the prefix
4320 verbatim if grub_install_dos_part is -2.
4321
4322 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
4323 and LVM devices.
4324
4325 * util/i386/pc/grub-setup.c (setup): New argument
4326 MUST_EMBED. Force embedding of GRUB when the argument is
4327 true. Close FILE before returning.
4328 (main): Add support for RAID and LVM.
4329
4330 * conf/common.rmk: Add RAID and LVM modules.
4331 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
4332 util/lvm.c.
4333 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
4334
4335 * kern/misc.c (grub_strstr): New function.
4336 * include/grub/misc.h (grub_strstr): New prototype.
4337
050548d0 43382006-10-10 Tristan Gingold <tristan.gingold@bull.net>
4339
4340 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
4341
da849d2d 43422006-10-05 Tristan Gingold <tristan.gingold@bull.net>
4343
4344 * kern/misc.c (grub_strtoull): Guess the base only if not
4345 specified.
4346
97b2f2ff 43472006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 4348
4349 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
4350 PowerMac support.
4351
97b2f2ff 43522006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 4353
4354 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
4355
4356 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
4357 Remove `flags' argument. All callers changed.
4358 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
4359 (IEEE1275_IHANDLE_INVALID): New variable.
4360 (IEEE1275_CELL_INVALID): New variable.
4361 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4362 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
4363 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
4364 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
4365 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
4366 codes from Open Firmware. All callers updated.
4367 (grub_ieee1275_next_property): Directly return Open Firmware return
4368 code.
4369 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4370 Standardize error checking from `grub_ieee1275_get_property'.
4371 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
4372 `devalias' to `aliases'. Correct comments. Consolidate error paths.
4373
97b2f2ff 43742006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 4375
4376 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
4377 `instance_to_package_args' to `instance_to_path_args'.
4378
4379 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
4380 `grub_ieee1275_chosen'.
4381
4382 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
4383 `grub_ieee1275_interpret'.
4384
97b2f2ff 43852006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 4386
4387 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
4388
97b2f2ff 43892006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 4390
4391 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
4392 (__cmpdi): Likewise.
4393
4394 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
4395 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
4396 `grub_ssize_t'.
4397
02bb8acc 4398 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 4399
4400 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
4401 to type `grub_ssize_t'.
4402 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
4403
7f9a8531 44042006-09-22 Marco Gerards <marco@gnu.org>
4405
4406 * normal/script.c (grub_script_create_cmdmenu): Skip leading
4407 newlines.
4408
b5ef1102 44092006-09-22 Marco Gerards <marco@gnu.org>
4410
4411 * commands/echo.c: New file.
4412
4413 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
4414
4415 * conf/common.rmk (echo_mod_SOURCES): New variable.
4416 (echo_mod_CFLAGS): Likewise.
4417 (echo_mod_LDFLAGS): Likewise.
4418
2cff3677 44192006-09-22 Marco Gerards <marco@gnu.org>
4420
4421 * normal/main.c (get_line): Malloc memory instead of using
4422 preallocated memory. Removed the arguments `cmdline' and
4423 `max_len'. Updated all callers.
4424
6ba4688b 44252006-09-22 Marco Gerards <marco@gnu.org>
4426
4427 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
4428 (normal_mod_DEPENDENCIES): Likewise.
4429
4430 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
4431 (normal_mod_DEPENDENCIES): Likewise.
4432
4433 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
4434
e02ac02c 44352006-09-22 Johan Rydberg <jrydberg@gnu.org>
4436
4437 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
4438 programs.
4439 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
4440 (normal_mod_DEPENDENCIES): Likewise.
4441 * conf/i386-pc.mk: Regenerate.
4442 * conf/i386-efi.mk: Likewise
4443 * conf/common.mk: Likewise.
4444 * conf/powerpc-ieee1275.mk: Likewise.
4445 * conf/sparc64-ieee1275.mk: Likewise.
4446
8d252e44 44472006-09-22 Robert Millan <rmh@aybabtu.com>
4448
4449 Sync with i386 version.
4450 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
4451 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
4452
209bf7ac 44532006-09-21 Robert Millan <rmh@aybabtu.com>
4454
4455 Import from GRUB Legacy (lib/device.c):
4456 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
4457 (init_device_map) [__linux__]: Add support for I2O devices.
4458
6b146090 44592006-09-14 Marco Gerards <marco@gnu.org>
4460
4461 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
4462 `-melf_i386'.
4463
e38600a8 44642006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 4465
4466 * util/i386/pc/grub-install.in: Skip menu.lst when removing
4467 /boot/grub/*.lst.
78fa1790 4468
2952da5d 4469 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 4470
2952da5d 4471 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
4472 before adding it to device.map.
4473
01b82a64 44742006-08-15 Johan Rydberg <jrydberg@gnu.org>
4475
4476 * genmk.rb: Let GCC generate dependenceies the first time it
4477 compiles a file; using the -MD option.
4478 * conf/common.mk: Regenerate.
4479 * conf/i386-pc.mk: Likewise.
4480 * conf/i386-efi.mk: Likewise.
4481 * conf/powerpc-ieee1275.mk: Likewise.
4482 * conf/sparc64-ieee1275.mk: Likewise.
4483
1064790d 44842006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
4485
4486 Move the prototypes of grub_setjmp and grub_longjmp to
4487 cpu/setjmp.h, so that each architecture may specify different
4488 attributes.
4489
4490 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
4491 (grub_longjmp): Likewise.
4492 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
4493 (grub_longjmp): Likewise.
4494 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
4495 (grub_longjmp): Likewise.
4496
4497 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
4498 [!GRUB_UTIL] (grub_longjmp): Removed.
4499
29dda3ed 45002006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
4501
4502 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
4503 "color!" method does not return any value.
4504
ad2a06ed 45052006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4506
4507 * include/grub/bitmap.h: New file.
4508
4509 * include/grub/i386/pc/vbeutil.h: Likewise.
4510
4511 * video/bitmap.c: Likewise.
4512
4513 * video/readers/tga.c: Likewise.
4514
4515 * video/i386/pc/vbeutil.c: Likewise.
4516
4517 * commands/videotest.c: Code cleanup and updated to reflect to new
4518 video API.
4519
4520 * term/gfxterm.c: Likewise.
4521
4522 * video/video.c: Likewise.
4523
4524 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
4525 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
4526 (bitmap_mod_SOURCES): New entry.
4527 (bitmap_mod_CFLAGS): Likewise.
4528 (bitmap_mod_LDFLAGS): Likewise.
4529 (tga_mod_SOURCES): Likewise.
4530 (tga_mod_CFLAGS): Likewise.
4531 (tga_mod_LDFLAGS): Likewise.
4532
4533 * include/grub/video.h (grub_video_blit_operators): New enum type.
4534 (grub_video_render_target): Changed as forward declaration and moved
4535 actual definition to be video driver specific.
4536 (grub_video_adapter.blit_bitmap): Added blitting operator.
4537 (grub_video_adapter.blit_render_target): Likewise.
4538 (grub_video_blit_bitmap): Likewise.
4539 (grub_video_blit_render_target): Likewise.
4540
4541 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
4542 driver specific render target definition.
4543 (grub_video_vbe_map_rgba): Added driver internal helper.
4544 (grub_video_vbe_unmap_color): Updated to use
4545 grub_video_i386_vbeblit_info.
4546 (grub_video_vbe_get_video_ptr): Likewise.
4547
4548 * include/grub/i386/pc/vbeblit.h
4549 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
4550 grub_video_i386_vbeblit_info.
4551 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4552 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4553 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4554 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4555 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4556 (grub_video_i386_vbeblit_index_index): Likewise.
4557 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
4558 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4559 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4560 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
4561 operator.
4562 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
4563 operator.
4564
4565 * video/i386/pc/vbeblit.c: Updated to reflect changes on
4566 include/grub/i386/pc/vbeblit.h.
4567
4568 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
4569 Updated to use grub_video_i386_vbeblit_info.
4570 (grub_video_i386_vbefill_R8G8B8): Likewise.
4571 (grub_video_i386_vbefill_index): Likewise.
4572 (grub_video_i386_vbefill): Added generic filler.
4573
4574 * video/i386/pc/vbefill.c: Updated to reflect changes on
4575 include/grub/i386/pc/vbefill.h.
4576
4577 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
4578 grub_video_i386_vbeblit_info.
4579 (grub_video_vbe_unmap_color): Likewise.
4580 (grub_video_vbe_blit_glyph): Likewise.
4581 (grub_video_vbe_scroll): Likewise.
4582 (grub_video_vbe_draw_pixel): Removed function.
4583 (grub_video_vbe_get_pixel): Likewise.
4584 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
4585 updated code to use it.
4586 (common_blitter): Added common blitter for render target and bitmap.
4587 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
4588 (grub_video_vbe_blit_render_target): Likewise.
4589
bc8c036d 45902006-07-30 Johan Rydberg <jrydberg@gnu.org>
4591
4592 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
4593 is in text mode if there is no console control protocol instance
4594 available.
4595
684a8eff 45962006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4597
4598 * include/grub/video.h: Code cleanup.
4599
4600 * include/grub/i386/pc/vbe.h: Likewise.
4601
4602 * video/i386/pc/vbe.c: Likewise.
4603
4604 * video/i386/pc/vbeblit.c: Likewise.
4605
4606 * video/i386/pc/vbefill.c: Likewise.
4607
4608 * video/video.c: Likewise. Also added more comments.
4609
5915059b 46102006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4611
4612 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
4613 (struct grub_biosdisk_dap): Likewise.
4614
4615 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
4616 linkage settings for all functions.
4617
90ce5d56 46182006-07-12 Marco Gerards <marco@gnu.org>
4619
4620 * configure.ac (--enable-mm-debug): Fix typo.
4621
4622 * genkernsyms.sh.in: Use proper quoting for `CC'.
4623
43e7f879 46242006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
4625
4626 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
4627 (normal_mod_ASFLAGS): Remove "-m32".
4628
4889bdec 46292006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
4630
4631 * util/misc.c: Include config.h.
4632 [!HAVE_MEMALIGN]: Do not include malloc.h.
4633 (grub_memalign): Use posix_memalign, if present. Then, use
4634 memalign, if present. Otherwise, emit an error.
4635
4636 * util/grub-emu.c: Do not include malloc.h.
4637
4638 * include/grub/util/misc.h: Include unistd.h. This is required for
4639 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
4640 D. Eades III <hde@foobar-qux.org>.
4641
4642 * configure.ac (AC_GNU_SOURCE): Added.
4643 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
4644 type.
4645
fd39d4da 46462006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
4647
4648 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
4649 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
4650
b786f3b5 46512006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
4652
4653 * include/grub/types.h (grub_host_addr_t): Rename to
4654 grub_target_addr_t.
4655 (grub_host_off_t): Rename to grub_target_off_t.
4656 (grub_host_size_t): Rename to grub_target_size_t.
4657 (grub_host_ssize_t): Rename to grub_target_ssize_t.
4658 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
4659
4660 * include/grub/kernel.h (struct grub_module_header): Change type
4661 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
4662 (grub_module_info): Likewise.
4663
051988bb 46642006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4665
4666 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
4667 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
4668 Velazquez <jesus.velazquez@gmail.com>.
4669
deae281b 46702006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4671
4672 Count partitions from 1 instead of 0 in the string representation
4673 of partitions. Still use 0-based internally.
4674
4675 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
4676 (sun_partition_map_iterate): Use grub_partition_t instead of
4677 struct grub_partition *. Cast DESC->START_CYLINDER to
4678 grub_uint64_t after converting the endian.
4679 (sun_partition_map_probe): Subtract 1 for PARTNUM.
4680 (sun_partition_map_get_name): Add 1 to P->INDEX.
4681
4682 * partmap/pc.c (grub_partition_parse): Subtract 1 for
4683 PCDATA->DOS_PART.
4684 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
4685
4686 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
4687 zero instead of one.
4688 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
4689 (gpt_partition_map_get_name): Add 1 into P->INDEX.
4690
4691 * partmap/apple.c (apple_partition_map_iterate): Change the type
4692 of POS to unsigned.
4693 (apple_partition_map_probe): Subtract 1 for PARTNUM.
4694 (apple_partition_map_get_name): Add 1 into P->INDEX.
4695
4696 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
4697 of POS to unsigned.
4698 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
4699 calculate the offset of a partition.
4700 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
4701 (amiga_partition_map_get_name): Add 1 into P->INDEX.
4702
4703 * partmap/acorn.c (acorn_partition_map_find): Change the type of
4704 SECTOR to grub_disk_addr_t.
4705 (acorn_partition_map_iterate): Likewise.
4706 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
4707 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
4708 top.
4709 (acorn_partition_map_get_name): Add 1 into P->INDEX.
4710
4711 * kern/i386/pc/init.c (make_install_device): Add 1 into
4712 GRUB_INSTALL_DOS_PART.
4713
4714 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
4715 conditional.
4716
524a1e6a 47172006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4718
4719 Clean up the code to support 64-bit addressing in disks and
4720 files. This change is not enough for filesystems yet.
4721
4722 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
4723 type of "start" to grub_uint64_t.
4724 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
4725 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
4726 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
4727 convert addresses.
4728
4729 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
4730 to grub_disk_addr_t.
4731
4732 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
4733 string.
4734
4735 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4736
4737 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
4738 to char *.
4739
4740 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
4741
4742 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
4743
4744 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
4745
4746 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
4747 to grub_off_t, to detect an error from grub_file_seek.
4748 (grub_multiboot_load_elf32): Likewise.
4749
4750 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
4751 maximum unsigned long value when an overflow is detected.
4752 (grub_strtoull): New function.
4753 (grub_divmod64): Likewise.
4754 (grub_lltoa): use grub_divmod64.
4755
4756 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
4757 grub_disk_addr_t.
4758 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
4759 the pointer to next character. Use grub_strtoull instead of
4760 grub_strtoul.
4761 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4762 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4763 respectively.
4764
4765 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
4766 return value is signed.
4767 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4768 test if OFFSET is less than zero, as OFFSET is unsigned now.
4769
4770 * kern/disk.c (struct grub_disk_cache): Change the type of
4771 "sector" to grub_disk_addr_t.
4772 (grub_disk_cache_get_index): Change the type of SECTOR to
4773 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4774 unsigned after shifting.
4775 (grub_disk_cache_invalidate): Change the type of SECTOR to
4776 grub_disk_addr_t.
4777 (grub_disk_cache_unlock): Likewise.
4778 (grub_disk_cache_store): Likewise.
4779 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4780 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4781 grub_disk_addr_t and grub_uint64_t, respectively.
4782 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4783 body, as the value of OFFSET is tweaked by
4784 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4785 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4786 respectively.
4787 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4788 body, as the value of OFFSET is tweaked by
4789 grub_disk_check_range. Change the types of LEN and N to
4790 grub_size_t.
4791
4792 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4793 and "saved_offset" to grub_off_t.
4794 (test_header): Cast BUF to char *.
4795 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4796 to char *.
4797 (grub_gzio_read): Change the types of OFFSET and SIZE to
4798 grub_off_t and grub_size_t, respectively.
4799
4800 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4801 Removed.
4802 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4803 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4804 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4805 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4806 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4807
4808 * include/grub/types.h (grub_off_t): Unconditionally set to
4809 grub_uint64_t.
4810 (grub_disk_addr_t): Changed to grub_uint64_t.
4811
4812 * include/grub/partition.h (struct grub_partition): Change the
4813 types of "start", "len" and "offset" to grub_disk_addr_t,
4814 grub_uint64_t and grub_disk_addr_t, respectively.
4815 (grub_partition_get_start): Return grub_disk_addr_t.
4816 (grub_partition_get_len): Return grub_uint64_t.
4817
4818 * include/grub/misc.h (grub_strtoull): New prototype.
4819 (grub_divmod64): Likewise.
4820
4821 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4822 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4823 grub_off_t, respectively.
4824 All callers and references changed.
4825
4826 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4827 grub_size_t in "read".
4828 All callers and references changed.
4829
4830 * include/grub/file.h (struct grub_file): Change the types of
4831 "offset" and "size" to grub_off_t and grub_off_t,
4832 respectively. Change the type of SECTOR to grub_disk_addr_t in
4833 "read_hook".
4834 (grub_file_read): Change the type of LEN to grub_size_t.
4835 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4836 grub_off_t.
4837 (grub_file_size): Return grub_off_t.
4838 (grub_file_tell): Likewise.
4839 All callers and references changed.
4840
4841 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4842 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4843 "write".
4844 (struct grub_disk): Change the type of "total_sectors" to
4845 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4846 "read_hook".
4847 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4848 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4849 (grub_disk_write): Likewise.
4850 All callers and references changed.
4851
4852 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4853 char * for grub_strncmp to silence gcc.
4854 (grub_iso9660_mount): Likewise.
4855 (grub_iso9660_mount): Likewise.
4856 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4857 return statement.
4858 (grub_iso9660_iterate_dir): Likewise.
4859 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4860
4861 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4862 LEN to grub_disk_addr_t and grub_size_t, respectively.
4863
4864 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4865
4866 * fs/jfs.c (grub_jfs_read_file): Likewise.
4867
4868 * fs/minix.c (grub_jfs_read_file): Likewise.
4869
4870 * fs/sfs.c (grub_jfs_read_file): Likewise.
4871
4872 * fs/ufs.c (grub_jfs_read_file): Likewise.
4873
4874 * fs/xfs.c (grub_jfs_read_file): Likewise.
4875
4876 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4877 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4878 respectively.
4879
4880 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4881 BLKNR to -1 instead of returning GRUB_ERRNO.
4882 (grub_ext2_read_file): Change the types of SECTOR and
4883 LEN to grub_disk_addr_t and grub_size_t, respectively.
4884
4885 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4886 LEN to grub_disk_addr_t and grub_size_t, respectively.
4887
4888 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4889 grub_file_read.
4890
4891 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4892 string. Do not cast SECTOR explicitly.
4893
4894 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4895 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4896 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4897 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4898 over 2TB and LBA mode is not supported, raise an error.
4899 (get_safe_sectors): New function.
4900 (grub_biosdisk_read): Use get_safe_sectors.
4901 (grub_biosdisk_write): Likewise.
4902
4903 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4904 (grub_efidisk_write): Likewise.
4905
4906 * disk/loopback.c (delete_loopback): Cosmetic changes.
4907 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4908 correctly.
4909 (grub_loopback_open): Likewise.
4910 (grub_loopback_read): Likewise. Also, change the type of POS to
4911 grub_off_t, and fix the usage of grub_memset.
4912
4913 * commands/i386/pc/play.c: Include grub/machine/time.h.
4914
4915 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4916 print FILE->SIZE.
4917
4918 * commands/configfile.c: Include grub/env.h.
4919
4920 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4921 GRUB_ERRNO directly instead. Change the type of POS to
4922 grub_off_t. Follow the coding standard.
4923
4924 * commands/blocklist.c: Include grub/partition.h.
4925 (grub_cmd_blocklist): Return an error if the underlying device is
4926 not a disk. Take the starting sector of a partition into account,
4927 if a partition is used.
4928
4929 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4930 a length field.
4931 (lba_mode): Support 64-bit addresses.
4932 (chs_mode): Likewise.
4933 (copy_buffer): Adapted to the new offsets of a length field and a
4934 segment field.
4935 (blocklist_default_start): Allocate 64-bit space.
4936
4937 * boot/i386/pc/boot.S (force_lba): Removed.
4938 (boot_drive): Moved to under KERNEL_SECTOR.
4939 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4940 space.
4941 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4942 is useless.
4943 (lba_mode): Refactored to support a 64-bit address. More size
4944 optimization.
4945 (setup_sectors): Likewise.
4946
53af98ad 49472006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4948
4949 * DISTLIST: Added include/grub/i386/linux.h. Removed
4950 include/grub/i386/pc/linux.h
4951
4952 * configure.ac (AC_INIT): Bumped to 1.94.
4953
4954 * config.guess: Updated from gnulib.
4955 * config.sub: Likewise.
4956 * install-sh: Likewise.
4957 * mkinstalldirs: Likewise.
4958
b4c1940a 49592006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4960
4961 * conf/common.rmk (grub_modules_init.lst): Depended on
4962 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4963 MODSRCFILES.
4964
4965 * genmk.rb (PModule::rule): Reverted the previous change.
4966
cfca1cfd 49672006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4968
4969 * conf/common.rmk (grub_modules_init.lst): Depends on
4970 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4971 that the target does not exist before producing.
4972 (grub_modules_init.h): Remove the target before generating.
4973 (grub_emu_init.c): Likewise.
4974
4975 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4976
aa6d7826 49772006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
4978
4979 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4980 for the target-specific tests. Make sure that we also have the
4981 up-to-date target variables for those tests.
4982
26c607b9 49832006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4984
4985 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4986 (PModule::rule): Likewise.
4987
0162321a 49882006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4989
4990 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4991 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4992 target-specific flags should be prefixed.
4993 (PModule::rule): Likewise.
4994
6c826348 49952006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
4996
4997 * configure.ac (CMP): Check if cmp is available explicitly.
4998
b977bf01 49992006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
5000
5001 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
5002 (target_cpu): New variable.
5003 (pkglibdir): Use target_cpu instead of host_cpu.
5004
5005 * util/i386/pc/grub-install.in (host_cpu): Removed.
5006 (target_cpu): New variable.
5007 (pkglibdir): Use target_cpu instead of host_cpu.
5008
5009 * util/genmoddep.c: Removed.
5010
5011 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
5012 instead of GRUB_HOST_SIZEOF_VOID_P.
5013 * kern/dl.c: Likewise.
5014
5015 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
5016 ...
5017 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5018 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5019 (GRUB_TARGET_SIZEOF_LONG): ... this.
5020 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5021 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5022 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5023 to ...
5024 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5025 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5026 (GRUB_TARGET_SIZEOF_LONG): ... this.
5027 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5028 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5029 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5030 to ...
5031 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5032 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5033 (GRUB_TARGET_SIZEOF_LONG): ... this.
5034 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5035 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5036
5037 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
5038 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
5039 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
5040 instead of GRUB_HOST_SIZEOF_LONG.
5041 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
5042 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
5043 GRUB_CPU_WORDS_BIGENDIAN.
5044 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
5045 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
5046 grub_host_ssize_t.
5047
5048 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
5049 (genmoddep_SOURCES): Likewise.
5050 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
5051 (genmoddep_SOURCES): Likewise.
5052 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
5053 (genmoddep_SOURCES): Likewise.
5054 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
5055 Likewise.
5056 (genmoddep_SOURCES): Likewise.
5057
5058 * genmoddep.awk: New file.
5059
5060 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
5061 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
5062 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
5063 (PModule::rule): Likewise.
5064 (Program::rule): Likewise.
5065 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
5066 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
5067 respectively.
5068
5069 * configure.ac: Rewritten intensively to use host and target
5070 instead of build and host, respectively.
5071
5072 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
5073 (host_cpu): Removed.
5074 (target_cpu): New variable.
5075 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
5076 (BUILD_CC): Removed.
5077 (BUILD_CFLAGS): Likewise.
5078 (BUILD_CPPFLAGS): Likewise.
5079 (TARGET_CC): New variable.
5080 (TARGET_CFLAGS): Likewise.
5081 (TARGET_CPPFLAGS): Likewise.
5082 (TARGET_LDFLAGS): Likewise.
5083 (AWK): Likewise.
5084 (include): Use target_cpu instead of host_cpu.
5085 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
5086
5087 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
5088
f09771a1 50892006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
5090
5091 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
5092 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
5093 field 'false' to 'exec_on_false'.
5094 (grub_script_create_cmdif): Renamed argument names to reflect above
5095 changes.
5096
5097 * normal/execute.c (grub_script_execute_cmdif): Likewise.
5098
5099 * normal/script.c (grub_script_create_cmdif): Likewise.
5100
118f4fb3 51012006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
5102
5103 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
5104 top.
5105 (grub_hfsplus_btree_recptr): Likewise.
5106 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
5107 FILEBLOCK both to pass a block number and store next block
5108 number.
5109 (grub_hfsplus_read_block): Rewritten heavily to support an extent
5110 overflow file correctly. Specify errors appropriately, because
5111 fshelp expects that GRUB_ERRNO is set when fails. Reuse
5112 grub_hfsplus_btree_recptr to get the pointer to a found key.
5113 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
5114 is found.
5115
5116 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
5117 linux.mod.
5118 (_linux_mod_SOURCES): New variable.
5119 (_linux_mod_CFLAGS): Likewise.
5120 (_linux_mod_LDFLAGS): Likewise.
5121 (linux_mod_SOURCES): Likewise.
5122 (linux_mod_CFLAGS): Likewise.
5123 (linux_mod_LDFLAGS): Likewise.
5124
5125 * DISTLIST: Added loader/i386/efi/linux.c,
5126 loader/i386/efi/linux_normal.c and
5127 include/grub/i386/efi/loader.h.
5128
5129 * loader/i386/efi/linux.c: New file.
5130 * loader/i386/efi/linux_normal.c: Likewise.
5131 * include/grub/i386/efi/loader.h: Likewise.
5132
89a7d726 51332006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
5134
5135 * commands/blocklist.c: New file.
5136
5137 * DISTLIST: Added commands/blocklist.c.
5138
5139 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 5140 color for the background, and a darker color for the foreground.
89a7d726 5141 (grub_console_checkkey): Return READ_KEY.
5142 (grub_console_cls): Set the background to
5143 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
5144
5145 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
5146
5147 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
5148 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
5149
5150 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
5151 prototype.
5152
5153 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
5154 BG. The spec is wrong again.
5155
5156 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
5157 prototype.
5158 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
5159
5160 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5161 commands/blocklist.c.
5162 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5163
5164 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
5165 (blocklist_mod_SOURCES): New variable.
5166 (blocklist_mod_CFLAGS): Likewise.
5167 (blocklist_mod_LDFLAGS): Likewise.
5168
75c8f258 51692006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
5170
5171 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
5172 duplication.
5173 (lba_mode): Use %eax more intensively to reduce the code size.
5174
da2eb181 51752006-05-20 Marco Gerards <marco@gnu.org>
5176
5177 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
5178
5179 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
5180 for `menuentry'.
5181 (script): Accept leading newlines.
5182 (newlines): New rule to describe 0 or more newlines.
5183 (commands): Accept `command' with trailing newline. Fixed the
5184 order in which arguments were passed to `grub_script_add_cmd'.
5185 Accept commands separated by newlines.
5186 (function): Changed to accept newlines.
5187 (menuentry) Rewritten.
5188
5189 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
5190 front of the list, instead of to the end.
5191
577b4050 51922006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
5193
5194 * util/i386/pc/grub-install.in (bindir): New variable.
5195 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
5196 Shaver <lbgwjl@gmail.com>.
5197
0d6e1189 51982006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
5199
5200 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
5201 grub/machine/linux.h
5202 * loader/i386/pc/linux.c: Likewise.
5203
5204 * include/grub/i386/pc/linux.h: Moved to ...
5205 * include/grub/i386/linux.h: ... here.
5206
5207 * include/grub/i386/linux.h (struct linux_kernel_params): New
5208 struct.
5209
31b86e9f 52102006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
5211
5212 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
5213 checking.
5214 (grub_video_vbe_blit_glyph): Likewise.
5215 (grub_video_vbe_blit_bitmap): Likewise.
5216 (grub_video_vbe_blit_render_target): Likewise.
5217
83b984de 52182006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
5219
5220 * configure.ac (--with-platform): Properly quote the square
5221 brackets.
5222
5f0413bd 52232006-05-08 Marco Gerards <marco@gnu.org>
5224
5225 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
5226 this...
5227 (kernel_elf_HEADERS): ...to this. Updated all users.
5228 (grubof_symlist.c): Renamed from this...
5229 (kernel_elf_symlist.c): ...to this. Updated all users.
5230 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5231 (grubof_SOURCES): Renamed from this...
5232 (kernel_elf_SOURCES): ...to this.
5233 (grubof_HEADERS): Renamed from this...
5234 (kernel_elf_HEADERS): ...to this.
5235 (grubof_CFLAGS): Renamed from this...
5236 (kernel_elf_CFLAGS): ...to this.
5237 (grubof_ASFLAGS): Renamed from this...
5238 (kernel_elf_ASFLAGS): ...to this.
5239 (grubof_LDFLAGS): Renamed from this...
5240 (kernel_elf_LDFLAGS): ...to this.
5241
5242 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
5243 this...
5244 (kernel_elf_HEADERS): ...to this. Updated all users.
5245 (grubof_symlist.c): Renamed from this...
5246 (kernel_elf_symlist.c): ...to this. Updated all users.
5247 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5248 (grubof_SOURCES): Renamed from this...
5249 (kernel_elf_SOURCES): ...to this.
5250 (grubof_HEADERS): Renamed from this...
5251 (kernel_elf_HEADERS): ...to this.
5252 (grubof_CFLAGS): Renamed from this...
5253 (kernel_elf_CFLAGS): ...to this.
5254 (grubof_ASFLAGS): Renamed from this...
5255 (kernel_elf_ASFLAGS): ...to this.
5256 (grubof_LDFLAGS): Renamed from this...
5257 (kernel_elf_LDFLAGS): ...to this.
5258
5259 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
5260 `kernel.elf' instead of `grubof'.
5261
05568c2e 52622006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
5263
5264 Add --with-platform to configure. Use pkglibdir instead of
5265 pkgdatadir. This is reported by Roger Leigh.
5266
5267 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
5268 (host_vendor): Likewise.
5269 (host_os): Likewise.
5270 (pkgdatadir): Likewise.
5271 (platform): New variable.
5272 (pkglibdir): Likewise.
5273 Use PKGLIBDIR instead of PKGDATADIR.
5274
5275 * util/i386/pc/grub-install.in (datadir): Removed.
5276 (host_vendor): Likewise.
5277 (host_os): Likewise.
5278 (pkgdatadir): Likewise.
5279 (platform): New variable.
5280 (pkglibdir): Likewise.
5281 Use PKGLIBDIR instead of PKGDATADIR.
5282
5283 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
5284 instead of GRUB_DATADIR.
5285 (main): Likewise.
5286 * util/i386/pc/grub-mkimage.c (usage): Likewise.
5287 (main): Likewise.
5288 * util/i386/efi/grub-mkimage.c (usage): Likewise.
5289 (main): Likewise.
5290
5291 * configure.ac (--with-platform): New option.
5292 Use PLATFORM instead of HOST_VENDOR to specify a platform.
5293
5294 * Makefile.in: Include a makefile based on PLATFORM instead of
5295 HOST_VENDOR.
5296 (pkgdatadir): Not appended by the machine type.
5297 (pkglibdir): Appended by the machine type.
5298 (host_vendor): Removed.
5299 (platform): New variable.
5300 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
5301 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
5302 (uninstall): Likewise.
5303
4e93851c 53042006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
5305
5306 Use the environment context in the menu. Remove the commands
5307 "default" and "timeout", and use variables instead.
5308
5309 * normal/menu.c: Include grub/env.h.
5310 (print_entry): Cast TITLE to silence gcc.
5311 (get_timeout): New function.
5312 (set_timeout): Likewise.
5313 (get_entry_number): Likewise.
5314 (run_menu): Use a default entry, a fallback entry and a timeout
5315 in the environment variables "default", "fallback" and
5316 "timeout". Also, tweak the default entry if it is not within the
5317 current menu entries.
5318 (grub_menu_run): Use a fallback entry in the environment variable
5319 "fallback".
5320
5321 * normal/main.c (read_config_file): Do not initialize
5322 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
5323 NEWMENU->TIMEOUT.
5324 (grub_normal_execute): Use a data slot to store the menu.
5325
5326 * include/grub/normal.h (struct grub_menu): Removed default_entry,
5327 fallback_entry and timeout.
5328 (struct grub_menu_list): Removed.
5329 (grub_menu_list_t): Likewise.
5330 (struct grub_context): Likewise.
5331 (grub_context_t): Likewise.
5332 (grub_context_get): Likewise.
5333 (grub_context_get_current_menu): Likewise.
5334 (grub_context_push_menu): Likewise.
5335 (grub_context_pop_menu): Likewise.
5336 (grub_default_init): Likewise.
5337 (grub_default_fini): Likewise.
5338 (grub_timeout_init): Likewise.
5339 (grub_timeout_fini): Likewise.
5340
5341 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
5342 and timeout.mod.
5343 (normal_mod_SOURCES): Removed normal/context.c.
5344
5345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
5346 commands/default.c, commands/timeout.c and normal/context.c.
5347 (normal_mod_SOURCES): Removed normal/context.c.
5348
5349 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
5350 commands/timeout.c and normal/context.c.
5351 (normal_mod_SOURCES): Removed normal/context.c.
5352
5353 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
5354 commands/default.c, commands/timeout.c and normal/context.c.
5355 (normal_mod_SOURCES): Removed normal/context.c.
5356
5357 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
5358 timeout.mod.
5359 (default_mod_SOURCES): Removed.
5360 (default_mod_CFLAGS): Likewise.
5361 (default_mod_LDFLAGS): Likewise.
5362 (timeout_mod_SOURCES): Removed.
5363 (timeout_mod_CFLAGS): Likewise.
5364 (timeout_mod_LDFLAGS): Likewise.
5365
5366 * DISTLIST: Removed commands/default.c, commands/timeout.c and
5367 normal/context.c.
5368
5369 * commands/default.c: Removed.
5370 * commands/timeout.c: Likewise.
5371 * normal/context.c: Likewise.
5372
1eb9cc1d 53732006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
5374
5375 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
5376
385bd9c1 53772006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
5378
5379 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
5380 "next" to "prev" for readability.
5381 (struct grub_env_sorted_var): New struct.
5382 (grub_env_context): Renamed to ...
5383 (initial_context): ... this.
5384 (grub_env_var_context): Renamed to ...
5385 (current_context): ... this.
5386 (grub_env_find): Look only at CURRENT_CONTEXT.
5387 (grub_env_context_open): Rewritten to copy exported variables from
5388 previous context.
5389 (grub_env_context_close): Rewritten according to the new
5390 scheme. Also, add an assertion to prevent the initial context from
5391 removed.
5392 (grub_env_insert): Removed the code for the sorted list.
5393 (grub_env_remove): Likewise.
5394 (grub_env_export): Simply mark the variable with
5395 GRUB_ENV_VAR_GLOBAL.
5396 (grub_env_set): A cosmetic change for naming consistency.
5397 (grub_env_get): Likewise.
5398 (grub_env_unset): Likewise.
5399 (grub_env_iterate): Rewritten to sort variables within this
5400 function.
5401 (grub_register_variable_hook): Fixed for naming consistency. Call
5402 grub_env_find again, only if NAME is not found at the first time.
5403 (mangle_data_slot_name): New function.
5404 (grub_env_set_data_slot): Likewise.
5405 (grub_env_get_data_slot): Likewise.
5406 (grub_env_unset_data_slot): Likewise.
5407
5408 * include/grub/env.h (grub_env_var_type): New enum.
5409 (GRUB_ENV_VAR_LOCAL): New constant.
5410 (GRUB_ENV_VAR_GLOBAL): Likewise.
5411 (GRUB_ENV_VAR_DATA): Likewise.
5412 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
5413 "type".
5414 (grub_env_set): Replace VAR with NAME for consistency.
5415 (grub_register_variable_hook): Likewise.
5416 (grub_env_export): Specify the name of the argument.
5417 (grub_env_set_data_slot): New prototype.
5418 (grub_env_get_data_slot): Likewise.
5419 (grub_env_unset_data_slot): Likewise.
5420
7f362539 54212006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5422
5423 Extend the loader so that GRUB can accept a loader which comes
5424 back to GRUB when a loaded image exits. Also, this change adds
5425 support for a chainloader on EFI.
5426
5427 * term/efi/console.c: Include grub/misc.h.
5428 (grub_console_checkkey): Display a scan code on the top for
5429 debugging. This will be removed once the EFI port gets stable.
5430 Correct the scan code mapping.
5431
5432 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
5433 allocate memory from larger regions, in order to reduce the number
5434 of allocated regions. Otherwise, the MacOSX loader panics.
5435 (filter_memory_map): Avoid less than 1MB for compatibility with
5436 other loaders.
5437 (add_memory_regions): Allocate from the tail of a region, if
5438 possible, to avoid allocating a region near to 1MB, for the MacOSX
5439 loader.
5440
5441 * kern/efi/init.c (grub_efi_set_prefix): Specify
5442 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
5443
5444 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
5445 argument IMAGE_HANDLE and specify it to get a loaded image.
5446 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
5447 grub_efi_get_loaded_image.
5448 (grub_efi_get_filename): Divide the legnth by the size of
5449 grub_efi_char16_t.
5450 (grub_efi_get_device_path): New function.
5451 (grub_efi_print_device_path): Print End Device Path nodes. Divide
5452 the length by the size of grub_efi_char16_t for a file path device
5453 path node.
5454
5455 * kern/loader.c (grub_loader_noreturn): New variable.
5456 (grub_loader_set): Accept a new argument NORETURN. Set
5457 GRUB_LOADER_NORETURN to NORETURN.
5458 All callers changed.
5459 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
5460 grub_machine_fini.
5461
5462 * include/grub/efi/efi.h (grub_efi_get_device_path): New
5463 prototype.
5464 (grub_efi_get_loaded_image): Take an argument to specify an image
5465 handle.
5466
5467 * include/grub/loader.h (grub_loader_set): Added one more argument
5468 NORETURN.
5469
5470 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
5471 instead of grub_efi_open_protocol.
5472 (grub_efidisk_get_device_name): Likewise.
5473 (grub_efidisk_close): Print a newline.
5474 (grub_efidisk_get_device_handle): Fixed to use
5475 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
5476 GRUB_EFI_DEVICE_PATH_TYPE.
5477
5478 * disk/efi/efidisk.c (device_path_guid): Moved to ...
5479 * kern/efi/efi.c (device_path_guid): ... here.
5480
5481 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
5482 chain.mod.
5483 (kernel_mod_HEADERS): Added efi/disk.h.
5484 (_chain_mod_SOURCES): New variable.
5485 (_chain_mod_CFLAGS): Likewise.
5486 (_chain_mod_LDFLAGS): Likewise.
5487 (chain_mod_SOURCES): Likewise.
5488 (chain_mod_CFLAGS): Likewise.
5489 (chain_mod_LDFLAGS): Likewise.
5490
5491 * DISTLIST: Added include/grub/efi/chainloader.h,
5492 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
5493
5494 * include/grub/efi/chainloader.h: New file.
5495 * loader/efi/chainloader.c: Likewise.
5496 * loader/efi/chainloader_normal.c: Likewise.
5497
c0111d6e 54982006-04-30 Marco Gerards <marco@gnu.org>
5499
5500 * commands/configfile.c (grub_cmd_source): New function.
5501 (GRUB_MOD_INIT): Register the commands `source' and `.'.
5502 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
5503
df5341da 55042006-04-30 Marco Gerards <marco@gnu.org>
5505
5506 * normal/execute.c (grub_script_execute_cmd): Change the return
5507 type to `grub_err_t'. Correctly return the error.
5508 (grub_script_execute_cmdline): In case a command line is not a
5509 command or a function, try to interpret it as an assignment.
5510
f85934bd 55112006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5512
5513 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
5514 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
5515 skip a node whose name is obviously invalid as UTF-16,
5516 i.e. contains a NUL character. Stop the iteration when the last
5517 directory entry is found. Instead of using the return value of
5518 grub_hfsplus_btree_iterate_node, store the value in RET and use
5519 it, because the iterator can be stopped by the last directory
5520 entry.
5521
8f8a2cf8 55222006-04-30 Marco Gerards <marco@gnu.org>
5523
5524 * include/grub/env.h (grub_env_export): New prototype. Reported
5525 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
5526
a27e84ce 55272006-04-30 Marco Gerards <marco@gnu.org>
5528
5529 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
5530 size of the extents in a catalog file record.
5531
eaef0553 55322006-04-29 Marco Gerards <marco@gnu.org>
5533
5534 * commands/configfile.c (grub_cmd_configfile): Execute the
5535 configfile within its own context.
5536
5537 * include/grub/env.h (grub_env_context_open): New prototype.
5538 (grub_env_context_close): Likewise.
5539
5540 * kern/env.c (grub_env): Removed.
5541 (grub_env_sorted): Likewise.
5542 (grub_env_context): New variable.
5543 (grub_env_var_context): Likewise.
5544 (grub_env_find): Search both the active context and the global
5545 context.
5546 (grub_env_context_open): New function.
5547 (grub_env_context_close): Likewise.
5548 (grub_env_insert): Likewise.
5549 (grub_env_remove): Likewise.
5550 (grub_env_export): Likewise.
5551 (grub_env_set): Changed to use helper functions to avoid code
5552 duplication.
5553 (grub_env_iterate): Rewritten so both the current context and the
5554 global context are being used.
5555
5556 * normal/command.c (export_command): New function.
5557 (grub_command_init): Register the `export' function.
5558
7b455f4d 55592006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
5560
5561 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
5562 explicitly to suppress gcc's warnings.
5563 * fs/fat.c (grub_fat_find_dir): Likewise.
5564 (grub_fat_label): Likewise.
5565 * fs/xfs.c (grub_xfs_read_inode): Likewise.
5566 (grub_xfs_mount): Likewise.
5567 (grub_xfs_label): Likewise.
5568 * fs/affs.c (grub_affs_mount): Likewise.
5569 (grub_affs_label): Likewise.
5570 (grub_affs_iterate_dir): Likewise.
5571 * fs/sfs.c (grub_sfs_mount): Likewise.
5572 (grub_sfs_iterate_dir): Likewise.
5573 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
5574 * fs/hfs.c (grub_hfs_mount): Likewise.
5575 (grub_hfs_cmp_catkeys): Likewise.
5576 (grub_hfs_find_dir): Likewise.
5577 (grub_hfs_dir): Likewise.
5578 (grub_hfs_label): Likewise.
5579 * fs/jfs.c (grub_jfs_mount): Likewise.
5580 (grub_jfs_opendir): Likewise.
5581 (grub_jfs_getent): Likewise.
5582 (grub_jfs_lookup_symlink): Likewise.
5583 (grub_jfs_label): Likewise.
5584 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
5585 (grub_hfsplus_iterate_dir): Likewise.
5586 (grub_hfsplus_btree_iterate_node): Made static.
5587
5588 * util/grub-emu.c (prefix): New variable.
5589 (grub_machine_set_prefix): New function.
5590 (main): Do not set the environment variable "prefix" here. Only
5591 set PREFIX, which is used later by grub_machine_set_prefix.
5592
5593 * include/grub/video.h: Do not include grub/symbol.h.
5594 (grub_video_register): Not exported. This symbol is not defined in
5595 the kernel.
5596 (grub_video_unregister): Likewise.
5597 (grub_video_iterate): Likewise.
5598 (grub_video_setup): Likewise.
5599 (grub_video_restore): Likewise.
5600 (grub_video_get_info): Likewise.
5601 (grub_video_get_blit_format): Likewise.
5602 (grub_video_set_palette): Likewise.
5603 (grub_video_get_palette): Likewise.
5604 (grub_video_set_viewport): Likewise.
5605 (grub_video_get_viewport): Likewise.
5606 (grub_video_map_color): Likewise.
5607 (grub_video_map_rgb): Likewise.
5608 (grub_video_map_rgba): Likewise.
5609 (grub_video_fill_rect): Likewise.
5610 (grub_video_blit_glyph): Likewise.
5611 (grub_video_blit_bitmap): Likewise.
5612 (grub_video_blit_render_target): Likewise.
5613 (grub_video_scroll): Likewise.
5614 (grub_video_swap_buffers): Likewise.
5615 (grub_video_create_render_target): Likewise.
5616 (grub_video_delete_render_target): Likewise.
5617 (grub_video_set_active_render_target): Likewise.
5618
5619 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
5620 Undefined.
5621 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
5622
5623 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
5624 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5625 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5626 instead of $(srcdir)/genkernsyms.sh.
5627
5628 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
5629 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5630 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5631 instead of $(srcdir)/genkernsyms.sh.
5632
5633 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
5634 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5635 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5636 instead of $(srcdir)/genkernsyms.sh.
5637
5638 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
5639 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5640 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5641 instead of $(srcdir)/genkernsyms.sh.
5642
5643 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
5644 genkernsyms.sh.
5645
5646 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
5647 genkernsyms.sh.
5648 (gensymlist.sh): New target.
5649 (genkernsyms.sh): Likewise.
5650
5651 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
5652 genkernsyms.sh.in and gensymlist.sh.in.
5653
5654 * genkernsyms.sh: Removed.
5655 * gensymlist.sh: Likewise.
5656
5657 * genkernsyms.sh.in: New file.
5658 * gensymlist.sh.in: Likewise.
5659
1885bb27 56602006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5661
5662 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
5663 clobber "prefix", since we may have already set it manually.
5664
71538dff 56652006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5666
5667 * kern/misc.c (abort): New alias for grub_abort.
5668
2965c7cc 56692006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
5670
5671 A new machine-specific function "grub_machine_set_prefix" is
5672 defined. This is called after loading modules, so that a prefix
5673 initialization can use modules. Also, this change adds an
5674 intensive debugging feature for the memory manager via the
5675 configure option "--enable-mm-debug".
5676
5677 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
5678 PART.LEN.
5679
5680 * kern/sparc64/ieee1275/init.c (abort): Removed.
5681 (grub_stop): Likewise.
5682 (grub_exit): New function.
5683 (grub_set_prefix): Renamed to ...
5684 (grub_machine_set_prefix): ... this.
5685 (grub_machine_init): Do not call grub_set_prefix.
5686
5687 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
5688 (grub_machine_set_prefix): ... this.
5689 (grub_machine_init): Do not call grub_set_prefix.
5690
5691 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
5692 (grub_machine_init): Do not set the prefix here.
5693
5694 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
5695
5696 * kern/efi/init.c: Include grub/mm.h.
5697 (grub_efi_set_prefix): New function.
5698
5699 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
5700 (grub_efi_get_filename): New function.
5701 (grub_print_device_path): Renamed to ...
5702 (grub_efi_print_device_path): ... this.
5703
5704 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
5705 [MM_DEBUG] (grub_realloc): Likewise.
5706 [MM_DEBUG] (grub_free): Likewise.
5707 [MM_DEBUG] (grub_memalign): Likewise.
5708 [MM_DEBUG] (grub_mm_debug): New variable.
5709 [MM_DEBUG] (grub_debug_malloc): New function.
5710 [MM_DEBUG] (grub_debug_free): New function.
5711 [MM_DEBUG] (grub_debug_realloc): New function.
5712 [MM_DEBUG] (grub_debug_memalign): New function.
5713
5714 * kern/misc.c (grub_abort): Print a newline to distinguish
5715 the message.
5716
5717 * kern/main.c (grub_main): Call grub_machine_set_prefix and
5718 grub_set_root_dev after loading modules. This is necessary when
5719 setting a prefix depends on modules.
5720
5721 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
5722 (grub_efi_print_device_path): ... this.
5723 (grub_efi_get_filename): New prototype.
5724 (grub_efi_set_prefix): Likewise.
5725
5726 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
5727 and grub/disk.h.
5728 (grub_efidisk_get_device_handle): New prototype.
5729 (grub_efidisk_get_device_name): Likewise.
5730
5731 * include/grub/mm.h: Include config.h.
5732 (MM_DEBUG): Removed.
5733 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
5734 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
5735 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
5736 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
5737 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
5738 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
5739 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
5740 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
5741 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
5742
5743 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
5744
5745 * disk/efi/efidisk.c: Include grub/partition.h.
5746 (iterate_child_devices): New function.
5747 (add_device): First, compare only last device path nodes, so that
5748 devices are sorted by the types.
5749 (grub_efidisk_get_device_handle): New function.
5750 (grub_efidisk_get_device_name): Likewise.
5751
5752 * configure.ac (--enable-mm-debug): New option to enable the
5753 memory manager debugging feature. This makes the binary much
5754 bigger, so is disabled by default.
5755
9cacaa17 57562006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
5757
5758 Use grub_abort instead of grub_stop, and grub_exit must be
5759 define in each architecture now. Also, this change adds support
5760 for EFI disks.
5761
5762 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5763 (grub_getkey): New function.
5764 (grub_term_get_current): Likewise.
5765
5766 * util/i386/pc/grub-setup.c: Include grub/term.h.
5767 (grub_getkey): New function.
5768 (grub_term_get_current): Likewise.
5769
5770 * util/misc.c (grub_stop): Renamed to ...
5771 (grub_exit): ... this.
5772
5773 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5774 (grub_exit): ... this.
5775 (grub_machine_init): Use grub_abort instead of abort.
5776 (grub_stop): Removed.
5777
5778 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5779 abort.
5780
5781 * kern/i386/pc/startup.S (grub_exit): New function.
5782 (cold_reboot): New label.
5783
5784 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5785 (grub_efi_init): Call grub_efidisk_init.
5786 (grub_efi_fini): Call grub_efidisk_fini.
5787
5788 * kern/efi/efi.c: Include grub/mm.h.
5789 (grub_efi_console_control_guid): Renamed to ...
5790 (console_control_guid): ... this.
5791 (grub_efi_loaded_image_guid): Renamed to ...
5792 (loaded_image_guid): ... this.
5793 (grub_efi_locate_handle): New function.
5794 (grub_efi_open_protocol): Likewise.
5795 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5796 GRUB_EFI_CONSOLE_CONTROL_GUID.
5797 (grub_efi_exit): Removed.
5798 (grub_stop): Likewise.
5799 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5800 (grub_exit): New function.
5801 (grub_print_device_path): Likewise.
5802
5803 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5804 (grub_enter_rescue_mode): Register "exit".
5805
5806 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5807 (grub_abort): New function.
5808
5809 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5810
5811 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5812
5813 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5814
5815 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5816 (grub_print_device_path): New prototype.
5817 (grub_efi_locate_handle): Likewise.
5818 (grub_efi_open_protocol): Likewise.
5819
5820 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5821 * disk/efi/efidisk.c: Likewise.
5822
5823 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5824
5825 * include/grub/efi/console_control.h
5826 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5827
5828 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5829 last 8 bytes as an array.
5830 (GRUB_EFI_DISK_IO_GUID): New macro.
5831 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5832 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5833 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5834 grub_uint8_t.
5835 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5836 (struct grub_efi_device_path): Rename the member "sub_type" to
5837 "subtype".
5838 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5839 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5840 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5841 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5842 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5843 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5844 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5845 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5846 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5847 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5848 (struct grub_efi_pci_device_path): New structure.
5849 (grub_efi_pci_device_path_t): New type.
5850 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5851 (struct grub_efi_pccard_device_path): New structure.
5852 (grub_efi_pccard_device_path_t): New type.
5853 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5854 (struct grub_efi_memory_mapped_device_path): New structure.
5855 (grub_efi_memory_mapped_device_path_t): New type.
5856 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5857 (struct grub_efi_vendor_device_path): New structure.
5858 (grub_efi_vendor_device_path_t): New type.
5859 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5860 (struct grub_efi_controller_device_path): New structure.
5861 (grub_efi_controller_device_path_t): New type.
5862 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5863 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5864 (struct grub_efi_acpi_device_path): New structure.
5865 (grub_efi_acpi_device_path_t): New type.
5866 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5867 (struct grub_efi_expanded_acpi_device_path): New structure.
5868 (grub_efi_expanded_acpi_device_path_t): New type.
5869 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5870 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5871 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5872 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5873 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5874 (struct grub_efi_atapi_device_path): New structure.
5875 (grub_efi_atapi_device_path_t): New type.
5876 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5877 (struct grub_efi_fibre_channel_device_path): New structure.
5878 (grub_efi_fibre_channel_device_path_t): New type.
5879 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5880 (struct grub_efi_1394_device_path): New structure.
5881 (grub_efi_1394_device_path_t): New type.
5882 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5883 (struct grub_efi_usb_device_path): New structure.
5884 (grub_efi_usb_device_path_t): New type.
5885 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5886 (struct grub_efi_usb_class_device_path): New structure.
5887 (grub_efi_usb_class_device_path_t): New type.
5888 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5889 (struct grub_efi_i2o_device_path): New structure.
5890 (grub_efi_i2o_device_path_t): New type.
5891 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5892 (struct grub_efi_mac_address_device_path): New structure.
5893 (grub_efi_mac_address_device_path_t): New type.
5894 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5895 (struct grub_efi_ipv4_device_path): New structure.
5896 (grub_efi_ipv4_device_path_t): New type.
5897 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5898 (struct grub_efi_ipv6_device_path): New structure.
5899 (grub_efi_ipv6_device_path_t): New type.
5900 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5901 (struct grub_efi_infiniband_device_path): New structure.
5902 (grub_efi_infiniband_device_path_t): New type.
5903 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5904 (struct grub_efi_uart_device_path): New structure.
5905 (grub_efi_uart_device_path_t): New type.
5906 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5907 (struct grub_efi_vendor_messaging_device_path): New structure.
5908 (grub_efi_vendor_messaging_device_path_t): New type.
5909 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5910 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5911 (struct grub_efi_hard_drive_device_path): New structure.
5912 (grub_efi_hard_drive_device_path_t): New type.
5913 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5914 (struct grub_efi_cdrom_device_path): New structure.
5915 (grub_efi_cdrom_device_path_t): New type.
5916 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5917 (struct grub_efi_vendor_media_device_path): New structure.
5918 (grub_efi_vendor_media_device_path_t): New type.
5919 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5920 (struct grub_efi_file_path_device_path): New structure.
5921 (grub_efi_file_path_device_path_t): New type.
5922 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5923 (struct grub_efi_protocol_device_path): New structure.
5924 (grub_efi_protocol_device_path_t): New type.
5925 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5926 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5927 (struct grub_efi_bios_device_path): New structure.
5928 (grub_efi_bios_device_path_t): New type.
5929 (struct grub_efi_disk_io): New structure.
5930 (grub_efi_disk_io_t): New type.
5931 (struct grub_efi_block_io_media): New structure.
5932 (grub_efi_block_io_media_t): New type.
5933 (struct grub_efi_block_io): New structure.
5934 (grub_efi_block_io_t): New type.
5935
5936 * include/grub/misc.h (grub_stop): Removed.
5937 (grub_exit): New prototype.
5938 (grub_abort): Likewise.
5939
5940 * include/grub/disk.h (enum grub_disk_dev_id): Added
5941 GRUB_DISK_DEVICE_EFIDISK_ID.
5942
5943 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5944 disk/efi/efidisk.c.
5945 (kernel_syms.lst): Remove the target if an error occurs.
5946
49986a9f 59472006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
5948
5949 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5950 as it was simply too buggy.
5951
970d3b8a 59522006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
5953
5954 * kern/misc.c (grub_lltoa): New function.
5955 (grub_vsprintf): Added support for the long long suffix,
5956 i.e. "ll".
5957
ff04ec24 59582006-04-20 Hollis Blanchard <hollis@penguinppc.org>
5959
5960 * Makefile.in (LDFLAGS): Add variable.
5961 (LD): Remove variable.
5962 * configure.ac: Add -m32 to LDFLAGS.
5963 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5964 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5965 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5966 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5967 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5968 variables.
5969 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5970 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5971 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5972
37e5e1a4 59732006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
5974
5975 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5976 length for unknown glyph.
5977
c352d8dd 59782006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5979
2eab1c0d 5980 Add support for pre-loaded modules into the EFI port.
5981
5982 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5983 completely. Accept one more argument DIR. The caller has changed.
5984
5985 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5986
5987 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5988 (grub_efi_loaded_image_guid): New variable.
5989 (grub_efi_get_loaded_image): New function.
5990 (grub_arch_modules_addr): Likewise.
5991
5992 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5993 prototype.
5994
5995 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5996 (struct grub_efi_loaded_image): New structure.
5997 (grub_efi_loaded_image_t): New type.
5998
59992006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6000
c352d8dd 6001 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
6002 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
6003 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
6004
6d01d6b4 60052006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
6006
6007 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
6008
976a4ea0 60092006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
6010
6011 * DISTLIST: Added include/grub/efi/console.h,
6012 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
6013 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6014
6015 * include/grub/efi/console.h: New file.
6016 * include/grub/efi/time.h: Likewise.
6017 * include/grub/i386/efi/kernel.h: Likewise.
6018 * kern/efi/init.c: Likewise.
6019 * kern/efi/mm.c: Likewise.
6020 * term/efi/console.c: Likewise.
6021
6022 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
6023 (grub_stop): Removed.
6024 (grub_get_rtc): Likewise.
6025 (grub_machine_init): Simply call grub_efi_init.
6026 (grub_machine_fini): Call grub_efi_fini.
6027
6028 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
6029 (grub_efi_output_string): Removed.
6030 (grub_efi_stall): New function.
6031 (grub_stop): Likewise.
6032 (grub_get_rtc): Likewise.
6033
6034 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
6035 (grub_efi_stall): New prototype.
6036 (grub_efi_allocate_pages): Likewise.
6037 (grub_efi_free_pages): Likewise.
6038 (grub_efi_get_memory_map): Likewise.
6039 (grub_efi_mm_init): Likewise.
6040 (grub_efi_mm_fini): Likewise.
6041 (grub_efi_init): Likewise.
6042 (grub_efi_fini): Likewise.
6043
6044 * include/grub/i386/efi/time.h: Do not include
6045 grub/symbol.h. Include grub/efi/time.h.
6046 (GRUB_TICKS_PER_SECOND): Removed.
6047 (grub_get_rtc): Likewise.
6048
6049 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
6050 Added padding. The EFI spec is buggy.
6051 (GRUB_EFI_BLACK): New macro.
6052 (GRUB_EFI_BLUE): Likewise.
6053 (GRUB_EFI_GREEN): Likewise.
6054 (GRUB_EFI_CYAN): Likewise.
6055 (GRUB_EFI_RED): Likewise.
6056 (GRUB_EFI_MAGENTA): Likewise.
6057 (GRUB_EFI_BROWN): Likewise.
6058 (GRUB_EFI_LIGHTGRAY): Likewise.
6059 (GRUB_EFI_BRIGHT): Likewise.
6060 (GRUB_EFI_DARKGRAY): Likewise.
6061 (GRUB_EFI_LIGHTBLUE): Likewise.
6062 (GRUB_EFI_LIGHTGREEN): Likewise.
6063 (GRUB_EFI_LIGHTCYAN): Likewise.
6064 (GRUB_EFI_LIGHTRED): Likewise.
6065 (GRUB_EFI_LIGHTMAGENTA): Likewise.
6066 (GRUB_EFI_YELLOW): Likewise.
6067 (GRUB_EFI_WHITE): Likewise.
6068 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
6069 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
6070 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
6071 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
6072 (GRUB_EFI_BACKGROUND_RED): Likewise.
6073 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
6074 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
6075 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
6076 (GRUB_EFI_TEXT_ATTR): Likewise.
6077
6078 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
6079 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6080 (kernel_mod_HEADERS): Added efi/time.h.
6081
83709125 60822006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
6083
6084 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
6085 include/grub/efi/api.h, include/grub/efi/console_control.h,
6086 include/grub/efi/efi.h, include/grub/efi/pe32.h,
6087 include/grub/i386/efi/time.h, kern/efi/efi.c,
6088 kern/i386/efi/init.c, kern/i386/efi/startup.S,
6089 and util/i386/efi/grub-mkimage.c.
6090
6091 * Makefile.in (RMKFILES): Added i386-efi.rmk.
6092
6093 * genmk.rb (PModule#rule): Do not export symbols if
6094 #{prefix}_EXPORTS is set to "no".
6095
6096 * conf/i386-efi.mk: New file.
6097 * conf/i386-efi.rmk: Likewise.
6098 * include/grub/efi/api.h: Likewise.
6099 * include/grub/efi/console_control.h: Likewise.
6100 * include/grub/efi/efi.h: Likewise.
6101 * include/grub/efi/pe32.h: Likewise.
6102 * include/grub/i386/efi/time.h: Likewise.
6103 * kern/efi/efi.c: Likewise.
6104 * kern/i386/efi/init.c: Likewise.
6105 * kern/i386/efi/startup.S: Likewise.
6106 * util/i386/efi/grub-mkimage.c: Likewise.
6107
61082006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 6109
6110 * include/grub/script.h: Include <grub/parser.h> and
6111 "grub_script.tab.h".
6112 (struct grub_lexer_param): New struct.
6113 (struct grub_parser_param): Likewise.
6114 (grub_script_create_arglist): Pass the state in an argument.
6115 (grub_script_add_arglist): Likewise.
6116 (grub_script_create_cmdline): Likewise.
6117 (grub_script_create_cmdblock): Likewise.
6118 (grub_script_create_cmdif): Likewise.
6119 (grub_script_create_cmdmenu): Likewise.
6120 (grub_script_add_cmd): Likewise.
6121 (grub_script_arg_add): Likewise.
6122 (grub_script_lexer_ref): Likewise.
6123 (grub_script_lexer_deref): Likewise.
6124 (grub_script_lexer_record_start): Likewise.
6125 (grub_script_lexer_record_stop): Likewise.
6126 (grub_script_mem_record): Likewise.
6127 (grub_script_mem_record_stop): Likewise.
6128 (grub_script_malloc): Likewise.
6129 (grub_script_yylex): Likewise.
6130 (grub_script_yyparse): Likewise.
6131 (grub_script_yyerror): Likewise.
6132 (grub_script_yylex): Likewise.
6133 (grub_script_lexer_init): Return the state.
6134
6135 * normal/lexer.c (grub_script_lexer_state): Removed variable.
6136 (grub_script_lexer_done): Likewise.
6137 (grub_script_lexer_getline): Likewise.
6138 (grub_script_lexer_refs): Likewise.
6139 (script): Likewise.
6140 (newscript): Likewise.
6141 (record): Likewise.
6142 (recording): Likewise.
6143 (recordpos): Likewise.
6144 (recordlen): Likewise.
6145 (grub_script_lexer_init): Return the state instead of setting
6146 global variables.
6147 (grub_script_lexer_ref): Use the newly added argument for state
6148 instead of globals.
6149 (grub_script_lexer_deref): Likewise.
6150 (grub_script_lexer_record_start): Likewise.
6151 (grub_script_lexer_record_stop): Likewise.
6152 (recordchar): Likewise.
6153 (nextchar): Likewise.
6154 (grub_script_yylex2): Likewise.
6155 (grub_script_yylex): Likewise.
6156 (grub_script_yyerror): Likewise.
6157
6158 * normal/parser.y (func_mem): Removed variable.
6159 (menu_entry): Likewise.
6160 (err): Likewise.
6161 (%lex-param): New parser option.
6162 (%parse-param): Likewise.
6163 (script): Always return the AST.
6164 (argument): Pass the state around.
6165 (arguments): Likewise.
6166 (grubcmd): Likewise.
6167 (commands): Likewise.
6168 (function): Likewise.
6169 (menuentry): Likewise.
6170 (if_statement): Likewise.
6171 (if): Likewise.
6172
6173 * normal/script.c (grub_script_memused): Removed variable.
6174 (grub_script_parsed): Likewise.
6175 (grub_script_malloc): Added a state argument. Use that instead of
6176 global variables.
6177 (grub_script_mem_record): Likewise.
6178 (grub_script_mem_record_stop): Likewise.
6179 (grub_script_arg_add): Likewise.
6180 (grub_script_add_arglist): Likewise.
6181 (grub_script_create_cmdline): Likewise.
6182 (grub_script_create_cmdif): Likewise.
6183 (grub_script_create_cmdmenu): Likewise.
6184 (grub_script_add_cmd): Likewise.
6185 (grub_script_parse): Setup the state before calling the parser.
6186
e2a8c904 61872006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 6188
6189 * normal/command.c (grub_command_init): Remove the title command.
6190
6191 * normal/lexer.c (grub_script_yylex): Renamed from this...
6192 (grub_script_yylex2): ... to this.
6193 (grub_script_yylex): New function. Temporary
6194 introduced to filter some tokens.
6195 (grub_script_yyerror): Print a newline.
6196
6197 * normal/main.c (read_config_file): Output information about the
6198 lines that contain errors. Wait for a key after all lines have
6199 been processed. Don't return an empty menu.
6200
6201 * normal/parser.y (func_mem): Don't initialize.
6202 (menu_entry): Likewise.
6203 (err): New variable.
6204 (script): Don't return anything when an error was encountered.
6205 (ws, returns): Removed rules.
6206 (argument): Disabled concatenated variable support.
6207 (arguments): Remove explicit separators.
6208 (grubcmd): Likewise.
6209 (function): Likewise.
6210 (menuentry): Likewise.
6211 (if): Likewise.
6212 (commands): Likewise. Add error handling.
6213
6214 * normal/script.c (grub_script_create_cmdline): If
6215 `grub_script_parsed' is 0, assume the parser encountered an error.
6216
c9a86192 62172006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
6218
6219 * configure.ac: Add support for EFI. Fix the typo
6220 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
6221
70f3b243 62222006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6223
6224 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
6225 foreign multibyte characters should be shown correctly.
6226
65f201ad 62272006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6228
6229 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
6230 calculation.
6231 (read_config_file): Made it to close file before returning.
6232
b4b93674 62332006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
6234
6235 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
6236 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
6237 video/i386/pc/vbefill.c.
6238
6239 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
6240 video/i386/pc/vbefill.c.
6241
6242 * include/grub/video.h (grub_video_blit_format): New enum.
6243 (grub_video_mode_info): Added new member blit_format.
6244 (grub_video_get_blit_format): New function prototype.
6245
6246 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
6247 function prototype.
6248 (grub_video_vbe_map_rgb): Likewise.
6249 (grub_video_vbe_unmap_color): Likewise.
6250
6251 * include/grub/i386/pc/vbeblit.h: New file.
6252
6253 * include/grub/i386/pc/vbefill.h: New file.
6254
6255 * video/video.c (grub_video_get_blit_format): New function.
6256 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
6257 (grub_video_vbe_map_rgb): Likewise.
6258 (grub_video_vbe_unmap_color): Likewise.
6259
6260 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
6261 optimized fills.
6262 (grub_video_vbe_blit_render_target): Changed to use more optimized
6263 blits.
6264 (grub_video_vbe_setup): Added detection for optimized settings.
6265 (grub_video_vbe_create_render_target): Likewise.
6266
6267 * video/i386/pc/vbeblit.c: New file.
6268
6269 * video/i386/pc/vbefill.c: New file.
6270
c2379b9c 62712006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
6272
6273 * font/manager.c (grub_font_get_glyph): Removed font fixup from
6274 here...
6275
6276 * util/unifont2pff.rb: ... and moved it to here. Improved argument
6277 parsing to support both hex and dec ranges. If filename was missing
6278 show usage information.
6279
bd0d7896 62802006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
6281
6282 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
6283 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
6284
6285 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
6286 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
6287 (video_mod_SOURCES): Added.
6288 (video_mod_CFLAGS): Likewise.
6289 (video_mod_LDFLAGS): Likewise.
6290 (gfxterm_mod_SOURCES): Likewise.
6291 (gfxterm_mod_CFLAGS): Likewise.
6292 (gfxterm_mod_LDFLAGS): Likewise.
6293 (videotest_mod_SOURCES): Likewise.
6294 (videotest_mod_CFLAGS): Likewise.
6295 (videotest_mod_LDFLAGS): Likewise.
6296 (vesafb_mod_SOURCES): Removed.
6297 (vesafb_mod_CFLAGS): Likewise.
6298 (vesafb_mod_LDFLAGS): Likewise.
6299 (vga_mod_SOURCES): Likewise.
6300 (vga_mod_CFLAGS): Likewise.
6301 (vga_mod_LDFLAGS): Likewise.
6302
6303 * commands/videotest.c: New file.
6304
6305 * font/manager.c (fill_with_default_glyph): Modified to use
6306 grub_font_glyph.
6307 (grub_font_get_glyph): Likewise.
6308 (fontmanager): Renamed from this...
6309 (font_manager): ... to this.
6310
6311 * include/grub/font.h (grub_font_glyph): Added new structure.
6312 (grub_font_get_glyph): Modified to use grub_font_glyph.
6313
6314 * include/grub/misc.h (grub_abs): Added as inline function.
6315
6316 * include/grub/video.h: New file.
6317
6318 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
6319 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
6320 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
6321 (grub_vbe_get_controller_info): Renamed from this...
6322 (grub_vbe_bios_get_controller_info): ... to this.
6323 (grub_vbe_get_mode_info): Renamed from this...
6324 (grub_vbe_bios_get_mode_info): ... to this.
6325 (grub_vbe_set_mode): Renamed from this...
6326 (grub_vbe_bios_set_mode): ... to this.
6327 (grub_vbe_get_mode): Renamed from this...
6328 (grub_vbe_bios_get_mode): ... to this.
6329 (grub_vbe_set_memory_window): Renamed from this...
6330 (grub_vbe_bios_set_memory_window): ... to this.
6331 (grub_vbe_get_memory_window): Renamed from this...
6332 (grub_vbe_bios_get_memory_window): ... to this.
6333 (grub_vbe_set_scanline_length): Renamed from this...
6334 (grub_vbe_set_scanline_length): ... to this.
6335 (grub_vbe_get_scanline_length): Renamed from this...
6336 (grub_vbe_bios_get_scanline_length): ... to this.
6337 (grub_vbe_set_display_start): Renamed from this...
6338 (grub_vbe_bios_set_display_start): ... to this.
6339 (grub_vbe_get_display_start): Renamed from this...
6340 (grub_vbe_bios_get_display_start): ... to this.
6341 (grub_vbe_set_palette_data): Renamed from this...
6342 (grub_vbe_bios_set_palette_data): ... to this.
6343 (grub_vbe_set_pixel_rgb): Removed.
6344 (grub_vbe_set_pixel_index): Likewise.
6345
6346 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
6347 from this...
6348 (grub_vbe_bios_get_controller_info): ... to this.
6349 (grub_vbe_get_mode_info): Renamed from this...
6350 (grub_vbe_bios_get_mode_info): ... to this.
6351 (grub_vbe_set_mode): Renamed from this...
6352 (grub_vbe_bios_set_mode): ... to this.
6353 (grub_vbe_get_mode): Renamed from this...
6354 (grub_vbe_bios_get_mode): ... to this.
6355 (grub_vbe_set_memory_window): Renamed from this...
6356 (grub_vbe_bios_set_memory_window): ... to this.
6357 (grub_vbe_get_memory_window): Renamed from this...
6358 (grub_vbe_bios_get_memory_window): ... to this.
6359 (grub_vbe_set_scanline_length): Renamed from this...
6360 (grub_vbe_set_scanline_length): ... to this.
6361 (grub_vbe_get_scanline_length): Renamed from this...
6362 (grub_vbe_bios_get_scanline_length): ... to this.
6363 (grub_vbe_set_display_start): Renamed from this...
6364 (grub_vbe_bios_set_display_start): ... to this.
6365 (grub_vbe_get_display_start): Renamed from this...
6366 (grub_vbe_bios_get_display_start): ... to this.
6367 (grub_vbe_set_palette_data): Renamed from this...
6368 (grub_vbe_bios_set_palette_data): ... to this.
6369 (grub_vbe_bios_get_controller_info): Fixed problem with registers
6370 getting corrupted after calling it. Added more pushes and pops.
6371 (grub_vbe_bios_set_mode): Likewise.
6372 (grub_vbe_bios_get_mode): Likewise.
6373 (grub_vbe_bios_get_memory_window): Likewise.
6374 (grub_vbe_bios_set_scanline_length): Likewise.
6375 (grub_vbe_bios_get_scanline_length): Likewise.
6376 (grub_vbe_bios_get_display_start): Likewise.
6377 (grub_vbe_bios_set_palette_data): Likewise.
6378
6379 * normal/cmdline.c (cl_set_pos): Refresh the screen.
6380 (cl_insert): Likewise.
6381 (cl_delete): Likewise.
6382
6383 * term/gfxterm.c: New file.
6384
6385 * term/i386/pc/vesafb.c: Removed file.
6386
6387 * video/video.c: New file.
6388
6389 * video/i386/pc/vbe.c (real2pm): Added new function.
6390 (grub_video_vbe_draw_pixel): Likewise.
6391 (grub_video_vbe_get_video_ptr): Likewise.
6392 (grub_video_vbe_get_pixel): Likewise
6393 (grub_video_vbe_init): Likewise.
6394 (grub_video_vbe_fini): Likewise.
6395 (grub_video_vbe_setup): Likewise.
6396 (grub_video_vbe_get_info): Likewise.
6397 (grub_video_vbe_set_palette): Likewise.
6398 (grub_video_vbe_get_palette): Likewise.
6399 (grub_video_vbe_set_viewport): Likewise.
6400 (grub_video_vbe_get_viewport): Likewise.
6401 (grub_video_vbe_map_color): Likewise.
6402 (grub_video_vbe_map_rgb): Likewise.
6403 (grub_video_vbe_map_rgba): Likewise.
6404 (grub_video_vbe_unmap_color): Likewise.
6405 (grub_video_vbe_fill_rect): Likewise.
6406 (grub_video_vbe_blit_glyph): Likewise.
6407 (grub_video_vbe_blit_bitmap): Likewise.
6408 (grub_video_vbe_blit_render_target): Likewise.
6409 (grub_video_vbe_scroll): Likewise.
6410 (grub_video_vbe_swap_buffers): Likewise.
6411 (grub_video_vbe_create_render_target): Likewise.
6412 (grub_video_vbe_delete_render_target): Likewise.
6413 (grub_video_vbe_set_active_render_target): Likewise.
6414 (grub_vbe_set_pixel_rgb): Remove function.
6415 (grub_vbe_set_pixel_index): Likewise.
6416 (index_color_mode): Remove static variable.
6417 (active_mode): Likewise.
6418 (framebuffer): Likewise.
6419 (bytes_per_scan_line): Likewise.
6420 (grub_video_vbe_adapter): Added new static variable.
6421 (framebuffer): Likewise.
6422 (render_target): Likewise.
6423 (initial_mode): Likewise.
6424 (mode_in_use): Likewise.
6425 (mode_list): Likewise.
6426
5f97350b 64272006-03-10 Marco Gerards <marco@gnu.org>
6428
6429 * configure.ac (AC_INIT): Bumped to 1.93.
6430
6431 * DISTLIST: Added `include/grub/hfs.h'.
6432
a3c5c6f8 64332006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
6434
6435 * boot/i386/pc/boot.S (general_error): Before looping, try INT
6436 18H, which might help the BIOS falling back to next boot media.
6437
6de53d26 64382006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
6439
6440 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
6441 Poe Chen <poe.poechen@gmail.com>.
6442
77c4a393 64432006-01-17 Marco Gerards <marco@gnu.org>
6444
6445 * include/grub/normal.h: Include <grub/script.h>.
6446 (grub_command_list): Removed struct.
6447 (grub_command_list_t): Removed type.
6448 (grub_menu_entry): Remove members `num' and `command_list'. Add
6449 members `commands' and `sourcecode'.
6450 * include/grub/script.h: Add inclusion guards.
6451 (grub_script_cmd_menuentry): New struct.
6452 (grub_script_execute_menuentry): New prototype.
6453 (grub_script_lexer_record_start): Likewise.
6454 (grub_script_lexer_record_stop): Likewise.
6455 * normal/execute.c (grub_script_execute_menuentry): New function.
6456 * normal/lexer.c (record, recording, recordpos, recordlen): New
6457 variables.
6458 (grub_script_lexer_record_start): New function.
6459 (grub_script_lexer_record_stop): Likewise.
6460 (recordchar): Likewise.
6461 (nextchar): Likewise.
6462 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
6463 2048 as the buffer size. Add the tokens `menuentry' and `@'.
6464 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
6465 (current_menu): New variable.
6466 (free_menu): Mainly rewritten.
6467 (grub_normal_menu_addentry): New function.
6468 (read_config_file): Rewritten.
6469 * normal/menu.c (run_menu_entry): Mainly rewritten.
6470 * normal/menu_entry.c (make_screen): Rewritten te code to insert
6471 the menu entry.
6472 (run): Mainly rewritten.
6473 * normal/parser.y (menu_entry): New variable.
6474 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
6475 (menuentry): New rule.
6476 (command): Add `menuentry'.
6477 (if_statement): Allow additional returns before `fi'.
6478 * normal/script.c (grub_script_create_cmdmenu): New function.
6479
144f1f98 64802006-01-03 Marco Gerards <marco@gnu.org>
6481
6482 * INSTALL: GNU Bison is required.
6483 * configure.ac: Rewritten the test to detect Bison.
6484 * Makefile.in (YACC): New variable. Reported by Xun Sun
6485 <xun.sun.cn@gmail.com>.
6486
af4b2d89 64872006-01-03 Marco Gerards <marco@gnu.org>
6488
6489 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
6490 the HFS+ filesystem to filesystem blocks.
6491 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
6492 GCC warning is silenced.
6493
15643b71 64942006-01-03 Marco Gerards <marco@gnu.org>
6495
6496 * partmap/apple.c (apple_partition_map_iterate): Convert the data
6497 read from disk from big endian to host byte order.
6498
00905879 64992006-01-03 Hollis Blanchard <hollis@penguinppc.org>
6500
6501 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
6502 documentation.
6503 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
6504 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
6505 embedded HFS+ filesystem.
6506 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
6507 (grub_hfs_sblock): Move from here...
6508 * include/grub/hfs.h: To here... New file.
6509 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
6510 documentation.
6511 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
6512 New macros.
6513 (grub_hfsplus_volheader): Change type of member `magic' to
6514 `grub_uint16_t'.
6515 (grub_hfsplus_data): Add new member `embedded_offset'.
6516 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
6517 returned block.
6518 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
6519 Calculate the offset.
6520
8899bc3e 65212005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6522
6523 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
6524 Removed.
6525 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
6526
ae8c0277 65272005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6528
6529 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
6530 ENV->NAME is NULL after allocating ENV->VALUE.
6531
07084456 65322005-12-25 Marco Gerards <marco@gnu.org>
6533
6534 * kern/env.c (grub_env_set): Rewritten the error handling code.
6535
4750f5f1 65362005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6537
6538 * geninit.sh: Made more robust, and more portable.
6539
50214199 65402005-12-25 Marco Gerards <marco@gnu.org>
6541
6542 Add support for Apple HFS+ filesystems.
6543
6544 * fs/hfsplus.c: New file.
6545
6546 * DISTLIST: Added `fs/hfsplus.c'.
6547
6548 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
6549 (hfsplus_mod_SOURCES): New variable.
6550 (hfsplus_mod_CFLAGS): Likewise.
6551 (hfsplus_mod_LDFLAGS): Likewise.
6552 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
6553 (grub_setup_SOURCES): Likewise.
6554 (grub_mkdevicemap_SOURCES): Likewise.
6555 (grub_emu_SOURCES): Likewise.
6556 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6557
6558 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
6559
6560 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
6561
befaed6c 65622005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6563
6564 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
6565 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
6566 include/grub/parser.h, include/grub/script.h, kern/parser.c,
6567 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
6568 normal/lexer.c, normal/parser.y, normal/script.c, and
6569 partmap/gpt.c.
6570 Removed kern/sparc64/cache.c.
6571
6572 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
6573 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
6574 grub_emu_init.c.
6575
6576 * configure.ac (AC_INIT): Bumped to 1.92.
6577
6a124103 65782005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
6579
6580 * kern/err.c (grub_error_push): Added new function to support error
6581 stacks.
6582 (grub_error_pop): Likewise.
6583 (grub_error_stack_items): New local variable to support error stacks.
6584 (grub_error_stack_pos): Likewise.
6585 (grub_error_stack_assert): Likewise.
6586 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
6587 stack depth.
6588 (grub_print_error): Added support to print errors from error stack.
6589
6590 * include/grub/err.h (grub_error_push): Added function prototype.
6591 (grub_error_pop): Likewise.
6592
be973c1b 65932005-12-09 Hollis Blanchard <hollis@penguinppc.org>
6594
6595 * configure.ac: Accept `powerpc64' as host_cpu.
6596 (amd64): Rename to `biarch32'.
6597
6598 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
6599 non-cacheline-aligned addresses.
6600
6601 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
6602 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
6603 if `size' is non-zero.
6604
b04216ab 66052005-12-03 Marco Gerards <mgerards@xs4all.nl>
6606
6607 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
6608 and `cd' to make sure the filename is not prefixed with a
6609 directory name.
6610 (pkgdata_MODULES): Add `gpt.mod'.
6611 (gpt_mod_SOURCES): New variable.
6612 (gpt_mod_CFLAGS): Likewise.
6613 (gpt_mod_LDFLAGS): Likewise.
6614
6615 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
6616
6617 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
6618 New macro.
6619
6620 * partmap/gpt.c: New file.
6621
6622 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
6623 GPT partition map is detected.
6624
41730ed9 66252005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
6626
6627 * commands/i386/pc/play.c: New file.
6628 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
6629 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
6630 macros.
6631
95dc3643 66322005-11-27 Marco Gerards <mgerards@xs4all.nl>
6633
6634 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
6635 ((unused))' to silence gcc warning.
6636
1569ec51 66372005-11-26 Hollis Blanchard <hollis@penguinppc.org>
6638
6639 * configure.ac: Correct `AC_PROG_YACC' test.
6640
9abde152 66412005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6642
6643 * util/powerpc/ieee1275/grub-install.in: Run the mount point
6644 check before installing files.
6645
44b83271 66462005-11-22 Mike Small <smallm@panix.com>
6647
6648 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
6649 number regex so multidigit numbers are recognized correctly.
6650
66512005-11-22 Mike Small <smallm@panix.com>
6652
6653 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
6654 debugging message before attempting to claim memory.
6655 (grub_rescue_cmd_initrd): Add a claim debugging message and try
6656 multiple addresses in case of failure.
6657
9c12956b 66582005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6659
6660 * term/tparm.c (get_space): Remove empty `if' statement.
6661
6662 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
6663
6664 * kern/parser.c (check_varstate): Rename `state' to 's'.
6665
aeaf81d9 66662005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6667
6668 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
6669 variable definitions to the beginning of each function. Sort stack
6670 variables by size.
6671 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
6672 `buf' argument to `char *'.
6673
79bbb63f 66742005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6675
6676 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
6677 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6678 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6679 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6680 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6681 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6682 configfile.mod, search.mod, gzio.mod and test.mod.
6683 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6684 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6685 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6686 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6687 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6688 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6689 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6690 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6691 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6692 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6693 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6694 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6695 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6696 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6697 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6698 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6699 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6700 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6701 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6702 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6703 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6704 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6705 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
6706
6707 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
6708 `grep --include'.
6709 (pkgdata_MODULES): Add test.mod.
6710
233b1628 67112005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6712
6713 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
6714 appending to variables with "+=".
6715 (PModule): Use full pathname to generate *.lst filenames.
6716
6717 * Makefile.in: Fixed list rules moved from genmk.rb.
6718 (.DELETE_ON_ERROR): New special target.
6719 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
6720
6721 * conf/i386-pc.rmk: Include conf/common.mk.
6722 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6723 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6724 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6725 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6726 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6727 configfile.mod, search.mod, gzio.mod and test.mod.
6728 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6729 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6730 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6731 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6732 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6733 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6734 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6735 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6736 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6737 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6738 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6739 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6740 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6741 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6742 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6743 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6744 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6745 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6746 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6747 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6748 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6749 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6750 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
6751 here...
6752 * conf/common.rmk: ... to here. New file.
6753
6754 * conf/common.mk: New file.
6755
16f820c8 67562005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
6757
6758 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
6759 (grub_script.tab.c): ... here.
6760
6761 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6762 (grub_script.tab.c): ... here.
6763
6764 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6765 (grub_script.tab.c): ... here.
6766
6767 * normal/command.c (grub_command_find): Fixed a memory leak of
6768 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6769
63ba1554 67702005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6771
6772 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6773 "@" which marks the start of a comment on ARM.
6774 (VARIABLE): Likewise.
6775
7f67dc13 67762005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6777
79bbb63f 6778 Add support for Linux/ADFS partition tables.
7f67dc13 6779
6780 * partmap/acorn.c: New file.
6781
6782 * include/grub/acorn_filecore.h: Likewise.
6783
6784 * DISTLIST: Added `partmap/acorn.c' and
6785 `include/grub/acorn_filecore.h'.
6786
6787 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6788 `partmap/acorn.c'.
6789 (pkgdata_MODULES): Add `acorn.mod'.
6790 (acorn_mod_SOURCES): New variable.
6791 (acorn_mod_CFLAGS): Likewise.
6792
6793 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6794 `partmap/acorn.c'.
6795 (pkgdata_MODULES): Add `acorn.mod'.
6796 (acorn_mod_SOURCES): New variable.
6797 (acorn_mod_CFLAGS): Likewise.
6798
6799 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6800 (pkgdata_MODULES): Add `acorn.mod'.
6801 (acorn_mod_SOURCES): New variable.
6802 (acorn_mod_CFLAGS): Likewise.
6803 (acorn_mod_LDFLAGS): Likewise.
6804
6805 * include/types.h (grub_disk_addr_t): New typedef.
6806
6d099807 68072005-11-13 Marco Gerards <mgerards@xs4all.nl>
6808
6809 * geninit.sh: New file.
6810
6811 * geninitheader.sh: Likewise.
6812
6813 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6814 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6815 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6816 * commands/configfile.c (grub_configfile_init)
6817 (grub_configfile_fini): Likewise.
6818 * commands/default.c (grub_default_init, grub_default_fini):
6819 Likewise.
6820 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6821 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6822 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6823 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6824 Likewise.
6825 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6826 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6827 Likewise.
6828 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6829 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6830 Likewise.
6831 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6832 Likewise.
6833 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6834 Likewise.
6835 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6836 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6837 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6838 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6839 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6840 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6841 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6842 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6843 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6844 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6845 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6846 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6847 * partmap/amiga.c (grub_amiga_partition_map_init)
6848 (grub_amiga_partition_map_fini): Likewise.
6849 * partmap/apple.c (grub_apple_partition_map_init)
6850 (grub_apple_partition_map_fini): Likewise.
6851 * partmap/pc.c (grub_pc_partition_map_init)
6852 (grub_pc_partition_map_fini): Likewise.
6853 * partmap/sun.c (grub_sun_partition_map_init,
6854 grub_sun_partition_map_fini): Likewise.
6855 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6856 Likewise.
6857
6858 * util/grub-emu.c: Include <grub_modules_init.h>.
6859 (main): Don't initialize and de-initialize any modules directly,
6860 use `grub_init_all' and `grub_fini_all' instead.
6861
6862 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6863 `grub_vesafb_mod_init'.
6864 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6865 all users.
6866 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6867 `grub_vga_mod_init'. Updated all users.
6868 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6869
6870 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6871 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6872 rules.
6873
6874 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6875 Generate a function to initialize the module in utilities.
6876 Updated all callers.
6877 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6878 initialize the module in utilities. Updated all callers.
6879
9046bcf0 68802005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6881
6882 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6883 escape sequence and a literal ^L to clear the screen.
6884
6885 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6886 when returning from Open Firmware.
6887
d13ea639 68882005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6889
6890 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6891 (grub_ofconsole_height): Likewise.
6892 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6893 manually insert a '\n'.
6894 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6895 `grub_ofconsole_height'. Return early if these are already set.
6896
a8fcf206 68972005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6898
6899 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6900 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6901 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6902 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6903 and `normal/script.c'.
6904 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6905 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6906 (test_mod_SOURCES): New variable.
6907 (test_mod_CFLAGS): Likewise.
6908 (test_mod_LDFLAGS): Likewise.
6909 (pkgdata_MODULES): Add `test.mod'.
6910 (grub_script.tab.c): New rule.
6911 (grub_script.tab.h): Likewise.
6912
b6b32745 69132005-11-07 Marco Gerards <mgerards@xs4all.nl>
6914
6915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6916 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6917 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6918 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6919 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6920 (test_mod_SOURCES): New variable.
6921 (test_mod_CFLAGS): Likewise.
6922 (pkgdata_MODULES): Add `test.mod'.
6923 (grub_script.tab.c): New rule.
6924 (grub_script.tab.h): Likewise.
6925
daac212a 69262005-11-06 Marco Gerards <mgerards@xs4all.nl>
6927
6928 Add initial scripting support.
6929
6930 * commands/test.c: New file.
6931 * include/grub/script.h: Likewise.
6932 * normal/execute.c: Likewise.
6933 * normal/function.c: Likewise.
6934 * normal/lexer.c: Likewise.
6935 * normal/parser.y: Likewise.
6936 * normal/script.c: Likewise.
6937
6938 * configure.ac: Add `AC_PROG_YACC' test.
6939
6940 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6941 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6942 `normal/function.c' and `normal/script.c'.
6943 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6944 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 6945 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6946 variables.
daac212a 6947 (pkgdata_MODULES): Add `test.mod'.
6948 (grub_script.tab.c): New rule.
6949 (grub_script.tab.h): Likewise.
6950
6951 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6952
6953 * include/grub/normal.h (grub_test_init): New prototype.
6954 (grub_test_fini): Likewise.
6955
6956 * normal/command.c: Include <grub/script.h>.
6957 (grub_command_execute): Rewritten.
6958
6959 * util/grub-emu.c (main): Call `grub_test_init' and
6960 `grub_test_fini'.
6961
77500b2b 69622005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6963
6964 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6965 to 0.
6966 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6967 there are no pending characters.
6968
e45deb9e 69692005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6970
6971 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6972 `grub_strndup' to drop device arguments. Replace unnecessary
6973 `grub_strndup' with `grub_strdup'.
6974
4ce32619 69752005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6976
6977 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6978 `debug' environment variable has been set.
6979
69802005-11-02 Hollis Blanchard <hollis@penguinppc.org>
6981
6982 * Makefile.in (install-local): Use $(DATA).
6983 (uninstall): Likewise.
6984 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6985 (sbin_UTILITIES): ... to here.
6986 (sbin_SCRIPTS): New variable.
6987 (grub_install_SOURCES): New variable.
6988 * util/powerpc/ieee1275/grub-install.in: New file.
6989 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6990 variable.
6991 (add_segments): Call `grub_util_get_path'.
6992
25fe6f03 69932005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6994
6995 From Timothy Baldwin:
6996 * commands/ls.c (grub_ls_list_files): Close FILE with
6997 grub_file_close.
6998 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6999
04ccf3ec 70002005-10-24 Marco Gerards <mgerards@xs4all.nl>
7001
7002 * include/grub/parser.h: New file.
7003
7004 * kern/parser.c: Likewise.
7005
7006 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
7007 (grub_setup_SOURCES): Likewise.
7008 (grub_probefs_SOURCES): Likewise.
7009 (grub_emu_SOURCES): Likewise.
7010 (kernel_img_HEADERS): Add `parser.h'.
7011
7012 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7013 (grub_emu_SOURCES): Add `kern/parser.c'.
7014 (grubof_SOURCES): Likewise.
7015
7016 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7017 (grubof_SOURCES): Add `kern/parser.c'.
7018
7019 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
7020
7021 * kern/misc.c (grub_split_cmdline): Removed function.
7022
7023 * kern/rescue.c: Include <grub/parser.h>.
7024 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
7025 of `grub_split_cmdline'.
7026
7027 * normal/command.c: Include <grub/parser.h>.
7028 (grub_command_execute): Use `grub_parser_split_cmdline' instead
7029 of `grub_split_cmdline'.
7030
7031 * normal/completion.c: Include <grub/parser.h>.
7032 (cmdline_state): New variable.
7033 (iterate_dir): End the filename with a quote depending on the
7034 command line state.
7035 (get_state): new function.
7036 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
7037 split the arguments and determine the current argument. When the
7038 argument string is not quoted, escape all spaces.
7039
6d8f4b0e 70402005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7041
7042 * normal/sparc64/setjmp.S: New file.
7043
15cf03ed 70442005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7045
7046 * include/grub/sparc64/libgcc.h: New file.
7047 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
7048 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
7049 normal/sparc64/setjmp.c.
7050
03e8661a 70512005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7052
7053 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
7054 * kern/sparc64/cache.S: New file.
7055 * kern/sparc64/cache.c: Removed.
7056 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
7057 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
7058 -mtune=ultrasparc.
7059 (COMMON_LDFLAGS): Add -melf64_sparc.
7060 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
7061 (grubof_SOURCES): Use cache.S instead of cache.c.
7062 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
7063 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
7064 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
7065 commented though.
7066 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
7067 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
7068 (linux_mod_CFLAGS): Commented out.
7069 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
7070 out because module isn't built.
7071 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
7072 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
7073 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
7074 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
7075 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
7076 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7077 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7078 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
7079 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
7080 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
7081 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7082 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7083 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
7084 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
7085
34eeec8a 70862005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
7087
7088 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
7089 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
7090 longer, because HFS should not be used on PC.
7091
708367a3 70922005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7093
7094 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
7095 consistently within the loop.
7096
6fa1251a 70972005-10-15 Marco Gerards <mgerards@xs4all.nl>
7098
7099 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
7100 directory can not be read.
7101
4801580b 71022005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7103
7104 * configure.ac (AC_INIT): Increase the version number to 1.91.
7105
7106 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
7107 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
7108 term/i386/pc/serial.c.
7109
219ad426 71102005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7111
7112 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
7113 file size must be permitted.
7114
7115 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
7116 between %ah and %al.
7117
688e5699 71182005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7119
7120 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
7121 grub_uint64_t.
7122 Call the hook with a NUL-terminated filename.
7123 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
7124 grub_cpu_to_be32.
7125
7126 * kern/term.c (cursor_state): New variable.
7127 (grub_term_set_current): Reset the cursor state on a new
7128 terminal.
7129 (grub_setcursor): Rewritten to use CURSOR_STATE.
7130 (grub_getcursor): New function.
7131
7132 * include/grub/term.h (grub_getcursor): New prototype.
7133
7134 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
7135 integers on ARM. Reported by Timothy Baldwin
7136 <T.E.Baldwin99@members.leeds.ac.uk>.
7137
bb34586c 71382005-10-11 Marco Gerards <mgerards@xs4all.nl>
7139
7140 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
7141 allocated.
7142 (grub_sfs_dir): Likewise.
7143
9a909877 71442005-10-09 Marco Gerards <mgerards@xs4all.nl>
7145
7146 Add support for the SFS filesystem.
7147
7148 * fs/sfs.c: New file.
7149
7150 * DISTLIST: Added `fs/sfs.c'.
7151
7152 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
7153 (grub_probefs_SOURCES): Likewise.
7154 (grub_emu_SOURCES): Likewise.
7155 (pkgdata_MODULES): Add `sfs.mod'.
7156 (sfs_mod_SOURCES): New variable.
7157 (sfs_mod_CFLAGS): Likewise.
7158 (sfs_mod_LDFLAGS): Likewise.
7159
7160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
7161 (pkgdata_MODULES): Add `sfs.mod'.
7162 (sfs_mod_SOURCES): New variable.
7163 (sfs_mod_CFLAGS): Likewise.
7164
7165 * util/grub-emu.c (main): Call `grub_sfs_init' and
7166 `grub_sfs_fini'.
7167
7168 * include/grub/fs.h (grub_sfs_init): New prototype.
7169 (grub_sfs_fini): Likewise.
7170
57bdbde3 71712005-10-07 Marco Gerards <mgerards@xs4all.nl>
7172
7173 Add support for the AFFS filesystem.
7174
7175 * fs/affs.c: New file.
7176
7177 * DISTLIST: Added `fs/affs.c'.
7178
7179 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
7180 (grub_probefs_SOURCES): Likewise.
7181 (grub_emu_SOURCES): Likewise.
7182 (pkgdata_MODULES): Add `affs.mod'.
7183 (affs_mod_SOURCES): New variable.
7184 (affs_mod_CFLAGS): Likewise.
7185 (affs_mod_LDFLAGS): Likewise.
7186
7187 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
7188 (pkgdata_MODULES): Add `affs.mod'.
7189 (affs_mod_SOURCES): New variable.
7190 (affs_mod_CFLAGS): Likewise.
7191
7192 * util/grub-emu.c (main): Call `grub_affs_init' and
7193 `grub_affs_fini'.
7194
7195 * include/grub/fs.h (grub_affs_init): New prototype.
7196 (grub_affs_fini): Likewise.
7197
047b67e0 71982005-10-01 Marco Gerards <mgerards@xs4all.nl>
7199
7200 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
7201
59b8208a 72022005-10-01 Marco Gerards <mgerards@xs4all.nl>
7203
7204 * configure.ac: Accept `x86_64' as host_cpu. In that case add
7205 `-m32' to CFLAGS.
7206
7207 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
7208 linking.
7209
7210 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
7211 (COMMON_LDFLAGS): New variable.
7212 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
7213 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
7214 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
7215 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
7216 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
7217 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
7218 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
7219 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
7220 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
7221 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
7222 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7223 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7224 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
7225 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
7226 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
7227 variables.
7228 (normal_mod_ASFLAGS): Add `-m32'.
7229
7230 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
7231 (grub_host_size_t, grub_host_ssize_t): New types.
7232 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
7233 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
7234 `GRUB_HOST_SIZEOF_VOID_P'.
7235
7236 * include/grub/kernel.h (struct grub_module_header): Type of
7237 member offset changed to `grub_host_off_t'. Type of member size
7238 changed to `grub_host_size_t'.
7239 (struct grub_module_info): Type of member offset changed to
7240 `grub_host_off_t'. Type of member size changed to
7241 `grub_host_size_t'.
7242
b4093103 72432005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
7244
7245 Make GRUB's kernel compliant to Multiboot Specification.
7246
7247 * kern/i386/pc/startup.S (multiboot_header): New label.
7248 (multiboot_entry): Likewise.
7249 (multiboot_trampoline): Likewise.
7250
7251 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7252 Increased to 0x4A0.
7253
7254 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
7255 put parentheses after a question mark.
7256 [!GRUB_UTIL] (my_mod): New variable.
7257
7258 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
7259
b2499b29 72602005-09-28 Marco Gerards <mgerards@xs4all.nl>
7261
7262 Adds support for the XFS filesystem. Btrees are not supported
7263 yet.
7264
7265 * fs/xfs.c: New file.
7266
7267 * DISTLIST: Added `fs/xfs.c'.
7268
7269 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
7270 (grub_probefs_SOURCES): Likewise.
7271 (grub_emu_SOURCES): Likewise.
7272 (pkgdata_MODULES): Add `xfs.mod'.
7273 (xfs_mod_SOURCES): New variable.
7274 (xfs_mod_CFLAGS): Likewise.
7275
7276 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
7277 (pkgdata_MODULES): Add `xfs.mod'.
7278 (xfs_mod_SOURCES): New variable.
7279 (xfs_mod_CFLAGS): Likewise.
7280
7281 * util/grub-emu.c (main): Call `grub_xfs_init' and
7282 `grub_xfs_fini'.
7283
7284 * include/grub/fs.h (grub_xfs_init): New prototype.
7285 (grub_xfs_fini): Likewise.
7286
7287
83d37a62 72882005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
7289
7290 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
7291 color modes, allow greater than 16 colors to be configured as
7292 a default palette.
7293
47d2d65e 72942005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7295
7296 * normal/completion.c (complete_arguments): Add the qualifier
7297 const into OPTIONS.
7298
7299 From Omniflux <omniflux+lists@omniflux.com>:
7300 * include/grub/terminfo.h: New file.
7301 * include/grub/tparm.h: Likewise.
7302 * include/grub/i386/pc/serial.h: Likewise.
7303 * term/terminfo.c: Likewise.
7304 * term/tparm.c: Likewise.
7305 * term/i386/pc/serial.c: Likewise.
7306 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
7307 serial.mod.
7308 (terminfo_mod_SOURCES): New variable.
7309 (terminfo_mod_CFLAGS): Likewise.
7310 (serial_mod_SOURCES): Likewise.
7311 (serial_mod_CFLAGS): Likewise.
7312
48b671ff 73132005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
7314
7315 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
7316 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
7317 and kern/powerpc/ieee1275/cmain.c, respectively.
7318
7319 * boot/powerpc/ieee1275/crt0.S: Moved to ...
7320 * kern/powerpc/ieee1275/crt0.S: ... here.
7321
7322 * boot/powerpc/ieee1275/cmain.c: Moved to ...
7323 * kern/powerpc/ieee1275/cmain.c: ... here.
7324
7325 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
7326 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
7327 instead of boot/powerpc/ieee1275/crt0.S and
7328 boot/powerpc/ieee1275/cmain.c, respectively.
7329
7330 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
7331 sectors. It was not used anyway.
7332
09fc77a7 73332005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7334
7335 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
7336 `unused parameter' warning.
7337
003789c7 73382005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7339
7340 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
7341 function.
7342 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
7343 getcharwidth.
7344
67f44c86 73452005-08-28 Marco Gerards <metgerards@student.han.nl>
7346
7347 * include/grub/normal.h (enum grub_completion_type): Added
7348 `GRUB_COMPLETION_TYPE_ARGUMENT'.
7349
7350 * normal/cmdline.c (print_completion): Handle
7351 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
7352 * normal/menu_entry.c (store_completion): Likewise.
7353
7354 * normal/completion.c (complete_arguments): New function.
7355 (grub_normal_do_completion): Call `complete_arguments' when the
7356 current words start with a dash.
7357
0b5abe02 73582005-08-27 Marco Gerards <metgerards@student.han.nl>
7359
7360 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
7361 `gzio.mod' instead of `io.mod').
7362
d9864ee1 73632005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
7364
7365 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
7366 (DISTDIRS): Added io and video.
7367 Rewrite the search routine to make an output consistently.
7368
7369 * DISTLIST: Added conf/sparc64-ieee1275.mk,
7370 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
7371 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
7372 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
7373 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
7374 util/powerpc/ieee1275/misc.c.
7375
7376 * include/grub/gzio.h: New file.
7377 * io/gzio.c: Likewise.
7378
7379 * kern/file.c (grub_file_close): Call grub_device_close only if
7380 FILE->DEVICE is not NULL.
7381
7382 * include/grub/mm.h [!NULL] (NULL): New macro.
7383
7384 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
7385
7386 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
7387 (pkgdata_MODULES): Added gzio.mod.
7388 (gzio_mod_SOURCES): New variable.
7389 (gzio_mod_CFLAGS): Likewise.
7390
7391 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
7392 (pkgdata_MODULES): Added gzio.mod.
7393 (gzio_mod_SOURCES): New variable.
7394 (gzio_mod_CFLAGS): Likewise.
7395
7396 * commands/cat.c: Include grub/gzio.h.
7397 (grub_cmd_cat): Use grub_gzfile_open instead of
7398 grub_file_open.
7399
7400 * commands/cmp.c: Include grub/gzio.h.
7401 (grub_cmd_cmp): Use grub_gzfile_open instead of
7402 grub_file_open.
7403
7404 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
7405 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
7406 grub_file_open.
7407 (grub_rescue_cmd_module): Likewise.
7408
fa46f4b5 74092005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7410
7411 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
7412 kern/sparc64/ieee1275/init.c because it contains _start.
7413 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
7414
e9211b5d 74152005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7416
7417 * configure.ac: Add support for sparc64 host with ieee1275
7418 firmware.
7419 * configure: Generated from configure.ac.
7420 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
7421 instead of int.
7422 (grub_ofdisk_read): Likewise.
7423 (grub_ofdisk_open): Use %p to print pointer values, and cast the
7424 pointers as (void *) to remove a warning.
7425 (grub_ofdisk_close): Likewise.
7426 (grub_ofdisk_read): Likewise.
7427 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
7428 returns, so make it return void to remove a warning.
7429 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
7430 Corresponding prototype change.
7431 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
7432 values, and cast the pointers as (void *) to remove a warning.
7433 (grub_mm_dump): Likewise.
7434 * conf/sparc64-ieee1275.mk: New file.
7435 * conf/sparc64-ieee1275.rmk: Likewise.
7436 * include/grub/sparc64/setjmp.h: Likewise.
7437 * include/grub/sparc64/types.h: Likewise.
7438 * include/grub/sparc64/ieee1275/console.h: Likewise.
7439 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7440 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7441 * include/grub/sparc64/ieee1275/time.h: Likewise.
7442 * kern/sparc64/cache.c: Likewise.
7443 * kern/sparc64/dl.c: Likewise.
7444 * kern/sparc64/ieee1275/init.c: Likewise.
7445 * kern/sparc64/ieee1275/openfw.c: Likewise.
7446
385c6a92 74472005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7448
7449 * util/console.c (grub_ncurses_putchar): If C is greater than
7450 0x7f, set C to a question mark.
7451 (grub_ncurses_getcharwidth): New function.
7452 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
7453 getcharwidth.
7454
7455 * normal/menu.c (print_entry): Made aware of Unicode. First,
7456 convert TITLE to UCS-4, and predict the cursor position by
7457 grub_getcharwidth.
7458
7459 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
7460 const to SRC.
7461 * kern/misc.c (grub_utf16_to_utf8): Likewise.
7462
16ccb8b1 74632005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7464
7465 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
7466 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7467 grub_strcat.
7468
7469 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
7470 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7471 grub_strcpy and grub_strlen. Take it into account that a space
7472 character is inserted as a delimiter.
7473
6a85ce79 74742005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7475
7476 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
7477 invalid magic in thre error.
7478
7479 * commands/search.c: New file.
7480
7481 * util/grub-emu.c (main): Call grub_search_init and
7482 grub_search_fini.
7483
7484 * kern/rescue.c (grub_rescue_print_disks): Removed.
7485 (grub_rescue_print_devices): New function.
7486 (grub_rescue_cmd_ls): Use grub_device_iterate with
7487 grub_rescue_print_devices instead of grub_disk_dev_iterate with
7488 grub_rescue_print_disks.
7489
7490 * kern/partition.c (grub_partition_iterate): Return the result of
7491 PARTMAP->ITERATE instead of GRUB_ERRNO.
7492
7493 * kern/device.c: Include grub/partition.h.
7494 (grub_device_iterate): New function.
7495
7496 * include/grub/partition.h (grub_partition_iterate): Return int
7497 instead of grub_err_t.
7498
7499 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
7500 prototype.
7501 [GRUB_UTIL] (grub_search_fini): Likewise.
7502
7503 * include/grub/device.h (grub_device_iterate): New prototype.
7504
7505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7506 commands/search.c.
7507 (pkgdata_MODULES): Added search.mod.
7508 (search_mod_SOURCES): New variable.
7509 (search_mod_CFLAGS): Likewise.
7510
7511 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
7512 (pkgdata_MODULES): Added search.mod.
7513 (search_mod_SOURCES): New variable.
7514 (search_mod_CFLAGS): Likewise.
7515
7516 * commands/ls.c (grub_ls_list_disks): Renamed to ...
7517 (grub_ls_list_devices): ... this, and use grub_device_iterate.
7518 All callers changed.
7519
7520 * DISTLIST: Added commands/search.c.
7521
ef095434 75222005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7523
7524 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
7525 conversion.
7526 (grub_getcharwidth): New function.
7527
7528 * kern/misc.c (grub_utf8_to_ucs4): New function.
7529
7530 * include/grub/term.h (struct grub_term): Added a new member
7531 "getcharwidth".
7532 (grub_getcharwidth): New prototype.
7533
7534 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
7535
7536 * term/i386/pc/console.c (map_char): New function. Segregated from
7537 grub_console_putchar.
7538 (grub_console_putchar): Use map_char.
7539 (grub_console_getcharwidth): New function.
7540 (grub_console_term): Specified grub_console_getcharwidth as
7541 getcharwidth.
7542
7543 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
7544 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
7545
7546 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
7547 GRUB_ERRNO.
7548 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
7549 on grub_strtoul completely.
7550 (write_char): Declare local variables in the beginning of the
7551 function.
7552 (grub_vesafb_getcharwidth): New function.
7553 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
7554 getcharwidth.
7555
1f0a95e4 75562005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
7557
7558 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
7559 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
7560 commands/i386/pc/vbetest.c.
7561
7562 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
7563 call grub_vbe_get_controller_info again, because the returned
7564 information is volatile.
7565 (grub_vbe_set_video_mode): Mostly rewritten.
7566 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
7567 grub_vbe_status_t correctly.
7568 (grub_vbe_get_video_mode_info): Likewise.
7569 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
7570 several if statements.
7571
7572 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
7573 * commands/i386/pc/vbeinfo.c: ... this.
7574
7575 * commands/i386/pc/vbe_test.c: Renamed to ...
7576 * commands/i386/pc/vbetest.c: ... this.
7577
7578 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
7579 ...
7580 (grub_cmd_vbeinfo): ... this. Save video modes before
7581 iterating. Skip a video mode, if it is not available, not enough
7582 information is given or it is monochrome. Show the memory
7583 model. Leave the interpretation of MODEVAR to grub_strtoul
7584 completely.
7585 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
7586 (GRUB_MOD_FINI): Likewise.
7587
7588 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
7589 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
7590 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
7591 duplicated grub_env_get. Leave the interpretation of MODEVAR to
7592 grub_strtoul completely.
7593 (real2pm): Removed.
7594 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
7595 (GRUB_MOD_FINI): Likewise.
7596
7597 * normal/misc.c: Include grub/mm.h.
7598
7599 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
7600 vbe_list_modes with vbetest.mod and vbeinfo.mod.
7601 (vbe_list_modes_mod_SOURCES): Removed.
7602 (vbe_list_modes_mod_CFLAGS): Likewise.
7603 (vbe_test_mod_SOURCES): Likewise.
7604 (vbe_test_mod_CFLAGS): Likewise.
7605 (vbeinfo_mod_SOURCES): New variable.
7606 (vbeinfo_mod_CFLAGS): Likewise.
7607 (vbetest_mod_SOURCES): Likewise.
7608 (vbetest_mod_CFLAGS): Likewise.
7609
992ffbbe 76102005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
7611
7612 * normal/misc.c: New file.
7613
7614 * DISTLIST: Added normal/misc.c.
7615
7616 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
7617 DISK to HOOK. Call HOOK with DISK.
7618 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7619 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7620 * partmap/sun.c (sun_partition_map_iterate): Likewise.
7621
7622 * normal/menu_entry.c (struct screen): Added a new member
7623 "completion_shown".
7624 (completion_buffer): New global variable.
7625 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
7626 (store_completion): New function.
7627 (complete): Likewise.
7628 (clear_completions): Likewise.
7629 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
7630 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
7631 a tab, call complete.
7632
7633 * normal/completion.c (disk_dev): Removed.
7634 (print_simple_completion): Likewise.
7635 (print_partition_completion): Likewise.
7636 (print_func): New global variable.
7637 (add_completion): Do not take the arguments WHAT or PRINT any
7638 longer. Added a new argument TYPE. Instead of printing directly,
7639 call PRINT_FUNC if not NULL.
7640 All callers changed.
7641 (complete_device): Use a local variable DEV instead of
7642 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
7643 (grub_normal_do_completion): Take a new argument HOOK. Do not
7644 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
7645 empty string, return NULL instead.
7646 All callers changed.
7647
7648 * normal/cmdline.c (print_completion): New function.
7649
7650 * kern/partition.c (grub_partition_iterate): Add an argument DISK
7651 to HOOK.
7652 All callers changed.
7653
7654 * kern/disk.c (grub_print_partinfo): Removed.
7655
7656 * include/grub/partition.h (struct grub_partition_map): Add a new
7657 argument DISK into HOOK of ITERATE.
7658 (grub_partition_iterate): Add a new argument DISK to HOOK.
7659
7660 * include/grub/normal.h (enum grub_completion_type): New enum.
7661 (grub_completion_type_t): New type.
7662 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
7663 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
7664 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
7665 (GRUB_COMPLETION_TYPE_FILE): Likewise.
7666 (grub_normal_do_completion): Added a new argument HOOK.
7667 (grub_normal_print_device_info): New prototype.
7668
7669 * include/grub/disk.h (grub_print_partinfo): Removed.
7670
7671 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
7672 (normal_mod_SOURCES): Likewise.
7673 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7674 (normal_mod_SOURCES): Likewise.
7675
7676 * commands/ls.c (grub_ls_list_disks): Use
7677 grub_normal_print_device_info instead of grub_print_partinfo. Free
7678 PNAME.
7679 (grub_ls_list_files): Use grub_normal_print_device_info instead of
7680 duplicating the code.
7681
0bd41162 76822005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7683
7684 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
7685 follow GCS more precisely.
7686 * commands/i386/pc/vbe_test.c: Likewise.
7687 * include/grub/i386/pc/vbe.h: Likewise.
7688 * term/i386/pc/vesafb.c: Likewise.
7689 * video/i386/pc/vbe.c: Likewise.
7690
6323696a 76912005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7692
7693 * DISTLIST: Added term/i386/pc/vesafb.c
7694 DISTLIST: Added video/i386/pc/vbe.c
7695 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
7696 DISTLIST: Added commands/i386/pc/vbe_test.c.
7697 * commands/i386/pc/vbe_list_modes.c: New file.
7698 * commands/i386/pc/vbe_test.c: Likewise.
7699 * term/i386/pc/vesafb.c: Likewise.
7700 * video/i386/pc/vbe.c: Likewise.
7701 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
7702 (grub_vbe_probe) Added prototype.
7703 (grub_vbe_set_video_mode) Likewise.
7704 (grub_vbe_get_video_mode) Likewise.
7705 (grub_vbe_get_video_mode_info) Likewise.
7706 (grub_vbe_set_pixel_rgb) Likewise.
7707 (grub_vbe_set_pixel_index) Likewise.
7708 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
7709 (pkgdata_MODULES): Added vesafb.mod.
7710 (pkgdata_MODULES): Added vbe_list_modes.mod.
7711 (pkgdata_MODULES): Added vbe_test.mod.
7712 (vbe_mod_SOURCES): Added.
7713 (vbe_mod_CFLAGS): Likewise.
7714 (vesafb_mod_SOURCES): Likewise.
7715 (vesafb_mod_CFLAGS): Likewise.
7716 (vbe_list_modes_mod_SOURCES): Likewise.
7717 (vbe_list_modes_mod_CFLAGS): Likewise.
7718 (vbe_test_mod_SOURCES): Likewise.
7719 (vbe_test_mod_CFLAGS): Likewise.
7720
0a74e62f 77212005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
7722
0a74e62f 7723 * normal/command.c (grub_command_execute): If INTERACTIVE is
7724 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
7725 CMDLINE. Disable the pager if INTERACTIVE is true.
7726 All callers are changed.
7727
7728 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
7729 before reading a config file.
7730 * normal/main.c (read_config_file): Even if a command is not
7731 found, register it if it is within an entry.
7732
7733 * util/grub-emu.c: Include sys/types.h and unistd.h.
7734 (options): Added --hold.
7735 (struct arguments): Added a new member "hold".
7736 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
7737 missing.
7738 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
7739 cleared by a debugger, if it is not zero.
7740
7741 * include/grub/normal.h (grub_command_execute): Add an argument
7742 INTERACTIVE.
7743
e51f85ae 77442005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
7745
7746 * DISTLIST: Added include/grub/i386/pc/vbe.h.
7747
e9c6f39b 77482005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
7749
7750 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
7751 program with another one, because the old one didn't detect a bug
7752 in gcc-3.4. Always use regparm 2, because the new test is still
7753 not enough for gcc-4.0. Someone must investigate a simple test
7754 case which detects a bug in gcc-4.0.
7755
8de3495c 77562005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
7757
7758 * DISTLIST: Added normal/completion.c.
7759
7760 * normal/completion.c: New file.
7761
7762 * term/i386/pc/console.c (grub_console_getwh): New function.
7763 (grub_console_term): Assign grub_console_getwh to getwh.
7764
7765 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7766 function is defined in normal/completion.c as
7767 grub_normal_do_completion.
7768 (grub_cmdline_get): Use grub_normal_do_completion instead of
7769 grub_tab_complete.
7770
7771 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7772 returns non-zero, otherwise return 0.
7773 (grub_partition_iterate): First, probe the partition map. Then,
7774 call ITERATE only for this partition map.
7775
7776 * kern/misc.c (grub_strncmp): Rewritten.
7777
7778 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7779 returns non-zero. Otherwise return 0.
7780
7781 * include/grub/partition.h (grub_partition_map_iterate): Return
7782 int instead of void.
7783
7784 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7785
7786 * include/grub/misc.h (grub_strncmp): Change the type of N to
7787 grub_size_t.
7788
7789 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7790 of void.
7791
7792 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
7793 unsigned explictly before comparing it with I.
7794
7795 * kern/main.c (grub_env_write_root): Add the attribute unused into
7796 VAR.
7797
7798 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7799 normal/completion.c.
7800 (normal_mod_SOURCES): Likewise.
7801 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7802 (normal_mod_SOURCES): Likewise.
7803
7804 * normal/command.c (grub_iterate_commands): If ITERATE returns
7805 non-zero, return one immediately.
7806
e85e144b 78072005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7808
7809 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7810 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7811 descriptions.
7812 (grub_vbe_get_controller_info): New function.
7813 (grub_vbe_get_mode_info): Likewise.
7814 (grub_vbe_set_mode): Likewise.
7815 (grub_vbe_get_mode): Likewise.
7816 (grub_vbe_set_memory_window): Likewise.
7817 (grub_vbe_get_memory_window): Likewise.
7818 (grub_vbe_set_scanline_length): Likewise.
7819 (grub_vbe_get_scanline_length): Likewise.
7820 (grub_vbe_set_display_start): Likewise.
7821 (grub_vbe_get_display_start): Likewise.
7822 (grub_vbe_set_palette_data): Likewise.
7823 * include/grub/i386/pc/vbe.h: New file.
7824
c46153d2 78252005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7826
7827 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7828 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7829 * DISTLIST: Likewise.
7830 * kern/ieee1275/of.c: Moved to ...
7831 * kern/ieee1275/ieee1275.c: ... here.
7832
0cb90c45 78332005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7834
7835 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7836 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7837 Pass 0 as `end' parameter to grub_strtoul().
7838
a19fb360 78392005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7840
7841 * include/grub/powerpc/ieee1275/console.h: Do not include
7842 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7843 ifdef.
7844 (grub_console_cur_color): Remove i386-specific prototype.
7845 (grub_console_real_putchar): Likewise.
7846 (grub_console_checkkey): Likewise.
7847 (grub_console_getkey): Likewise.
7848 (grub_console_getxy): Likewise.
7849 (grub_console_gotoxy): Likewise.
7850 (grub_console_cls): Likewise.
7851 (grub_console_setcursor): Likewise.
7852 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7853 Include <grub/machine/console.h>.
7854 * term/ieee1275/ofconsole.c: Likewise.
7855
4ac9bd04 78562005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7857
7858 * Makefile.in (LIBLZO): New variable.
7859
7860 * configure.ac: Check for LZO version 2.
7861
7862 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7863 lzo/lzo1x.h instead of lzo1x.h.
7864
7865 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7866 of -llzo.
7867
7868 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7869 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7870
7871 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7872 copying the data from PARTITION to P.
7873
f4917dfd 78742005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7875
7876 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7877 negative, unload the module.
7878
7879 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7880 map is "pc_partition_map" but not "pc".
7881 (usage): Fix the description. The options are --boot-image and
7882 --core-image but not --boot-file or --core-file.
7883 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7884 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7885 DEFAULT_DIRECTORY.
7886
7887 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7888 --core-file. Specify INSTALL_DEVICE as an argument.
7889
7890 * util/console.c: Include config.h.
7891 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7892 [HAVE_NCURSES_H]: Include ncurses.h.
7893 [HAVE_CURSES_H]: Include curses.h.
7894 [!A_NORMAL] (A_NORMAL): Defined as zero.
7895 [!A_STANDOUT] (A_STANDOUT): Likewise.
7896
7897 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7898 -lncurses.
7899 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7900
7901 * configure.ac: Check for curses libraries and headers.
7902
7903 * Makefile.in (LIBCURSES): New variable.
7904
7905 * genmk.rb (Script::rule): Set the executable bits.
7906
7907 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7908 name of the PC partition map is "pc_partition_map" but not "pc".
7909
0e143073 79102005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7911
7912 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7913 (modules): Likewise.
7914 (usage): Added descriptions for --modules and --grub-probefs.
7915 Handle --modules and --grub-probefs. Save the arguments in MODULES
7916 and GRUB_PROBEFS, respectively.
7917 Auto-detect a filesystem module against GRUBDIR. If the result is
7918 empty and modules are not specified explicitly, abort the
7919 installation. Add the result to MODULES.
7920
7921 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7922 disk/powerpc/ieee1275/ofdisk.c,
7923 include/grub/powerpc/ieee1275/init.h and
7924 term/powerpc/ieee1275/ofconsole.c.
7925 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7926 term/ieee1275/ofconsole.c.
7927
7928 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7929
7930 * COPYING: Upgraded to the latest version. Only the address of the
7931 FSF office has changed.
7932
efd6e6d5 79332005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7934
7935 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7936 kern/ieee1275.c with kern/ieee1275/of.c.
7937
7938 * kern/ieee1275.c: Moved to ...
7939 * kern/ieee1275/of.c: ... here.
7940
8ceafda2 79412005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
7942
7943 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7944 readablity.
7945
7946 * config.guess: Updated to the latest version from gnulib.
7947 * config.sub: Likewise.
7948 * install.sh: Likewise.
7949 * mkinstalldirs: Likewise.
7950
7951 * include/grub/console.h: Removed. This file is arch-specific. Do
7952 not put this in include/grub.
7953
7954 * include/grub/i386/pc/console.h: Resurrected.
7955
7956 * util/console.c: Include grub/machine/console.h instead of
7957 grub/console.h.
7958 * util/grub-emu.c: Likewise.
7959
267f6cd9 79602005-08-04 Marco Gerards <metgerards@student.han.nl>
7961
7962 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7963 hardcoded value.
7964
7965 From Vincent Pelletier <subdino2004@yahoo.fr>
7966 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7967 Redefined to use grub_getwh.
7968 (grub_term): New member named getwh.
7969 (grub_getwh): New prototype.
7970 * kern/term.c (grub_getwh): New function.
7971 * term/i386/pc/console.c (grub_console_getwh): New function.
7972 (grub_console_term): New member `getwh'.
7973 * term/i386/pc/vga.c (grub_vga_getwh): New function.
7974 (grub_vga_term): New member `getwh'.
0b5abe02 7975 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 7976 grub_ssize_t.
7977 (grub_ofconsole_getw): New function.
7978 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7979 (grub_ofconsole_term): New field named getwh and new initial
7980 value.
7981
3be7266d 79822005-08-03 Hollis Blanchard <hollis@penguinppc.org>
7983
7984 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7985 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
7986 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7987 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7988 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7989 of <grub/machine/ieee1275.h>.
7990 * commands/ieee1275/reboot.c: Likewise.
7991 * boot/powerpc/ieee1275/ieee1275.c: Move ...
7992 * kern/ieee1275.c: ... to here. All users updated. Change all
7993 parameter structs to use new type `grub_ieee1275_cell_t'.
7994 * term/powerpc/ieee1275/ofconsole.c: Move ...
7995 * term/ieee1275/ofconsole.c: ... to here. All users updated.
7996 * disk/powerpc/ieee1275/ofdisk.c: Move ...
7997 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
7998 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7999 to return int.
8000 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
8001 Remove unused prototypes. All users updated.
8002 * include/grub/powerpc/ieee1275/console.h: Removed.
8003 * include/grub/powerpc/ieee1275/ieee1275.h: Define
8004 `grub_ieee1275_cell_t'.
8005 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
8006 Cast comparisons with -1 to the correct type.
8007 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
8008 type to match `grub_ieee1275_entry_fn'.
8009
8b5f3938 80102005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
8011
8012 * DISTLIST: Added util/i386/pc/grub-probefs.c.
8013
8014 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
8015 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
8016 partmap/sun.c.
8017 (grub_probefs_SOURCES): New variable.
8018
8019 * util/i386/pc/grub-probefs.c: New file.
8020
8021 * util/i386/pc/grub-setup.c (main): Call
8022 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
8023 grub_hfs_init and grub_jfs_init to initialize the system. Call
8024 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
8025 grub_pc_partition_map_fini to finish the system.
8026
ea409713 80272005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
8028
8029 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
8030 function.
8031 (grub_multiboot_load_elf32): Likewise.
8032 (grub_multiboot_is_elf64): Likewise.
8033 (grub_multiboot_load_elf64): Likewise.
8034 (grub_multiboot_load_elf): Likewise.
8035 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
8036 an ELF32 or ELF64 file.
8037 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
8038
8039 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
8040 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
8041 NULL before calling FS->LABEL.
8042 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
8043 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
8044 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
8045 before calling FS->LABEL.
8046
141a288b 80472005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
8048
8049 * util/i386/pc/grub-install.in (datadir): New variable.
8050 (libdir): Removed.
8051 (pkgdatadir): New variable.
8052 (pkglibdir): Removed.
8053
0d5f8a54 80542005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
8055
8056 * DISTLIST: Added util/i386/pc/grub-install.in.
8057
8058 * util/i386/pc/grub-install.in: New file.
8059
8060 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
8061 (grub_install_SOURCES): Likewise.
8062
8063 * genmk.rb: Added support for scripts.
8064 (Script): New class.
8065 (scripts): New variable.
8066
8067 * Makefile.in (install-local): Install sbin_SCRIPTS by
8068 INSTALL_SCRIPT.
8069 (uninstall): Remove sbin_SCRIPTS.
8070
8071 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
8072 device, try to get a GRUB device by
8073 grub_util_biosdisk_get_grub_dev.
8074 Free DEST_DEV.
8075
8076 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
8077 description for --device-map.
8078
5f968e1e 80792005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8080
8081 Change the semantics of variable hooks. They now return strings
8082 instead of error values.
8083
8084 * util/i386/pc/grub-setup.c: Include grub/env.h.
8085 (setup): Use grub_device_set_root instead of grub_env_set.
8086
8087 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
8088 grub_env_get instead of grub_device_set_root and
8089 grub_device_get_root, respectively.
8090
8091 * kern/main.c (grub_env_write_root): New function.
8092 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
8093 grub_env_set instead of grub_device_set_root.
8094
8095 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
8096 many variables.
8097 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
8098 rather than calling ENV->WRITE_HOOK afterwards.
8099 (grub_env_get): Return the result of ENV->READ_HOOK rather than
8100 passing a pointer of a pointer.
8101 (grub_register_variable_hook): Change the types of "read_hook" and
8102 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
8103 respectively.
8104 Allocate the default empty string on the heap, because this string
8105 may be freed later.
8106
8107 * kern/device.c: Include grub/env.h.
8108 (grub_device_set_root): Removed.
8109 (grub_device_get_root): Likewise.
8110 (grub_device_open): Use grub_env_get instead of
8111 grub_device_get_root.
8112
8113 * include/grub/env.h (grub_env_read_hook_t): New type.
8114 (grub_env_write_hook_t): Likewise.
8115 (grub_env_var): Change the types of "read_hook" and "write_hook"
8116 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
8117 (grub_register_variable_hook): Likewise.
8118
8119 * include/grub/device.h (grub_device_set_root): Removed.
8120 (grub_device_set_root): Likewise.
8121
8122 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
8123 make sure that DIRNAME terminates with '/', so that
8124 grub_fat_find_dir will fail if PATH is not a directory.
8125
8126 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
8127 from DIRNAME.
8128 Use the qualifier auto for print_files and print_files_long.
8129 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
8130 as a regular file.
8131 Put a newline only if there is no error.
8132 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
8133 used.
8134
896f0afd 81352005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8136
8137 * kern/partition.c (grub_partition_probe): Initialize PART to
8138 NULL. Otherwise, when no partition map is registered, this returns
8139 a garbage.
8140
b28b81b2 81412005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
8142
8143 * partmap/apple.c (apple_partition_map_iterate): Check if POS
8144 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
8145 valid.
8146
5f3607e0 81472005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
8148
8149 * commands/ls.c (grub_ls_list_disks): Print the filesystem
8150 information on each device, if it does not have partitions. Print
8151 "Device" instead of "Disk", because this function is not specific
8152 to disk devices.
8153
8154 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
8155 static to ensure that it is put on the memory rather than a
8156 register.
8157
502c87e8 81582005-07-17 Yoshinori Okuji <okuji@enbug.org>
8159
8160 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
8161 (grub_cat_init): Likewise.
8162 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
8163 (options): Likewise.
8164 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
8165 (grub_configfile_init): Likewise.
8166 * font/manager.c (GRUB_MOD_INIT): Likewise.
8167 * commands/help.c (GRUB_MOD_INIT): Likewise.
8168 (grub_help_init): Likewise.
8169 * normal/command.c (grub_command_init): Likewise.
8170 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
8171 * disk/loopback.c (grub_loop_init): Likewise.
8172 (GRUB_MOD_INIT): Likewise.
8173 * commands/ls.c (grub_ls_init): Likewise.
8174 (GRUB_MOD_INIT): Likewise.
8175 (options): Likewise.
8176 * commands/boot.c (grub_boot_init): Likewise.
8177 (GRUB_MOD_INIT): Likewise.
8178 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
8179 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
8180 (GRUB_MOD_INIT): Likewise.
8181 * commands/cmp.c (grub_cmp_init): Likewise.
8182 (GRUB_MOD_INIT): Likewise.
8183
8184 * normal/arg.c: Use <> instead of "" to include header files.
8185 (SHORT_ARG_HELP): New macro.
8186 (SHORT_ARG_USAGE): Likewise.
8187 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
8188 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
8189 descriptions.
8190 (find_short): Check if C is 'h' or 'u' explicitly.
8191 (grub_arg_show_help): Use space characters instead of tabs. Treat
8192 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
8193 are shown with --help and --usage only if they are not used for
8194 the command itself.
8195 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
8196 'h' and 'u'.
8197
8198 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
8199 const into "longarg". Change the type of "shortarg" to int.
8200
f806d18e 82012005-07-17 Yoshinori Okuji <okuji@enbug.org>
8202
8203 * boot/i386/pc/boot.S (boot_drive_check): New label.
8204
8205 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
8206 macro.
8207
8208 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
8209 which do not pass a boot drive correctly. Copied from GRUB Legacy.
8210
e293232b 82112005-07-17 Yoshinori Okuji <okuji@enbug.org>
8212
8213 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
8214 When turning off Gate A20, skip the check and return immediately,
8215 because this is not fatal usually.
8216
ebedfd00 82172005-07-17 Yoshinori Okuji <okuji@enbug.org>
8218
8219 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
8220 be 0x7C00 instead of 0x8000.
8221
8222 * boot/i386/pc/pxeboot.S: Rewritten.
8223
8224 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
8225 EXT_C.
8226 (gate_a20_check_state): Read a byte from 0x108000. Invert the
8227 result.
8228
654fc59f 82292005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
8230
8231 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
8232 robustness. This routine now supports a BIOS call and System
8233 Control Port A to modify the gate A20.
8234
8235 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8236 Increased to 0x440.
8237
09f9923f 82382005-07-12 Hollis Blanchard <hollis@penguinppc.org>
8239
8240 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
8241 device path and resulting ihandle.
8242 (grub_ofdisk_close): dprintf the ihandle being closed.
8243 (grub_ofdisk_read): dprintf function parameters.
8244 * kern/mm.c (grub_mm_init_region): Likewise.
8245 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
8246 (grub_linux_boot): dprintf the Linux entry point, initrd address and
8247 size, and boot arguments.
8248 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
8249 before loading into memory.
8250 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
8251 before loading into memory.
8252
7ef504d8 82532005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
8254
8255 * kern/mm.c: Added much documentation.
8256 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
8257 8, set to 5 instead of 8.
8258
e0f050c2 82592005-07-10 Yoshinori Okuji <okuji@enbug.org>
8260
8261 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
8262
8263 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
8264 (grub_mkdevicemap_SOURCES): New variable.
8265
8266 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
8267 lib/device.c of GRUB Legacy.
8268
7224189a 82692005-07-10 Yoshinori Okuji <okuji@enbug.org>
8270
8271 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
8272 instead of PATH is NULL.
8273
68c864eb 82742005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
8275
8276 * commands/cmp.c (BUFFER_SIZE): New macro.
8277 (grub_cmd_cmp): Close the right file at the right time. Compare
8278 only data just read. Don't report files of different size as
8279 identical. Dynamically allocate buffers. Move variable
8280 declarations at the beginning of function.
8281
e6f3e614 82822005-07-09 Yoshinori Okuji <okuji@enbug.org>
8283
8284 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
8285 reverse.
8286
f8f1559a 82872004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
8288
8289 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
8290 when backspace is pressed at beginning of line.
8291
39c9d41d 82922005-07-03 Yoshinori Okuji <okuji@enbug.org>
8293
8294 * DISTLIST: Added genfslist.sh.
8295
8296 * normal/main.c (fs_module_list): New variable.
8297 (autoload_fs_module): New function.
8298 (read_fs_list): Likewise.
8299 (grub_normal_execute): Call read_fs_list.
8300
8301 * kern/fs.c (grub_fs_autoload_hook): New variable.
8302 (grub_fs_probe): Added support for auto-loading.
8303
8304 * include/grub/normal.h (struct grub_fs_module_list): New struct.
8305 (grub_fs_module_list_t): New type.
8306
8307 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
8308 (grub_fs_autoload_hook): New prototype.
8309
8310 * genfslist.sh: New file.
8311
8312 * genmk.rb: Added a rule to generate a filesystem list.
8313
121c1d83 83142005-06-30 Marco Gerards <metgerards@student.han.nl>
8315
8316 * configure.ac: Fix the test for cross-compiling.
8317
8318 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
8319 define GRUB_UTIL anymore.
8320
8321 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
8322 so this function works on other systems than just big endian.
8323 (load_modules): Likewise.
8324 (add_segments): Likewise.
8325
e75d76e1 83262005-06-23 Hollis Blanchard <hollis@penguinppc.org>
8327
8328 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
8329 contains `l' modifier, get a long from va_arg().
8330
50b5a0a7 83312005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
8332
8333 * kern/mm.c (grub_free): If the next free block which is being
8334 merged is the first free block, set the first block to the block
8335 being freed.
8336 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
8337
89371b20 83382005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8339
8340 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
8341 `grub_ieee1275_chosen'.
8342
168d6e58 83432005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8344
8345 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
8346 (grub_ieee1275_chosen): New variable.
8347 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
8348 `chosen'.
8349 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
8350 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8351 Rename first argument to `phandle' for consistency.
8352 (grub_ieee1275_get_property_length): Likewise.
8353 (grub_ieee1275_next_property): Likewise. Change type of first argument
8354 to grub_ieee1275_phandle_t.
8355 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
8356 Move export next to declaration.
8357 (grub_ieee1275_chosen): New variable.
8358 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
8359 Correct cosmetic typo.
8360 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
8361 `grub_ieee1275_chosen'.
8362 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
8363 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
8364 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
8365 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
8366 `grub_ieee1275_chosen'.
8367
ca5baa3f 83682005-05-10 Hollis Blanchard <hollis@penguinppc.org>
8369
8370 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
8371 /chosen/bootargs.
8372 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
8373 /chosen/bootargs as "variable=value" pairs.
8374
708b345f 83752005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
8376
8377 * include/grub/misc.h (grub_dprintf): New macro.
8378 (grub_real_dprintf): New prototype.
8379 (grub_strword): Likewise.
8380 (grub_iswordseparator): Likewise.
8381 * kern/misc.c (grub_real_dprintf): New function.
8382 (grub_strword): Likewise.
8383 (grub_iswordseparator): Likewise.
8384
f4c5e67c 83852005-04-30 Hollis Blanchard <hollis@penguinppc.org>
8386
8387 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
8388 (roundup): Remove macro.
8389 (grub_ieee1275_flags): Make static.
8390 (grub_ieee1275_realmode): Remove.
8391 (grub_ieee1275_test_flag): New function.
8392 (grub_ieee1275_set_flag): Likewise.
8393 (find_options): Rename to `grub_ieee1275_find_options'; update
8394 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
8395 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
8396 (cmain): New prototype.
8397 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
8398 `grub_ieee1275_flags' directly.
8399 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
8400 machine/biosdisk.h.
8401 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
8402 Don't include grub/machine/init.h.
8403 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
8404 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8405 Remove prototype.
8406 (grub_ieee1275_realmode): Likewise.
8407 (grub_ieee1275_flag): New enum.
8408 (grub_ieee1275_test_flag): New prototype.
8409 (grub_ieee1275_set_flag): New prototype.
8410 * include/grub/powerpc/ieee1275/init.h: Remove file.
8411 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
8412 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
8413 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
8414 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
8415 comment.
8416 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
8417 `grub_ieee1275_test_flag'.
8418 (grub_ieee1275_encode_devname): Likewise.
8419
ed16607e 84202005-04-21 Hollis Blanchard <hollis@penguinppc.org>
8421
8422 * include/grub/powerpc/ieee1275/ieee1275.h
8423 (grub_ieee1275_encode_devname): New prototype.
8424 (grub_ieee1275_get_filename): Likewise.
8425 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
8426 function.
8427 (grub_set_prefix): Likewise.
8428 (grub_machine_init): Call grub_set_prefix.
8429 * kern/powerpc/ieee1275/openfw.c: Fix typos.
8430 (grub_parse_type): New enum.
8431 (grub_ieee1275_get_devargs): New function.
8432 (grub_ieee1275_get_devname): Likewise.
8433 (grub_ieee1275_parse_args): Likewise.
8434 (grub_ieee1275_get_filename): Likewise.
8435 (grub_ieee1275_encode_devname): Likewise.
8436
be369920 84372005-03-30 Marco Gerards <metgerards@student.han.nl>
8438
8439 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
8440 `grub_loader_unset'.
8441
a5ce3a4a 84422005-03-26 Hollis Blanchard <hollis@penguinppc.org>
8443
8444 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
8445 instead of grub_ieee1275_interpret.
8446 (grub_halt_init): New function.
8447 (grub_halt_fini): Likewise.
8448 (GRUB_MOD_INIT): Correct message grammar.
8449 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
8450 instead of grub_ieee1275_interpret.
8451 (grub_reboot_init): New function.
8452 (grub_reboot_fini): Likewise.
8453 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
8454 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
8455 util/i386/pc/misc.c with commands/ieee1275/halt.c,
8456 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
8457 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
8458 function.
8459 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
8460 Add prototype.
8461 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
8462 prototype.
8463 (grub_halt): Likewise.
8464 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
8465 (cmain): Remove __attribute__((unused)).
8466 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
8467 (grub_heap_len): Likewise.
8468 (grub_machine_fini): New function.
8469 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
8470 (grub_halt): Likewise.
8471 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
8472 function.
8473 * util/powerpc/ieee1275/misc.c: New file.
8474
0058f771 84752005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8476
8477 * DISTLIST: New file.
8478 * gendistlist.sh: Likewise.
8479
8480 * Makefile.in (COMMON_DISTFILES): Removed.
8481 (BOOT_DISTFILES): Likewise.
8482 (CONF_DISTFILES): Likewise.
8483 (DISK_DISTFILES): Likewise.
8484 (FS_DISTFILES): Likewise.
8485 (INCLUDE_DISTFILES): Likewise.
8486 (KERN_DISTFILES): Likewise.
8487 (LOADER_DISTFILES): Likewise.
8488 (TERM_DISTFILES): Likewise.
8489 (UTIL_DISTFILES): Likewise.
8490 (DISTFILES): Likewise.
8491 (uninstall): Uninstall files in $(pkgdata_DATA).
8492 (DISTLIST): New target.
8493 (distdir): Use the contents of the file DISTLIST to get a list of
8494 distributed files.
8495
46b3b8a5 84962005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8497
8498 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
8499 descriptor. This is ported from GRUB Legacy.
8500
8501 * gencmdlist.sh: Added an extra semicolon to make it work with
8502 old sed versions. Reported by Robert Bihlmeyer
8503 <robbe@orcus.priv.at>.
8504
5822ff87 85052005-03-08 Yoshinori Okuji <okuji@enbug.org>
8506
8507 Automatic loading of commands is supported.
8508
8509 * normal/main.c (read_command_list): New function.
8510 (grub_normal_execute): Call read_command_list.
8511
8512 * normal/command.c (grub_register_command): Return zero or CMD.
8513 Allocate CMD->NAME from the heap.
8514 Initialize CMD->MODULE_NAME to zero.
8515 Find the same name as well. If the same command is found and it is
8516 a dummy command, overwrite members. If it is not a dummy command,
8517 return zero.
8518 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
8519 (grub_command_find): If a dummy command is found, load a module
8520 and retry to find a command only once.
8521
8522 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
8523 make sure that each command is loaded.
8524
8525 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
8526 macro.
8527 (struct grub_command): Remove const from the member `name'.
8528 Add a new member `module_name'.
8529 (grub_register_command): Return grub_command_t.
8530
8531 * commands/help.c (grub_cmd_help): Call grub_command_find to make
8532 sure that each command is loaded.
8533
8534 * genmk.rb (PModule::rule): Specify a module name without the
8535 suffix ".mod" to gencmdlist.sh.
8536
7b1f4b57 85372005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8538
8539 * gencmdlist.sh: New file.
8540
8541 * genmk.rb (PModule::rule): Generate a rule for a command list.
8542 Clean command.lst.
8543 Generate command.lst from $(COMMANDFILES).
8544
8545 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
8546 (DATA): Added $(pkgdata_DATA).
8547 (install-local): Install files in $(pkgdata_DATA).
8548
062aaf39 85492005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8550
8551 * term/i386/pc/vga.c (debug_command): Removed.
8552 (GRUB_MOD_INIT): Do not register the command "debug".
8553
8554 From Hollis Blanchard:
8555 * commands/configfile.c: New file.
8556 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8557 commands/configfile.c.
8558 (pkgdata_MODULES): Added configfile.mod.
8559 (configfile_mod_SOURCES): New variable.
8560 (configfile_mod_CFLAGS): Likewise.
8561 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8562 commands/configfile.c.
8563 (pkgdata_MODULES): Added configfile.mod.
8564 (configfile_mod_SOURCES): New variable.
8565 (configfile_mod_CFLAGS): Likewise.
8566 * util/grub-emu.c (main): Call grub_configfile_init and
8567 grub_configfile_fini.
8568 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
8569 prototype.
8570 [GRUB_UTIL] (grub_configfile_fini): Likewise.
8571
cee01aa6 85722005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8573
8574 * normal/arg.c (grub_arg_show_help): Do not show the bug report
8575 address.
8576
8577 * commands/help.c (grub_cmd_help): Do not print newlines after
8578 the last command in print_command_help.
8579
93f3a1d8 85802005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8581
8582 * commands/default.h: New file.
8583 * commands/timeout.h: Likewise.
8584 * normal/context.c: Likewise.
8585
8586 * util/misc.c: Do not include sys/times.h.
8587 Include sys/time.h and grub/machine/time.h.
8588 (grub_get_rtc): Rewritten with gettimeofday.
8589
8590 * util/grub-emu.c (main): Call grub_default_init and
8591 grub_timeout_init before grub_normal_init, and call
8592 grub_timeout_fini and grub_default_fini after grub_main.
8593
8594 * util/console.c (grub_ncurses_checkkey): Return the read
8595 character or -1.
8596
8597 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
8598 timeouts.
8599
8600 * normal/main.c (read_config_file): Push MENU. If this fails,
8601 print an error and wait for a user input.
8602 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
8603 If a menu is empty or an error occurs, pop MENU.
8604 (grub_normal_execute): Pop and free MENU after grub_menu_run
8605 returns.
8606
8607 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
8608
8609 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
8610 include time.h.
8611 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8612 without GRUB_UTIL.
8613 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
8614 time.h.
8615 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8616 without GRUB_UTIL.
8617
8618 * include/grub/normal.h (struct grub_menu_list): New struct.
8619 (grub_menu_list_t): New type.
8620 (struct grub_context): New struct.
8621 (grub_context_t): New type.
8622 (grub_register_command): Got rid of EXPORT_FUNC.
8623 (grub_unregister_command): Likewise.
8624 (grub_context_get): New prototype.
8625 (grub_context_get_current_menu): Likewise.
8626 (grub_context_push_menu): Likewise.
8627 (grub_context_pop_menu): Likewise.
8628 [GRUB_UTIL] (grub_default_init): Likewise.
8629 [GRUB_UTIL] (grub_default_fini): Likewise.
8630 [GRUB_UTIL] (grub_timeout_init): Likewise.
8631 [GRUB_UTIL] (grub_timeout_fini): Likewise.
8632
8633 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
8634 commands/timeout.c and normal/context.c.
8635 (pkgdata_MODULES): Added default.mod and timeout.mod.
8636 (normal_mod_SOURCES): Added normal/context.c.
8637 (default_mod_SOURCES): New variable.
8638 (default_mod_CFLAGS): Likewise.
8639 (timeout_mod_SOURCES): Likewise.
8640 (timeout_mod_CFLAGS): Likewise.
8641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
8642 conf/i386-pc.rmk.
8643 (pkgdata_MODULES): Added default.mod and timeout.mod.
8644 (normal_mod_SOURCES): Added normal/context.c.
8645 (default_mod_SOURCES): New variable.
8646 (default_mod_CFLAGS): Likewise.
8647 (timeout_mod_SOURCES): Likewise.
8648 (timeout_mod_CFLAGS): Likewise.
8649
8650 * Makefile.in (all-local): Added $(MKFILES).
8651
4ed2e1dd 86522005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
8653
8654 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
8655 (grub_emu_SOURCES): Likewise.
8656 (pkgdata_MODULES): Add `sun.mod'.
8657 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8659 `partmap/sun.c'.
8660 (pkgdata_MODULES): Add `sun.mod'.
8661 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8662 * include/grub/partition.h (grub_sun_partition_map_init): New
8663 prototype.
8664 (grub_sun_partition_map_fini): Likewise.
8665 * partmap/sun.c: New file.
8666 * util/grub-emu.c (main): Initialize and de-initialize the sun
8667 partitionmap support.
8668
4d4e372e 86692005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
8670
8671 This implements an Emacs-like menu entry editor.
8672
8673 * normal/menu_entry.c: New file.
8674
8675 * util/console.c (grub_ncurses_putchar): Translate some Unicode
8676 characters to ASCII.
8677 (saved_char): New variable.
8678 (grub_ncurses_checkkey): Rewritten completely.
8679 (grub_ncurses_getkey): Likewise.
8680 (grub_ncurses_init): Call raw instead of cbreak.
8681
8682 * normal/menu.c (print_entry): Do not put a space.
8683 (init_page): Renamed to ...
8684 (grub_menu_init_page): ... this. All callers changed.
8685 (edit_menu_entry): Removed.
8686 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
8687
8688 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
8689
8690 * kern/misc.c (grub_vprintf): Call grub_refresh.
8691
8692 * normal/menu.c (DISP_LEFT): Renamed to ...
8693 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
8694 * normal/menu.c (DISP_UP): Renamed to ...
8695 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
8696 * normal/menu.c (DISP_RIGHT): Renamed to ...
8697 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
8698 * normal/menu.c (DISP_DOWN): Renamed to ...
8699 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
8700 * normal/menu.c (DISP_HLINE): Renamed to ...
8701 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
8702 * normal/menu.c (DISP_VLINE): Renamed to ...
8703 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
8704 * normal/menu.c (DISP_UL): Renamed to ...
8705 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
8706 * normal/menu.c (DISP_UR): Renamed to ...
8707 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
8708 * normal/menu.c (DISP_LL): Renamed to ...
8709 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
8710 * normal/menu.c (DISP_LR): Renamed to ...
8711 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
8712 * normal/menu.c (TERM_WIDTH): Renamed to ...
8713 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
8714 * normal/menu.c (TERM_HEIGHT): Renamed to ...
8715 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
8716 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
8717 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
8718 * normal/menu.c (TERM_MARGIN): Renamed to ...
8719 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
8720 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
8721 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
8722 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
8723 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
8724 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
8725 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
8726 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
8727 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
8728 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
8729 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
8730 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
8731 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
8732 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
8733 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
8734 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
8735 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
8736 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
8737 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
8738 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
8739 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
8740 All callers changed.
8741
8742 * include/grub/normal.h: New prototype.
8743
8744 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8745 normal/menu_entry.c.
8746 (normal_mod_SOURCES): Likewise.
8747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8748 (normal_mod_SOURCES): Likewise.
8749
e6b92c8a 87502005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
8751
8752 * include/grub/normal.h (grub_halt_init): New prototype.
8753 (grub_halt_fini): Likewise.
8754 (grub_reboot_init): Likewise.
8755 (grub_reboot_fini): Likewise.
8756
8757 * util/grub-emu.c: Include signal.h.
8758 (main_env): New global variable.
8759 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
8760 catch C-c.
8761 (grub_machine_fini): New function.
8762 (main): Call grub_halt_init and grub_reboot_init before
8763 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8764 Call setjmp with MAIN_ENV to go back afterwards.
8765 Call grub_machine_fini right before return.
8766
8767 * include/grub/util/misc.h: Include setjmp.h.
8768 (main_env): New prototype.
8769
8770 * include/grub/kernel.h (grub_machine_fini): New prototype.
8771 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8772 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8773
8774 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8775 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8776 * term/i386/pc/console.c (grub_console_fini): Likewise.
8777
8778 * util/i386/pc/misc.c: New file.
8779
8780 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8781 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8782 commands/i386/pc/reboot.c.
8783
c642636f 87842005-02-14 Guillem Jover <guillem@hadrons.org>
8785
8786 * include/grub/dl.h (grub_dl_check_header): New prototype.
8787 (grub_arch_dl_check_header): Change return type to grub_err_t,
8788 remove size parameter and export function. Update all callers.
8789 * kern/dl.c (grub_dl_check_header): New function.
8790 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8791 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8792 are inside the core.
8793 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8794 independent ELF header checks.
8795 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8796 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8797 `grub_dl_check_header' instead of explicit checks. Check for the
8798 ELF type.
8799 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8800 `grub_dl_check_header' instead of explicit checks. Remove arch
8801 specific ELF header checks.
8802
e6b92c8a 8803 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8804 argument SIZE.
8805
5eabe94b 88062005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8807
8808 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8809 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8810
1b14a681 88112005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8812
8813 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8814 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8815 (part_map_iterate): Clear `grub_errno' and return 0 if
8816 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8817 * partmap/amiga.c (amiga_partition_map_iterate): Return
8818 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8819 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8820
aca108aa 88212005-02-01 Guillem Jover <guillem@hadrons.org>
8822
8823 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8824 help info.
8825
c9f9c556 88262005-01-31 Marco Gerards <metgerards@student.han.nl>
8827
8828 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8829 Removed prototype.
8830 (grub_rescue_cmd_linux): New prototype.
8831 (grub_rescue_cmd_initrd): Likewise.
8832 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8833 `bi_rec'.
8834 (grub_linux_release_mem): Release the memory for the initrd.
8835 (grub_load_linux): Renamed from this...
8836 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8837 Changed `entry' not to be static. Loop over memory regions to
8838 find another one when the default fails.
8839 (grub_rescue_cmd_initrd): New function.
8840 (grub_linux_init): Remove function.
8841 (grub_linux_fini): Likewise.
8842 (GRUB_MOD_INIT): Register `initrd'.
8843 (GRUB_MOD_FINI): Unregister `initrd'.
8844 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8845 Function removed.
8846 (grub_linux_normal_fini): Likewise.
8847 (GRUB_MOD_INIT): Register `initrd'.
8848 (GRUB_MOD_FINI): Unregister `initrd'.
8849
990cf3aa 88502005-01-31 Marco Gerards <metgerards@student.han.nl>
8851
8852 * commands/help.c: New file.
8853 * normal/arg.c (show_help): Renamed to...
8854 (grub_arg_show_help): ... this.
8855 * commands/i386/pc/halt.c: New file.
8856 * commands/i386/pc/reboot.c: Likewise.
8857 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8858 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8859 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8860 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8861 variables.
8862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8863 `commands/help.c'.
8864 (pkgdata_MODULES): Add `help.mod'.
8865 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8866 * grub/i386/pc/init.h (grub_reboot): New prototype.
8867 (grub_halt): Likewise.
8868 * include/grub/normal.h (grub_arg_show_help): New prototype.
8869 (grub_help_init): Likewise.
8870 (grub_help_fini): Likewise.
8871 * util/grub-emu.c (main): Initialize and deinitialize the help
8872 command.
8873
8874 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8875
8876 * normal/command.c (grub_command_init): Fixed the description of
8877 the `set' and `unset' commands.
8878
88792005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 8880
8881 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8882 function.
8883 * commands/ieee1275/halt.c: New file.
8884 * commands/ieee1275/reboot.c: Likewise.
8885 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8886 `__attribute__ ((unused))'. Some GCS related fixed.
8887 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8888 (grub_suspend_fini): Likewise.
8889 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8890 and `halt.mod'.
8891 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8892 (halt_mod_CFLAGS): New variables.
8893 * include/grub/powerpc/ieee1275/ieee1275.h
8894 (grub_ieee1275_interpret): New prototype.
8895
1ab09cc7 88962005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8897
8898 * include/grub/misc.h (memmove): New prototype.
8899 (memcpy): Likewise.
8900
8b8cbdb2 89012005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8902
8903 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8904 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8905
e3741a27 89062005-01-22 Marco Gerards <metgerards@student.han.nl>
8907
8908 * kern/misc.c (grub_strndup): Function rewritten.
8909
776bd780 89102005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8911
8912 * normal/menu.c (TERM_WIDTH): Macro redefined.
8913 (TERM_TOP_BORDER_Y): Likewise.
8914 (draw_border): Replaced while-loop by a for-loop. Make the number
8915 of lines consistent with the number of lines displayed in
8916 print_entries. Added a margin below the rectangle.
8917 (print_entry): Make the entry fit in the rectangle.
8918 (print_entries): Display the scroll arrows next to the right
8919 border.
8920
78026bce 89212005-01-21 Marco Gerards <metgerards@student.han.nl>
8922
8923 * fs/minix.c (grub_minix_find_file): Reserve more space for
8924 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8925 `grub_strncpy' to copy `path' into it.
8926
67bbaf0f 89272005-01-21 Marco Gerards <metgerards@student.han.nl>
8928
8929 Add the loopback device, a device via which files can be accessed
8930 as devices.
8931
8932 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8933 (pkgdata_MODULES): Add loopback.mod.
8934 (loopback_mod_SOURCES): New variable.
8935 (loopback_mod_CFLAGS): Likewise.
8936 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8937 `disk/loopback.c'.
8938 (pkgdata_MODULES): Add loopback.mod.
8939 (loopback_mod_SOURCES): New variable.
8940 (loopback_mod_CFLAGS): Likewise.
8941 * disk/loopback.c: new file.
8942 * include/grub/normal.h (grub_loop_init): New prototype.
8943 (grub_loop_fini): New prototype.
8944 * util/grub-emu.c (main): Initialize and de-initialize loopback
8945 support.
8946 * include/grub/disk.h (grub_disk_dev_id): Add
8947 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8948
6f1c18bd 89492005-01-20 Hollis Blanchard <hollis@penguinppc.org>
8950
8951 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8952 function.
8953 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8954 (suspend_mod_SOURCES): New variable.
8955 (suspend_mod_CFLAGS): Likewise.
8956 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8957 New prototype.
8958 * commands/ieee1275/suspend.c: New file.
8959
b38551da 89602005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8961
8962 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8963 ((unused))' to `__attribute__ ((used))'.
8964 (GRUB_MOD_FINI): Likewise.
8965 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8966 * genmk.rb (PModule): Assign space to common symbols when linking
8967 modules.
8968
777aff39 89692005-01-20 Marco Gerards <metgerards@student.han.nl>
8970
8971 * include/grub/mm.h (grub_mm_init_region): Change the type of the
8972 `unsigned' arguments to `grub_size_t'.
8973 (grub_malloc): Likewise.
8974 (grub_realloc): Likewise.
8975 (grub_memalign): Likewise.
8976 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8977 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8978 * util/misc.c (grub_malloc): Likewise.
8979 (grub_realloc): Likewise.
8980 * kern/mm.c (get_header_from_pointer): Change the casts to
8981 `unsigned' into a cast to `grub_size_t'.
8982
8983 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8984 point to `currnode' when `currnode' is changed.
8985
8986 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
8987 Schottelius <nico-linux@schottelius.org>.
8988
d0ff18e1 89892005-01-09 Hollis Blanchard <hollis@penguinppc.org>
8990
8991 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8992 (note_path): Remove variable.
8993 (GRUB_IEEE1275_NOTE_NAME): New macro.
8994 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8995 (grub_ieee1275_note_hdr): New structure.
8996 (grub_ieee1275_note_desc): Likewise.
8997 (grub_ieee1275_note): Likewise.
8998 (load_note): Remove `dir' argument. All callers updated. Remove
8999 `note_img' and `path'. Do not load a file from `note_path'.
9000 Initialize a struct grub_ieee1275_note and write that to `out'.
9001 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
9002
4ca7004c 90032005-01-05 Marco Gerards <metgerards@student.han.nl>
9004
9005 * util/misc.c (grub_util_read_image): Revert last change. It
9006 called `grub_util_read_at', which seeks from the beginning of the
9007 file.
9008
0b412211 90092005-01-04 Hollis Blanchard <hollis@penguinppc.org>
9010
9011 * TODO: Add note about endianness in grub-mkimage.
9012 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
9013 section.
9014 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
9015 (grub_mkimage_SOURCES): New target.
9016 * include/grub/kernel.h (grub_start_addr): Remove variable.
9017 (grub_end_addr): Likewise.
9018 (grub_total_module_size): Likewise.
9019 (grub_kernel_image_size): Likewise.
9020 (GRUB_MODULE_MAGIC): New constant.
9021 (grub_module_info): New structure.
9022 (grub_arch_modules_addr): New prototype.
9023 (grub_get_end_addr): Remove prototype.
9024 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
9025 * include/grub/powerpc/ieee1275/kernel.h: New file.
9026 * include/grub/util/misc.h (grub_util_get_fp_size): New
9027 prototype.
9028 (grub_util_read_at): Likewise.
9029 (grub_util_write_image_at): Likewise.
9030 * kern/main.c (grub_get_end_addr): Remove function.
9031 (grub_load_modules): Call grub_arch_modules_addr instead of using
9032 grub_end_addr. Look for a grub_module_info struct in memory. Use
9033 the grub_module_info fields instead of calling grub_get_end_addr
9034 as loop conditions. Move grub_add_unused_region code here.
9035 (grub_add_unused_region): Remove function.
9036 * kern/i386/pc/init.c: Include grub/cache.h.
9037 (grub_machine_init): Remove call to grub_get_end_addr. Remove
9038 one call to add_mem_region.
9039 (grub_arch_modules_addr): New function.
9040 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
9041 (grub_total_module_size): Likewise.
9042 Include grub/machine/kernel.h.
9043 (grub_arch_modules_addr): New function.
9044 * util/grub-emu.c (grub_end_addr): Remove variable.
9045 (grub_total_module_size): Likewise.
9046 (grub_arch_modules_addr): New function.
9047 * util/misc.c: Include unistd.h.
9048 (grub_util_get_fp_size): New function.
9049 (grub_util_read_at): Likewise.
9050 (grub_util_write_image_at): Likewise.
9051 (grub_util_read_image): Call grub_util_read_at.
9052 (grub_util_write_image): Call grub_util_write_image_at.
9053 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
9054 additional memory in kernel_img for a struct grub_module_info.
9055 Fill in that grub_module_info.
9056 * util/powerpc/ieee1275/grub-mkimage.c: New file.
9057
458786f8 90582005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9059
9060 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
9061 New function.
9062 * include/grub/powerpc/ieee1275/ieee1275.h
9063 (grub_ieee1275_milliseconds): New prototype.
9064 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
9065 Change to 1000.
9066 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
9067 grub_ieee1275_milliseconds.
9068
ac507d1b 90692005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9070
9071 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
9072 variable.
9073 (find_options): New function.
9074 (cmain): Call find_options.
9075 * include/grub/powerpc/ieee1275/ieee1275.h
9076 (grub_ieee1275_realmode): New extern variable.
9077 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
9078 grub_map if grub_ieee1275_realmode is false.
9079
6b8fd1c4 90802004-12-29 Marco Gerards <metgerards@student.han.nl>
9081
9082 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
9083 lines are inserted and make it work like readline. Reported by
9084 Vincent Pelletier <subdino2004@yahoo.fr>.
9085
8514a1e0 90862004-12-28 Marco Gerards <metgerards@student.han.nl>
9087
9088 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
9089
9090 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
9091 `kern/powerpc/cache.S'.
9092
924b6140 90932004-12-27 Marco Gerards <metgerards@student.han.nl>
9094
9095 * genmk.rb: Handle the `Program' class in the main loop. Written
9096 by Johan Rydberg <jrydberg@gnu.org>.
9097 (Program): New class.
9098 (programs): New variable.
9099 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
9100 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
9101 instead of "grub/kernel.h". Include <grub/machine/init.h>.
9102 (help_arch): Function removed.
9103 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
9104 `powerpc/libgcc.h' and `loader.h'.
9105 (pkgdata_PROGRAMS): New variable.
9106 (sbin_UTILITIES): Variable removed.
9107 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
9108 (grubof_SOURCES): Variable re-defined so it only includes the
9109 core functionality.
9110 (grubof_CFLAGS): Remove `-DGRUBOF'.
9111 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
9112 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
9113 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
9114 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
9115 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
9116 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
9117 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
9118 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
9119 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
9120 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
9121 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9122 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
9123 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
9124 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
9125 (pc_mod_CFLAGS): New variables.
9126 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
9127 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
9128 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
9129 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
9130 Moved from here...
9131 * include/grub/i386/pc/init.h (grub_os_area_addr)
9132 (rub_os_area_size): ... to here.
9133 * include/grub/powerpc/ieee1275/ieee1275.h
9134 (grub_ieee1275_entry_fn): Export symbol.
9135 * include/grub/powerpc/ieee1275/init.h: New file.
9136 * include/grub/powerpc/libgcc.h: Likewise.
9137 * include/grub/cache.h: Likewise.
9138 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
9139 <hollis@penguinppc.org>.
9140 * kern/dl.c: Include <grub/cache.h>.
9141 (grub_dl_flush_cache): New function.
9142 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
9143 for this module.
9144 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
9145 (grub_console_init): Removed prototypes.
9146 (grub_machine_init): Don't initialize the modules anymore.
9147 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
9148 static.
9149 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
9150 Macro undef removed.
9151 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
9152 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
9153 relocation `R_PPC_REL32'. Return an error when the relocation is
9154 unknown.
9155 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
9156 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
9157 * util/misc.c (grub_arch_sync_caches): Likewise.
9158
e4b47e0c 91592004-12-19 Marco Gerards <metgerards@student.han.nl>
9160
9161 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
9162 `symlist.c', add `grubof_symlist.c'.
9163 (symlist.c): Variable removed.
9164 (grubof_HEADERS): Variable added.
9165 (grubof_symlist.c): New target.
9166 (kernel_syms.lst): Use `grubof_HEADERS' instead of
9167 `kernel_img_HEADERS'.
9168 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
9169 * kern/powerpc/dl.c: New file.
9170 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
9171 Function removed.
9172 (grub_arch_dl_relocate_symbols): Likewise.
9173 (grub_register_exported_symbols): Likewise.
9174
4ceb3636 91752004-12-13 Marco Gerards <metgerards@student.han.nl>
9176
9177 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
9178 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
9179 to fail instead. Reported by Vincent Pelletier
9180 <subdino2004@yahoo.fr>.
9181
9182 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
9183 it is not allocated. Reported by Vincent Pelletier
9184 <subdino2004@yahoo.fr>.
9185
9186 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
9187 output so the output looks better.
9188
3f1578fe 91892004-12-04 Marco Gerards <metgerards@student.han.nl>
9190
9191 Modulize the partition map support and add support for the amiga
9192 partition map.
9193
9194 * commands/ls.c: Include <grub/partition.h> instead of
9195 <grub/machine/partition.h>.
9196 * kern/disk.c: Likewise.
9197 * kern/rescue.c: Likewise.
9198 * loader/i386/pc/chainloader.c: Likewise.
9199 * normal/cmdline.c: Likewise.
9200 * kern/powerpc/ieee1275/init.c: Likewise.
9201 (grub_machine_init): Call `grub_pc_partition_map_init',
9202 `grub_amiga_partition_map_init' and
9203 `grub_apple_partition_map_init'.
9204 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
9205 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
9206 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
9207 `partition.h' and `pc_partition.h'.
9208 (grub_setup_SOURCES): Remove
9209 `disk/i386/pc/partition.c'. Add `kern/partition.c',
9210 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9211 (grub_emu_SOURCES): Likewise.
9212 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
9213 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
9214 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
9215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9216 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
9217 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9218 (grubof_SOURCES): Likewise.
9219 * disk/i386/pc/partition.c: File removed.
9220 * disk/powerpc/ieee1275/partition.c: Likewise.
9221 * include/grub/powerpc/ieee1275/partition.h: Likewise.
9222 * include/grub/i386/pc/partition.h: Likewise.
9223 * kern/partition.c: New file.
9224 * partmap/amiga.c: Likewise.
9225 * partmap/apple.c: Likewise.
9226 * partmap/pc.c: Likewise.
9227 * include/grub/partition.h: Likewise..
9228 * include/grub/pc_partition.h: Likewise.
9229 * util/grub-emu.c: Include <grub/partition.h> instead of
9230 <grub/machine/partition.h>.
9231 (main): Call `grub_pc_partition_map_init',
9232 `grub_amiga_partition_map_init' and
9233 `grub_apple_partition_map_init' and deinitialize afterwards.
9234 * util/i386/pc/biosdisk.c: Include `#include
9235 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9236 `<grub/machine/partition.h>'.
9237 * util/i386/pc/grub-setup.c: Likewise.
9238 * util/i386/pc/biosdisk.c: Likewise.
9239 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
9240 partition information in case of a PC partition.
9241 * util/i386/pc/grub-setup.c: Include `#include
9242 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9243 `<grub/machine/partition.h>'.
9244 (setup): Only access the PC specific partition information in case
9245 of a PC partition.
9246
0ef4ced9 92472004-11-17 Hollis Blanchard <hollis@penguinppc.org>
9248
9249 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
9250 (grub_longjmp): Likewise.
9251 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
9252 20.
9253 * normal/powerpc/setjmp.S: New file.
9254 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9255 `normal/powerpc/setjmp.S'.
9256 (grubof_CFLAGS): Add `-DGRUBOF'.
9257 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
9258 [GRUB_UTIL && !GRUBOF].
9259
19950e29 92602004-11-16 Marco Gerards <metgerards@student.han.nl>
9261
9262 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
9263 property named `name'. Correctly handle the error returned by
9264 `grub_ieee1275_finddevice' if a device can not be opened.
9265
a2fea427 92662004-11-02 Hollis Blanchard <hollis@penguinppc.org>
9267
9268 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
9269 `actual' for negativity.
9270 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9271 kern/fshelp.c.
9272
41ea0ea3 92732004-11-01 Marco Gerards <metgerards@student.han.nl>
9274
9275 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
9276 (PAGE_OFFSET): New macro.
9277 (CRTC_ADDR_PORT): Likewise.
9278 (CRTC_DATA_PORT): Likewise.
9279 (START_ADDR_HIGH_REGISTER): Likewise.
9280 (START_ADDR_LOW_REGISTER): Likewise.
9281 (GRAPHICS_ADDR_PORT): Likewise.
9282 (GRAPHICS_DATA_PORT): Likewise.
9283 (READ_MAP_REGISTER): Likewise.
9284 (INPUT_STATUS1_REGISTER): Likewise.
9285 (INPUT_STATUS1_VERTR_BIT): Likewise.
9286 (page): New variable.
9287 (wait_vretrace): New function.
9288 (set_read_map): Likewise.
9289 (set_start_address): Likewise.
9290 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
9291 the right page.
9292 (check_vga_mem): Take the page into account.
9293 (write_char): Likewise.
9294 (write_cursor): Likewise.
9295 (scroll_up): Likewise. Copy the page to the page that is not
9296 shown and switch between both pages.
9297 (grub_vga_putchar): Fix off by one error.
9298 (grub_vga_cls): Wait for the vertical retrace. Take the page into
9299 account.
9300
ad0bd20b 93012004-11-01 Marco Gerards <metgerards@student.han.nl>
9302
9303 Add support for iso9660 (including rockridge).
9304
9305 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9306 (iso9660_mod_SOURCES): New variable.
9307 (iso9660_mod_CFLAGS): Likewise.
9308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9309 * include/grub/fs.h (grub_iso9660_init): New prototype.
9310 * util/grub-emu.c (main): Call `grub_iso9660_init'.
9311 * fs/iso9660.c: New file.
9312
9313 * include/grub/misc.h (grub_strncat): New prototype.
9314 * kern/misc.c (grub_strncat): New function.
9315
9316 * fs/hfs.c (grub_hfs_mount): Translate the error
9317 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
9318 * fs/jfs.c (grub_jfs_mount): Likewise.
9319 * fs/ufs.c (grub_ufs_mount): Likewise.
9320
a5477a59 93212004-10-28 Hollis Blanchard <hollis@penguinppc.org>
9322
9323 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
9324 which initialized BAT registers.
9325 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
9326 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9327 Move from here...
9328 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
9329 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9330 ... to here.
9331 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
9332 (grub_mapclaim): Likewise.
9333 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
9334 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
9335 hand.
9336
9304c1f8 93372004-10-19 Hollis Blanchard <hollis@penguinppc.org>
9338
9339 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
9340 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
9341 -ffreestanding and -msoft-float.
9342
86f4ae25 93432004-10-15 Hollis Blanchard <hollis@penguinppc.org>
9344
9345 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
9346 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
9347 set in grub_ieee1275_flags.
9348
38912228 93492004-10-14 Hollis Blanchard <hollis@penguinppc.org>
9350
9351 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
9352 prototype.
9353 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
9354 grub_console_init first.
9355 Change the memory range used for grub_ieee1275_claim and
9356 grub_mm_init_region.
9357 Print an error message if the claim fails.
9358 Include <grub/misc.h>.
9359
d1923dc8 93602004-10-13 Hollis Blanchard <hollis@penguinppc.org>
9361
9362 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
9363 Call grub_children_iterate for device nodes of type `scsi',
9364 `ide', or `ata'.
9365 (grub_ofdisk_open): Remove manual device alias resolution.
9366 Fix memory leak when device cannot be opened.
9367 * include/grub/powerpc/ieee1275/ieee1275.h
9368 (grub_children_iterate): New prototype.
9369 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
9370 New function.
9371 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9372 Return -1 if args.size was -1.
9373
4512e4f3 93742004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9375
9376 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
9377 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
9378 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
9379 Open Firmware's memory for it; claim memory from _start to _end.
9380 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
9381 (_end): New extern.
9382 (_start): Zero BSS from __bss_start to _end.
9383 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9384 New extern.
9385 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
9386
4d61feb0 93872004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9388
ad0bd20b 9389 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
9390 -1 if args.base was -1.
4d61feb0 9391
026fa2f9 93922004-10-08 Hollis Blanchard <hollis@penguinppc.org>
9393
9394 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
9395 escape sequence instead of a literal ^L. Also call
9396 grub_ofconsole_gotoxy.
9397
9f2220ef 93982004-10-03 Hollis Blanchard <hollis@penguinppc.org>
9399
9400 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
9401 void * arguments to grub_addr_t. All callers updated. Also make
9402 the `result' argument optional.
9403 (grub_ieee1275_release): change void * arguments to grub_addr_t.
9404 All callers updated.
9405
8a572cd7 94062004-09-22 Hollis Blanchard <hollis@penguinppc.org>
9407
9408 * commands/ls.c (grub_ls_list_files): Use the string following the
9409 initial ')', if present, as the filesystem path.
9410 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
9411
9412 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
9413
18aa81f2 94142004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
9415
9416 Make the source code of the menu interface more readable.
9417
9418 * normal/menu.c: Include grub/mm.h.
9419 (TERM_WIDTH): New macro.
9420 (TERM_HEIGHT): Likewise.
9421 (TERM_INFO_HEIGHT): Likewise.
9422 (TERM_MARGIN): Likewise.
9423 (TERM_SCROLL_WIDTH): Likewise.
9424 (TERM_TOP_BORDER_Y): Likewise.
9425 (TERM_LEFT_BORDER_X): Likewise.
9426 (TERM_BORDER_WIDTH): Likewise.
9427 (TERM_MESSAGE_HEIGHT): Likewise.
9428 (TERM_BORDER_HEIGHT): Likewise.
9429 (TERM_NUM_ENTRIES): Likewise.
9430 (TERM_FIRST_ENTRY_Y): Likewise.
9431 (TERM_ENTRY_WIDTH): Likewise.
9432 (TERM_CURSOR_X): Likewise.
9433 (draw_border): Use macros instead of magic numbers.
9434 (print_entry): Likewise.
9435 (print_entries): Likewise.
9436 (run_menu): Likewise. Also, handle the key 'e'.
9437 (run_menu_entry): Ignore empty command lines.
9438 (print_message): Added a new argument EDIT. If EDIT is true,
9439 print a different message.
9440 (init_page): Likewise.
9441 (edit_menu_entry): New function. Not implemented yet.
9442
b47efe30 94432004-09-17 Marco Gerards <metgerards@student.han.nl>
9444
9445 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
9446 can be loaded from normal mode.
9447
9448 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
9449 `multiboot.mod'.
9450 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
9451 (multiboot_mod_CFLAGS): New variables.
9452 * loader/i386/pc/linux_normal.c: New file.
9453 * loader/i386/pc/multiboot_normal.c: Likewise.
9454
9455 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
9456 attribute `unused'.
9457
9458 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
9459 `fdiro' to read the mode information from instead of `diro'.
9460
9461 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
9462 looking up a symlink.
9463
9464 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
9465 macro.
9466 * normal/command.c (grub_command_execute): Don't parse the
9467 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
9468 flags of the command.
9469
9470 * normal/menu.c (grub_menu_run): Fix typo.
9471
da75ac71 94722004-09-14 Hollis Blanchard <hollis@penguinppc.org>
9473
9474 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
9475
9476 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
9477 `y + 1' instead of `y - 1'.
9478
9479 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
9480
062b24c2 94812004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
9482
9483 From Hollis Blanchard <hollis@penguinppc.org>:
9484 * kern/misc.c (memmove): New alias for grub_memmove.
9485 (memcmp): New alias for grub_memcmp.
9486 (memset): New alias for grub_memset.
9487 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9488 Change "int handle" to "grub_ieee1275_phandle_t handle".
9489 * include/grub/powerpc/ieee1275/ieee1275.h
9490 (grub_ieee1275_get_property): Likewise.
9491
8ddad845 94922004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
9493
9494 Added normal mode command `chainloader' as module chain.mod, which
9495 depends on normal.mod and _chain.mod.
9496
9497 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
9498 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
9499 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
9500 Deleted prototype.
9501 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
9502 but arguments parsing moved to ...
9503 (grub_chainloader_cmd): ... here. New function.
9504 * include/grub/i386/pc/chainloader.h: New file.
9505 * loader/i386/pc/chainloader_normal.c: Likewise.
9506
2c1f4ce3 95072004-09-11 Marco Gerards <metgerards@student.han.nl>
9508
9509 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
9510 (grub_mkimage_LDFLAGS): Likewise.
9511 (grub_emu_SOURCES): Likewise.
9512 (kernel_img_HEADERS): Added fshelp.h.
9513 * fs/ext2.c: Include <grub/fshelp.h>.
9514 (FILETYPE_REG): New macro.
9515 (FILETYPE_INO_REG): Likewise.
9516 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
9517 Changed all users.
9518 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
9519 all users.
9520 (grub_fshelp_node): New struct.
9521 (grub_ext2_data): Added member `diropen'. Changed member `inode'
9522 to a pointer.
9523 (grub_ext2_get_file_block): Removed function.
9524 (grub_ext2_read_block): New function.
9525 (grub_ext2_read_file): Replaced parameter `data' by `node'.
9526 This function was written.
9527 (grub_ext2_mount): Read the root inode. Create a diropen struct.
9528 (grub_ext2_find_file): Removed function.
9529 (grub_ext2_read_symlink): New function.
9530 (grub_ext2_iterate_dir): Likewise.
9531 (grub_ext2_open): Rewritten.
9532 (grub_ext2_dir): Rewritten.
9533 * include/grub/fshelp.h: New file.
9534 * fs/fshelp.c: Likewise.
9535
3c52136a 95362004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
9537
9538 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
9539 (print_message): Add a missing newline.
9540 (run_menu): Added timeout support.
9541 (run_menu_entry): New local function.
9542 (grub_menu_run): Added support for booting.
9543
9544 * kern/loader.c (grub_loader_is_loaded): New function.
9545
9546 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
9547 (grub_get_rtc): Exported.
9548
9549 * include/grub/i386/pc/time.h: Include grub/symbol.h.
9550 (grub_get_rtc): Exported.
9551
9552 * include/grub/normal.h (struct grub_command_list): Remove
9553 constant from the member `command'.
9554
9555 * include/grub/loader.h (grub_loader_is_loaded): Declared.
9556
9557 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
9558
9559 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
9560
aa033560 95612004-08-28 Marco Gerards <metgerards@student.han.nl>
9562
9563 Add support for the JFS filesystem.
9564
9565 * fs/jfs.c: New file.
9566 * include/grub/fs.h (grub_jfs_init): New prototype.
9567 (grub_jfs_fini): New prototype.
9568 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
9569 (grub_emu_SOURCES): Likewise.
9570 (pkgdata_MODULES): Add jfs.mod.
9571 (jfs_mod_SOURCES): New variable.
9572 (jfs_mod_CFLAGS): Likewise.
9573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
9574 (grubof_SOURCES): Likewise.
9575 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
9576
9577 * fs/fat.c (grub_fat_find_dir): Convert the filename little
9578 endian to the host endian.
9579 (grub_fat_utf16_to_utf8): Move function from there...
9580 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
9581 the endianess of the source string anymore.
9582 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
9583
94bc45af 95842004-08-24 Marco Gerards <metgerards@student.han.nl>
9585
9586 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
9587 (grub_boot_fini) [GRUB_UTIL]: Likewise.
9588 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
9589 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
9590
9591 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
9592 (grub_hfs_iterate_dir): Make the function static. Add prototypes
9593 for `node_found' and `it_dir'.
9594 (grub_hfs_dir): Add prototype for `dir_hook'.
9595
9596 * fs/minix.c (grub_minix_get_file_block): Add prototype for
9597 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
9598 and `indir32' to silence a gcc warning.
9599
9600 * include/grub/fs.h (grub_hfs_init): New prototype.
9601 (grub_hfs_fini): Likewise.
9602
9603
97543f08 96042004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9605
9606 Each disk device has its own id now. This is useful to make use
9607 of multiple disk devices.
9608
9609 * include/grub/disk.h (grub_disk_dev_id): New enum.
9610 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
9611 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
9612
9613 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
9614 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9615
9616 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
9617 GRUB_DISK_DEVICE_OFDISK_ID as an id.
9618
9619 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
9620 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9621
9622 * include/grub/disk.h (struct grub_disk_dev): Added a new member
9623 "id" which is used by the cache manager.
9624
9625 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
9626 of just "GRUB".
9627
64372eb4 96282004-08-18 Marco Gerards <metgerards@student.han.nl>
9629
9630 * fs/hfs.c: New file.
9631 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
9632 (grub_emu_SOURCES): Likewise.
9633 (pkgdata_MODULES): Add hfs.mod.
9634 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
9635 (grubof_SOURCES): Likewise.
9636 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
9637
9638 * include/grub/misc.h (grub_strncasecmp): Add prototype.
9639 * kern/misc.c (grub_strncasecmp): Add function.
9640
cc61b58f 96412004-08-14 Marco Gerards <metgerards@student.han.nl>
9642
9643 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
9644 with parentheses.
9645
9646 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
9647 (grub_ext2_dir): In case the directory entry type is unknown, read
9648 it from the inode.
9649
0ef123f6 96502004-08-02 Peter Bruin <pjbruin@dds.nl>
9651
9652 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
9653 grub_load_linux instead of grub_rescue_cmd_linux as second
9654 argument of grub_rescue_register_command.
9655
9656 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
9657
a447c5df 96582004-07-27 Marco Gerards <metgerards@student.han.nl>
9659
9660 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
9661 function.
9662 * commands/boot.c: Remove the check for `GRUB_UTIL'.
9663 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9664 `loader/powerpc/ieee1275/linux.c',
9665 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
9666 * include/grub/powerpc/ieee1275/ieee1275.h
9667 (grub_ieee1275_release): New prototype.
9668 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
9669 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
9670 normal, boot, linux and linux_normal.
9671 * loader/powerpc/ieee1275/linux.c: New file.
9672 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9673
5a9e3546 96742004-07-12 Marco Gerards <metgerards@student.han.nl>
9675
9676 * normal/arg.c (grub_arg_parse): Correct error handling after
9677 reallocating the argumentlist (check if `argl' is not null instead
9678 of checking if `args' is not null).
9679 * kern/mm.c (grub_realloc): Return the same pointer when using the
9680 same region, instead of returning the header address.
9681
e15199cb 96822004-07-11 Marco Gerards <metgerards@student.han.nl>
9683
9684 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
9685 one block instead of two when looking for the initial partition.
9686 (grub_partition_probe): Initialize the local variable `p' with 0.
9687 Use base 10 for the grub_strtoul call.
9688 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
9689 need for one local variable.
9690 (grub_strtoul): Don't add the new value to `num', instead of that
9691 just assign it.
9692
020616c2 96932004-07-11 Marco Gerards <metgerards@student.han.nl>
9694
9695 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
9696 (pxeboot_img_SOURCES): New variable.
9697 (pxeboot_img_ASFLAGS): Likewise.
9698 (pxeboot_img_LDFLAGS): Likewise.
9699 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
9700 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
9701 <lode_leroy@hotmail.com>.
9702
6c51eb64 97032004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9704
9705 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
9706 there was no input.
9707
cfb12aff 97082004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9709
9710 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
9711 the history buffer logic.
9712
6eabba74 97132004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9714
9715 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
9716 (FILETYPE_INO_SYMLINK): New macros.
9717 (grub_ext2_find_file): Check if the node is a directory using the
9718 inode stat information instead of using the filetype in the
9719 dirent. Exclude the first character of an absolute symlink.
9720 (grub_ext2_dir): Mask out the filetype part of the mode member of
9721 the inode.
9722
66e19ef8 97232004-05-24 Marco Gerards <metgerards@student.han.nl>
9724
9725 Add support for UFS version 1 and 2. Add support for the minix
9726 filesystem version 1 and 2, both the variants with 14 and 30 long
9727 filenames.
9728
9729 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
9730 fs/minix.c.
9731 (grub_emu_SOURCES): Likewise.
9732 (pkgdata_MODULES): Add ufs.mod and minix.mod.
9733 (ufs_mod_SOURCES): New variable.
9734 (ufs_mod_CFLAGS): Likewise.
9735 (minix_mod_SOURCES): Likewise.
9736 (minix_mod_CFLAGS): Likewise.
9737 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
9738 fs/minix.c.
9739 (grubof_SOURCES): Likewise.
9740 * fs/ufs.c: New file.
9741 * fs/minix.c: New file.
9742 * include/grub/fs.h (grub_ufs_init): New prototype.
9743 (grub_ufs_fini): Likewise.
9744 (grub_minix_init): Likewise.
9745 (grub_minix_fini): Likewise.
9746 * util/grub-emu.c (main): Initialize and deinitialize UFS and
9747 minix fs.
9748
cc2e748a 97492004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
9750
9751 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
9752 commands/ls.c, commands/terminal.c, commands/boot.c,
9753 commands/cmp.c and commands/cat.c.
9754 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
9755
9756 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
9757 "env.h"
9758
4b13b216 97592004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9760
9761 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9762 and grub_, respectively. Because the conversion is trivial and
9763 mechanical, I omit the details here. Please refer to the CVS
9764 if you need more information.
9765
6a142551 97662004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9767
9768 * include/pupa: Renamed to ...
9769 * include/grub: ... this.
9770 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9771 * util/i386/pc/grub-mkimage.c: ... this.
9772 * util/i386/pc/pupa-setup.c: Renamed to ...
9773 * util/i386/pc/grub-setup.c: ... this.
9774 * util/pupa-emu.c: Renamed to ...
9775 * util/grub-emu.c: ... this.
9776
e56cdf21 97772004-03-29 Marco Gerards <metgerards@student.han.nl>
9778
9779 Add support for the newworld apple macintosh (PPC). This has been
9780 tested on the powerbook 2000 only. It only adds support for
9781 generic ieee1275 functions, console and disk support. This should
9782 be easy to port to other architectures with support for Open
9783 Firmware.
9784
9785 * configure.ac: Accept the powerpc as host_cpu. In the case of
9786 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9787 specific tests are only executed while building for the i386.
9788 Inverse test for crosscompile.
9789 * genmk.rb (Utility): Allow assembler files.
9790 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9791 * conf/powerpc-ieee1275.rmk: New file.
9792 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9793 * disk/powerpc/ieee1275/partition.c: Likewise.
9794 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9795 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9796 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9797 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9798 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9799 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9800 * include/pupa/powerpc/ieee1275/loader.h
9801 * include/pupa/powerpc/setjmp.h: Likewise.
9802 * include/pupa/powerpc/types.h: Likewise.
9803 * kern/powerpc/ieee1275/init.c: Likewise.
9804 * kern/powerpc/ieee1275/openfw.c: Likewise.
9805 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9806
9807 These files were written by Johan Rydberg
9808 (jrydberg@night.trouble.net) and I only modified them slightly.
9809
9810 * boot/powerpc/ieee1275/cmain.c: New file.
9811 * boot/powerpc/ieee1275/crt0.S: Likewise.
9812 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9813 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9814
8c8cc205 98152004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9816
9817 * Makefile.in: Update copyright.
9818 * genmodsrc.sh: Likewise.
9819 * gensymlist.sh: Likewise.
9820 * term/i386/pc/vga.c: Indent correctly.
9821
9822 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9823 bugreporting address.
9824 * util/i386/pc/pupa-setup.c (usage): Likewise,
9825 (main): Call pupa_ext2_init and pupa_ext2_fini.
9826
9827 * fs/fat.c (log2): Renamed to ...
9828 (fat_log2): ... this.
9829 All callers changed.
9830 * kern/misc.c (memcpy): Alias to pupa_memmove.
9831 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9832 lvalue cast.
9833 * util/console.c (pupa_ncurses_fini): Return 0.
9834
9835 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9836 Move fail label here.
9837 [__GNU__]: Don't warn when using stat.
9838 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9839 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9840 long int. Use strtol instead of strtoul.
9841
db1771cf 98422004-03-14 Marco Gerards <metgerards@student.han.nl>
9843
9844 * commands/boot.c: New file.
9845 * commands/cat.c: Likewise.
9846 * commands/cmp.c: Likewise.
9847 * commands/ls.c: Likewise.
9848 * commands/terminal.c: Likewise.
9849 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9850 (pupa_register_command): Changed interface to match the new
9851 argument parser.
9852 (pupa_command_execute): Changed (almost rewritten) so it uses
9853 pupa_split_command. Added support for setting variables using the
9854 syntax `foo=bar'.
9855 (rescue_command): Changed to work with the new argument parser.
9856 (terminal_command): Moved from here to commands/terminal.c.
9857 (set_command): New function.
9858 (unset_command): New function.
9859 (insmod_command): New function.
9860 (rmmod_command): New function.
9861 (lsmod_command): New function.
9862 (pupa_command_init): Don't initialize the command terminal
9863 anymore. Initialize the commands set, unset, insmod, rmmod and
9864 lsmod.
9865 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9866 (kernel_img_HEADERS): Add arg.h and env.h.
9867 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9868 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9869 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9870 normal/arg.c.
9871 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9872 terminal.mod.
9873 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9874 (boot_mod_SOURCES): New variable.
9875 (terminal_mod_SOURCES): Likewise.
9876 (ls_mod_SOURCES): Likewise.
9877 (cmp_mod_SOURCES): Likewise.
9878 (cat_mod_SOURCES): Likewise.
9879
9880 * normal/arg.c: New file.
9881 * kern/env.c: Likewise.
9882 * include/pupa/arg.h: Likewise.
9883 * include/pupa/env.h: Likewise.
9884 * font/manager.c (font_command): Changed to match argument parsing
9885 interface changes.
9886 (PUPA_MOD_INIT): Likewise.
9887 * hello/hello.c (pupa_cmd_hello): Likewise.
9888 (PUPA_MOD_INIT): Likewise.
9889 * include/pupa/disk.h: Include <pupa/device.h>.
9890 (pupa_print_partinfo): New prototype.
9891 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9892 (pupa_dl_get_prefix): Likewise.
9893 * include/pupa/misc.h: Include <pupa/err.h>.
9894 (pupa_isgraph): New prototype.
9895 (pupa_isdigit): Likewise.
9896 (pupa_split_cmdline): Likewise.
9897 * include/pupa/normal.h: Include <pupa/arg.h>.
9898 (pupa_command): Changed the prototype of the member `func' to
9899 match the argument parsing interface. Added member `options'.
9900 (pupa_register_command): Updated to match function.
9901 (pupa_arg_parse): New prototype.
9902 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9903 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9904 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9905 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9906 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9907 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9908 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9909 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9910 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9911 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9912 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9913 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9914 * kern/disk.c: Include <pupa/file.h>.
9915 (pupa_print_partinfo): New function.
9916 * kern/dl.c: Include <pupa/env.h>.
9917 (pupa_dl_dir): Variable removed.
9918 (pupa_dl_load): Use the environment variable `prefix' instead of
9919 the variable pupa_dl_dir.
9920 (pupa_dl_set_prefix): Function removed.
9921 (pupa_dl_get_prefix): Likewise.
9922 * kern/i386/pc/init.c: Include <pupa/env.h>.
9923 (pupa_machine_init): Use the environment variable `prefix' instead of
9924 using pupa_dl_set_prefix to set the prefix.
9925 * kern/main.c: Include <pupa/env.h>.
9926 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9927 using pupa_dl_get_prefix to get the prefix.
9928 * kern/misc.c: Include <pupa/env.h>.
9929 (pupa_isdigit): New function.
9930 (pupa_isgraph): Likewise.
9931 (pupa_ftoa): Likewise.
9932 (pupa_vsprintf): Added support for printing values of the type
9933 `double'. Make it possible to format variable output when using
9934 formatting like `%1.2%f'.
9935 (pupa_split_cmdline): New function.
9936 * kern/rescue.c: Include <pupa/env.h>.
9937 (next_word): Removed function.
9938 (pupa_rescue_cmd_prefix): Likewise.
9939 (pupa_rescue_cmd_set): New function.
9940 (pupa_rescue_cmd_unset): New function.
9941 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9942 split the command line instead of splitting it here. Added
9943 support for setting variables using the syntax `foo=bar'. Don't
9944 initialize the prefix command anymore. Initialized the set and
9945 unset commands.
9946 * normal/cmdline.c: Include <pupa/env.h>.
9947 (pupa_tab_complete): Added prototypes for print_simple_completion,
9948 print_partition_completion, add_completion, iterate_commands,
9949 iterate_dev, iterate_part and iterate_dir. Moved code to print
9950 partition information from here to kern/disk.c.
9951 (pupa_cmdline_run): Don't check if the funtion exists anymore.
9952 * normal/main.c: Include <pupa/env.h>.
9953 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9954 instead of using pupa_dl_get_prefix to get the prefix.
9955 * term/i386/pc/vga.c: Include <pupa/arg.h>.
9956 (check_vga_mem): Cast pointers to `void *' to silence a gcc
9957 warning.
9958 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9959 (pupa_vga_setcolor): Declare unused variables with `__attribute__
9960 ((unused))' to silence a gcc warning.
9961 (pupa_vga_setcolor): Likewise.
9962 (debug_command): Changed to match argument parsing
9963 interface changes.
9964 * util/pupa-emu.c: Include <pupa/env.h>.
9965 (options): Added 0's for unused fields to silence a gcc warning.
9966 (argp): Likewise.
9967 (main): Use the environment variable `prefix' instead of using
9968 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
9969 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
9970 and terminal.
9971
9972 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9973 * util/misc.c: Include <malloc.h>.
9974 (pupa_malloc): Rewritten so errors are correctly reported.
9975 (pupa_realloc): Likewise.
9976 (pupa_memalign): Likewise.
9977 (pupa_mm_init_region): Declare unused variables with
9978 `__attribute__ ((unused))' to silence a gcc warning.
9979 * normal/i386/setjmp.S: Remove tab at the end of the file to
9980 silence a gcc warning.
9981 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9982 variables with `__attribute__ ((unused))' to silence a gcc
9983 warning.
9984 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9985 local variable i unsigned to silence a gcc warning.
9986
9987 * kern/term.c: Include <pupa/misc.h>.
9988 (pupa_more_lines): New variable.
9989 (pupa_more): Likewise.
9990 (pupa_putcode): When the pager is active pause at the end of every
9991 screen.
9992 (pupa_set_more): New function.
9993 * include/pupa/term.h (pupa_set_more): New prototype.
9994
9995
3b1139cb 99962004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
9997
9998 Now this project is GRUB 2 rather than PUPA. The location of
9999 the CVS repository was moved to GRUB's.
10000
10001 * configure.ac: Use bug-grub as the reporting address.
10002 Use GRUB instead of PUPA.
10003 Change the version number to 1.90.
10004
8367695c 100052004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
10006
10007 * genkernsyms.sh: Updated copyright information.
10008 * genmk.rb: Likewise.
10009 * genmodsrc.sh: Likewise.
10010 * gensymlist.sh: Likewise.
10011 * boot/i386/pc/boot.S: Likewise.
10012 * boot/i386/pc/diskboot.S: Likewise.
10013 * disk/i386/pc/biosdisk.c: Likewise.
10014 * disk/i386/pc/partition.c: Likewise.
10015 * font/manager.c: Likewise.
10016 * fs/ext2.c: Likewise.
10017 * fs/fat.c: Likewise.
10018 * include/pupa/boot.h: Likewise.
10019 * include/pupa/device.h: Likewise.
10020 * include/pupa/disk.h: Likewise.
10021 * include/pupa/dl.h: Likewise.
10022 * include/pupa/elf.h: Likewise.
10023 * include/pupa/err.h: Likewise.
10024 * include/pupa/file.h: Likewise.
10025 * include/pupa/font.h: Likewise.
10026 * include/pupa/fs.h: Likewise.
10027 * include/pupa/kernel.h: Likewise.
10028 * include/pupa/loader.h: Likewise.
10029 * include/pupa/misc.h: Likewise.
10030 * include/pupa/mm.h: Likewise.
10031 * include/pupa/net.h: Likewise.
10032 * include/pupa/normal.h: Likewise.
10033 * include/pupa/rescue.h: Likewise.
10034 * include/pupa/setjmp.h: Likewise.
10035 * include/pupa/symbol.h: Likewise.
10036 * include/pupa/term.h: Likewise.
10037 * include/pupa/types.h: Likewise.
10038 * include/pupa/i386/setjmp.h: Likewise.
10039 * include/pupa/i386/types.h: Likewise.
10040 * include/pupa/i386/pc/biosdisk.h: Likewise.
10041 * include/pupa/i386/pc/boot.h: Likewise.
10042 * include/pupa/i386/pc/console.h: Likewise.
10043 * include/pupa/i386/pc/init.h: Likewise.
10044 * include/pupa/i386/pc/kernel.h: Likewise.
10045 * include/pupa/i386/pc/linux.h: Likewise.
10046 * include/pupa/i386/pc/loader.h: Likewise.
10047 * include/pupa/i386/pc/memory.h: Likewise.
10048 * include/pupa/i386/pc/multiboot.h: Likewise.
10049 * include/pupa/i386/pc/partition.h: Likewise.
10050 * include/pupa/i386/pc/time.h: Likewise.
10051 * include/pupa/i386/pc/vga.h: Likewise.
10052 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
10053 * include/pupa/util/getroot.h: Likewise.
10054 * include/pupa/util/misc.h: Likewise.
10055 * include/pupa/util/resolve.h: Likewise.
10056 * kern/device.c: Likewise.
10057 * kern/disk.c: Likewise.
10058 * kern/dl.c: Likewise.
10059 * kern/err.c: Likewise.
10060 * kern/file.c: Likewise.
10061 * kern/fs.c: Likewise.
10062 * kern/loader.c: Likewise.
10063 * kern/main.c: Likewise.
10064 * kern/misc.c: Likewise.
10065 * kern/mm.c: Likewise.
10066 * kern/rescue.c: Likewise.
10067 * kern/term.c: Likewise.
10068 * kern/i386/dl.c: Likewise.
10069 * kern/i386/pc/init.c: Likewise.
10070 * kern/i386/pc/lzo1x.S: Likewise.
10071 * kern/i386/pc/startup.S: Likewise.
10072 * loader/i386/pc/chainloader.c: Likewise.
10073 * loader/i386/pc/linux.c: Likewise.
10074 * loader/i386/pc/multiboot.c: Likewise.
10075 * normal/cmdline.c: Likewise.
10076 * normal/command.c: Likewise.
10077 * normal/main.c: Likewise.
10078 * normal/menu.c: Likewise.
10079 * normal/i386/setjmp.S: Likewise.
10080 * term/i386/pc/console.c: Likewise.
10081 * term/i386/pc/vga.c: Likewise.
10082 * util/console.c: Likewise.
10083 * util/genmoddep.c: Likewise.
10084 * util/misc.c: Likewise.
10085 * util/pupa-emu.c: Likewise.
10086 * util/resolve.c: Likewise.
10087 * util/unifont2pff.rb: Likewise.
10088 * util/i386/pc/biosdisk.c: Likewise.
10089 * util/i386/pc/getroot.c: Likewise.
10090 * util/i386/pc/pupa-mkimage.c: Likewise.
10091 * util/i386/pc/pupa-setup.c: Likewise.
10092
e6eced71 100932004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
10094
10095 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
10096 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
10097 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
10098 reading and reset it after reading.
10099 (pupa_ext2_close): Return PUPA_ERR_NONE.
10100
10101 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
10102 Correct value.
10103 (struct linux_kernel_header): Add kernel_version and
10104 initrd_addr_max.
10105 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
10106 pupa_file_read succeeds.
10107 (pupa_rescue_cmd_initrd): Implement.
10108
5aded270 101092003-12-03 Marco Gerards <metgerards@student.han.nl>
10110
10111 * fs/ext2.c (pupa_ext2_label): New function.
10112 (pupa_ext2_fs): Added label.
10113 * fs/fat.c (pupa_fat_label): New function.
10114 (pupa_fat_fs): Added label.
10115 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
10116
10117 * kern/misc.c (pupa_strndup): New function.
10118 * include/pupa/misc.h (pupa_strndup): New prototype.
10119
10120 * include/pupa/normal.h: Include <pupa/err.h>.
10121 (pupa_set_history): New prototype.
10122 (pupa_iterate_commands): New prototype.
10123 * normal/cmdline.c: Include <pupa/machine/partition.h>,
10124 <pupa/disk.h>, <pupa/file.h>.
10125 (hist_size): New variable.
10126 (hist_lines): Likewise.
10127 (hist_end): Likewise.
10128 (hist_used): Likewise.
10129 (pupa_set_history): New function.
10130 (pupa_history_get): Likewise.
10131 (pupa_history_add): Likewise.
10132 (pupa_history_replace): Likewise.
10133 (pupa_tab_complete): Likewise.
10134 (pupa_cmdline_run): Added tab completion and history buffer. Tab
10135 completion shows partitionnames while completing partitions, this
10136 feature was suggested by Jeff Bailey.
10137 * normal/command.c (pupa_iterate_commands): New function.
10138 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
10139 (pupa_normal_init): Initialize history buffer.
10140 (PUPA_MOD_INIT): Likewise.
10141 (pupa_normal_fini): Free the history buffer.
10142 (PUPA_MOD_FINI): Likewise.
10143
10144 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
10145 key.
10146
10147 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
10148 * configure.ac [i386]: Check for regparam bug.
10149 (NESTED_FUNC_ATTR) [! i386]: Defined.
10150
1f7315a3 101512003-11-17 Marco Gerards <metgerards@student.han.nl>
10152
10153 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
10154 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
10155 (pupa_emu_SOURCES): New variable.
10156 (pupa_emu_LDFLAGS): Likewise.
10157 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
10158 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
10159 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
10160 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10161 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
10162 (pupa_jmp_buf): New typedef.
10163 (pupa_setjmp) [PUPA_UTIL]: New macro.
10164 (pupa_longjmp) [PUPA_UTIL]: Likewise.
10165 * include/pupa/term.h (struct pupa_term): New member `refresh'.
10166 (pupa_refresh): New prototype.
10167 * include/pupa/util/getroot.h: New file.
10168 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
10169 it.
10170 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
10171 (pupa_rescue_cmd_cat): Likewise.
10172 (pupa_rescue_cmd_ls): Likewise.
10173 (pupa_rescue_cmd_testload): Likewise.
10174 (pupa_rescue_cmd_lsmod): Likewise.
10175 * normal/cmdline.c (pupa_cmdline_get): Likewise.
10176 * normal/menu.c (run_menu): Likewise.
10177 * kern/term.c (pupa_cls): Likewise.
10178 (pupa_refresh): New function.
10179 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
10180 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10181 * util/console.c: New file.
10182
10183 * util/i386/pc/getroot.c: New file.
10184 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
10185 (pupa_putchar): New function.
10186 (pupa_refresh): Likewise.
10187 (xgetcwd): Function moved to ...
10188 (strip_extra_slashes): Likewise.
10189 (get_prefix): Likewise.
10190 * util/i386/pc/getroot.c: ... here.
10191 (find_root_device): Function moved and renamed to...
10192 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
10193 Changed all callers.
10194 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
10195 and renamed to...
10196 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
10197 Changed all callers.
10198 * util/misc.c (pupa_memalign): New function.
10199 (pupa_mm_init_region): Likewise.
10200 (pupa_register_exported_symbols): Likewise.
10201 (pupa_putchar): Function removed.
10202 * util/pupa-emu.c: New file.
10203
9a5c1ade 102042003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
10205
10206 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
10207 (_multiboot_mod_SOURCES): New variable.
10208 (_multiboot_mod_CFLAGS): Likewise.
10209 * loader/i386/pc/multiboot.c: New file.
10210 * include/pupa/i386/pc/multiboot.h: Likewise.
10211 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
10212 (pupa_multiboot_real_boot): New function.
10213 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
10214 (pupa_multiboot_real_boot): New prototype.
10215 (pupa_rescue_cmd_multiboot): Likewise
10216 (pupa_rescue_cmd_module): Likewise.
10217
10218 * kern/loader.c (pupa_loader_set): Continue when
10219 pupa_loader_unload_func() fails.
10220 (pupa_loader_unset): New function.
10221 * include/pupa/loader.h (pupa_loader_unset): New prototype.
10222
10223 * kern/misc.c (pupa_stpcpy): New function.
10224 * include/pupa/misc.h (pupa_stpcpy): New prototype.
10225
8e72a9c0 102262003-11-12 Marco Gerards <metgerards@student.han.nl>
10227
10228 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
10229 for available extensions.
10230
10231 * include/pupa/i386/pc/time.h: New file.
10232 * kern/disk.c: Include <pupa/machine/time.h>.
10233 (PUPA_CACHE_TIMEOUT): New macro.
10234 (pupa_last_time): New variable.
10235 (pupa_disk_open): Flush the cache when there was a timeout.
10236 (pupa_disk_close): Reset the timer.
10237 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
10238 pupa_currticks.
10239 * util/misc.c: Include <sys/times.h>
10240 (pupa_get_rtc): New function.
10241
c4adbd32 102422003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10243
10244 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
10245 as blocks.
10246 (pupa_ext2_get_file_block): Use blocks member.
10247
10248 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
10249 first block. Return -1 instead of pupa_errno on error.
10250
bfd30f06 102512003-10-27 Marco Gerards <metgerards@student.han.nl>
10252
10253 * README: In the pupa-mkimage example use _chain instead of chain
10254 and ext2 instead of fat.
10255 * TODO: Replace ext2fs with jfs as an example. Add an item for
10256 adding journal playback for ext2fs.
10257 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
10258 (pkgdata_MODULES): Added ext2.mod.
10259 (ext2_mod_SOURCES): New variable.
10260 (ext2_mod_CFLAGS): Likewise.
10261 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
10262 * include/pupa/misc.h (pupa_strncpy): New prototype.
10263 (pupa_strcat): Likewise.
10264 (pupa_strncmp): Likewise.
10265 * kern/misc.c (pupa_strcat): Enable function.
10266 (pupa_strncpy): New function.
10267 (pupa_strncmp): Likewise.
10268 * fs/ext2.c: New file.
10269
10270 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
10271 when the read failed before retrying.
10272 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
10273 (_FILE_OFFSET_BITS): Likewise.
10274 * configure.ac: Added AC_SYS_LARGEFILE.
10275
98d15063 102762003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10277
10278 * genmk.rb (PModule#rule): Make sure to get only symbol names
10279 from the output of nm.
10280 Reported by Robert Millan <zeratul2@wanadoo.es>.
10281
18d9c7cd 102822003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10283
10284 I forgot to check in these changes for a long time. This adds
10285 incomplete support for VGA console, and this is still very
10286 buggy. Also, a lot of consideration is required for I18N,
10287 UNICODE, and VGA font issues. Therefore, assume that this is
10288 such that "better than nothing".
10289
10290 * font/manager.c: New file.
10291 * include/pupa/font.h: Likewise.
10292 * include/pupa/i386/pc/vga.h: Likewise.
10293 * term/i386/pc/vga.c: Likewise.
10294 * util/unifont2pff.rb: Likewise.
10295
10296 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
10297 (pkgdata_MODULES): Added vga.mod and font.mod.
10298 (vga_mod_SOURCES): New variables.
10299 (vga_mod_CFLAGS): Likewise.
10300 (font_mod_SOURCES): Likewise.
10301 (font_mod_CFLAGS): Likewise.
10302
10303 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
10304
10305 * include/pupa/term.h: Include pupa/err.h.
10306 (struct pupa_term): Added init and fini.
10307 Changed the argument of putchar to pupa_uint32_t.
10308
10309 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
10310 (pupa_console_real_putchar): New prototype.
10311 (pupa_console_putchar): Removed.
10312 (pupa_console_checkkey): Exported.
10313 (pupa_console_getkey): Likewise.
10314
10315 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
10316 characters.
10317
10318 * kern/term.c (pupa_term_set_current): Rewritten.
10319 (pupa_putchar): Likewise.
10320 (pupa_putcode): New function.
10321
10322 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
10323 (pupa_console_real_putchar): ... this.
10324 (pupa_vga_set_mode): New function.
10325 (pupa_vga_get_font): Likewise.
10326
10327 * normal/command.c: Include pupa/term.h.
10328 (terminal_command): New function.
10329 (pupa_command_init): Register the command "terminal".
10330
10331 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
10332 (DISP_UP): Likewise.
10333 (DISP_RIGHT): Likewise.
10334 (DISP_DOWN): Likewise.
10335 (DISP_HLINE): Likewise.
10336 (DISP_VLINE): Likewise.
10337 (DISP_UL): Likewise.
10338 (DISP_UR): Likewise.
10339 (DISP_LL): Likewise.
10340 (DISP_LR): Likewise.
10341
10342 * term/i386/pc/console.c (pupa_console_putchar): New function.
10343
977329f5 103442003-02-08 NIIBE Yutaka <gniibe@m17n.org>
10345
10346 * util/resolve.c (pupa_util_resolve_dependencies): BUG
10347 FIX. Reverse the path_list.
10348
10349 * include/pupa/normal.h: Export pupa_register_command and
10350 pupa_unregister_command.
10351
10352 * hello/hello.c (pupa_cmd_hello): New module.
10353 * conf/i386-pc.rmk: Added hello.mod.
10354
1f5ab428 103552003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
10356
10357 * kern/i386/pc/lzo1x.S: New file.
10358
10359 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
10360 (compress_kernel): New variable.
10361 (generate_image): Heavily modified to support compressing a
10362 large part of the core image.
10363
10364 * util/misc.c (pupa_util_read_image): Fix a file descriptor
10365 leak.
10366 (pupa_util_load_image): New function.
10367
10368 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
10369 (pupa_compressed_size): New variable.
10370 (codestart): Enable Gate A20 here.
10371 Decompress the compressed part of the core image.
10372 Rearrange the code to put functions and variables which are
10373 required for initialization in the non-compressed part.
10374 Include lzo1x.S.
10375
10376 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
10377 here.
10378
10379 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
10380
10381 * include/pupa/i386/pc/kernel.h
10382 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
10383 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
10384 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10385 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10386 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
10387
10388 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
10389
10390 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
10391 (Utility#rule): Likewise.
10392
10393 * configure.ac: Check if LZO is available.
10394
ce5bf700 103952003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
10396
10397 * include/pupa/normal.h: New file.
10398 * include/pupa/setjmp.h: Likewise.
10399 * include/pupa/i386/setjmp.h: Likewise.
10400 * normal/cmdline.c: Likewise.
10401 * normal/command.c: Likewise.
10402 * normal/main.c: Likewise.
10403 * normal/menu.c: Likewise.
10404 * normal/i386/setjmp.S: Likewise.
10405
10406 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
10407 (pupa_rescue_cmd_initrd): Likewise.
10408
10409 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
10410 Likewise.
10411
10412 * kern/i386/pc/startup.S (translation_table): New variable.
10413 (translate_keycode): New function.
10414 (pupa_console_getkey): Call translate_keycode.
10415
10416 * kern/rescue.c (attempt_normal_mode): New function.
10417 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
10418 it failed, print a message.
10419
10420 * kern/mm.c (pupa_real_malloc): Print more information when a
10421 free magic is broken.
10422 (pupa_free): If the first free header is not free actually, set
10423 it to P.
10424
10425 * kern/main.c (pupa_load_normal_mode): Just load the module
10426 "normal".
10427 (pupa_main): Don't print the message
10428 "Entering into rescue mode..." here.
10429
10430 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
10431 Declared.
10432 (pupa_rescue_cmd_initrd): Likewise.
10433 (pupa_rescue_cmd_initrd): Likewise.
10434
10435 * include/pupa/symbol.h (FUNCTION): Specify the type.
10436 (VARIABLE): Likewise.
10437
10438 * include/pupa/err.h (pupa_err_t): Added
10439 PUPA_ERR_UNKNOWN_COMMAND.
10440
10441 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
10442 (pupa_dl_get_prefix): Likewise.
10443
10444 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
10445 Added _chain.mod and _linux.mod instead of chain.mod and
10446 linux.mod.
10447 (chain_mod_SOURCES): Renamed to ...
10448 (_chain_mod_SOURCES): ... this.
10449 (chain_mod_CFLAGS): Renamed to ...
10450 (_chain_mod_CFLAGS): ... this.
10451 (linux_mod_SOURCES): Renamed to ...
10452 (_linux_mod_SOURCES): ... this.
10453 (linux_mod_CFLAGS): Renamed to ...
10454 (_linux_mod_CFLAGS): ... this.
10455 (normal_mod_SOURCES): New variable.
10456 (normal_mod_CFLAGS): Likewise.
10457 (normal_mod_ASFLAGS): Likewise.
10458
104592003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
10460
10461 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
10462 possible.
10463
10464 * kern/dl.c (pupa_dl_ref): Refer dependending modules
10465 recursively.
10466 (pupa_dl_unref): Unrefer depending modules recursively.
10467 Don't call pupa_dl_unload implicitly, because PUPA can crash if
10468 a module is unloaded before one depending on that module is
10469 unloaded.
10470 (pupa_dl_unload): Unload depending modules explicitly,
10471 if possible.
10472
c04da074 104732003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
10474
10475 * include/pupa/i386/pc/linux.h: New file.
10476 * loader/i386/pc/linux.c: Likewise.
10477
10478 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
10479 Removed.
10480 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
10481 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
10482 of PUPA_CHAINLOADER_BOOT_SECTOR.
10483
10484 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
10485 (pupa_linux_prot_size): New variable.
10486 (pupa_linux_tmp_addr): Likewise.
10487 (pupa_linux_real_addr): Likewise.
10488 (pupa_linux_boot_zimage): New function.
10489 (pupa_linux_boot_bzimage): Likewise.
10490
10491 * kern/i386/pc/init.c (struct mem_region): New structure.
10492 (MAX_REGIONS): New macro.
10493 (mem_regions): New variable.
10494 (num_regions): Likewise.
10495 (pupa_os_area_addr): Likewise.
10496 (pupa_os_area_size): Likewise.
10497 (pupa_lower_mem): Likewise.
10498 (pupa_upper_mem): Likewise.
10499 (add_mem_region): New function.
10500 (compact_mem_regions): Likewise.
10501 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
10502 the size of the conventional memory and that of so-called upper
10503 memory (before the first memory hole).
10504 Instead of adding each found region to free memory, use
10505 add_mem_region and add them after removing overlaps.
10506 Also, add only 1/4 of the upper memory to free memory. The rest
10507 is used for loading OS images. Maybe this is ad hoc, but this
10508 makes it much easier to relocate OS images when booting.
10509
10510 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
10511 (pupa_enter_rescue_mode): Don't register initrd and module.
10512
10513 * kern/mm.c: Include pupa/dl.h.
10514
10515 * kern/main.c: Include pupa/file.h and pupa/device.h.
10516
10517 * kern/loader.c (pupa_loader_load_module_func): Removed.
10518 (pupa_loader_load_module): Likewise.
10519
10520 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
10521 ``.o''.
10522
10523 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
10524 (pupa_linux_tmp_addr): Likewise.
10525 (pupa_linux_real_addr): Likewise.
10526 (pupa_linux_boot_zimage): Likewise.
10527 (pupa_linux_boot_bzimage): Likewise.
10528
10529 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
10530 (pupa_upper_mem): Likewise.
10531 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
10532 module is too dangerous.
10533
10534 * include/pupa/loader.h (pupa_os_area_addr): Declared.
10535 (pupa_os_area_size): Likewise.
10536 (pupa_loader_set): Remove the first argument. Loader doesn't
10537 manage modules or initrd any longer.
10538 (pupa_loader_load_module): Removed.
10539
10540 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
10541 (linux_mod_SOURCES): New variable.
10542 (linux_mod_CFLAGS): Likewise.
10543
a13f9237 105442003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
10545
10546 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
10547 the length of a blocklist correctly.
10548
10549 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
10550 Use ioctl only if the OS file is a block device.
10551 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
10552 not very useful for normal files.
10553
10554 * kern/main.c (pupa_set_root_dev): New function.
10555 (pupa_load_normal_mode): Likewise.
10556 (pupa_main): Call those above.
10557
10558 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
10559 pupa_uint16_t.
10560
10561 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
10562
a5ffe966 105632003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10564
10565 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
10566 (setup): Configure the installed partition information and the
10567 dl prefix.
10568
10569 * loader/i386/pc/chainloader.c (my_mod): New variable.
10570 (pupa_chainloader_unload): New function.
10571 (pupa_rescue_cmd_chainloader): Refer itself.
10572 (PUPA_MOD_INIT): Save its own module in MY_MOD.
10573
10574 * kern/i386/pc/startup.S (install_partition): Removed.
10575 (version_string): Likewise.
10576 (config_file): Likewise.
10577 (pupa_install_dos_part): New variable.
10578 (pupa_install_bsd_part): Likewise.
10579 (pupa_prefix): Likewise.
10580 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
10581
10582 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
10583 and pupa/misc.h.
10584 (make_install_device): New function.
10585 (pupa_machine_init): Set the dl prefix.
10586
10587 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
10588 (buf): Renamed to ...
10589 (linebuf): ... this.
10590 (pupa_rescue_cmd_prefix): New function.
10591 (pupa_rescue_cmd_insmod): Likewise.
10592 (pupa_rescue_cmd_rmmod): Likewise.
10593 (pupa_rescue_cmd_lsmod): Likewise.
10594 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
10595 rmmod and lsmod.
10596
10597 * kern/mm.c (pupa_memalign): If failed even after invalidating
10598 disk caches, unload unneeded modules and retry.
10599
10600 * kern/misc.c (pupa_memmove): New function.
10601 (pupa_memcpy): Removed.
10602 (pupa_strcpy): New function.
10603 (pupa_itoa): Made static.
10604
10605 * kern/dl.c (pupa_dl_iterate): New function.
10606 (pupa_dl_ref): Likewise.
10607 (pupa_dl_unref): Likewise.
10608 (pupa_dl_unload): Return if succeeded or not.
10609 (pupa_dl_unload_unneeded): New function.
10610 (pupa_dl_unload_all): Likewise.
10611 (pupa_dl_init): Renamed to ...
10612 (pupa_dl_set_prefix): ... this.
10613 (pupa_dl_get_prefix): New function.
10614
10615 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
10616 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
10617 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10618 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10619 (pupa_install_dos_part): Declared.
10620 (pupa_install_bsd_part): Likewise.
10621 (pupa_prefix): Likewise.
10622 (pupa_boot_drive): Likewise.
10623
10624 * include/pupa/types.h: Fix a typo.
10625
10626 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
10627 pupa_memmove.
10628 (pupa_memmove): Declared.
10629 (pupa_strcpy): Likewise.
10630
10631 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
10632 pupa_mod_init takes one argument, its own module.
10633 (pupa_dl_unload_unneeded): Declared.
10634 (pupa_dl_unload_all): Likewise.
10635 (pupa_dl_ref): Likewise.
10636 (pupa_dl_unref): Likewise.
10637 (pupa_dl_iterate): Likewise.
10638 (pupa_dl_init): Renamed to ...
10639 (pupa_dl_set_prefix): ... this.
10640 (pupa_dl_get_prefix): Declared.
10641
10642 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
10643 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
10644 unloaded.
10645 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
10646 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
10647
10648 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
10649 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
10650
012d7999 106512003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10652
10653 * util/i386/pc/pupa-setup.c (setup): Define the internal
10654 function find_first_partition_start at the top level, because GCC
10655 3.0.x cannot compile internal functions in deeper scopes
10656 correctly.
10657 (find_root_device): Use lstat instead of stat.
10658 Don't follow symbolic links.
10659 Fix the path-constructing code.
10660
10661 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
10662 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
10663 by a BLKGETSIZE ioctl first, because block devices don't fill
10664 the member st_mode of the structure stat on Linux.
10665 [__linux__] (linux_find_partition): Use a temporary buffer
10666 REAL_DEV for the working space. Copy it to DEV before returning.
10667 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
10668 buffer cache consistent.
10669 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
10670 strncmp. The previous value was merely wrong.
10671 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
10672
10673 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
10674 FAT size is 12. The previous value was merely wrong.
10675
10676 * kern/main.c (pupa_main): Don't split the starting message from
10677 newlines.
10678
10679 * kern/term.c (pupa_putchar): Put CR after LF instead of before
10680 LF, because BIOS goes crazy about character attributes in this
10681 case.
10682
1cc73a62 106832003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10684
10685 * include/i386/pc/util/biosdisk.h: New file.
10686 * util/i386/pc/biosdisk.c: Likewise.
10687 * util/i386/pc/pupa-setup.c: Likewise.
10688
10689 * Makefile.in (INCLUDE_DISTFILES): Added
10690 include/pupa/i386/pc/util/biosdisk.h.
10691 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
10692 directory util/i386/pc.
10693 (install-local): Added a rule for sbin_UTILITIES.
10694 (uninstall): Likewise.
10695
10696 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
10697
10698 * util/misc.c (xrealloc): New function.
10699 (pupa_malloc): Likewise.
10700 (pupa_free): Likewise.
10701 (pupa_realloc): Likewise.
10702 (pupa_stop): Likewise.
10703 (pupa_putchar): Likewise.
10704
10705 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
10706
10707 * include/pupa/util/misc.h (xrealloc): Declared.
10708
10709 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
10710 macro.
10711 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
10712 (PUPA_BOOT_MACHINE_BPB_END): ... this.
10713
10714 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
10715 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10716
10717 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
10718 way should be implemented.
10719 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10720
10721 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
10722 the size of NAME for safety.
10723 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
10724 0x88.
10725
10726 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
10727 (pupa_setup_SOURCES): Likewise.
10728
10729 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
10730
08b70fe8 107312002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10732
10733 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
10734 bunch of pushl's from pusha, because this destroys the return
10735 value.
10736
62ddcc8f 107372002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10738
10739 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
10740 This means that any missing prototypes could be fatal. Also, you
10741 must take care when writing assembly code. See the comments at
10742 the beginning of startup.S, for more details.
10743
10744 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
10745 compilation mechanism.
10746 (pupa_chainloader_real_boot): Likewise.
10747 (pupa_biosdisk_rw_int13_extensions): Likewise.
10748 (pupa_biosdisk_rw_standard): Likewise.
10749 (pupa_biosdisk_check_int13_extensions): Likewise.
10750 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
10751 (pupa_biosdisk_get_diskinfo_standard): Likewise.
10752 (pupa_get_memsize): Likewise.
10753 (pupa_get_mmap_entry): Likewise.
10754 (pupa_console_putchar): Likewise.
10755 (pupa_console_setcursor): Likewise.
10756 (pupa_getrtsecs): Use pushl instead of push.
10757
10758 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
10759 memory instead of the stack for a mmap entry, because some
10760 BIOSes may ignore the maximum size and overflow.
10761
10762 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10763
10764 * genmk.rb (PModule#rule): Compile automatically generated
10765 sources with module-specific CFLAGS as well as other sources.
10766
9962ed99 107672002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10768
10769 * configure.ac: Check ld.
10770 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10771 respectively, before checking endianness and sizes.
10772
10773 * Makefile.in (LD): New variable.
10774
abdfc3c5 107752002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10776
10777 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10778
6a161fa9 107792002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10780
10781 * Changelog: New file.
10782