1 2008-03-02 Bean <bean123ch@gmail.com>
3 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
11 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
14 * docs/fdl.texi: New file.
16 * docs/mdate-sh: New file. Copied from gnulib.
17 * docs/texinfo.tex: Likewise.
19 * config.guess: Updated from gnulib.
20 * install-sh: Likewise.
22 2008-02-28 Robert Millan <rmh@aybabtu.com>
24 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
25 (aout_mod_SOURCES): New variable.
26 (aout_mod_CFLAGS): Likewise.
27 (aout_mod_LDFLAGS): Likewise.
29 * conf/i386-ieee1275.rmk: Likewise.
31 2008-02-28 Robert Millan <rmh@aybabtu.com>
33 * util/update-grub.in: Reorganise terminal validity check. Accept
34 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
35 Based on suggestion by Franklin PIAT.
37 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
39 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
41 * util/getroot.c (grub_util_check_block_device): New function that
42 returns the given argument if it is a block device and returns NULL else.
43 * util/grub-probe.c (argument_is_device): New variable.
44 (probe): Promote device_name from a variable to an argument. Receive
45 device_name from grub_util_check_block_device() if path is NULL and from
46 grub_guess_root_device() else. Do not free() device_name anymore.
47 (options): Introduce new parameter '-d, --device'.
48 (main): Add description of the new parameter to the help screen.
49 Rename path variable to argument. Set argument_is_device if the '-d'
50 option is given. Pass argument to probe() depending on
53 2008-02-24 Bean <bean123ch@gmail.com>
55 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
56 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
57 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
58 (GRUB_ISO9660_VOLDESC_PART): Likewise.
59 (GRUB_ISO9660_VOLDESC_END): Likewise.
60 (grub_iso9660_primary_voldesc): New member escape.
61 (grub_iso9660_data): New member joliet.
62 (grub_iso9660_convert_string): New function.
63 (grub_iso9660_mount): Detect joliet extension.
64 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
65 (grub_iso9660_iso9660_label): Likewise.
67 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
68 (grub_setup_SOURCES): Add fs/udf.c.
69 (grub_fstest_SOURCES): Likewise.
70 (udf_mod_SOURCES): New variable.
71 (udf_mod_CFLAGS): Likewise.
72 (udf_mod_LDFLAGS): Likewise.
74 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
75 (grub_emu_SOURCES): Likewise.
77 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
79 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
81 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
83 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
87 2008-02-24 Robert Millan <rmh@aybabtu.com>
89 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
90 (normal/lexer.c_DEPENDENCIES): New variables.
91 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
92 (normal/lexer.c_DEPENDENCIES): Likewise.
93 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
94 (normal/lexer.c_DEPENDENCIES): Likewise.
95 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
96 (normal/lexer.c_DEPENDENCIES): Likewise.
97 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
98 (normal/lexer.c_DEPENDENCIES): Likewise.
99 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
100 (normal/lexer.c_DEPENDENCIES): Likewise.
102 2008-02-23 Robert Millan <rmh@aybabtu.com>
104 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
105 since they were intended to be in hex. This didn't break previously
106 because of a bug in gpt_partition_map_iterate() (see below).
108 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
109 when checking the validity of GPT header.
110 Remove `partno', since it always provides the same information as `i'.
112 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
114 * include/grub/efi/time.h: Fix a wrong comment.
116 2008-02-19 Pavel Roskin <proski@gnu.org>
118 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
121 2008-02-19 Bean <bean123ch@gmail.com>
123 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
124 (aout_mod_SOURCES): New variable.
125 (aout_mod_CFLAGS): Likewise.
126 (aout_mod_LDFLAGS): Likewise.
127 (_bsd_mod_SOURCES): New variable.
128 (_bsd_mod_CFLAGS): Likewise.
129 (_bsd_mod_LDFLAGS): Likewise.
130 (bsd_mod_SOURCES): New variable.
131 (bsd_mod_CFLAGS): Likewise.
132 (bsd_mod_LDFLAGS): Likewise.
134 * include/grub/aout.h: New file.
136 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
138 * include/grub/i386/bsd.h: New file.
140 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
143 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
144 function is called, so that it's possible to change it inside the hook.
145 (grub_elf64_load): Likewise.
146 (grub_elf_file): Don't close the file if elf header is not found.
147 (grub_elf_close): Close the file if grub_elf_file fails (The new
148 grub_elf_file won't close it).
149 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
150 (grub_elf64_size): Likewise.
152 * kern/i386/loader.S (grub_unix_real_boot): New function.
154 * loader/aout.c: New file.
156 * loader/i386/bsd.c: New file.
158 * loader/i386/bsd_normal.c: New file.
160 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
162 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
163 can test othe formats.
165 2008-02-19 Robert Millan <rmh@aybabtu.com>
167 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
168 (grub_gpt_partition_type_empty): Redefine with macro from
169 `<grub/gpt_partition.h>'.
170 (gpt_partition_map_iterate): Adjust partition type comparison.
172 Export `entry' as partmap-specific `part.data' struct.
173 (grub_gpt_header, grub_gpt_partentry): Move from here ...
175 * include/grub/gpt_partition.h (grub_gpt_header)
176 (grub_gpt_partentry): ... to here (new file).
178 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
180 (grub_gpt_partition_type_bios_boot): New const variable, defined
181 with macro from `<grub/gpt_partition.h>'.
183 (setup): Replace `first_start' with `embed_region', which keeps
184 track of the embed region (and is partmap-agnostic).
186 Replace find_first_partition_start() with find_usable_region(),
187 which finds a usable region for embedding using partmap-specific
188 knowledge (supports PC/MSDOS and GPT).
190 Fix all assumptions that the embed region start at sector 1, using
191 `embed_region.start' from now on. Similarly, use `embed_region.end'
192 rather than `first_start' to calculate available size.
194 In grub_util_info() message, replace "into after the MBR" with an
195 indication of the specific sector our embed region starts at.
197 2008-02-19 Robert Millan <rmh@aybabtu.com>
199 * DISTLIST: Replace `commands/ieee1275/halt.c' and
200 `commands/ieee1275/reboot.c' with `commands/halt.c' and
202 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
203 (halt_mod_SOURCES): Likewise.
204 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
205 (halt_mod_SOURCES): Likewise.
207 2008-02-17 Christian Franke <franke@computer.org>
209 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
211 2008-02-17 Robert Millan <rmh@aybabtu.com>
213 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
214 set `first_start' to 0 for non-PC/MSDOS partition maps.
216 2008-02-16 Robert Millan <rmh@aybabtu.com>
218 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
219 do not assume partition map is PC/MSDOS before performing checks that
220 are specific to that layout.
222 2008-02-13 Robert Millan <rmh@aybabtu.com>
224 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
225 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
226 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
228 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
230 * configure.ac: Only a cosmetic change on the handling of
231 -fno-stack-protector.
233 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
235 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
236 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
238 (grub_install_SOURCES): Add halt.mod and reboot.mod.
239 (halt_mod_SOURCES): New variable.
240 (halt_mod_CFLAGS): Likewise.
241 (halt_mod_LDFLAGS): Likewise.
242 (reboot_mod_SOURCES): Likewise.
243 (reboot_mod_CFLAGS): Likewise.
244 (reboot_mod_LDFLAGS): Likewise.
246 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
247 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
249 (halt_mod_SOURCES): Likewise.
250 (reboot_mod_SOURCES): Likewise.
252 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
253 commands/i386/pc/reboot.c by commands/reboot.c.
254 (reboot_mod_SOURCES): Likewise.
256 * commands/i386/pc/reboot.c: merge this file ...
258 * commands/ieee1275/reboot.c: ... and this file ...
260 * commands/reboot.c: ... to this file.
261 Add some precompiler directive to include the correct header for
264 * commands/ieee1275/halt.c: move this file ...
266 * commands/halt.c: ... to here.
267 Add some precompiler directive to include the correct header for
270 * include/grub/efi/efi.h (grub_reboot): New function declaration.
271 (grub_halt): Likewise.
273 * kern/efi/efi.c (grub_reboot): New function.
274 (grub_halt): Likewise.
276 2008-02-12 Robert Millan <rmh@aybabtu.com>
278 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
279 /dev (like it is done for /dev/mapper). This doesn't provide support
280 for EVMS, but at least it is now easy to identify the problem when it
283 2008-02-11 Robert Millan <rmh@aybabtu.com>
285 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
286 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
287 comparing it with -1, not 0.
289 2008-02-10 Robert Millan <rmh@aybabtu.com>
291 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
293 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
294 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
296 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
297 `disk/lvm.c' to the end of the list.
298 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
299 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
301 2008-02-10 Robert Millan <rmh@aybabtu.com>
303 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
304 grub_print_error() instead. This will let user know why we're entering
306 Based on suggestions from Sam Morris.
308 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
310 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
311 on remaining N args, instead of "--" arg N times.
313 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
315 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
316 (fill_with_default_glyph): Changed to use unknown_glyph for fill
317 pattern for unknown glyphs.
319 2008-02-09 Robert Millan <rmh@aybabtu.com>
321 * configure.ac: Probe for `help2man'.
322 * Makefile.in (builddir): New variable.
323 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
324 or otherwise add a few flags/options to it.
325 (install-local): For every executable utility or script that is
326 installed, invoke $(HELP2MAN) to install a manpage based on --help
329 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
330 that it doesn't prevent --help from working in build tree.
332 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
333 with `bug-grub@gnu.org'.
334 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
335 * util/update-grub.in (usage): New function.
336 Implement proper argument check, with support for --help and --version
337 (as well as existing -y).
339 2008-02-09 Christian Franke <franke@computer.org>
341 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
342 avoid overwriting previous output.
343 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
345 2008-02-09 Robert Millan <rmh@aybabtu.com>
347 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
350 2008-02-09 Robert Millan <rmh@aybabtu.com>
352 * commands/sleep.c: New file.
353 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
354 (sleep_mod_SOURCES): New variable.
355 (sleep_mod_CFLAGS): Likewise.
356 (sleep_mod_LDFLAGS): Likewise.
358 2008-02-09 Robert Millan <rmh@aybabtu.com>
360 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
361 situations in which we can deduce the RAID size and the superblock
364 2008-02-09 Robert Millan <rmh@aybabtu.com>
366 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
367 and return a grub_diskmemberlist_t composed of LVM physical volumes.
368 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
370 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
371 and return a grub_diskmemberlist_t composed of physical array members.
372 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
374 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
376 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
377 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
378 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
380 * util/grub-probe.c (probe): Move partmap probing code from here ...
381 (probe_partmap): ... to here.
382 (probe): Use probe_partmap() once for the disk we're probing, and
383 additionally, when such disk contains a memberlist() struct member,
384 once for each disk that is contained in the structure returned by
387 2008-02-09 Robert Millan <rmh@aybabtu.com>
389 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
390 environment variable to 'all' in order to obtain debug output from
392 * util/i386/pc/grub-setup.c (main): Likewise.
394 2008-02-08 Robert Millan <rmh@aybabtu.com>
396 * disk/raid.c (grub_raid_scan_device): Check for
397 `array->device[sb.this_disk.number]' rather than for
398 `array->device[sb.this_disk.number]->name', since the latter is not
399 garanteed to be accessible.
401 2008-02-08 Robert Millan <rmh@aybabtu.com>
403 * disk/raid.c: Update copyright.
404 * fs/cpio.c: Likewise.
405 * include/grub/raid.h: Likewise.
406 * loader/i386/pc/multiboot.c: Likewise.
407 * util/hostfs.c: Likewise.
409 2008-02-08 Robert Millan <rmh@aybabtu.com>
411 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
412 to a grub_disk_t array.
413 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
415 (grub_raid_scan_device): Replace `device[x].name' accesses with
416 `device[x]->name'. Simplify initialization of `array->device[x]'.
418 2008-02-08 Robert Millan <rmh@aybabtu.com>
420 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
421 grub_dprintf() calls.
422 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
425 2008-02-07 Christian Franke <franke@computer.org>
427 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
428 instead of fseek and ftell to support large files.
429 (grub_hostfs_read): Likewise.
431 2008-02-07 Robert Millan <rmh@aybabtu.com>
433 Patch from Jeroen Dekkers.
434 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
435 failure, since succesfuly reading all array members might not be
438 2008-02-06 Robert Millan <rmh@aybabtu.com>
440 * util/grub-probe.c (probe): Simplify partmap probing (with the
441 assumption that the first word up to the underscore equals to
444 2008-02-06 Christian Franke <franke@computer.org>
446 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
447 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
448 last block of a cpio or tar stream.
449 Check for "TRAILER!!!" instead of any empty data
450 block to detect last block of a cpio stream.
451 (grub_cpio_dir): Fix constness of variable np.
452 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
453 cpio or tar trailer is detected. This fixes a crash
454 on open of a non existing file.
456 2008-02-05 Bean <bean123ch@gmail.com>
458 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
460 (grub_multiboot_load_elf64): Likewise.
461 (grub_multiboot): Initialize mbi structure.
463 * util/grub-fstest.c: Don't include unused header file script.h.
465 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
467 (grub_fstest_SOURCES): Likewise.
469 2008-02-05 Robert Millan <rmh@aybabtu.com>
471 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
472 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
473 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
474 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
476 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
477 (translation_table): Replace hardcoded values with macros
478 provided by `<grub/term.h>'.
480 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
481 (keyboard_map): Correct/add a few values, with macros provided
483 (keyboard_map_shift): Zero values that don't differ from their
484 `keyboard_map' equivalents.
485 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
486 Discard the second scan code that is always sent by Caps lock.
487 Only use `keyboard_map_shift' when it provides a non-zero value,
488 otherwise fallback to `keyboard_map'.
490 2008-02-04 Bean <bean123ch@gmail.com>
492 * Makefile.in (enable_grub_fstest): New variable.
494 * conf/common.rmk (grub_fstest_init.lst): New rule.
495 (grub_fstest_init.h): Likewise.
496 (grub_fstest_init.c): Likewise.
497 (util/grub-fstest.c_DEPENDENCIES): New variable.
498 (grub_fstest_SOURCES): Likewise.
500 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
502 * util/grub-fstest.c: New file.
504 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
506 Make grub-setup handle a separate root device.
508 * util/i386/pc/grub-setup.c (setup): Always open the root device,
509 so that the root device can be compared with the destination
511 When embedding the core image, if the root and destination devices
512 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
514 When not embedding, set ROOT_DRIVE to 0xFF.
516 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
518 Add support for having a grub directory in a different drive. This
519 is still only the data handling part.
521 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
522 (codestart): Save %dh in GRUB_ROOT_DRIVE.
523 (grub_root_drive): New variable.
525 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
526 instead of GRUB_BOOT_DRIVE to construct a device name. Set
527 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
530 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
532 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
534 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
536 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
537 is bogus, because PXE booting does not specify any drive
540 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
541 am not sure if this is really correct.
543 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
544 is always identical to the boot drive when booting from a CD.
546 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
548 (root_drive): New variable.
549 (real_start): Unconditionally set %dh to ROOT_DRIVE.
550 (setup_sectors): Push %dx right after popping it, because %dh will
552 (copy_buffer): Restore %dx.
554 2008-02-03 Robert Millan <rmh@aybabtu.com>
556 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
557 use `cdboot.img' for cdrom images.
559 2008-02-03 Robert Millan <rmh@aybabtu.com>
561 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
562 only setup gfxterm when `font' command has succeeded.
564 2008-02-03 Robert Millan <rmh@aybabtu.com>
566 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
567 (grub_rescue_cmd_multiboot_loader)
568 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
570 2008-02-03 Pavel Roskin <proski@gnu.org>
572 * a/kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
573 %edx and %esi from stack only after grub_gate_a20() is called.
574 grub_gate_a20() clobbers %edx.
576 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
578 * configure.ac (AC_INIT): Bumped to 1.96.
580 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
581 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
582 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
585 2008-02-03 Bean <bean123ch@gmail.com>
587 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
588 (cdboot_img_SOURCES): New variable.
589 (cdboot_img_ASFLAGS): New variable.
590 (cdboot_img_LDFLAGS): New variable.
592 * boot/i386/pc/cdboot.S: New file.
594 * disk/i386/pc/biosdisk.c (cd_start): New variable.
595 (cd_count): Likewise.
596 (grub_biosdisk_get_drive): Add support for cd device.
597 (grub_biosdisk_call_hook): Likewise.
598 (grub_biosdisk_iterate): Likewise.
599 (grub_biosdisk_open): Likewise.
600 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
601 (grub_biosdisk_rw): Support reading from cd device.
602 (GRUB_MOD_INIT): Iterate cd devices.
604 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
605 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
606 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
608 * kern/i386/pc/init.c (make_install_device): Check for cd device.
610 2008-02-02 Robert Millan <rmh@aybabtu.com>
612 * commands/read.c: New file.
613 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
614 (read_mod_SOURCES): New variable.
615 (read_mod_CFLAGS): Likewise.
616 (read_mod_LDFLAGS): Likewise.
618 2008-02-02 Robert Millan <rmh@aybabtu.com>
620 * normal/main.c (grub_normal_execute): Check for `menu->size' when
621 determining whether menu has to be displayed.
623 2008-02-02 Marco Gerards <marco@gnu.org>
625 * bus/pci.c: New file.
627 * include/grub/pci.h: Likewise.
629 * include/grub/i386/pc/pci.h: Likewise.
631 * commands/lspci.c: Likewise.
633 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
635 (pci_mod_SOURCES): New variable.
636 (pci_mod_CFLAGS): Likewise.
637 (pci_mod_LDFLAGS): Likewise.
638 (lspci_mod_SOURCES): Likewise.
639 (lspci_mod_CFLAGS): Likewise.
640 (lspci_mod_LDFLAGS): Likewise.
642 2008-02-02 Bean <bean123ch@gmail.com>
644 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
645 (grub_ufs_get_file_block): Fix indirect block calculation problem.
647 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
648 (grub_xfs_btree_node): New structure.
649 (grub_xfs_btree_root): New structure.
650 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
651 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
652 (GRUB_XFS_EXTENT_BLOCK): Likewise.
653 (GRUB_XFS_EXTENT_SIZE): Likewise.
654 (grub_xfs_read_block): Support btree format type.
655 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
656 Use directory block as basic unit.
658 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
660 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
661 __attribute__ ((__regparm__ (1))).
663 2008-02-01 Robert Millan <rmh@aybabtu.com>
665 Correct a mistake in previous commit.
667 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
669 (normal/command.c_DEPENDENCIES): New variable.
671 2008-02-01 Robert Millan <rmh@aybabtu.com>
673 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
675 (normal/command.c_DEPENDENCIES): New variable.
676 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
677 * conf/i386-ieee1275.rmk: Likewise.
678 * conf/i386-linuxbios.rmk: Likewise.
679 * conf/i386-pc.rmk: Likewise.
680 * conf/sparc64-ieee1275.rmk: Likewise.
681 * conf/powerpc-ieee1275.rmk: Likewise.
682 (grub_emu_SOURCES): Add `fs/fshelp.c'.
684 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
686 2008-02-01 Robert Millan <rmh@aybabtu.com>
688 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
689 call at beginning of function.
691 2008-01-31 Pavel Roskin <proski@gnu.org>
693 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
694 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
695 (grub_mkrescue_SOURCES): Likewise.
696 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
698 2008-01-30 Robert Millan <rmh@aybabtu.com>
700 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
701 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
702 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
703 (grub_probe_SOURCES): ... to here.
705 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
706 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
707 * conf/i386-ieee1275.rmk: Likewise.
708 * conf/i386-linuxbios.rmk: Likewise.
709 * conf/powerpc-ieee1275.rmk: Likewise.
711 2008-01-30 Tristan Gingold <gingold@free.fr>
713 * kern/rescue.c: Silently accept empty lines.
715 2008-01-29 Bean <bean123ch@gmail.com>
717 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
718 (real_code_2): Code cleanup and change comment style.
719 (move_memory): Avoid using 32-bit address mode.
721 2008-01-29 Bean <bean123ch@gmail.com>
723 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
724 (png_mod_SOURCES): New variable.
725 (png_mod_CFLAGS): Likewise.
726 (png_mod_LDFLAGS): Likewise.
728 * video/readers/png.c: New file.
730 2008-01-28 Robert Millan <rmh@aybabtu.com>
732 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
733 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
734 `ifndef GRUB_MOD_GAP' hack.
735 * util/elf/grub-mkimage.c (add_segments): Likewise.
737 2008-01-27 Robert Millan <rmh@aybabtu.com>
739 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
740 `GRUB_MOD_GAP' for platforms in which it's not defined.
741 * util/elf/grub-mkimage.c (add_segments): Likewise.
743 2008-01-27 Robert Millan <rmh@aybabtu.com>
745 Get grub-emu to build again (including parallel builds).
747 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
749 (util/grub-emu.c_DEPENDENCIES): ... this, ...
750 (normal/execute.c_DEPENDENCIES): ... this, ...
751 (grub-emu_DEPENDENCIES): ... and this.
753 * conf/i386-efi.rmk: Likewise.
754 * conf/i386-linuxbios.rmk: Likewise.
755 * conf/i386-ieee1275.rmk: Likewise.
756 * conf/powerpc-ieee1275.rmk: Likewise.
757 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
759 2008-01-27 Robert Millan <rmh@aybabtu.com>
761 * NEWS: Add a few items.
763 2008-01-27 Robert Millan <rmh@aybabtu.com>
765 Fix parallel builds with grub-emu. Based on earlier commit for
766 grub-probe and grub-setup.
768 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
769 (util/grub-emu.c_DEPENDENCIES): ... this.
770 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
771 (util/grub-emu.c_DEPENDENCIES): ... this.
772 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
773 (util/grub-emu.c_DEPENDENCIES): ... this.
774 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
775 (util/grub-emu.c_DEPENDENCIES): ... this.
776 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
777 (util/grub-emu.c_DEPENDENCIES): ... this.
779 2008-01-27 Pavel Roskin <proski@gnu.org>
781 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
782 to create a gap between _end and the modules added to the image
783 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
784 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
785 * util/elf/grub-mkimage.c (add_segments): Likewise.
787 2008-01-26 Pavel Roskin <proski@gnu.org>
789 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
790 just return an error.
792 2008-01-26 Bean <bean123ch@gmail.com>
794 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
795 (grub_reiserfs_get_item): Save offset of the next item.
796 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
798 2008-01-25 Robert Millan <rmh@aybabtu.com>
800 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
801 make all filesystem sources appear together (possibly fixing omissions
803 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
804 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
805 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
806 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
808 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
810 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
811 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
812 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
813 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
815 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
816 (probe): Add a sanity check to make sure of our ability to read
817 requested files when probing for filesystem type.
819 * genmk.rb: Update copyright year (2007).
821 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
822 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
823 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
824 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
825 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
826 : Remove function prototypes.
828 2008-01-25 Robert Millan <rmh@aybabtu.com>
830 Revert my previous commits (based on wrong assumption of how grub_errno
833 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
834 * kern/file.c (grub_file_open): Likewise.
836 2008-01-24 Pavel Roskin <proski@gnu.org>
838 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
839 that hang if GRUB tries to setup colors.
840 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
841 colors for firmwares that don't support it.
842 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
843 Recognize Open Hack'Ware, set flags to work around its
846 2008-01-24 Robert Millan <rmh@aybabtu.com>
848 * kern/file.c (grub_file_open): Do not account previous failures of
849 unrelated functions when grub_errno is checked for.
850 Reported by Oleg Strikov.
852 2008-01-24 Bean <bean123ch@gmail.com>
854 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
855 (grub_ufs_sblock): New member volume name.
856 (grub_ufs_find_file): Fix string copy bug.
857 (grub_ufs_label): Implement this function properly.
859 * fs/hfs.c (grub_hfs_cnid_type): New enum.
860 (grub_hfs_iterate_records): Use the correct file number for extents
861 and catalog file. Fix problem in next index calculation.
862 (grub_hfs_find_node): Replace recursive function call with loop.
863 (grub_hfs_iterate_dir): Replace recursive function call with loop.
865 2008-01-23 Robert Millan <rmh@aybabtu.com>
867 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
868 `<grub/symbol.h>' and `<grub/multiboot.h>'.
869 (grub_multiboot2_real_boot): New function prototype.
871 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
872 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
874 * kern/i386/ieee1275/init.c (grub_os_area_addr)
875 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
877 2008-01-23 Robert Millan <rmh@aybabtu.com>
879 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
880 #ifdef'ed out grub_printf().
882 2008-01-23 Robert Millan <rmh@aybabtu.com>
884 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
885 grub_dprintf calls, since they make "debug=all" mode unusable.
886 (grub_console_checkkey): Likewise.
888 2008-01-23 Robert Millan <rmh@aybabtu.com>
890 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
891 `term/i386/pc/at_keyboard.c'.
892 (pkglib_MODULES): Add `serial.mod'.
893 (serial_mod_SOURCES): New variable.
894 (serial_mod_CFLAGS): Likewise.
895 (serial_mod_LDFLAGS): Likewise.
897 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
898 `<grub/powerpc/ieee1275/console.h>'.
899 (grub_keyboard_controller_init): New function prototype.
900 (grub_console_checkkey): Likewise.
901 (grub_console_getkey): Likewise.
903 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
906 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
907 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
909 2008-01-23 Robert Millan <rmh@aybabtu.com>
911 * kern/i386/pc/init.c (make_install_device): When memdisk image is
912 present, "(memdisk)/boot/grub" becomes the default prefix.
914 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
915 a memdisk tarball with all the modules. Add --overlay=DIR option that
916 allows users to overlay additional files into the image.
918 2008-01-23 Robert Millan <rmh@aybabtu.com>
920 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
921 and `machine/memory.h'.
922 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
923 (_multiboot_mod_SOURCES): New variable.
924 (_multiboot_mod_CFLAGS): Likewise.
925 (_multiboot_mod_LDFLAGS): Likewise.
926 (multiboot_mod_SOURCES): Likewise.
927 (multiboot_mod_CFLAGS): Likewise.
928 (multiboot_mod_LDFLAGS): Likewise.
930 * include/grub/i386/ieee1275/loader.h: New file.
932 * include/grub/i386/ieee1275/machine.h: Likewise.
934 * include/grub/i386/ieee1275/memory.h: Likewise.
936 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
937 variable declaration.
938 (grub_os_area_size): Likewise.
940 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
941 (grub_lower_mem, grub_upper_mem): New variables.
942 (grub_stop_floppy): New function (just to make
943 grub_multiboot2_real_boot() happy).
945 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
946 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
947 (grub_stop): New function.
948 Include `"../realmode.S"' and `"../loader.S"'.
950 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
951 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
953 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
954 rely on grub_multiboot2_real_boot() for final boot.
956 2008-01-22 Robert Millan <rmh@aybabtu.com>
958 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
959 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
960 device that doesn't look like an SD card.
961 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
962 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
963 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
964 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
967 2008-01-22 Robert Millan <rmh@aybabtu.com>
969 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
970 avoid claiming over our own code.
972 2008-01-22 Bean <bean123ch@gmail.com>
974 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
975 (jpeg_mod_SOURCES): New variable.
976 (jpeg_mod_CFLAGS): Likewise.
977 (jpeg_mod_LDFLAGS): Likewise.
979 * video/readers/jpeg.c : New file.
981 2008-01-22 Bean <bean123ch@gmail.com>
983 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
984 there are no more items.
986 2008-01-21 Robert Millan <rmh@aybabtu.com>
988 * kern/mm.c (grub_mm_init_region): Improve debug message.
990 2008-01-21 Robert Millan <rmh@aybabtu.com>
992 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
993 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
995 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
997 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
998 Indicates start of upper memory.
999 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1000 (generate_image): Abort when image size is big enough to corrupt
1003 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1004 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1005 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1006 instead of hardcoding 0xA0000.
1007 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1008 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1009 instead of hardcoding 0xA0000.
1011 2008-01-21 Robert Millan <rmh@aybabtu.com>
1013 * disk/memdisk.c (memdisk_size): New variable.
1014 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1016 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1017 image to dynamic memory.
1018 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1019 `memdisk_size'. Free memdisk block.
1021 2008-01-21 Robert Millan <rmh@aybabtu.com>
1023 Fix detection of very small filesystems (like tar).
1025 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1026 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1027 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1028 a problem with this disk).
1030 2008-01-21 Robert Millan <rmh@aybabtu.com>
1032 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1033 on grub_biosdisk_rw_standard() error.
1035 2008-01-21 Robert Millan <rmh@aybabtu.com>
1037 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1039 * kern/elf.c: Likewise.
1040 * kern/ieee1275/ieee1275.c: Likewise.
1041 * kern/powerpc/ieee1275/openfw.c: Likewise.
1042 * term/ieee1275/ofconsole.c: Likewise.
1044 2008-01-21 Robert Millan <rmh@aybabtu.com>
1046 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1048 * include/grub/kernel.h (grub_arch_memdisk_addr)
1049 (grub_arch_memdisk_size): Moved from here ...
1051 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1052 (grub_arch_memdisk_size): ... to here.
1054 2008-01-21 Robert Millan <rmh@aybabtu.com>
1056 Mostly based on bugfix from Bean.
1058 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1059 attribute with hook() parameter.
1060 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1062 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1063 attribute with hook() parameter.
1064 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1067 2008-01-21 Robert Millan <rmh@aybabtu.com>
1069 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1070 (pkglib_MODULES): Add `memdisk.mod'.
1071 (memdisk_mod_SOURCES): New variable.
1072 (memdisk_mod_CFLAGS): Likewise.
1073 (memdisk_mod_LDFLAGS): Likewise.
1075 * disk/memdisk.c: New file.
1077 * include/grub/disk.h (grub_disk_dev_id): Add
1078 `GRUB_DISK_DEVICE_MEMDISK_ID'.
1080 * include/grub/i386/pc/kernel.h
1081 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1082 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1083 (grub_kernel_image_size): New variable declaration.
1084 (grub_total_module_size): Likewise.
1085 (grub_memdisk_image_size): Likewise.
1087 * include/grub/i386/pc/memory.h
1088 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1090 * include/grub/kernel.h: Include `<grub/symbol.h>'.
1091 (grub_arch_memdisk_addr): New variable declaration.
1092 (grub_arch_memdisk_size): Likewise.
1094 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1095 (grub_arch_memdisk_size): Likewise.
1097 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1098 (codestart): Replace hardcoded `0x100000' with
1099 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1101 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1102 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
1103 not NULL, append the contents of the file it refers to, at the end of
1104 the compressed kernel image. Initialize `grub_memdisk_image_size'
1105 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1106 (options): Add "memdisk"|'m' option.
1107 (main): Parse --memdisk|-m option, and pass user-provided path as
1108 parameter to generate_image().
1110 2008-01-20 Robert Millan <rmh@aybabtu.com>
1112 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
1113 grub_dprintf() calls from here ...
1114 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
1116 2008-01-20 Robert Millan <rmh@aybabtu.com>
1118 Fix detection of "real mode" when /options/real-mode? doesn't exist.
1120 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
1122 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
1123 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
1124 `GRUB_IEEE1275_FLAG_REAL_MODE'.
1125 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
1127 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
1128 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
1130 2008-01-19 Robert Millan <rmh@aybabtu.com>
1132 Get rid of confusing function (superceeded by
1133 `grub_ieee1275_get_integer_property')
1134 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
1136 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
1138 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
1139 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
1140 in native endianess from grub_ieee1275_get_integer_property().
1142 2008-01-19 Robert Millan <rmh@aybabtu.com>
1144 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
1145 command after "shut-down", since implementations differ on which
1146 the command for halt is.
1148 2008-01-19 Robert Millan <rmh@aybabtu.com>
1150 * include/grub/i386/linuxbios/console.h: Add header protection.
1151 (grub_keyboard_controller_init): New function prototype.
1152 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
1153 (KEYBOARD_COMMAND_READ): Likewise.
1154 (KEYBOARD_COMMAND_WRITE): Likewise.
1155 (KEYBOARD_SCANCODE_SET1): Likewise.
1156 (grub_keyboard_controller_write): New function.
1157 (grub_keyboard_controller_read): Likewise.
1158 (grub_keyboard_controller_init): Likewise.
1160 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
1161 (grub_console_init): On coreboot/LinuxBIOS, call
1162 grub_keyboard_controller_init().
1164 2008-01-19 Robert Millan <rmh@aybabtu.com>
1166 PowerPC changes provided by Pavel Roskin.
1168 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
1169 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
1170 don't rely on cmain() doing it.
1171 * kern/i386/ieee1275/startup.S (_start): Store %eax in
1172 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
1174 2008-01-16 Robert Millan <rmh@aybabtu.com>
1176 * include/grub/i386/linuxbios/memory.h
1177 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
1178 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
1179 receive `table_header' as argument. Instead, probe for it in the
1180 known memory ranges where it can be present.
1181 (grub_available_iterate): Do not pass a fixed `table_header' address
1182 to grub_linuxbios_table_iterate().
1184 2008-01-15 Robert Millan <rmh@aybabtu.com>
1186 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
1187 * conf/i386-ieee1275.rmk: New file.
1188 * include/grub/i386/ieee1275/console.h: Likewise.
1189 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
1190 * include/grub/i386/ieee1275/kernel.h: Likewise.
1191 * include/grub/i386/ieee1275/time.h: Likewise.
1192 * kern/i386/ieee1275/init.c: Likewise.
1193 * kern/i386/ieee1275/startup.S: Likewise.
1195 2008-01-15 Robert Millan <rmh@aybabtu.com>
1197 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
1198 when pointers are 32-bit (but still do set it to one when they are
1201 2008-01-15 Robert Millan <rmh@aybabtu.com>
1203 * include/grub/ieee1275/ieee1275.h
1204 (grub_ieee1275_get_integer_property): New function prototype.
1206 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
1207 (grub_ieee1275_get_integer_property): New function. Wraps around
1208 grub_ieee1275_get_property() to handle endianess.
1210 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
1211 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
1213 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
1214 (grub_map): Likewise.
1215 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
1217 2008-01-15 Bean <bean123ch@gmail.com>
1219 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
1220 (grub_script_execute_cmdline): Reset grub_errno.
1222 * normal/main.c (read_config_file): Reset grub_errno.
1224 * normal/parse.y (script_init): New.
1225 (script): Move function and menuentry here.
1227 (command): Add delimiter at the end of command.
1228 (commands): Adjust to match the new command.
1229 (commandblock): Remove grub_script_lexer_record_start.
1230 (menuentry): Add grub_script_lexer_record_start, use the new commands.
1231 (if): Use the new commands.
1233 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
1235 2008-01-15 Robert Millan <rmh@aybabtu.com>
1237 * normal/menu.c (run_menu): Move timeout message from here ...
1238 (print_timeout): ... to here.
1239 (run_menu): Use print_timeout() once during initial draw to print
1240 the whole message, and again in every clock tick to update only
1241 the number of seconds.
1243 2008-01-15 Robert Millan <rmh@aybabtu.com>
1245 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
1246 actual size of `available' from grub_ieee1275_get_property(), and
1247 restrict parsing to that bound.
1249 2008-01-15 Christian Franke <franke@computer.org>
1251 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
1252 (argp_program_version): Remove variable.
1253 (argp_program_bug_address): Likewise.
1254 (options): Convert from struct argp_option to struct option.
1255 (struct arguments): Remove.
1256 (parse_opt): Remove.
1257 (usage): New function.
1258 (main): Replace struct args members by simple variables.
1259 Replace argp_parse() by getopt_long().
1260 Add switch to evaluate options.
1261 Add missing "(...)" around root_dev in prefix string.
1263 2008-01-14 Robert Millan <rmh@aybabtu.com>
1265 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
1266 for grub_ieee1275_exit(), in order to improve portability.
1268 2008-01-14 Robert Millan <rmh@aybabtu.com>
1270 * util/grub.d/10_linux.in (prefix): Define.
1271 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
1273 2008-01-13 Pavel Roskin <proski@gnu.org>
1275 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
1276 grub_errno if no errors have been detected.
1278 2008-01-12 Robert Millan <rmh@aybabtu.com>
1280 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
1281 (grub_util_get_dev_abstraction): New function prototype.
1283 * util/getroot.c: Include `<grub/util/getroot.h>'
1284 (grub_util_get_grub_dev): Move detection of abstraction type to ...
1285 (grub_util_get_dev_abstraction): ... here (new function).
1287 * util/grub-probe.c: Convert PRINT_* to an enum. Add
1288 `PRINT_ABSTRACTION'.
1289 (probe): Probe for abstraction type when requested.
1290 (main): Understand `--target=abstraction'.
1292 * util/i386/efi/grub-install.in: Add abstraction module to core
1293 image when it is found to be necessary.
1294 * util/i386/pc/grub-install.in: Likewise.
1295 * util/powerpc/ieee1275/grub-install.in: Likewise.
1297 * util/update-grub_lib.in (font_path): Return system path without
1298 converting to GRUB path.
1299 * util/update-grub.in: Convert system path returned by font_path()
1300 to a GRUB path. Use `grub-probe -t abstraction' to determine what
1301 abstraction module is needed for loading fonts (if any). Export
1302 that as `GRUB_PRELOAD_MODULES'.
1303 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
1306 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
1308 Remove some unused code from reiserfs.
1310 * fs/reiserfs.c (struct grub_reiserfs_key)
1311 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
1312 (struct grub_reiserfs_node_body): Removed.
1313 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1315 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1317 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1319 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1321 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1323 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
1325 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1326 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1327 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1329 2008-01-10 Robert Millan <rmh@aybabtu.com>
1331 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
1332 Determines if a file is garbage left by packaging systems, etc.
1333 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
1334 for processing /etc/grub.d scripts.
1335 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
1336 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
1337 as a condition for processing Linux images.
1339 2008-01-10 Pavel Roskin <proski@gnu.org>
1341 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
1342 to compile reiserfs.c on PowerPC.
1344 2008-01-10 Robert Millan <rmh@aybabtu.com>
1346 * kern/device.c (grub_device_iterate): Do not abort device iteration
1347 when one of the devices cannot be opened.
1348 * kern/disk.c (grub_disk_open): Do not account previous failures of
1349 unrelated functions when grub_errno is checked for.
1351 2008-01-08 Robert Millan <rmh@aybabtu.com>
1353 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
1354 `! grub_linux_is_bzimage', change order of address comparison to make
1355 it more intuitive, and improve "too big zImage" error message.
1357 2008-01-08 Robert Millan <rmh@aybabtu.com>
1359 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
1360 `$(update-grub_DATA)'.
1361 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
1364 2008-01-07 Robert Millan <rmh@aybabtu.com>
1366 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
1367 which instruction is modified by grub-setup during installation
1368 (since it wasn't obvious by only looking at this file).
1370 2008-01-07 Robert Millan <rmh@aybabtu.com>
1372 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
1373 listing actual TODO items.
1375 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1377 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
1379 (grub_reiserfs_get_key_offset): Likewise.
1380 (grub_reiserfs_set_key_offset): Likewise.
1381 (grub_reiserfs_set_key_type): Likewise.
1382 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
1384 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
1385 better to remove the bitfield version completely.
1387 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1389 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
1390 allocated from the heap, due to the fshelp implementation.
1391 (grub_reiserfs_dir): Free NODE, due to the same reason.
1393 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1395 Mostly from Vincent Pelletier:
1397 * fs/reiserfs.c: New file.
1399 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
1400 (reiserfs_mod_SOURCES): New variable.
1401 (reiserfs_mod_CFLAGS): Likewise.
1402 (reiserfs_mod_LDFLAGS): Likewise.
1404 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
1405 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
1406 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
1409 2008-01-06 Robert Millan <rmh@aybabtu.com>
1411 * normal/color.c: Remove `<grub/env.h>'.
1413 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
1415 * include/grub/normal.h: Include <grub/env.h>.
1417 2008-01-05 Robert Millan <rmh@aybabtu.com>
1419 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
1420 usage example with `(hd0,1)'.
1421 Reported by Samuel Thibault.
1423 2008-01-05 Robert Millan <rmh@aybabtu.com>
1425 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
1426 (grub_linux_boot_zimage): Rename to ...
1427 (grub_linux_boot): ... this.
1428 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
1429 (grub_linux_boot_zimage): Conditionalize zImage copy.
1431 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
1432 (grub_linux_boot_bzimage): Remove prototype.
1433 (grub_linux_boot_zimage): Rename to ...
1434 (grub_linux_boot): ... this.
1436 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
1437 (grub_linux_boot): Remove function.
1439 2008-01-05 Robert Millan <rmh@aybabtu.com>
1441 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
1442 (grub_env_write_color_highlight): Likewise.
1443 (grub_wait_after_message): Likewise.
1445 * normal/color.c: New file.
1447 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1448 (normal_mod_DEPENDENCIES): Likewise.
1450 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1451 (normal_mod_DEPENDENCIES): Likewise.
1453 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1454 (normal_mod_DEPENDENCIES): Likewise.
1456 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1457 (normal_mod_DEPENDENCIES): Likewise.
1459 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
1460 for waiting after a message is printed.
1461 * normal/main.c (read_config_file): Likewise.
1462 (grub_normal_init): Register grub_env_write_color_normal() and
1463 grub_env_write_color_highlight() hooks. Mark `color_normal' and
1464 `color_highlight' variables as global.
1466 * normal/menu.c (grub_wait_after_message): New function.
1467 (grub_color_menu_normal): New variable. Replaces ...
1468 (GRUB_COLOR_MENU_NORMAL): ... this macro.
1469 (grub_color_menu_highlight): New variable. Replaces ...
1470 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
1471 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
1472 `GRUB_TERM_COLOR_STANDARD'.
1473 (print_message): Use `grub_setcolorstate' to reload colors. Rename
1474 `normal_code' and `highlight_code' to `old_color_normal' and
1475 `old_color_highlight', respectively.
1476 (grub_menu_init_page): Update colors when drawing the menu, based on
1477 `menu_color_normal' and `menu_color_highlight' variables.
1478 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
1479 a message is printed.
1481 2008-01-05 Robert Millan <rmh@aybabtu.com>
1483 * kern/env.c (grub_env_context_open): Propagate hooks for global
1484 variables to new context.
1486 * kern/main.c (grub_set_root_dev): Export `root' variable.
1488 2008-01-05 Robert Millan <rmh@aybabtu.com>
1490 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
1491 discs unconditionaly, since udev and others have options to provide
1494 2008-01-05 Robert Millan <rmh@aybabtu.com>
1496 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
1498 2008-01-04 Christian Franke <franke@computer.org>
1500 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
1503 2008-01-03 Pavel Roskin <proski@gnu.org>
1505 * kern/i386/linuxbios/init.c: Put "void" to all function
1506 declarations with no arguments.
1507 * kern/powerpc/ieee1275/init.c: Likewise.
1508 * term/i386/pc/at_keyboard.c: Likewise.
1509 * term/i386/pc/vga_text.c: Likewise.
1510 * util/grub-mkdevicemap.c: Likewise.
1512 2008-01-02 Robert Millan <rmh@aybabtu.com>
1514 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
1515 message when loaded image is out of bounds.
1516 (grub_multiboot_load_elf64): Likewise.
1518 2008-01-02 Pavel Roskin <proski@gnu.org>
1520 * util/grub.d/10_linux.in: Try version without ".old" when
1521 looking for initrd. It's better to use initrd from the newer
1522 kernel of the same version than no initrd at all.
1524 2008-01-01 Robert Millan <rmh@aybabtu.com>
1526 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
1528 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
1530 * include/grub/video.h: Added grub_video_unmap_color and
1531 grub_video_get_active_render_target.
1532 (grub_video_adapter): Added unmap_color and get_active_render_target.
1534 * video/video.c: Added grub_video_unmap_color and
1535 grub_video_get_active_render_target.
1536 (grub_video_get_info): Changed method to accept NULL pointer as an
1537 argument to allow detection of active video adapter.
1539 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
1540 grub_video_vbe_unmap_color_int.
1541 Added grub_video_vbe_unmap_color and
1542 grub_video_vbe_get_active_render_target.
1543 (grub_video_vbe_adapter): Added unmap_color and
1544 get_active_render_target.
1546 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
1547 with grub_video_vbe_unmap_color_int.
1549 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
1550 (DEFAULT_NORMAL_COLOR): Likewise.
1551 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
1552 (DEFAULT_FG_COLOR): Removed.
1553 (DEFAULT_BG_COLOR): Likewise.
1554 (DEFAULT_CURSOR_COLOR): Changed value.
1555 (grub_virtual_screen): Added standard_color_setting,
1556 normal_color_setting, highlight_color_setting and term_color.
1557 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
1558 (bitmap_width): Added.
1559 (bitmap_height): Likewise.
1561 (set_term_color): Likewise.
1562 (grub_virtual_screen_setup): Changed to use new terminal coloring
1564 (grub_gfxterm_init): Added init for bitmap.
1565 (grub_gfxterm_fini): Added destroy for bitmap.
1566 (redraw_screen_rect): Updated to use background bitmap and new
1568 (scroll_up): Added optimization for case when there is no bitmap.
1569 (grub_gfxterm_cls): Fixed to use correct background color.
1570 (grub_virtual_screen_setcolorstate): Changed to use new terminal
1572 (grub_virtual_screen_setcolor): Likewise.
1573 (grub_virtual_screen_getcolor): Added.
1574 (grub_gfxterm_background_image_cmd): Likewise.
1575 (grub_video_term): Added setcolor and getcolor.
1576 (MOD_INIT): Added registration of background_image command.
1577 (MOD_TERM): Added unregistration for background_image command.
1579 2007-12-30 Pavel Roskin <proski@gnu.org>
1581 * loader/multiboot_loader.c: Fix multiboot command
1582 unregistration. Fix all typos in the word "multiboot".
1584 2007-12-29 Pavel Roskin <proski@gnu.org>
1586 * util/grub.d/10_linux.in: Refactor search for initrd. Add
1587 support for initrd names used in Fedora.
1589 2007-12-26 Bean <bean123ch@gmail.com>
1591 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
1592 (cpio_mod_SOURCES): New variable.
1593 (cpio_mod_CFLAGS): Likewise.
1594 (cpio_mod_LDFLAGS): Likewise.
1596 * fs/cpio.c: New file.
1598 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
1600 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1602 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1604 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1606 2007-12-25 Robert Millan <rmh@aybabtu.com>
1608 * include/grub/term.h (struct grub_term): Add `getcolor' function.
1609 (grub_getcolor): New function.
1611 * kern/term.c (grub_getcolor): New function.
1612 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
1613 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
1614 (print_entry): Set normal and highlight colors to
1615 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
1616 respectively, before printing and restore them to old
1618 (grub_menu_init_page): Likewise. Fill an additional colored space
1619 that would otherwise be left blank.
1621 * term/efi/console.c (grub_console_getcolor): New function.
1622 (struct grub_console_term.getcolor): New variable.
1623 * term/i386/pc/console.c (grub_console_getcolor): New function.
1624 (struct grub_console_term.getcolor): New variable.
1625 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
1626 (struct grub_console_term.getcolor): New variable.
1628 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
1629 (struct grub_console_term.setcolor): Remove variable.
1630 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
1631 (struct grub_console_term.setcolor): Remove variable.
1632 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
1633 (struct grub_console_term.setcolor): Remove variable.
1634 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
1635 (struct grub_console_term.setcolor): Remove variable.
1637 2007-12-25 Robert Millan <rmh@aybabtu.com>
1639 * configure.ac: Search for possible unifont.hex locations, and
1640 define UNIFONT_HEX if found.
1642 * Makefile.in (UNIFONT_HEX): Define variable.
1643 (DATA): Rename to ...
1644 (PKGLIB): ... this. Update all users.
1645 (PKGDATA): New variable.
1646 (pkgdata_IMAGES): Rename to ...
1647 (pkglib_IMAGES): ... this. Update all users.
1648 (pkgdata_MODULES): Rename to ...
1649 (pkglib_MODULES): ... this. Update all users.
1650 (pkgdata_PROGRAMS): Rename to ...
1651 (pkglib_PROGRAMS): ... this. Update all users.
1652 (pkgdata_DATA): Rename to ...
1653 (pkglib_DATA): ... this. Update all users.
1654 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
1655 (unicode.pff, ascii.pff): New rules.
1656 (all-local): Add `$(PKGDATA)' dependency.
1657 (install-local): Process `$(PKGDATA)'.
1659 * util/update-grub_lib.in (font_path): Search for *.pff files in
1660 a few more locations, including `${pkgdata}'.
1662 2007-12-23 Robert Millan <rmh@aybabtu.com>
1664 Patch from Bean <bean123ch@gmail.com>:
1665 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
1668 2007-12-21 Bean <bean123ch@gmail.com>
1670 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
1671 (ntfscomp_mod_SOURCES): New variable.
1672 (ntfscomp_mod_CFLAGS): Likewise.
1673 (ntfscomp_mod_LDFLAGS): Likewise.
1675 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
1676 (grub_probe_SOURCES): Likewise.
1677 (grub_emu_SOURCES): Likewise.
1679 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1680 (grub_emu_SOURCES): Likewise.
1682 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1683 (grub_emu_SOURCES): Likewise.
1685 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1686 (grub_emu_SOURCES): Likewise.
1688 * fs/ntfs.c (grub_ntfscomp_func): New variable.
1689 (read_run_list): Renamed to grub_ntfs_read_run_list.
1690 (decomp_nextvcn): Moved to ntfscomp.c.
1691 (decomp_getch): Likewise.
1692 (decomp_get16): Likewise.
1693 (decomp_block): Likewise.
1694 (read_block): Likewise.
1695 (read_data): Partially moved to ntfscomp.c.
1696 (fixup): Change unsigned to grub_uint16_t.
1697 (read_mft): Change unsigned long to grub_uint32_t.
1698 (read_attr): Likewise.
1699 (read_data): Likewise.
1700 (read_run_data): Likewise.
1701 (read_run_list): Likewise.
1702 (read_mft): Likewise.
1704 * fs/ntfscomp.c: New file.
1706 * include/grub/ntfs.h: New file.
1708 2007-12-16 Robert Millan <rmh@aybabtu.com>
1710 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
1711 IDE disk check, since Linux is known to support 20 IDE disks.
1712 Reported by Colin Watson.
1714 2007-12-15 Bean <bean123ch@gmail.com>
1716 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
1717 (lnxboot_img_SOURCES): New variable.
1718 (lnxboot_img_ASFLAGS): Likewise.
1719 (lnxboot_img_LDFLAGS): Likewise.
1721 * boot/i386/pc/lnxboot.S: New file.
1723 2007-11-24 Pavel Roskin <proski@gnu.org>
1725 * configure.ac: Test if '--build-id=none' is supported by the
1726 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
1727 objcopy to generate incorrect binary files (binutils
1728 2.17.50.0.18-1 as shipped by Fedora 8).
1729 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
1730 linking, so that build ID doesn't break the test.
1732 2007-11-24 Pavel Roskin <proski@gnu.org>
1734 * include/grub/i386/time.h: use "void" in the argument list
1736 * include/grub/powerpc/time.h: Likewise.
1737 * include/grub/sparc64/time.h: Likewise.
1739 2007-11-18 Christian Franke <franke@computer.org>
1741 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
1742 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
1743 This fixes the problem that function keys did not work in grub-emu.
1745 2007-11-18 Christian Franke <franke@computer.org>
1747 * disk/host.c (grub_host_open): Remove attribute unused from
1748 name parameter. Add check for "host". This fixes the problem
1749 that grub-emu does not find partitions.
1751 2007-11-18 Christian Franke <franke@computer.org>
1753 * util/hostfs.c (is_dir): New function.
1754 (grub_hostfs_dir): Handle missing dirent.d_type case.
1755 (grub_hostfs_read): Add missing fseek().
1756 (grub_hostfs_label): Clear label pointer. This fixes a crash
1757 of grub-emu on "ls (host)".
1759 2007-11-18 Christian Franke <franke@computer.org>
1761 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
1762 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
1763 to 64 bit boundary by default.
1765 2007-11-18 Bean <bean123ch@gmail.com>
1767 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
1768 (hexdump_mod_SOURCES): New variable.
1769 (hexdump_mod_CFLAGS): Likewise.
1770 (hexdump_mod_LDFLAGS): Likewise.
1772 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1774 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1776 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1780 * include/grub/hexdump.h: New file.
1782 * commands/hexdump.c: New file.
1784 2007-11-10 Robert Millan <rmh@aybabtu.com>
1786 * commands/i386/pc/play.c (beep_off): Switch order of arguments
1787 in grub_outb() calls.
1788 (beep_on): Likewise.
1790 2007-11-10 Christian Franke <franke@computer.org>
1792 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
1793 (grub_menu_run): Likewise.
1795 2007-11-10 Robert Millan <rmh@aybabtu.com>
1797 * include/grub/i386/efi/machine.h: New file.
1798 * include/grub/i386/linuxbios/machine.h: Likewise.
1799 * include/grub/i386/pc/machine.h: Likewise.
1800 * include/grub/powerpc/ieee1275/machine.h: Likewise.
1801 * include/grub/sparc64/ieee1275/machine.h: Likewise.
1803 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
1804 (serial_hw_io_addr): New variable.
1805 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
1806 instead of `(unsigned short *) 0x400'.
1808 2007-11-10 Bean <bean123ch@gmail.com>
1810 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
1812 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1814 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
1815 (vga_mod_SOURCES): Added.
1816 (vga_mod_CFLAGS): Likewise.
1817 (vga_mod_LDFLAGS): Likewise.
1819 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
1821 (set_map_mask): Likewise.
1822 (set_read_map): Likewise.
1823 (set_read_address): Likewise.
1824 (vga_font): Removed variable.
1825 (get_vga_glyph): Removed function.
1826 (invalidate_char): Likewise.
1827 (write_char): Changed to use grub_font_get_glyph() for font
1829 (grub_vga_putchar): Likewise.
1830 (grub_vga_getcharwidth): Likewise.
1832 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1834 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
1836 (pxeboot_img_LDFLAGS): Likewise.
1837 (diskboot_img_LDFLAGS): Likewise.
1838 (kernel_img_LDFLAGS): Likewise.
1840 2007-11-06 Robert Millan <rmh@aybabtu.com>
1842 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
1843 in grub_outb() calls.
1844 (serial_hw_init): Likewise.
1846 2007-11-05 Robert Millan <rmh@aybabtu.com>
1848 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
1849 spaces. Skip non-regular files.
1851 2007-11-05 Robert Millan <rmh@aybabtu.com>
1853 * kern/disk.c (grub_disk_firmware_fini)
1854 (grub_disk_firmware_is_tainted): New variables.
1856 * include/grub/disk.h (grub_disk_firmware_fini)
1857 (grub_disk_firmware_is_tainted): Likewise.
1859 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
1860 (grub_disk_biosdisk_fini): ... to here.
1861 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
1862 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
1863 is set. Register grub_disk_biosdisk_fini() in
1864 `grub_disk_firmware_fini'.
1866 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
1867 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
1868 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
1869 to finish existing firmware disk interface.
1871 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
1872 (ata_mod_SOURCES): New variable.
1873 (ata_mod_CFLAGS): Likewise.
1874 (ata_mod_LDFLAGS): Likewise.
1876 2007-11-05 Robert Millan <rmh@aybabtu.com>
1878 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
1879 (grub_ata_wait): Reimplement using grub_millisleep().
1881 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
1882 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
1884 2007-11-03 Marco Gerards <marco@gnu.org>
1886 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
1887 (CRTC_ADDR_PORT): New macro.
1888 (CRTC_DATA_PORT): Likewise.
1889 (CRTC_CURSOR): Likewise.
1890 (CRTC_CURSOR_ADDR_HIGH): Likewise.
1891 (CRTC_CURSOR_ADDR_LOW): Likewise.
1892 (update_cursor): New function.
1893 (grub_console_real_putchar): Call `update_cursor'.
1894 (grub_console_gotoxy): Likewise.
1895 (grub_console_cls): Set the default color when clearing the
1897 (grub_console_setcursor): Implemented.
1899 2007-11-03 Marco Gerards <marco@gnu.org>
1901 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
1903 (grub_ata_pio_write): Likewise.
1905 (grub_atapi_identify): Wait after issuing an ATA command.
1906 (grub_atapi_packet): Likewise.
1907 (grub_ata_identify): Likewise.
1908 (grub_ata_readwrite): Likewise.
1910 2007-11-03 Marco Gerards <marco@gnu.org>
1912 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
1913 (grub_ata_pio_write): Likewise.
1914 (grub_ata_readwrite): Use `grub_error', instead of
1915 returning `grub_errno'.
1917 2007-11-03 Marco Gerards <marco@gnu.org>
1919 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
1920 grub_ata_pio_write once for every single sector, instead of for
1923 2007-10-31 Robert Millan <rmh@aybabtu.com>
1925 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
1927 * conf/i386-linuxbios.rmk: New file.
1929 * kern/i386/pc/hardware.c: Likewise.
1930 * term/i386/pc/at_keyboard.c: Likewise.
1931 * term/i386/pc/vga_text.c: Likewise.
1933 * include/grub/i386/linuxbios/boot.h: Likewise.
1934 * include/grub/i386/linuxbios/console.h: Likewise.
1935 * include/grub/i386/linuxbios/init.h: Likewise.
1936 * include/grub/i386/linuxbios/kernel.h: Likewise.
1937 * include/grub/i386/linuxbios/loader.h: Likewise.
1938 * include/grub/i386/linuxbios/memory.h: Likewise.
1939 * include/grub/i386/linuxbios/serial.h: Likewise.
1940 * include/grub/i386/linuxbios/time.h: Likewise.
1942 * kern/i386/linuxbios/init.c: Likewise.
1943 * kern/i386/linuxbios/startup.S: Likewise.
1944 * kern/i386/linuxbios/table.c: Likewise.
1946 2007-10-31 Marco Gerards <marco@gnu.org>
1948 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
1949 (ata_mod_SOURCES): New variable.
1950 (ata_mod_CFLAGS): Likewise.
1951 (ata_mod_LDFLAGS): Likewise.
1953 * disk/ata.c: New file.
1955 * include/grub/disk.h (grub_disk_dev_id): Add
1956 `GRUB_DISK_DEV_ATA_ID'.
1958 2007-10-31 Robert Millan <rmh@aybabtu.com>
1960 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
1961 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
1963 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
1964 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
1966 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
1969 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
1971 2007-10-27 Robert Millan <rmh@aybabtu.com>
1973 * include/grub/types.h (ULONG_MAX): Define macro.
1975 2007-10-22 Robert Millan <rmh@aybabtu.com>
1977 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
1979 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
1981 2007-10-22 Robert Millan <rmh@aybabtu.com>
1983 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
1984 (pkgdata_MODULES): Add `biosdisk.mod'.
1985 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
1988 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
1989 (grub_biosdisk_init): Replace with ...
1990 (GRUB_MOD_INIT(biosdisk)): ... this.
1991 (grub_biosdisk_fini): Replace with ...
1992 (GRUB_MOD_FINI(biosdisk)): ... this.
1994 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
1995 (grub_machine_init): Remove call to grub_biosdisk_init().
1996 (grub_machine_fini): Remove call to grub_machine_fini().
1998 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2000 2007-10-22 Robert Millan <rmh@aybabtu.com>
2002 * include/grub/time.h: New file.
2003 * include/grub/i386/time.h: Likewise.
2004 * include/grub/powerpc/time.h: Likewise.
2005 * include/grub/sparc64/time.h: Likewise.
2007 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2009 (KERNEL_MACHINE_TIME_HEADER): ... this.
2010 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2012 (KERNEL_MACHINE_TIME_HEADER): ... this.
2013 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2015 (KERNEL_MACHINE_TIME_HEADER): ... this.
2017 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2018 (grub_millisleep): New function.
2019 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2020 (grub_millisleep): New function.
2021 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2022 Remove `grub/machine/time.h' include.
2023 (grub_millisleep): New function.
2024 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2025 Remove `grub/machine/time.h' include.
2026 (grub_millisleep): New function.
2028 * include/grub/misc.h (grub_div_roundup): New function.
2030 * kern/misc.c: Include `<grub/time.h>'.
2031 (grub_millisleep_generic): New function.
2033 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2035 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2037 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2038 `machine/time.h'. Add `time.h'.
2039 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2041 2007-10-21 Robert Millan <rmh@aybabtu.com>
2043 * include/grub/misc.h (grub_max): New function.
2045 2007-10-21 Robert Millan <rmh@aybabtu.com>
2047 * util/misc.c (grub_util_info): Call fflush() before returning.
2049 2007-10-20 Robert Millan <rmh@aybabtu.com>
2051 * genmk.rb (Image): Copy `extra_flags' from here ...
2052 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
2054 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2055 to `argc' and `args' arguments.
2057 2007-10-17 Robert Millan <rmh@aybabtu.com>
2059 * kern/i386/loader.S: New file.
2061 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2062 * kern/i386/loader.S (grub_linux_prot_size)... to here.
2063 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2064 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2065 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2066 * kern/i386/loader.S (grub_linux_real_addr)... to here.
2067 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2068 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2069 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2070 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2071 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2072 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2073 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2074 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2076 * kern/i386/realmode.S: New file.
2078 * kern/i386/pc/startup.S (protstack): Moved from here ...
2079 * kern/i386/realmode.S (protstack)... to here.
2080 * kern/i386/pc/startup.S (gdt): Moved from here ...
2081 * kern/i386/realmode.S (gdt)... to here.
2082 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2083 * kern/i386/realmode.S (prot_to_real)... to here.
2085 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2086 `kern/i386/realmode.S'.
2088 2007-10-17 Robert Millan <rmh@aybabtu.com>
2090 * include/grub/i386/loader.h: New file.
2092 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2093 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2094 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2095 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2096 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2097 * include/grub/i386/loader.h (grub_linux_prot_size)
2098 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2099 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2100 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2101 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2103 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2105 2007-10-15 Robert Millan <rmh@aybabtu.com>
2107 * normal/misc.c (grub_normal_print_device_info): Do not probe for
2108 filesystem when dev->disk is unset.
2109 Do probe for filesystem even when dev->disk->has_partitions is set.
2110 In case a filesystem is found, always report it.
2111 In case it isn't, if dev->disk->has_partitions is set, report that
2112 a partition table was found instead of reporting that no filesystem
2113 could be identified.
2115 2007-10-12 Robert Millan <rmh@aybabtu.com>
2117 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
2118 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
2120 * include/grub/types.h (grub_host_to_target16): New macro.
2121 (grub_host_to_target32): Likewise.
2122 (grub_host_to_target64): Likewise.
2123 (grub_target_to_host16): Likewise.
2124 (grub_target_to_host32): Likewise.
2125 (grub_target_to_host64): Likewise.
2127 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2129 (GRUB_MOD_ALIGN): ...this. Update all users.
2131 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
2132 grub_host_to_target32.
2133 Replace grub_be_to_cpu32 with grub_target_to_host32.
2134 (load_modules): Likewise.
2135 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
2136 Replace grub_be_to_cpu32 with grub_target_to_host32.
2137 Replace grub_cpu_to_be16 with grub_host_to_target16.
2138 Replace grub_cpu_to_be32 grub_host_to_target32.
2140 2007-10-12 Robert Millan <rmh@aybabtu.com>
2142 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
2143 * util/elf/grub-mkimage.c: ... here.
2145 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
2146 `util/powerpc/ieee1275/grub-mkimage.c'.
2148 2007-10-07 Robert Millan <rmh@aybabtu.com>
2150 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
2151 and make it easier to figure out.
2152 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
2153 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
2154 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
2155 leave us with less than HEAP_MIN_SIZE total heap.
2156 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
2158 2007-10-03 Robert Millan <rmh@aybabtu.com>
2160 * include/grub/i386/io.h: New file.
2161 * commands/i386/pc/play.c (inb): Removed.
2163 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2165 * term/i386/pc/serial.c (inb): Removed.
2167 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2169 * term/i386/pc/vga.c (inb): Removed.
2171 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2174 2007-10-02 Robert Millan <rmh@aybabtu.com>
2176 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
2177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2178 Reported by Marcin Kurek.
2180 2007-09-07 Robert Millan <rmh@aybabtu.com>
2182 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
2183 SmartFirmware version updates (as released by Sven Luther), and avoid
2184 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
2185 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
2188 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2191 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
2192 when merging two regions.
2194 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2196 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
2197 * normal/completion.c (grub_normal_do_completion): Likewise.
2198 Reported by Hitoshi Ozeki.
2200 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2202 Do not use devices at boot in chainloading.
2204 * loader/i386/pc/chainloader.c (boot_drive): New variable.
2205 (boot_part_addr): Likewise.
2206 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
2207 with BOOT_DRIVE and BOOT_PART_ADDR.
2208 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
2209 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
2211 2007-08-29 Robert Millan <rmh@aybabtu.com>
2213 Patch from Simon Peter <dn.tlp@gmx.net>:
2214 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
2215 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
2216 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
2217 util/i386/pc/grub-setup.c_DEPENDENCIES.
2218 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
2219 util/grub-probe.c_DEPENDENCIES.
2220 * conf/powerpc-ieee1275.rmk: Likewise.
2222 2007-08-28 Robert Millan <rmh@aybabtu.com>
2224 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
2225 to tell grub-mkdevicemap how to name devices.
2226 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
2229 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
2230 util/i386/get_disk_name.c.
2231 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
2232 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
2233 util/ieee1275/get_disk_name.c.
2235 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
2237 * DISTLIST: Add util/i386/get_disk_name.c and
2238 util/ieee1275/get_disk_name.c.
2240 * util/grub-mkdevicemap.c: Replace device naming logic with
2241 grub_util_get_disk_name() calls.
2243 2007-08-20 Robert Millan <rmh@aybabtu.com>
2245 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
2246 (so that it works for both plural and singular quantities).
2248 2007-08-05 Robert Millan <rmh@aybabtu.com>
2250 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
2251 so that [xz] isn't taken into account when determining order.
2253 2007-08-02 Marco Gerards <marco@gnu.org>
2255 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
2256 `include/multiboot2.h', `include/grub/elfload.h',
2257 `include/multiboot.h', `include/grub/multiboot.h',
2258 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
2259 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
2260 `kern/elf.c', `loader/multiboot_loader.c',
2261 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
2262 `loader/i386/pc/multiboot2.c',
2263 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
2264 `util/i386/pc/grub-mkrescue.in'. Remove
2265 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
2266 `include/grub/i386/pc/util/biosdisk.h' and
2267 `include/grub/powerpc/ieee1275/multiboot.h'.
2269 2007-08-02 Bean <bean123ch@gmail.com>
2271 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
2272 (ntfs_mod_SOURCES): New variable.
2273 (ntfs_mod_CFLAGS): Likewise.
2274 (ntfs_mod_LDFLAGS): Likewise.
2276 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
2277 (grub_probe_SOURCES): Likewise.
2278 (grub_emu_SOURCES): Likewise.
2280 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2281 (grub_emu_SOURCES): Likewise.
2283 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2284 (grub_emu_SOURCES): Likewise.
2286 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
2288 * fs/ntfs.c: New file.
2290 2007-08-02 Bean <bean123ch@gmail.com>
2292 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
2294 * file.h (grub_file): Likewise.
2296 * fshelp.h (grub_fshelp_read_file): Likewise.
2298 * util/i386/pc/grub-setup.c (setup): Likewise.
2299 (save_first_sector): Likewise.
2300 (save_blocklists): Likewise.
2302 * fs/affs.c (grub_affs_read_file): Likewise.
2304 * fs/ext2.c (grub_ext2_read_file): Likewise.
2306 * fs/fat.c (grub_fat_read_data): Likewise.
2308 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
2310 * fs/hfs.c (grub_hfs_read_file): Likewise.
2312 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2314 * fs/jfs.c (grub_jfs_read_file): Likewise.
2316 * fs/minix.c (grub_minix_read_file): Likewise.
2318 * fs/sfs.c (grub_sfs_read_file): Likewise.
2320 * fs/ufs.c (grub_ufs_read_file): Likewise.
2322 * fs/xfs.c (grub_xfs_read_file): Likewise.
2324 * command/blocklist.c (read_blocklist): Likewise.
2325 (print_blocklist): Likewise.
2327 2007-08-02 Marco Gerards <marco@gnu.org>
2329 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
2332 * disk/host.c: New file.
2334 * util/hostfs.c: Likewise.
2336 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
2337 return `GRUB_ERR_BAD_FS'.
2338 * fs/sfs.c (grub_sfs_mount): Likewise.
2339 * fs/xfs.c (grub_xfs_mount): Likewise.
2341 * include/grub/disk.h (enum grub_disk_dev_id): Add
2342 `GRUB_DISK_DEVICE_HOST_ID'.
2344 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
2346 2007-07-24 Jerone Young <jerone@gmail.com>
2348 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
2349 modules for compilation.
2350 * conf/powerpc-ieee1275.rmk: Likewise.
2352 * include/multiboot.h: Move multiboot definitions to one file. Rename
2353 many definitions to not get grub specific.
2354 * include/multiboot2.h: Create header with multiboot 2 definitions.
2355 * include/grub/multiboot.h: Header for grub specific function
2356 prototypes and definitions.
2357 * include/grub/multiboot2.h: Likewise.
2358 * include/grub/multiboot_loader.h: Likewise.
2359 * include/grub/i386/pc/multiboot.h: Removed.
2360 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
2362 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
2363 and 2 to allow for one multiboot and module commands.
2364 * loader/multiboot2.c: Add multiboot2 functionality.
2365 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
2366 and definition names.
2367 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
2369 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
2370 ieee1275 specific multiboot2 code.
2372 * kern/i386/pc/startup.S: Change headers and definition names for
2373 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
2375 2007-07-22 Robert Millan <rmh@aybabtu.com>
2377 * geninitheader.sh: Process file specified in first parameter rather
2378 than hardcoding grub_modules_init.lst.
2379 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
2380 than hardcoding grub_modules_init.h.
2382 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
2383 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
2384 grub_probe_init.[ch] and grub_setup_init.[ch].
2386 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
2387 grub_modules_init.h with grub_emu_init.h.
2388 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
2389 grub_probe_init.[ch] files.
2390 * conf/i386-efi.rmk: Likewise.
2391 * conf/i386-pc.rmk: Likewise.
2392 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
2393 grub_setup_init.[ch] files.
2395 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
2396 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
2397 to initialize modules rather than a list of hardcoded functions.
2398 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
2399 grub_init_all() to initialize modules rather than a list of hardcoded
2402 2007-07-22 Robert Millan <rmh@aybabtu.com>
2404 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
2405 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
2407 2007-07-22 Robert Millan <rmh@aybabtu.com>
2409 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2410 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
2411 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
2412 flag when running on SmartFirmware.
2413 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
2414 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
2417 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2418 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
2419 rather than decreasing it.
2421 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
2422 there's not enough space to do it, fail in the same way as when it
2423 can't be done because there are no partitions.
2425 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
2426 when nvsetenv failed.
2428 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2430 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
2431 because this rule is automatically generated.
2432 (grub-mkrescue): Removed for the same reason as above.
2434 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2436 Migrate to GNU General Public License Version 3.
2438 * COPYING: Replaced with the plain text version of GPLv3.
2440 * config.guess: Updated from gnulib.
2441 * config.sub: Likewise.
2443 * geninit.sh: Output a GPLv3 copyright notice.
2444 * geninitheader.sh: Likewise.
2445 * genmodsrc.sh: Likewise.
2446 * gensymlist.sh.in: Likewise.
2448 * boot/i386/pc/boot.S: Upgraded to GPLv3.
2449 * boot/i386/pc/diskboot.S: Likewise.
2450 * boot/i386/pc/pxeboot.S: Likewise.
2451 * commands/blocklist.c: Likewise.
2452 * commands/boot.c: Likewise.
2453 * commands/cat.c: Likewise.
2454 * commands/cmp.c: Likewise.
2455 * commands/configfile.c: Likewise.
2456 * commands/echo.c: Likewise.
2457 * commands/help.c: Likewise.
2458 * commands/ls.c: Likewise.
2459 * commands/search.c: Likewise.
2460 * commands/terminal.c: Likewise.
2461 * commands/test.c: Likewise.
2462 * commands/videotest.c: Likewise.
2463 * commands/i386/cpuid.c: Likewise.
2464 * commands/i386/pc/halt.c: Likewise.
2465 * commands/i386/pc/play.c: Likewise.
2466 * commands/i386/pc/reboot.c: Likewise.
2467 * commands/i386/pc/vbeinfo.c: Likewise.
2468 * commands/i386/pc/vbetest.c: Likewise.
2469 * commands/ieee1275/halt.c: Likewise.
2470 * commands/ieee1275/reboot.c: Likewise.
2471 * commands/ieee1275/suspend.c: Likewise.
2472 * disk/loopback.c: Likewise.
2473 * disk/lvm.c: Likewise.
2474 * disk/raid.c: Likewise.
2475 * disk/efi/efidisk.c: Likewise.
2476 * disk/i386/pc/biosdisk.c: Likewise.
2477 * disk/ieee1275/ofdisk.c: Likewise.
2478 * font/manager.c: Likewise.
2479 * fs/affs.c: Likewise.
2480 * fs/ext2.c: Likewise.
2481 * fs/fat.c: Likewise.
2482 * fs/fshelp.c: Likewise.
2483 * fs/hfs.c: Likewise.
2484 * fs/hfsplus.c: Likewise.
2485 * fs/iso9660.c: Likewise.
2486 * fs/jfs.c: Likewise.
2487 * fs/minix.c: Likewise.
2488 * fs/sfs.c: Likewise.
2489 * fs/ufs.c: Likewise.
2490 * fs/xfs.c: Likewise.
2491 * hello/hello.c: Likewise.
2492 * include/grub/acorn_filecore.h: Likewise.
2493 * include/grub/arg.h: Likewise.
2494 * include/grub/bitmap.h: Likewise.
2495 * include/grub/boot.h: Likewise.
2496 * include/grub/cache.h: Likewise.
2497 * include/grub/device.h: Likewise.
2498 * include/grub/disk.h: Likewise.
2499 * include/grub/dl.h: Likewise.
2500 * include/grub/elfload.h: Likewise.
2501 * include/grub/env.h: Likewise.
2502 * include/grub/err.h: Likewise.
2503 * include/grub/file.h: Likewise.
2504 * include/grub/font.h: Likewise.
2505 * include/grub/fs.h: Likewise.
2506 * include/grub/fshelp.h: Likewise.
2507 * include/grub/gzio.h: Likewise.
2508 * include/grub/hfs.h: Likewise.
2509 * include/grub/kernel.h: Likewise.
2510 * include/grub/loader.h: Likewise.
2511 * include/grub/lvm.h: Likewise.
2512 * include/grub/misc.h: Likewise.
2513 * include/grub/mm.h: Likewise.
2514 * include/grub/net.h: Likewise.
2515 * include/grub/normal.h: Likewise.
2516 * include/grub/parser.h: Likewise.
2517 * include/grub/partition.h: Likewise.
2518 * include/grub/pc_partition.h: Likewise.
2519 * include/grub/raid.h: Likewise.
2520 * include/grub/rescue.h: Likewise.
2521 * include/grub/script.h: Likewise.
2522 * include/grub/setjmp.h: Likewise.
2523 * include/grub/symbol.h: Likewise.
2524 * include/grub/term.h: Likewise.
2525 * include/grub/terminfo.h: Likewise.
2526 * include/grub/tparm.h: Likewise.
2527 * include/grub/types.h: Likewise.
2528 * include/grub/video.h: Likewise.
2529 * include/grub/efi/api.h: Likewise.
2530 * include/grub/efi/chainloader.h: Likewise.
2531 * include/grub/efi/console.h: Likewise.
2532 * include/grub/efi/console_control.h: Likewise.
2533 * include/grub/efi/disk.h: Likewise.
2534 * include/grub/efi/efi.h: Likewise.
2535 * include/grub/efi/pe32.h: Likewise.
2536 * include/grub/efi/time.h: Likewise.
2537 * include/grub/i386/linux.h: Likewise.
2538 * include/grub/i386/setjmp.h: Likewise.
2539 * include/grub/i386/types.h: Likewise.
2540 * include/grub/i386/efi/kernel.h: Likewise.
2541 * include/grub/i386/efi/loader.h: Likewise.
2542 * include/grub/i386/efi/time.h: Likewise.
2543 * include/grub/i386/pc/biosdisk.h: Likewise.
2544 * include/grub/i386/pc/boot.h: Likewise.
2545 * include/grub/i386/pc/chainloader.h: Likewise.
2546 * include/grub/i386/pc/console.h: Likewise.
2547 * include/grub/i386/pc/init.h: Likewise.
2548 * include/grub/i386/pc/kernel.h: Likewise.
2549 * include/grub/i386/pc/loader.h: Likewise.
2550 * include/grub/i386/pc/memory.h: Likewise.
2551 * include/grub/i386/pc/multiboot.h: Likewise.
2552 * include/grub/i386/pc/serial.h: Likewise.
2553 * include/grub/i386/pc/time.h: Likewise.
2554 * include/grub/i386/pc/vbe.h: Likewise.
2555 * include/grub/i386/pc/vbeblit.h: Likewise.
2556 * include/grub/i386/pc/vbefill.h: Likewise.
2557 * include/grub/i386/pc/vbeutil.h: Likewise.
2558 * include/grub/i386/pc/vga.h: Likewise.
2559 * include/grub/ieee1275/ieee1275.h: Likewise.
2560 * include/grub/ieee1275/ofdisk.h: Likewise.
2561 * include/grub/powerpc/libgcc.h: Likewise.
2562 * include/grub/powerpc/setjmp.h: Likewise.
2563 * include/grub/powerpc/types.h: Likewise.
2564 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2565 * include/grub/powerpc/ieee1275/console.h: Likewise.
2566 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
2567 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
2568 * include/grub/powerpc/ieee1275/loader.h: Likewise.
2569 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
2570 * include/grub/powerpc/ieee1275/time.h: Likewise.
2571 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
2572 * include/grub/sparc64/libgcc.h: Likewise.
2573 * include/grub/sparc64/setjmp.h: Likewise.
2574 * include/grub/sparc64/types.h: Likewise.
2575 * include/grub/sparc64/ieee1275/console.h: Likewise.
2576 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2577 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2578 * include/grub/sparc64/ieee1275/time.h: Likewise.
2579 * include/grub/util/biosdisk.h: Likewise.
2580 * include/grub/util/getroot.h: Likewise.
2581 * include/grub/util/lvm.h: Likewise.
2582 * include/grub/util/misc.h: Likewise.
2583 * include/grub/util/raid.h: Likewise.
2584 * include/grub/util/resolve.h: Likewise.
2585 * io/gzio.c: Likewise.
2586 * kern/device.c: Likewise.
2587 * kern/disk.c: Likewise.
2588 * kern/dl.c: Likewise.
2589 * kern/elf.c: Likewise.
2590 * kern/env.c: Likewise.
2591 * kern/err.c: Likewise.
2592 * kern/file.c: Likewise.
2593 * kern/fs.c: Likewise.
2594 * kern/loader.c: Likewise.
2595 * kern/main.c: Likewise.
2596 * kern/misc.c: Likewise.
2597 * kern/mm.c: Likewise.
2598 * kern/parser.c: Likewise.
2599 * kern/partition.c: Likewise.
2600 * kern/rescue.c: Likewise.
2601 * kern/term.c: Likewise.
2602 * kern/efi/efi.c: Likewise.
2603 * kern/efi/init.c: Likewise.
2604 * kern/efi/mm.c: Likewise.
2605 * kern/i386/dl.c: Likewise.
2606 * kern/i386/efi/init.c: Likewise.
2607 * kern/i386/efi/startup.S: Likewise.
2608 * kern/i386/pc/init.c: Likewise.
2609 * kern/i386/pc/lzo1x.S: Likewise.
2610 * kern/i386/pc/startup.S: Likewise.
2611 * kern/ieee1275/ieee1275.c: Likewise.
2612 * kern/powerpc/cache.S: Likewise.
2613 * kern/powerpc/dl.c: Likewise.
2614 * kern/powerpc/ieee1275/cmain.c: Likewise.
2615 * kern/powerpc/ieee1275/crt0.S: Likewise.
2616 * kern/powerpc/ieee1275/init.c: Likewise.
2617 * kern/powerpc/ieee1275/openfw.c: Likewise.
2618 * kern/sparc64/cache.S: Likewise.
2619 * kern/sparc64/dl.c: Likewise.
2620 * kern/sparc64/ieee1275/init.c: Likewise.
2621 * kern/sparc64/ieee1275/openfw.c: Likewise.
2622 * loader/efi/chainloader.c: Likewise.
2623 * loader/efi/chainloader_normal.c: Likewise.
2624 * loader/i386/efi/linux.c: Likewise.
2625 * loader/i386/efi/linux_normal.c: Likewise.
2626 * loader/i386/pc/chainloader.c: Likewise.
2627 * loader/i386/pc/chainloader_normal.c: Likewise.
2628 * loader/i386/pc/linux.c: Likewise.
2629 * loader/i386/pc/linux_normal.c: Likewise.
2630 * loader/i386/pc/multiboot.c: Likewise.
2631 * loader/i386/pc/multiboot_normal.c: Likewise.
2632 * loader/powerpc/ieee1275/linux.c: Likewise.
2633 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2634 * normal/arg.c: Likewise.
2635 * normal/cmdline.c: Likewise.
2636 * normal/command.c: Likewise.
2637 * normal/completion.c: Likewise.
2638 * normal/execute.c: Likewise.
2639 * normal/function.c: Likewise.
2640 * normal/lexer.c: Likewise.
2641 * normal/main.c: Likewise.
2642 * normal/menu.c: Likewise.
2643 * normal/menu_entry.c: Likewise.
2644 * normal/misc.c: Likewise.
2645 * normal/parser.y: Likewise.
2646 * normal/script.c: Likewise.
2647 * normal/i386/setjmp.S: Likewise.
2648 * normal/powerpc/setjmp.S: Likewise.
2649 * normal/sparc64/setjmp.S: Likewise.
2650 * partmap/acorn.c: Likewise.
2651 * partmap/amiga.c: Likewise.
2652 * partmap/apple.c: Likewise.
2653 * partmap/gpt.c: Likewise.
2654 * partmap/pc.c: Likewise.
2655 * partmap/sun.c: Likewise.
2656 * term/gfxterm.c: Likewise.
2657 * term/terminfo.c: Likewise.
2658 * term/efi/console.c: Likewise.
2659 * term/i386/pc/console.c: Likewise.
2660 * term/i386/pc/serial.c: Likewise.
2661 * term/i386/pc/vesafb.c: Likewise.
2662 * term/i386/pc/vga.c: Likewise.
2663 * term/ieee1275/ofconsole.c: Likewise.
2664 * util/biosdisk.c: Likewise.
2665 * util/console.c: Likewise.
2666 * util/genmoddep.c: Likewise.
2667 * util/getroot.c: Likewise.
2668 * util/grub-emu.c: Likewise.
2669 * util/grub-mkdevicemap.c: Likewise.
2670 * util/grub-probe.c: Likewise.
2671 * util/lvm.c: Likewise.
2672 * util/misc.c: Likewise.
2673 * util/raid.c: Likewise.
2674 * util/resolve.c: Likewise.
2675 * util/update-grub.in: Likewise.
2676 * util/update-grub_lib.in: Likewise.
2677 * util/grub.d/00_header.in: Likewise.
2678 * util/grub.d/10_hurd.in: Likewise.
2679 * util/grub.d/10_linux.in: Likewise.
2680 * util/i386/efi/grub-install.in: Likewise.
2681 * util/i386/efi/grub-mkimage.c: Likewise.
2682 * util/i386/pc/grub-install.in: Likewise.
2683 * util/i386/pc/grub-mkimage.c: Likewise.
2684 * util/i386/pc/grub-mkrescue.in: Likewise.
2685 * util/i386/pc/grub-setup.c: Likewise.
2686 * util/i386/pc/misc.c: Likewise.
2687 * util/powerpc/ieee1275/grub-install.in: Likewise.
2688 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
2689 * util/powerpc/ieee1275/misc.c: Likewise.
2690 * video/bitmap.c: Likewise.
2691 * video/video.c: Likewise.
2692 * video/i386/pc/vbe.c: Likewise.
2693 * video/i386/pc/vbeblit.c: Likewise.
2694 * video/i386/pc/vbefill.c: Likewise.
2695 * video/i386/pc/vbeutil.c: Likewise.
2696 * video/readers/tga.c: Likewise.
2698 2007-07-02 Robert Millan <rmh@aybabtu.com>
2700 * conf/i386-efi.rmk: Replace obsolete reference to
2701 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
2702 with util/getroot.c.
2703 * conf/powerpc-ieee1275.rmk: Likewise.
2704 * conf/sparc64-ieee1275.rmk: Likewise.
2706 * util/grub-emu.c (main): Fix unchecked pointer handling.
2708 2007-07-02 Robert Millan <rmh@aybabtu.com>
2710 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
2711 invocation to fail, in order to support partition-less media.
2713 * util/i386/pc/grub-install.in: Likewise.
2715 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
2716 which fs or partmap modules are needed (akin to its sister scripts).
2718 Also use grub-probe to get rid of unportable /proc/mounts check.
2720 Print the same informational message that the other scripts do, before
2723 2007-06-23 Robert Millan <rmh@aybabtu.com>
2725 * util/update-grub_lib.in (font_path): New function. Determine wether
2726 a font file can be found and, if so, echo the GRUB path to it.
2728 * util/update-grub.in: Handle multiple terminals depending on user
2729 input, platform availability and font file presence. Propagate
2730 variables of our findings to /etc/grub.d/ children.
2732 * util/grub.d/00_header.in: Handle multiple terminals, based on
2733 environment setup by update-grub.
2735 2007-06-23 Robert Millan <rmh@aybabtu.com>
2737 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
2739 2007-06-21 Robert Millan <rmh@aybabtu.com>
2741 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
2742 indicate end of data section in kernel image.
2743 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
2744 GRUB_KERNEL_MACHINE_DATA_END.
2746 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
2748 * kern/i386/efi/startup.S: Likewise.
2750 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
2751 during image generation. Implement --prefix option to override this
2753 * util/i386/efi/grub-mkimage.c: Likewise.
2755 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
2756 code to make path relative to its root into a separate function.
2758 * util/i386/pc/grub-install.in: Use newly provided
2759 make_system_path_relative_to_its_root() to convert ${grubdir}, then
2760 pass the result to grub-install --prefix.
2762 2007-06-13 Robert Millan <rmh@aybabtu.com>
2764 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
2766 * util/grub-emu.c: Use above definitions from misc.h instead of
2768 * util/grub-mkdevicemap.c: Likewise.
2769 * util/i386/pc/grub-setup.c: Likewise.
2770 * util/grub-probe.c: Likewise.
2771 (probe): Abort with grub_util_error() when either
2772 grub_guess_root_device or grub_util_get_grub_dev fails.
2774 2007-06-12 Robert Millan <rmh@aybabtu.com>
2776 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
2778 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
2780 * util/grub-probe.c (probe): Likewise for "drive_name".
2782 2007-06-11 Robert Millan <rmh@aybabtu.com>
2784 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
2785 not just the cdrom one.
2787 2007-06-11 Robert Millan <rmh@aybabtu.com>
2789 * util/i386/pc/grub-mkrescue.in: Add "set -e".
2790 Add --pkglibdir=DIR option to override pkglibdir.
2791 Mention --image-type=TYPE in help output.
2792 Fix --grub-mkimage (it was a no-op).
2793 Abort gracefuly when no parameter is given.
2795 2007-06-11 Robert Millan <rmh@aybabtu.com>
2797 * util/i386/pc/grub-mkrescue.in: New file.
2798 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
2799 * Makefile.in: Handle bin_SCRIPTS.
2801 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
2803 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
2804 list of video modes.
2806 2007-06-06 Robert Millan <rmh@aybabtu.com>
2808 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
2809 file doesn't exist, or if it is in a filesystem grub can't read.
2811 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
2812 not abort if GRUB_DRIVE could not be defined. Rearrange generated
2813 header comment to fit in 80 columns when the variables are resolved.
2815 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
2816 could be identified by update-grub. Remove redundant check for
2817 unifont.pff existance (since convert_system_path_to_grub_path now
2820 2007-06-04 Robert Millan <rmh@aybabtu.com>
2822 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
2824 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
2826 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
2828 2007-06-04 Robert Millan <rmh@aybabtu.com>
2830 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
2832 * include/grub/partition.h: Declare grub_apple_partition_map_init and
2833 grub_apple_partition_map_fini.
2836 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
2837 to access >2 TiB disks).
2839 Print disk->total_sectors with %llu instead of %lu, since this
2840 variable is always 64-bit (prevents wrong disk size from being displayed
2841 on either >2 TiB disk or big-endian CPU).
2843 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
2844 into a generic case that supports all (sane) partition maps.
2846 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
2849 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
2850 and grub_apple_partition_map_fini() after that.
2852 2007-06-01 Robert Millan <rmh@aybabtu.com>
2854 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
2856 * util/grub.d/00_header.in: Only enable gfxterm when
2857 convert_system_path_to_grub_path() succeeds.
2859 2007-05-20 Robert Millan <rmh@aybabtu.com>
2861 * util/update-grub_lib.in: New file.
2862 * DISTLIST: Add update-grub_lib.in.
2863 * conf/common.rmk: Generate update-grub_lib and install it in
2865 * Makefile.in: Add install routine for $(lib_DATA).
2867 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
2868 function provided by update-grub_lib to support arbitrary paths of
2870 * util/update-grub.in: Use convert_system_path_to_grub_path() to
2871 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
2873 2007-05-19 Robert Millan <rmh@aybabtu.com>
2875 * commands/i386/cpuid.c: New module.
2877 * conf/i386-efi.rmk: Enable cpuid.mod.
2878 * conf/i386-pc.rmk: Likewise.
2880 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
2882 * kern/disk.c (grub_disk_read): Check return value of
2885 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
2887 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
2889 * disk/raid.c (grub_raid_open): Likewise.
2891 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
2893 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
2894 stack instead of on the heap.
2896 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
2897 before doing a read on it.
2899 * configure.ac: Only use -fno-stack-protector for the target
2902 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
2904 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
2905 __attribute_ ((unused)) to mode_type argument.
2907 * util/getroot.c (grub_guess_root_device): Fix #endif.
2909 * kern/misc.c (memcmp): Fix prototype.
2911 * include/grub/partition.h [GRUB_UTIL]
2912 (grub_gpt_partition_map_init): Add prototype.
2913 (grub_gpt_partition_map_fini): Likewise.
2915 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
2918 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
2919 (grub_fat_read_data): Likewise.
2920 (grub_fat_find_dir): Likewise.
2922 * font/manager.c (find_glyph): Make table a const.
2923 (grub_font_get_glyph): Remove bitmap from if statement.
2925 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
2927 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
2928 code, first search for device in /dev/mapper, then in /dev.
2929 (grub_util_get_grub_dev): New function.
2930 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
2932 * util/grub-probe.c (probe): Remove check for RAID, call
2933 grub_util_get_grub_dev() instead of
2934 grub_util_biosdisk_get_grub_dev().
2935 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
2936 grub_util_biosdisk_get_grub_dev().
2937 * util/i386/pc/grub-setup.c (main): Likewise.
2939 2007-05-16 Robert Millan <rmh@aybabtu.com>
2941 * DISTLIST: Update for the latest changes.
2942 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
2943 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
2944 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
2945 grub/util/biosdisk.h.
2946 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
2947 grub/util/biosdisk.h.
2949 2007-05-16 Robert Millan <rmh@aybabtu.com>
2951 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
2953 2007-05-16 Robert Millan <rmh@aybabtu.com>
2955 * util/i386/efi/grub-install.in: New.
2956 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
2957 newly added grub-install.
2958 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
2960 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
2961 grub/util/biosdisk.h.
2962 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
2963 grub/util/biosdisk.h.
2965 2007-05-16 Robert Millan <rmh@aybabtu.com>
2967 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
2968 * include/grub/util/biosdisk.h: ... here.
2969 * util/i386/pc/biosdisk.c: Moved to ...
2970 * util/biosdisk.c: ... here.
2971 * util/i386/pc/getroot.c: Moved to ...
2972 * util/getroot.c: ... here.
2973 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
2974 * util/grub-mkdevicemap.c: ... here.
2975 * util/i386/pc/grub-probe.c: Moved to ...
2976 * util/grub-probe.c: ... here.
2978 2007-05-15 Robert Millan <rmh@aybabtu.com>
2980 * util/update-grub.in: Remove duplicated line in grub.cfg header
2983 2007-05-13 Robert Millan <rmh@aybabtu.com>
2985 * util/update-grub.in: Fix a few assumptions about the devices holding
2986 /, /boot and /boot/grub being the same.
2987 * util/grub.d/00_header.in: Likewise.
2988 * util/grub.d/10_hurd.in: Likewise.
2989 * util/grub.d/10_linux.in: Likewise.
2991 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
2992 patterns. Use that to define the `.old' suffix as older than `'.
2994 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
2996 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
2997 the grub.cfg header message.
2999 2007-05-11 Robert Millan <rmh@aybabtu.com>
3001 * util/update-grub.in: Create device.map if it doesn't already exist,
3002 before attempting to run grub-probe.
3003 Check for grub-probe and grub-mkdevicemap with the same code
3004 grub-install is using.
3007 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3009 * Makefile.in: Add the datarootdir autoconf variable.
3011 2007-05-09 Robert Millan <rmh@aybabtu.com>
3013 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3014 fail gracefuly if dev->disk->partition == NULL.
3016 2007-05-07 Robert Millan <rmh@aybabtu.com>
3018 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3019 determine partition map module.
3020 * util/i386/pc/grub-install.in: Use this feature to decide which
3021 partition module to load, instead of hardcoding pc and gpt.
3023 2007-05-07 Robert Millan <rmh@aybabtu.com>
3025 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3026 source directory differs from build directory.
3028 2007-05-05 Robert Millan <rmh@aybabtu.com>
3030 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3033 2007-05-05 Robert Millan <rmh@aybabtu.com>
3035 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3037 2007-05-05 Robert Millan <rmh@aybabtu.com>
3039 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3040 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3042 2007-05-05 Robert Millan <rmh@aybabtu.com>
3044 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3045 (grub_probe_SOURCES): Likewise.
3046 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3047 GPT and initialize dos_part and bsd_part accordingly.
3048 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3050 (main): Activate gpt module for use during partition identification,
3051 and deactivate it afterwards.
3052 * util/i386/pc/grub-install.in: Add gpt module to core.img.
3053 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3054 partition identification, and deactivate it afterwards.
3056 2007-05-05 Robert Millan <rmh@aybabtu.com>
3058 * term/i386/pc/console.c (grub_console_fini): Call
3059 grub_term_set_current() before grub_term_unregister().
3061 2007-05-04 Robert Millan <rmh@aybabtu.com>
3063 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3064 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3065 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
3066 and update-grub_DATA.
3067 * conf/common.rmk: Build and install update-grub components.
3068 * conf/common.mk: Regenerate.
3069 * util/update-grub.in: New. Core of update-grub.
3070 * util/grub.d/00_header.in: New. Generates grub.cfg header.
3071 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
3072 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
3073 * util/grub.d/README: New. Document grub.d directory layout.
3075 2007-05-01 Robert Millan <rmh@aybabtu.com>
3077 * util/grub-emu.c: Move initialization functions
3078 grub_util_biosdisk_init() and grub_init_all() before
3079 grub_util_biosdisk_get_grub_dev(), which relies on them.
3081 2007-04-19 Robert Millan <rmh@aybabtu.com>
3083 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3086 2007-04-18 Jerone Young <jerone@gmail.com>
3088 * kernel/elf.c: Add missing parenthesis for conditional statement
3091 2007-04-10 Jerone Young <jerone@gmail.com>
3093 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3094 continue on and look for device node with real device name.
3096 2007-04-10 Jerone Young <jerone@gmail.com>
3098 * configure.ac: Add argument for autoconf to use tranformation
3100 * Makefile.in: Add autoconf package transformation code.
3101 * util/i386/pc/grub-install.in: Likewise.
3102 * util/powerpc/ieee1275/grub-install.in: Likewise.
3104 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3106 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
3107 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
3108 (EXT2_REVISION): Likewise.
3109 (EXT2_INODE_SIZE): Likewise.
3110 (struct grub_ext2_block_group): Added a missing member
3112 (grub_ext2_read_inode): Divide by the inode size in a superblock
3113 instead of 128 to obtain INODES_PER_BLOCK.
3114 Use the macro EXT2_INODE_SIZE instead of directly using
3117 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3119 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
3120 superblock instead of the structure size to compute an
3121 offset. This fixes the problem that GRUB could not read a
3122 filesystem when inode size is different from 128-byte.
3124 2007-03-05 Marco Gerards <marco@gnu.org>
3126 * normal/main.c (read_config_file): When "menu" is not set, create
3129 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3131 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
3132 (HEAP_LIMIT): New macro.
3133 (grub_claim_heap): Claim memory up to `heaplimit'.
3135 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3137 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
3138 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
3140 (grub_arch_modules_addr): Return address after `_end'.
3141 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
3142 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
3143 (add_segments): Calculate `_end' from phdr size and location.
3144 (ALIGN_UP): Moved to ...
3145 * include/grub/misc.h: here.
3146 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3148 (GRUB_IEEE1275_MODULE_BASE): Removed.
3150 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3152 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
3155 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3157 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
3159 (grub_elf64_load_hook_t): Likewise.
3160 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
3163 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3165 * kern/mm.c: Update copyright.
3166 (grub_mm_debug): Correct syntax error.
3167 (grub_mm_dump_free): New function.
3168 (grub_debug_free): Call `grub_free'.
3169 * include/grub/mm.h: Update copyright.
3170 (grub_mm_dump_free): Add declaration.
3172 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3174 * include/grub/ieee1275/ieee1275.h: Update copyright.
3175 * kern/powerpc/ieee1275/init.c: Likewise.
3176 * kern/powerpc/ieee1275/openfw.c: Likewise.
3178 * loader/powerpc/ieee1275/linux.c: Likewise.
3179 * include/grub/elfload.h: Likewise.
3180 * kern/elf.c: Likewise.
3181 (grub_elf32_load): Pass `base' and `size' parameters. Update all
3183 (grub_elf64_load): Likewise.
3184 (grub_elf32_load_segment): Move to a nested function.
3185 (grub_elf64_load_segment): Likewise.
3187 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3189 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
3191 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
3192 (grub_heap_len): Likewise.
3193 (HEAP_SIZE): New macro.
3194 (grub_claim_heap): New function.
3195 (grub_machine_init): Don't claim heap directly. Call
3197 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
3198 (grub_available_iterate): New function.
3200 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
3202 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
3203 * configure.ac: Use it for testing the HOST and TARGET compilers.
3205 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
3207 * Makefile.in (enable_grub_emu): New variable.
3208 * configure.ac (--enable-grub-emu): New option.
3209 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
3210 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
3211 * conf/i386-pc.rmk: Likewise.
3212 * conf/powerpc-ieee1275.rmk: Likewise.
3213 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
3215 2006-12-12 Marco Gerards <marco@gnu.org>
3217 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
3219 * kern/env.c (grub_env_unset): Don't free the member `value' when
3220 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
3223 * normal/main.c (current_menu): Removed.
3224 (free_menu): Unset the `menu' environment variable.
3225 (grub_normal_menu_addentry): Make use of the environment variable
3226 `menu', instead of using the global `current_menu'. Allocate
3227 memory for the sourcecode of this entry.
3228 (read_config_file): New argument `nested', changed all callers.
3229 Only in the case of a new context, initialize a new menu. Set the
3230 `menu' environment variable.
3231 (grub_normal_execute): Don't set and unset the environment
3232 variable `menu' here anymore. Only free the menu when leaving the
3235 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
3238 2006-12-11 Marco Gerards <marco@gnu.org>
3240 * normal/menu_entry.c (run): Fix off by one bug so the last line
3241 is executed. Move the loader check to outside the loop.
3243 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
3245 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
3247 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
3249 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
3250 the number of sectors. Reported by Andrey Shuvikov
3251 <mr_hyro@yahoo.com>.
3253 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
3255 * kern/disk.c (grub_disk_read): When there is a read error, always
3256 try to read only the necessary data.
3258 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
3260 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
3262 [GRUB_UTIL] (grub_raid_fini): Likewise.
3263 [GRUB_UTIL] (grub_lvm_init): Likewise.
3264 [GRUB_UTIL] (grub_lvm_fini): Likewise.
3265 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
3266 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
3267 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
3268 and grub_raid_fini().
3270 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3272 * include/grub/types.h (__unused): Rename to UNUSED.
3273 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
3274 (grub_elf64_size): Likewise.
3276 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3278 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
3279 grub_error_push and grub_error_pop in the error-handling path.
3280 (grub_elf32_load_segment): Only call grub_file_read with non-zero
3283 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3285 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
3286 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3288 (kernel_elf_SOURCES): Likewise.
3289 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
3290 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
3291 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3292 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3293 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
3294 (elf_mod_SOURCES): New variable.
3295 (elf_mod_CFLAGS): Likewise.
3296 (elf_mod_LDFLAGS): Likewise.
3297 * include/grub/types.h (__unused): New macro.
3298 * include/grub/elfload.h: New file.
3299 * kern/elf.c: Likewise.
3300 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
3301 (ELF32_LOADMASK): New macro.
3302 (ELF64_LOADMASK): Likewise.
3304 (grub_linux_load32): New function.
3305 (grub_linux_load64): Likewise.
3306 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
3307 Use grub_elf_t instead of grub_file_t.
3309 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
3311 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
3312 `catch_result' to struct set_color_args.
3314 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
3316 * normal/menu.c: Include grub/script.h.
3317 * normal/menu_entry.c: Likewise.
3318 * include/grub/normal.h: Do not include grub/script.h.
3320 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3322 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
3324 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3326 * kern/disk.c (grub_disk_open): Print debug messages when opening a
3328 (grub_disk_close): Print debug messages when closing a disk.
3329 (grub_disk_read): Print debug messages when disk read fails.
3330 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
3332 * kern/partition.c: Include misc.h.
3333 (grub_partition_iterate): Print debug messages when detecting
3336 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3338 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
3340 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
3342 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
3344 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3345 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
3347 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
3349 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
3350 instead of sizeof(lv). Patch by Michael Guntsche.
3352 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
3354 * disk/lvm.c: Rename VGS to VG_LIST.
3355 (grub_lvm_iterate): Change VGS->LV to VG-LV.
3356 (grub_lvm_open): Likewise.
3357 Thanks to Michael Guntsche for finding this bug.
3359 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3361 * configure.ac (AC_INIT): Bumped to 1.95.
3363 2006-10-14 Robert Millan <rmh@aybabtu.com>
3365 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
3366 with "/dev/.static/dev/md".
3368 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3370 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
3371 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
3372 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
3373 DRIVE_NAME are always freed.
3375 * util/i386/pc/biosdisk.c (make_device_name): Add one into
3376 DOS_PART, as a DOS partition is counted from one instead of zero
3377 now. Reported by Robert Millan.
3379 2006-10-14 Robert Millan <rmh@aybabtu.com>
3381 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
3382 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
3383 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
3384 string returned by grub_guess_root_device.
3385 * util/i386/pc/grub-setup.c: Likewise.
3386 * util/i386/pc/grub-probefs.c: Likewise.
3388 * util/i386/pc/grub-probefs.c: Rename to ...
3389 * util/i386/pc/grub-probe.c: ... this.
3390 * DISTLIST: Remove grub-probefs, add grub-probe.
3391 * conf/i386-efi.rmk: Likewise.
3392 * conf/i386-pc.rmk: Likewise.
3393 * util/i386/pc/grub-install.in: Likewise.
3395 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
3396 choose which information we want to print.
3398 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3400 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
3401 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
3402 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
3403 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
3404 video/readers/tga.c and video/i386/pc/vbeutil.c.
3406 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
3408 Added support for RAID and LVM.
3410 * disk/lvm.c: New file.
3411 * disk/raid.c: Likewise.
3412 * include/grub/lvm.h: Likewise.
3413 * include/grub/raid.h: Likewise.
3414 * include/grub/util/lvm.h: Likewise.
3415 * include/grub/util/raid.h: Likewise.
3416 * util/lvm.c: Likewise.
3417 * util/raid.c: Likewise.
3419 * include/grub/disk.h (grub_disk_dev_id): Add
3420 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
3421 (grub_disk_get_size): New prototype.
3422 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
3423 returns a partition.
3424 (grub_disk_get_size): New function.
3426 * kern/i386/pc/init.c (make_install_device): Copy the prefix
3427 verbatim if grub_install_dos_part is -2.
3429 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
3432 * util/i386/pc/grub-setup.c (setup): New argument
3433 MUST_EMBED. Force embedding of GRUB when the argument is
3434 true. Close FILE before returning.
3435 (main): Add support for RAID and LVM.
3437 * conf/common.rmk: Add RAID and LVM modules.
3438 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
3440 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
3442 * kern/misc.c (grub_strstr): New function.
3443 * include/grub/misc.h (grub_strstr): New prototype.
3445 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
3447 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
3449 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
3451 * kern/misc.c (grub_strtoull): Guess the base only if not
3454 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3456 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
3459 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3461 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
3463 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
3464 Remove `flags' argument. All callers changed.
3465 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
3466 (IEEE1275_IHANDLE_INVALID): New variable.
3467 (IEEE1275_CELL_INVALID): New variable.
3468 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3469 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
3470 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
3471 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
3472 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
3473 codes from Open Firmware. All callers updated.
3474 (grub_ieee1275_next_property): Directly return Open Firmware return
3476 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3477 Standardize error checking from `grub_ieee1275_get_property'.
3478 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
3479 `devalias' to `aliases'. Correct comments. Consolidate error paths.
3481 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
3483 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
3484 `instance_to_package_args' to `instance_to_path_args'.
3486 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
3487 `grub_ieee1275_chosen'.
3489 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
3490 `grub_ieee1275_interpret'.
3492 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
3494 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
3496 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
3498 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
3499 (__cmpdi): Likewise.
3501 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
3502 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
3505 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
3507 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
3508 to type `grub_ssize_t'.
3509 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
3511 2006-09-22 Marco Gerards <marco@gnu.org>
3513 * normal/script.c (grub_script_create_cmdmenu): Skip leading
3516 2006-09-22 Marco Gerards <marco@gnu.org>
3518 * commands/echo.c: New file.
3520 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
3522 * conf/common.rmk (echo_mod_SOURCES): New variable.
3523 (echo_mod_CFLAGS): Likewise.
3524 (echo_mod_LDFLAGS): Likewise.
3526 2006-09-22 Marco Gerards <marco@gnu.org>
3528 * normal/main.c (get_line): Malloc memory instead of using
3529 preallocated memory. Removed the arguments `cmdline' and
3530 `max_len'. Updated all callers.
3532 2006-09-22 Marco Gerards <marco@gnu.org>
3534 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
3535 (normal_mod_DEPENDENCIES): Likewise.
3537 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
3538 (normal_mod_DEPENDENCIES): Likewise.
3540 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
3542 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
3544 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
3546 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
3547 (normal_mod_DEPENDENCIES): Likewise.
3548 * conf/i386-pc.mk: Regenerate.
3549 * conf/i386-efi.mk: Likewise
3550 * conf/common.mk: Likewise.
3551 * conf/powerpc-ieee1275.mk: Likewise.
3552 * conf/sparc64-ieee1275.mk: Likewise.
3554 2006-09-22 Robert Millan <rmh@aybabtu.com>
3556 Sync with i386 version.
3557 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
3558 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
3560 2006-09-21 Robert Millan <rmh@aybabtu.com>
3562 Import from GRUB Legacy (lib/device.c):
3563 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
3564 (init_device_map) [__linux__]: Add support for I2O devices.
3566 2006-09-14 Marco Gerards <marco@gnu.org>
3568 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
3571 2006-09-14 Robert Millan <rmh@aybabtu.com>
3573 * util/i386/pc/grub-install.in: Skip menu.lst when removing
3576 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
3578 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
3579 before adding it to device.map.
3581 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
3583 * genmk.rb: Let GCC generate dependenceies the first time it
3584 compiles a file; using the -MD option.
3585 * conf/common.mk: Regenerate.
3586 * conf/i386-pc.mk: Likewise.
3587 * conf/i386-efi.mk: Likewise.
3588 * conf/powerpc-ieee1275.mk: Likewise.
3589 * conf/sparc64-ieee1275.mk: Likewise.
3591 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
3593 Move the prototypes of grub_setjmp and grub_longjmp to
3594 cpu/setjmp.h, so that each architecture may specify different
3597 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
3598 (grub_longjmp): Likewise.
3599 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
3600 (grub_longjmp): Likewise.
3601 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
3602 (grub_longjmp): Likewise.
3604 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
3605 [!GRUB_UTIL] (grub_longjmp): Removed.
3607 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
3609 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
3610 "color!" method does not return any value.
3612 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3614 * include/grub/bitmap.h: New file.
3616 * include/grub/i386/pc/vbeutil.h: Likewise.
3618 * video/bitmap.c: Likewise.
3620 * video/readers/tga.c: Likewise.
3622 * video/i386/pc/vbeutil.c: Likewise.
3624 * commands/videotest.c: Code cleanup and updated to reflect to new
3627 * term/gfxterm.c: Likewise.
3629 * video/video.c: Likewise.
3631 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
3632 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
3633 (bitmap_mod_SOURCES): New entry.
3634 (bitmap_mod_CFLAGS): Likewise.
3635 (bitmap_mod_LDFLAGS): Likewise.
3636 (tga_mod_SOURCES): Likewise.
3637 (tga_mod_CFLAGS): Likewise.
3638 (tga_mod_LDFLAGS): Likewise.
3640 * include/grub/video.h (grub_video_blit_operators): New enum type.
3641 (grub_video_render_target): Changed as forward declaration and moved
3642 actual definition to be video driver specific.
3643 (grub_video_adapter.blit_bitmap): Added blitting operator.
3644 (grub_video_adapter.blit_render_target): Likewise.
3645 (grub_video_blit_bitmap): Likewise.
3646 (grub_video_blit_render_target): Likewise.
3648 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
3649 driver specific render target definition.
3650 (grub_video_vbe_map_rgba): Added driver internal helper.
3651 (grub_video_vbe_unmap_color): Updated to use
3652 grub_video_i386_vbeblit_info.
3653 (grub_video_vbe_get_video_ptr): Likewise.
3655 * include/grub/i386/pc/vbeblit.h
3656 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
3657 grub_video_i386_vbeblit_info.
3658 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3659 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3660 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3661 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3662 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3663 (grub_video_i386_vbeblit_index_index): Likewise.
3664 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
3665 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3666 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3667 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
3669 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
3672 * video/i386/pc/vbeblit.c: Updated to reflect changes on
3673 include/grub/i386/pc/vbeblit.h.
3675 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
3676 Updated to use grub_video_i386_vbeblit_info.
3677 (grub_video_i386_vbefill_R8G8B8): Likewise.
3678 (grub_video_i386_vbefill_index): Likewise.
3679 (grub_video_i386_vbefill): Added generic filler.
3681 * video/i386/pc/vbefill.c: Updated to reflect changes on
3682 include/grub/i386/pc/vbefill.h.
3684 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
3685 grub_video_i386_vbeblit_info.
3686 (grub_video_vbe_unmap_color): Likewise.
3687 (grub_video_vbe_blit_glyph): Likewise.
3688 (grub_video_vbe_scroll): Likewise.
3689 (grub_video_vbe_draw_pixel): Removed function.
3690 (grub_video_vbe_get_pixel): Likewise.
3691 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
3692 updated code to use it.
3693 (common_blitter): Added common blitter for render target and bitmap.
3694 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
3695 (grub_video_vbe_blit_render_target): Likewise.
3697 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
3699 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
3700 is in text mode if there is no console control protocol instance
3703 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3705 * include/grub/video.h: Code cleanup.
3707 * include/grub/i386/pc/vbe.h: Likewise.
3709 * video/i386/pc/vbe.c: Likewise.
3711 * video/i386/pc/vbeblit.c: Likewise.
3713 * video/i386/pc/vbefill.c: Likewise.
3715 * video/video.c: Likewise. Also added more comments.
3717 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3719 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
3720 (struct grub_biosdisk_dap): Likewise.
3722 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
3723 linkage settings for all functions.
3725 2006-07-12 Marco Gerards <marco@gnu.org>
3727 * configure.ac (--enable-mm-debug): Fix typo.
3729 * genkernsyms.sh.in: Use proper quoting for `CC'.
3731 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
3733 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
3734 (normal_mod_ASFLAGS): Remove "-m32".
3736 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
3738 * util/misc.c: Include config.h.
3739 [!HAVE_MEMALIGN]: Do not include malloc.h.
3740 (grub_memalign): Use posix_memalign, if present. Then, use
3741 memalign, if present. Otherwise, emit an error.
3743 * util/grub-emu.c: Do not include malloc.h.
3745 * include/grub/util/misc.h: Include unistd.h. This is required for
3746 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
3747 D. Eades III <hde@foobar-qux.org>.
3749 * configure.ac (AC_GNU_SOURCE): Added.
3750 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
3753 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
3755 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
3756 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
3758 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
3760 * include/grub/types.h (grub_host_addr_t): Rename to
3762 (grub_host_off_t): Rename to grub_target_off_t.
3763 (grub_host_size_t): Rename to grub_target_size_t.
3764 (grub_host_ssize_t): Rename to grub_target_ssize_t.
3765 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
3767 * include/grub/kernel.h (struct grub_module_header): Change type
3768 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
3769 (grub_module_info): Likewise.
3771 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3773 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
3774 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
3775 Velazquez <jesus.velazquez@gmail.com>.
3777 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3779 Count partitions from 1 instead of 0 in the string representation
3780 of partitions. Still use 0-based internally.
3782 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
3783 (sun_partition_map_iterate): Use grub_partition_t instead of
3784 struct grub_partition *. Cast DESC->START_CYLINDER to
3785 grub_uint64_t after converting the endian.
3786 (sun_partition_map_probe): Subtract 1 for PARTNUM.
3787 (sun_partition_map_get_name): Add 1 to P->INDEX.
3789 * partmap/pc.c (grub_partition_parse): Subtract 1 for
3791 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
3793 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
3794 zero instead of one.
3795 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
3796 (gpt_partition_map_get_name): Add 1 into P->INDEX.
3798 * partmap/apple.c (apple_partition_map_iterate): Change the type
3800 (apple_partition_map_probe): Subtract 1 for PARTNUM.
3801 (apple_partition_map_get_name): Add 1 into P->INDEX.
3803 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
3805 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
3806 calculate the offset of a partition.
3807 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
3808 (amiga_partition_map_get_name): Add 1 into P->INDEX.
3810 * partmap/acorn.c (acorn_partition_map_find): Change the type of
3811 SECTOR to grub_disk_addr_t.
3812 (acorn_partition_map_iterate): Likewise.
3813 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
3814 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
3816 (acorn_partition_map_get_name): Add 1 into P->INDEX.
3818 * kern/i386/pc/init.c (make_install_device): Add 1 into
3819 GRUB_INSTALL_DOS_PART.
3821 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
3824 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
3826 Clean up the code to support 64-bit addressing in disks and
3827 files. This change is not enough for filesystems yet.
3829 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
3830 type of "start" to grub_uint64_t.
3831 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
3832 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
3833 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
3836 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
3837 to grub_disk_addr_t.
3839 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
3842 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3844 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
3847 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
3849 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
3851 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
3853 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
3854 to grub_off_t, to detect an error from grub_file_seek.
3855 (grub_multiboot_load_elf32): Likewise.
3857 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
3858 maximum unsigned long value when an overflow is detected.
3859 (grub_strtoull): New function.
3860 (grub_divmod64): Likewise.
3861 (grub_lltoa): use grub_divmod64.
3863 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
3865 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
3866 the pointer to next character. Use grub_strtoull instead of
3868 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
3869 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
3872 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
3873 return value is signed.
3874 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
3875 test if OFFSET is less than zero, as OFFSET is unsigned now.
3877 * kern/disk.c (struct grub_disk_cache): Change the type of
3878 "sector" to grub_disk_addr_t.
3879 (grub_disk_cache_get_index): Change the type of SECTOR to
3880 grub_disk_addr_t. Calculate the hash with SECTOR casted to
3881 unsigned after shifting.
3882 (grub_disk_cache_invalidate): Change the type of SECTOR to
3884 (grub_disk_cache_unlock): Likewise.
3885 (grub_disk_cache_store): Likewise.
3886 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
3887 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
3888 grub_disk_addr_t and grub_uint64_t, respectively.
3889 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
3890 body, as the value of OFFSET is tweaked by
3891 grub_disk_check_range. Change the types of START_SECTOR, LEN and
3892 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
3894 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
3895 body, as the value of OFFSET is tweaked by
3896 grub_disk_check_range. Change the types of LEN and N to
3899 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
3900 and "saved_offset" to grub_off_t.
3901 (test_header): Cast BUF to char *.
3902 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
3904 (grub_gzio_read): Change the types of OFFSET and SIZE to
3905 grub_off_t and grub_size_t, respectively.
3907 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
3909 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
3910 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
3911 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
3912 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
3913 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
3915 * include/grub/types.h (grub_off_t): Unconditionally set to
3917 (grub_disk_addr_t): Changed to grub_uint64_t.
3919 * include/grub/partition.h (struct grub_partition): Change the
3920 types of "start", "len" and "offset" to grub_disk_addr_t,
3921 grub_uint64_t and grub_disk_addr_t, respectively.
3922 (grub_partition_get_start): Return grub_disk_addr_t.
3923 (grub_partition_get_len): Return grub_uint64_t.
3925 * include/grub/misc.h (grub_strtoull): New prototype.
3926 (grub_divmod64): Likewise.
3928 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
3929 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
3930 grub_off_t, respectively.
3931 All callers and references changed.
3933 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
3934 grub_size_t in "read".
3935 All callers and references changed.
3937 * include/grub/file.h (struct grub_file): Change the types of
3938 "offset" and "size" to grub_off_t and grub_off_t,
3939 respectively. Change the type of SECTOR to grub_disk_addr_t in
3941 (grub_file_read): Change the type of LEN to grub_size_t.
3942 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
3944 (grub_file_size): Return grub_off_t.
3945 (grub_file_tell): Likewise.
3946 All callers and references changed.
3948 * include/grub/disk.h (struct grub_disk_dev): Change the types of
3949 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
3951 (struct grub_disk): Change the type of "total_sectors" to
3952 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
3954 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
3955 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
3956 (grub_disk_write): Likewise.
3957 All callers and references changed.
3959 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
3960 char * for grub_strncmp to silence gcc.
3961 (grub_iso9660_mount): Likewise.
3962 (grub_iso9660_mount): Likewise.
3963 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
3965 (grub_iso9660_iterate_dir): Likewise.
3966 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
3968 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
3969 LEN to grub_disk_addr_t and grub_size_t, respectively.
3971 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
3973 * fs/jfs.c (grub_jfs_read_file): Likewise.
3975 * fs/minix.c (grub_jfs_read_file): Likewise.
3977 * fs/sfs.c (grub_jfs_read_file): Likewise.
3979 * fs/ufs.c (grub_jfs_read_file): Likewise.
3981 * fs/xfs.c (grub_jfs_read_file): Likewise.
3983 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
3984 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
3987 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
3988 BLKNR to -1 instead of returning GRUB_ERRNO.
3989 (grub_ext2_read_file): Change the types of SECTOR and
3990 LEN to grub_disk_addr_t and grub_size_t, respectively.
3992 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
3993 LEN to grub_disk_addr_t and grub_size_t, respectively.
3995 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
3998 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
3999 string. Do not cast SECTOR explicitly.
4001 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4002 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4003 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4004 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4005 over 2TB and LBA mode is not supported, raise an error.
4006 (get_safe_sectors): New function.
4007 (grub_biosdisk_read): Use get_safe_sectors.
4008 (grub_biosdisk_write): Likewise.
4010 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4011 (grub_efidisk_write): Likewise.
4013 * disk/loopback.c (delete_loopback): Cosmetic changes.
4014 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4016 (grub_loopback_open): Likewise.
4017 (grub_loopback_read): Likewise. Also, change the type of POS to
4018 grub_off_t, and fix the usage of grub_memset.
4020 * commands/i386/pc/play.c: Include grub/machine/time.h.
4022 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4025 * commands/configfile.c: Include grub/env.h.
4027 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4028 GRUB_ERRNO directly instead. Change the type of POS to
4029 grub_off_t. Follow the coding standard.
4031 * commands/blocklist.c: Include grub/partition.h.
4032 (grub_cmd_blocklist): Return an error if the underlying device is
4033 not a disk. Take the starting sector of a partition into account,
4034 if a partition is used.
4036 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4038 (lba_mode): Support 64-bit addresses.
4039 (chs_mode): Likewise.
4040 (copy_buffer): Adapted to the new offsets of a length field and a
4042 (blocklist_default_start): Allocate 64-bit space.
4044 * boot/i386/pc/boot.S (force_lba): Removed.
4045 (boot_drive): Moved to under KERNEL_SECTOR.
4046 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4048 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4050 (lba_mode): Refactored to support a 64-bit address. More size
4052 (setup_sectors): Likewise.
4054 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4056 * DISTLIST: Added include/grub/i386/linux.h. Removed
4057 include/grub/i386/pc/linux.h
4059 * configure.ac (AC_INIT): Bumped to 1.94.
4061 * config.guess: Updated from gnulib.
4062 * config.sub: Likewise.
4063 * install-sh: Likewise.
4064 * mkinstalldirs: Likewise.
4066 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4068 * conf/common.rmk (grub_modules_init.lst): Depended on
4069 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4072 * genmk.rb (PModule::rule): Reverted the previous change.
4074 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4076 * conf/common.rmk (grub_modules_init.lst): Depends on
4077 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4078 that the target does not exist before producing.
4079 (grub_modules_init.h): Remove the target before generating.
4080 (grub_emu_init.c): Likewise.
4082 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4084 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
4086 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4087 for the target-specific tests. Make sure that we also have the
4088 up-to-date target variables for those tests.
4090 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4092 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4093 (PModule::rule): Likewise.
4095 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4097 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4098 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4099 target-specific flags should be prefixed.
4100 (PModule::rule): Likewise.
4102 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
4104 * configure.ac (CMP): Check if cmp is available explicitly.
4106 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
4108 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
4109 (target_cpu): New variable.
4110 (pkglibdir): Use target_cpu instead of host_cpu.
4112 * util/i386/pc/grub-install.in (host_cpu): Removed.
4113 (target_cpu): New variable.
4114 (pkglibdir): Use target_cpu instead of host_cpu.
4116 * util/genmoddep.c: Removed.
4118 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
4119 instead of GRUB_HOST_SIZEOF_VOID_P.
4120 * kern/dl.c: Likewise.
4122 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
4124 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4125 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4126 (GRUB_TARGET_SIZEOF_LONG): ... this.
4127 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4128 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4129 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4131 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4132 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4133 (GRUB_TARGET_SIZEOF_LONG): ... this.
4134 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4135 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4136 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4138 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4139 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4140 (GRUB_TARGET_SIZEOF_LONG): ... this.
4141 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4142 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4144 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
4145 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
4146 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
4147 instead of GRUB_HOST_SIZEOF_LONG.
4148 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
4149 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
4150 GRUB_CPU_WORDS_BIGENDIAN.
4151 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
4152 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
4155 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
4156 (genmoddep_SOURCES): Likewise.
4157 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
4158 (genmoddep_SOURCES): Likewise.
4159 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
4160 (genmoddep_SOURCES): Likewise.
4161 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
4163 (genmoddep_SOURCES): Likewise.
4165 * genmoddep.awk: New file.
4167 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
4168 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
4169 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
4170 (PModule::rule): Likewise.
4171 (Program::rule): Likewise.
4172 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
4173 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
4176 * configure.ac: Rewritten intensively to use host and target
4177 instead of build and host, respectively.
4179 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
4180 (host_cpu): Removed.
4181 (target_cpu): New variable.
4182 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
4183 (BUILD_CC): Removed.
4184 (BUILD_CFLAGS): Likewise.
4185 (BUILD_CPPFLAGS): Likewise.
4186 (TARGET_CC): New variable.
4187 (TARGET_CFLAGS): Likewise.
4188 (TARGET_CPPFLAGS): Likewise.
4189 (TARGET_LDFLAGS): Likewise.
4191 (include): Use target_cpu instead of host_cpu.
4192 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
4194 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
4196 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
4198 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
4199 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
4200 field 'false' to 'exec_on_false'.
4201 (grub_script_create_cmdif): Renamed argument names to reflect above
4204 * normal/execute.c (grub_script_execute_cmdif): Likewise.
4206 * normal/script.c (grub_script_create_cmdif): Likewise.
4208 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
4210 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
4212 (grub_hfsplus_btree_recptr): Likewise.
4213 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
4214 FILEBLOCK both to pass a block number and store next block
4216 (grub_hfsplus_read_block): Rewritten heavily to support an extent
4217 overflow file correctly. Specify errors appropriately, because
4218 fshelp expects that GRUB_ERRNO is set when fails. Reuse
4219 grub_hfsplus_btree_recptr to get the pointer to a found key.
4220 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
4223 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
4225 (_linux_mod_SOURCES): New variable.
4226 (_linux_mod_CFLAGS): Likewise.
4227 (_linux_mod_LDFLAGS): Likewise.
4228 (linux_mod_SOURCES): Likewise.
4229 (linux_mod_CFLAGS): Likewise.
4230 (linux_mod_LDFLAGS): Likewise.
4232 * DISTLIST: Added loader/i386/efi/linux.c,
4233 loader/i386/efi/linux_normal.c and
4234 include/grub/i386/efi/loader.h.
4236 * loader/i386/efi/linux.c: New file.
4237 * loader/i386/efi/linux_normal.c: Likewise.
4238 * include/grub/i386/efi/loader.h: Likewise.
4240 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
4242 * commands/blocklist.c: New file.
4244 * DISTLIST: Added commands/blocklist.c.
4246 * term/efi/console.c (grub_console_highlight_color): Use a lighter
4247 color for the background, and a darker color for the foreground.
4248 (grub_console_checkkey): Return READ_KEY.
4249 (grub_console_cls): Set the background to
4250 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
4252 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
4254 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
4255 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
4257 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
4260 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
4261 BG. The spec is wrong again.
4263 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
4265 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
4267 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4268 commands/blocklist.c.
4269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4271 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
4272 (blocklist_mod_SOURCES): New variable.
4273 (blocklist_mod_CFLAGS): Likewise.
4274 (blocklist_mod_LDFLAGS): Likewise.
4276 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
4278 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
4280 (lba_mode): Use %eax more intensively to reduce the code size.
4282 2006-05-20 Marco Gerards <marco@gnu.org>
4284 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
4286 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
4288 (script): Accept leading newlines.
4289 (newlines): New rule to describe 0 or more newlines.
4290 (commands): Accept `command' with trailing newline. Fixed the
4291 order in which arguments were passed to `grub_script_add_cmd'.
4292 Accept commands separated by newlines.
4293 (function): Changed to accept newlines.
4294 (menuentry) Rewritten.
4296 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
4297 front of the list, instead of to the end.
4299 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
4301 * util/i386/pc/grub-install.in (bindir): New variable.
4302 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
4303 Shaver <lbgwjl@gmail.com>.
4305 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
4307 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4308 grub/machine/linux.h
4309 * loader/i386/pc/linux.c: Likewise.
4311 * include/grub/i386/pc/linux.h: Moved to ...
4312 * include/grub/i386/linux.h: ... here.
4314 * include/grub/i386/linux.h (struct linux_kernel_params): New
4317 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
4319 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
4321 (grub_video_vbe_blit_glyph): Likewise.
4322 (grub_video_vbe_blit_bitmap): Likewise.
4323 (grub_video_vbe_blit_render_target): Likewise.
4325 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
4327 * configure.ac (--with-platform): Properly quote the square
4330 2006-05-08 Marco Gerards <marco@gnu.org>
4332 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
4334 (kernel_elf_HEADERS): ...to this. Updated all users.
4335 (grubof_symlist.c): Renamed from this...
4336 (kernel_elf_symlist.c): ...to this. Updated all users.
4337 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4338 (grubof_SOURCES): Renamed from this...
4339 (kernel_elf_SOURCES): ...to this.
4340 (grubof_HEADERS): Renamed from this...
4341 (kernel_elf_HEADERS): ...to this.
4342 (grubof_CFLAGS): Renamed from this...
4343 (kernel_elf_CFLAGS): ...to this.
4344 (grubof_ASFLAGS): Renamed from this...
4345 (kernel_elf_ASFLAGS): ...to this.
4346 (grubof_LDFLAGS): Renamed from this...
4347 (kernel_elf_LDFLAGS): ...to this.
4349 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
4351 (kernel_elf_HEADERS): ...to this. Updated all users.
4352 (grubof_symlist.c): Renamed from this...
4353 (kernel_elf_symlist.c): ...to this. Updated all users.
4354 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4355 (grubof_SOURCES): Renamed from this...
4356 (kernel_elf_SOURCES): ...to this.
4357 (grubof_HEADERS): Renamed from this...
4358 (kernel_elf_HEADERS): ...to this.
4359 (grubof_CFLAGS): Renamed from this...
4360 (kernel_elf_CFLAGS): ...to this.
4361 (grubof_ASFLAGS): Renamed from this...
4362 (kernel_elf_ASFLAGS): ...to this.
4363 (grubof_LDFLAGS): Renamed from this...
4364 (kernel_elf_LDFLAGS): ...to this.
4366 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
4367 `kernel.elf' instead of `grubof'.
4369 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
4371 Add --with-platform to configure. Use pkglibdir instead of
4372 pkgdatadir. This is reported by Roger Leigh.
4374 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
4375 (host_vendor): Likewise.
4376 (host_os): Likewise.
4377 (pkgdatadir): Likewise.
4378 (platform): New variable.
4379 (pkglibdir): Likewise.
4380 Use PKGLIBDIR instead of PKGDATADIR.
4382 * util/i386/pc/grub-install.in (datadir): Removed.
4383 (host_vendor): Likewise.
4384 (host_os): Likewise.
4385 (pkgdatadir): Likewise.
4386 (platform): New variable.
4387 (pkglibdir): Likewise.
4388 Use PKGLIBDIR instead of PKGDATADIR.
4390 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
4391 instead of GRUB_DATADIR.
4393 * util/i386/pc/grub-mkimage.c (usage): Likewise.
4395 * util/i386/efi/grub-mkimage.c (usage): Likewise.
4398 * configure.ac (--with-platform): New option.
4399 Use PLATFORM instead of HOST_VENDOR to specify a platform.
4401 * Makefile.in: Include a makefile based on PLATFORM instead of
4403 (pkgdatadir): Not appended by the machine type.
4404 (pkglibdir): Appended by the machine type.
4405 (host_vendor): Removed.
4406 (platform): New variable.
4407 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
4408 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
4409 (uninstall): Likewise.
4411 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
4413 Use the environment context in the menu. Remove the commands
4414 "default" and "timeout", and use variables instead.
4416 * normal/menu.c: Include grub/env.h.
4417 (print_entry): Cast TITLE to silence gcc.
4418 (get_timeout): New function.
4419 (set_timeout): Likewise.
4420 (get_entry_number): Likewise.
4421 (run_menu): Use a default entry, a fallback entry and a timeout
4422 in the environment variables "default", "fallback" and
4423 "timeout". Also, tweak the default entry if it is not within the
4424 current menu entries.
4425 (grub_menu_run): Use a fallback entry in the environment variable
4428 * normal/main.c (read_config_file): Do not initialize
4429 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
4431 (grub_normal_execute): Use a data slot to store the menu.
4433 * include/grub/normal.h (struct grub_menu): Removed default_entry,
4434 fallback_entry and timeout.
4435 (struct grub_menu_list): Removed.
4436 (grub_menu_list_t): Likewise.
4437 (struct grub_context): Likewise.
4438 (grub_context_t): Likewise.
4439 (grub_context_get): Likewise.
4440 (grub_context_get_current_menu): Likewise.
4441 (grub_context_push_menu): Likewise.
4442 (grub_context_pop_menu): Likewise.
4443 (grub_default_init): Likewise.
4444 (grub_default_fini): Likewise.
4445 (grub_timeout_init): Likewise.
4446 (grub_timeout_fini): Likewise.
4448 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
4450 (normal_mod_SOURCES): Removed normal/context.c.
4452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
4453 commands/default.c, commands/timeout.c and normal/context.c.
4454 (normal_mod_SOURCES): Removed normal/context.c.
4456 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
4457 commands/timeout.c and normal/context.c.
4458 (normal_mod_SOURCES): Removed normal/context.c.
4460 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
4461 commands/default.c, commands/timeout.c and normal/context.c.
4462 (normal_mod_SOURCES): Removed normal/context.c.
4464 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
4466 (default_mod_SOURCES): Removed.
4467 (default_mod_CFLAGS): Likewise.
4468 (default_mod_LDFLAGS): Likewise.
4469 (timeout_mod_SOURCES): Removed.
4470 (timeout_mod_CFLAGS): Likewise.
4471 (timeout_mod_LDFLAGS): Likewise.
4473 * DISTLIST: Removed commands/default.c, commands/timeout.c and
4476 * commands/default.c: Removed.
4477 * commands/timeout.c: Likewise.
4478 * normal/context.c: Likewise.
4480 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
4482 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
4484 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
4486 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
4487 "next" to "prev" for readability.
4488 (struct grub_env_sorted_var): New struct.
4489 (grub_env_context): Renamed to ...
4490 (initial_context): ... this.
4491 (grub_env_var_context): Renamed to ...
4492 (current_context): ... this.
4493 (grub_env_find): Look only at CURRENT_CONTEXT.
4494 (grub_env_context_open): Rewritten to copy exported variables from
4496 (grub_env_context_close): Rewritten according to the new
4497 scheme. Also, add an assertion to prevent the initial context from
4499 (grub_env_insert): Removed the code for the sorted list.
4500 (grub_env_remove): Likewise.
4501 (grub_env_export): Simply mark the variable with
4502 GRUB_ENV_VAR_GLOBAL.
4503 (grub_env_set): A cosmetic change for naming consistency.
4504 (grub_env_get): Likewise.
4505 (grub_env_unset): Likewise.
4506 (grub_env_iterate): Rewritten to sort variables within this
4508 (grub_register_variable_hook): Fixed for naming consistency. Call
4509 grub_env_find again, only if NAME is not found at the first time.
4510 (mangle_data_slot_name): New function.
4511 (grub_env_set_data_slot): Likewise.
4512 (grub_env_get_data_slot): Likewise.
4513 (grub_env_unset_data_slot): Likewise.
4515 * include/grub/env.h (grub_env_var_type): New enum.
4516 (GRUB_ENV_VAR_LOCAL): New constant.
4517 (GRUB_ENV_VAR_GLOBAL): Likewise.
4518 (GRUB_ENV_VAR_DATA): Likewise.
4519 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
4521 (grub_env_set): Replace VAR with NAME for consistency.
4522 (grub_register_variable_hook): Likewise.
4523 (grub_env_export): Specify the name of the argument.
4524 (grub_env_set_data_slot): New prototype.
4525 (grub_env_get_data_slot): Likewise.
4526 (grub_env_unset_data_slot): Likewise.
4528 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4530 Extend the loader so that GRUB can accept a loader which comes
4531 back to GRUB when a loaded image exits. Also, this change adds
4532 support for a chainloader on EFI.
4534 * term/efi/console.c: Include grub/misc.h.
4535 (grub_console_checkkey): Display a scan code on the top for
4536 debugging. This will be removed once the EFI port gets stable.
4537 Correct the scan code mapping.
4539 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
4540 allocate memory from larger regions, in order to reduce the number
4541 of allocated regions. Otherwise, the MacOSX loader panics.
4542 (filter_memory_map): Avoid less than 1MB for compatibility with
4544 (add_memory_regions): Allocate from the tail of a region, if
4545 possible, to avoid allocating a region near to 1MB, for the MacOSX
4548 * kern/efi/init.c (grub_efi_set_prefix): Specify
4549 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
4551 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
4552 argument IMAGE_HANDLE and specify it to get a loaded image.
4553 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
4554 grub_efi_get_loaded_image.
4555 (grub_efi_get_filename): Divide the legnth by the size of
4557 (grub_efi_get_device_path): New function.
4558 (grub_efi_print_device_path): Print End Device Path nodes. Divide
4559 the length by the size of grub_efi_char16_t for a file path device
4562 * kern/loader.c (grub_loader_noreturn): New variable.
4563 (grub_loader_set): Accept a new argument NORETURN. Set
4564 GRUB_LOADER_NORETURN to NORETURN.
4565 All callers changed.
4566 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
4569 * include/grub/efi/efi.h (grub_efi_get_device_path): New
4571 (grub_efi_get_loaded_image): Take an argument to specify an image
4574 * include/grub/loader.h (grub_loader_set): Added one more argument
4577 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
4578 instead of grub_efi_open_protocol.
4579 (grub_efidisk_get_device_name): Likewise.
4580 (grub_efidisk_close): Print a newline.
4581 (grub_efidisk_get_device_handle): Fixed to use
4582 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
4583 GRUB_EFI_DEVICE_PATH_TYPE.
4585 * disk/efi/efidisk.c (device_path_guid): Moved to ...
4586 * kern/efi/efi.c (device_path_guid): ... here.
4588 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
4590 (kernel_mod_HEADERS): Added efi/disk.h.
4591 (_chain_mod_SOURCES): New variable.
4592 (_chain_mod_CFLAGS): Likewise.
4593 (_chain_mod_LDFLAGS): Likewise.
4594 (chain_mod_SOURCES): Likewise.
4595 (chain_mod_CFLAGS): Likewise.
4596 (chain_mod_LDFLAGS): Likewise.
4598 * DISTLIST: Added include/grub/efi/chainloader.h,
4599 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
4601 * include/grub/efi/chainloader.h: New file.
4602 * loader/efi/chainloader.c: Likewise.
4603 * loader/efi/chainloader_normal.c: Likewise.
4605 2006-04-30 Marco Gerards <marco@gnu.org>
4607 * commands/configfile.c (grub_cmd_source): New function.
4608 (GRUB_MOD_INIT): Register the commands `source' and `.'.
4609 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
4611 2006-04-30 Marco Gerards <marco@gnu.org>
4613 * normal/execute.c (grub_script_execute_cmd): Change the return
4614 type to `grub_err_t'. Correctly return the error.
4615 (grub_script_execute_cmdline): In case a command line is not a
4616 command or a function, try to interpret it as an assignment.
4618 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4620 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
4621 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
4622 skip a node whose name is obviously invalid as UTF-16,
4623 i.e. contains a NUL character. Stop the iteration when the last
4624 directory entry is found. Instead of using the return value of
4625 grub_hfsplus_btree_iterate_node, store the value in RET and use
4626 it, because the iterator can be stopped by the last directory
4629 2006-04-30 Marco Gerards <marco@gnu.org>
4631 * include/grub/env.h (grub_env_export): New prototype. Reported
4632 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
4634 2006-04-30 Marco Gerards <marco@gnu.org>
4636 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
4637 size of the extents in a catalog file record.
4639 2006-04-29 Marco Gerards <marco@gnu.org>
4641 * commands/configfile.c (grub_cmd_configfile): Execute the
4642 configfile within its own context.
4644 * include/grub/env.h (grub_env_context_open): New prototype.
4645 (grub_env_context_close): Likewise.
4647 * kern/env.c (grub_env): Removed.
4648 (grub_env_sorted): Likewise.
4649 (grub_env_context): New variable.
4650 (grub_env_var_context): Likewise.
4651 (grub_env_find): Search both the active context and the global
4653 (grub_env_context_open): New function.
4654 (grub_env_context_close): Likewise.
4655 (grub_env_insert): Likewise.
4656 (grub_env_remove): Likewise.
4657 (grub_env_export): Likewise.
4658 (grub_env_set): Changed to use helper functions to avoid code
4660 (grub_env_iterate): Rewritten so both the current context and the
4661 global context are being used.
4663 * normal/command.c (export_command): New function.
4664 (grub_command_init): Register the `export' function.
4666 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
4668 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
4669 explicitly to suppress gcc's warnings.
4670 * fs/fat.c (grub_fat_find_dir): Likewise.
4671 (grub_fat_label): Likewise.
4672 * fs/xfs.c (grub_xfs_read_inode): Likewise.
4673 (grub_xfs_mount): Likewise.
4674 (grub_xfs_label): Likewise.
4675 * fs/affs.c (grub_affs_mount): Likewise.
4676 (grub_affs_label): Likewise.
4677 (grub_affs_iterate_dir): Likewise.
4678 * fs/sfs.c (grub_sfs_mount): Likewise.
4679 (grub_sfs_iterate_dir): Likewise.
4680 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
4681 * fs/hfs.c (grub_hfs_mount): Likewise.
4682 (grub_hfs_cmp_catkeys): Likewise.
4683 (grub_hfs_find_dir): Likewise.
4684 (grub_hfs_dir): Likewise.
4685 (grub_hfs_label): Likewise.
4686 * fs/jfs.c (grub_jfs_mount): Likewise.
4687 (grub_jfs_opendir): Likewise.
4688 (grub_jfs_getent): Likewise.
4689 (grub_jfs_lookup_symlink): Likewise.
4690 (grub_jfs_label): Likewise.
4691 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
4692 (grub_hfsplus_iterate_dir): Likewise.
4693 (grub_hfsplus_btree_iterate_node): Made static.
4695 * util/grub-emu.c (prefix): New variable.
4696 (grub_machine_set_prefix): New function.
4697 (main): Do not set the environment variable "prefix" here. Only
4698 set PREFIX, which is used later by grub_machine_set_prefix.
4700 * include/grub/video.h: Do not include grub/symbol.h.
4701 (grub_video_register): Not exported. This symbol is not defined in
4703 (grub_video_unregister): Likewise.
4704 (grub_video_iterate): Likewise.
4705 (grub_video_setup): Likewise.
4706 (grub_video_restore): Likewise.
4707 (grub_video_get_info): Likewise.
4708 (grub_video_get_blit_format): Likewise.
4709 (grub_video_set_palette): Likewise.
4710 (grub_video_get_palette): Likewise.
4711 (grub_video_set_viewport): Likewise.
4712 (grub_video_get_viewport): Likewise.
4713 (grub_video_map_color): Likewise.
4714 (grub_video_map_rgb): Likewise.
4715 (grub_video_map_rgba): Likewise.
4716 (grub_video_fill_rect): Likewise.
4717 (grub_video_blit_glyph): Likewise.
4718 (grub_video_blit_bitmap): Likewise.
4719 (grub_video_blit_render_target): Likewise.
4720 (grub_video_scroll): Likewise.
4721 (grub_video_swap_buffers): Likewise.
4722 (grub_video_create_render_target): Likewise.
4723 (grub_video_delete_render_target): Likewise.
4724 (grub_video_set_active_render_target): Likewise.
4726 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
4728 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
4730 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
4731 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4732 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4733 instead of $(srcdir)/genkernsyms.sh.
4735 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
4736 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4737 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4738 instead of $(srcdir)/genkernsyms.sh.
4740 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
4741 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4742 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4743 instead of $(srcdir)/genkernsyms.sh.
4745 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
4746 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4747 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4748 instead of $(srcdir)/genkernsyms.sh.
4750 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
4753 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
4755 (gensymlist.sh): New target.
4756 (genkernsyms.sh): Likewise.
4758 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
4759 genkernsyms.sh.in and gensymlist.sh.in.
4761 * genkernsyms.sh: Removed.
4762 * gensymlist.sh: Likewise.
4764 * genkernsyms.sh.in: New file.
4765 * gensymlist.sh.in: Likewise.
4767 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4769 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
4770 clobber "prefix", since we may have already set it manually.
4772 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4774 * kern/misc.c (abort): New alias for grub_abort.
4776 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
4778 A new machine-specific function "grub_machine_set_prefix" is
4779 defined. This is called after loading modules, so that a prefix
4780 initialization can use modules. Also, this change adds an
4781 intensive debugging feature for the memory manager via the
4782 configure option "--enable-mm-debug".
4784 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
4787 * kern/sparc64/ieee1275/init.c (abort): Removed.
4788 (grub_stop): Likewise.
4789 (grub_exit): New function.
4790 (grub_set_prefix): Renamed to ...
4791 (grub_machine_set_prefix): ... this.
4792 (grub_machine_init): Do not call grub_set_prefix.
4794 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
4795 (grub_machine_set_prefix): ... this.
4796 (grub_machine_init): Do not call grub_set_prefix.
4798 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
4799 (grub_machine_init): Do not set the prefix here.
4801 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
4803 * kern/efi/init.c: Include grub/mm.h.
4804 (grub_efi_set_prefix): New function.
4806 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
4807 (grub_efi_get_filename): New function.
4808 (grub_print_device_path): Renamed to ...
4809 (grub_efi_print_device_path): ... this.
4811 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
4812 [MM_DEBUG] (grub_realloc): Likewise.
4813 [MM_DEBUG] (grub_free): Likewise.
4814 [MM_DEBUG] (grub_memalign): Likewise.
4815 [MM_DEBUG] (grub_mm_debug): New variable.
4816 [MM_DEBUG] (grub_debug_malloc): New function.
4817 [MM_DEBUG] (grub_debug_free): New function.
4818 [MM_DEBUG] (grub_debug_realloc): New function.
4819 [MM_DEBUG] (grub_debug_memalign): New function.
4821 * kern/misc.c (grub_abort): Print a newline to distinguish
4824 * kern/main.c (grub_main): Call grub_machine_set_prefix and
4825 grub_set_root_dev after loading modules. This is necessary when
4826 setting a prefix depends on modules.
4828 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
4829 (grub_efi_print_device_path): ... this.
4830 (grub_efi_get_filename): New prototype.
4831 (grub_efi_set_prefix): Likewise.
4833 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
4835 (grub_efidisk_get_device_handle): New prototype.
4836 (grub_efidisk_get_device_name): Likewise.
4838 * include/grub/mm.h: Include config.h.
4839 (MM_DEBUG): Removed.
4840 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
4841 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
4842 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
4843 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
4844 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
4845 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
4846 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
4847 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
4848 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
4850 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
4852 * disk/efi/efidisk.c: Include grub/partition.h.
4853 (iterate_child_devices): New function.
4854 (add_device): First, compare only last device path nodes, so that
4855 devices are sorted by the types.
4856 (grub_efidisk_get_device_handle): New function.
4857 (grub_efidisk_get_device_name): Likewise.
4859 * configure.ac (--enable-mm-debug): New option to enable the
4860 memory manager debugging feature. This makes the binary much
4861 bigger, so is disabled by default.
4863 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
4865 Use grub_abort instead of grub_stop, and grub_exit must be
4866 define in each architecture now. Also, this change adds support
4869 * util/i386/pc/grub-probefs.c: Include grub/term.h.
4870 (grub_getkey): New function.
4871 (grub_term_get_current): Likewise.
4873 * util/i386/pc/grub-setup.c: Include grub/term.h.
4874 (grub_getkey): New function.
4875 (grub_term_get_current): Likewise.
4877 * util/misc.c (grub_stop): Renamed to ...
4878 (grub_exit): ... this.
4880 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
4881 (grub_exit): ... this.
4882 (grub_machine_init): Use grub_abort instead of abort.
4883 (grub_stop): Removed.
4885 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
4888 * kern/i386/pc/startup.S (grub_exit): New function.
4889 (cold_reboot): New label.
4891 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
4892 (grub_efi_init): Call grub_efidisk_init.
4893 (grub_efi_fini): Call grub_efidisk_fini.
4895 * kern/efi/efi.c: Include grub/mm.h.
4896 (grub_efi_console_control_guid): Renamed to ...
4897 (console_control_guid): ... this.
4898 (grub_efi_loaded_image_guid): Renamed to ...
4899 (loaded_image_guid): ... this.
4900 (grub_efi_locate_handle): New function.
4901 (grub_efi_open_protocol): Likewise.
4902 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
4903 GRUB_EFI_CONSOLE_CONTROL_GUID.
4904 (grub_efi_exit): Removed.
4905 (grub_stop): Likewise.
4906 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
4907 (grub_exit): New function.
4908 (grub_print_device_path): Likewise.
4910 * kern/rescue.c (grub_rescue_cmd_exit): New function.
4911 (grub_enter_rescue_mode): Register "exit".
4913 * kern/misc.c (grub_real_dprintf): A cosmetic change.
4914 (grub_abort): New function.
4916 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
4918 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
4920 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
4922 * include/grub/efi/efi.h (grub_efi_exit): Removed.
4923 (grub_print_device_path): New prototype.
4924 (grub_efi_locate_handle): Likewise.
4925 (grub_efi_open_protocol): Likewise.
4927 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
4928 * disk/efi/efidisk.c: Likewise.
4930 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
4932 * include/grub/efi/console_control.h
4933 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
4935 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
4936 last 8 bytes as an array.
4937 (GRUB_EFI_DISK_IO_GUID): New macro.
4938 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
4939 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
4940 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
4942 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
4943 (struct grub_efi_device_path): Rename the member "sub_type" to
4945 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
4946 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
4947 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
4948 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
4949 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
4950 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
4951 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
4952 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
4953 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
4954 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
4955 (struct grub_efi_pci_device_path): New structure.
4956 (grub_efi_pci_device_path_t): New type.
4957 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
4958 (struct grub_efi_pccard_device_path): New structure.
4959 (grub_efi_pccard_device_path_t): New type.
4960 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
4961 (struct grub_efi_memory_mapped_device_path): New structure.
4962 (grub_efi_memory_mapped_device_path_t): New type.
4963 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
4964 (struct grub_efi_vendor_device_path): New structure.
4965 (grub_efi_vendor_device_path_t): New type.
4966 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
4967 (struct grub_efi_controller_device_path): New structure.
4968 (grub_efi_controller_device_path_t): New type.
4969 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
4970 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
4971 (struct grub_efi_acpi_device_path): New structure.
4972 (grub_efi_acpi_device_path_t): New type.
4973 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
4974 (struct grub_efi_expanded_acpi_device_path): New structure.
4975 (grub_efi_expanded_acpi_device_path_t): New type.
4976 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
4977 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
4978 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
4979 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
4980 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
4981 (struct grub_efi_atapi_device_path): New structure.
4982 (grub_efi_atapi_device_path_t): New type.
4983 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
4984 (struct grub_efi_fibre_channel_device_path): New structure.
4985 (grub_efi_fibre_channel_device_path_t): New type.
4986 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
4987 (struct grub_efi_1394_device_path): New structure.
4988 (grub_efi_1394_device_path_t): New type.
4989 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
4990 (struct grub_efi_usb_device_path): New structure.
4991 (grub_efi_usb_device_path_t): New type.
4992 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
4993 (struct grub_efi_usb_class_device_path): New structure.
4994 (grub_efi_usb_class_device_path_t): New type.
4995 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
4996 (struct grub_efi_i2o_device_path): New structure.
4997 (grub_efi_i2o_device_path_t): New type.
4998 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
4999 (struct grub_efi_mac_address_device_path): New structure.
5000 (grub_efi_mac_address_device_path_t): New type.
5001 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5002 (struct grub_efi_ipv4_device_path): New structure.
5003 (grub_efi_ipv4_device_path_t): New type.
5004 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5005 (struct grub_efi_ipv6_device_path): New structure.
5006 (grub_efi_ipv6_device_path_t): New type.
5007 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5008 (struct grub_efi_infiniband_device_path): New structure.
5009 (grub_efi_infiniband_device_path_t): New type.
5010 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5011 (struct grub_efi_uart_device_path): New structure.
5012 (grub_efi_uart_device_path_t): New type.
5013 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5014 (struct grub_efi_vendor_messaging_device_path): New structure.
5015 (grub_efi_vendor_messaging_device_path_t): New type.
5016 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5017 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5018 (struct grub_efi_hard_drive_device_path): New structure.
5019 (grub_efi_hard_drive_device_path_t): New type.
5020 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5021 (struct grub_efi_cdrom_device_path): New structure.
5022 (grub_efi_cdrom_device_path_t): New type.
5023 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5024 (struct grub_efi_vendor_media_device_path): New structure.
5025 (grub_efi_vendor_media_device_path_t): New type.
5026 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5027 (struct grub_efi_file_path_device_path): New structure.
5028 (grub_efi_file_path_device_path_t): New type.
5029 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5030 (struct grub_efi_protocol_device_path): New structure.
5031 (grub_efi_protocol_device_path_t): New type.
5032 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5033 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5034 (struct grub_efi_bios_device_path): New structure.
5035 (grub_efi_bios_device_path_t): New type.
5036 (struct grub_efi_disk_io): New structure.
5037 (grub_efi_disk_io_t): New type.
5038 (struct grub_efi_block_io_media): New structure.
5039 (grub_efi_block_io_media_t): New type.
5040 (struct grub_efi_block_io): New structure.
5041 (grub_efi_block_io_t): New type.
5043 * include/grub/misc.h (grub_stop): Removed.
5044 (grub_exit): New prototype.
5045 (grub_abort): Likewise.
5047 * include/grub/disk.h (enum grub_disk_dev_id): Added
5048 GRUB_DISK_DEVICE_EFIDISK_ID.
5050 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5052 (kernel_syms.lst): Remove the target if an error occurs.
5054 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
5056 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5057 as it was simply too buggy.
5059 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
5061 * kern/misc.c (grub_lltoa): New function.
5062 (grub_vsprintf): Added support for the long long suffix,
5065 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
5067 * Makefile.in (LDFLAGS): Add variable.
5068 (LD): Remove variable.
5069 * configure.ac: Add -m32 to LDFLAGS.
5070 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5071 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5072 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5073 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5074 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5076 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5077 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5078 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5080 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
5082 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5083 length for unknown glyph.
5085 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5087 Add support for pre-loaded modules into the EFI port.
5089 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5090 completely. Accept one more argument DIR. The caller has changed.
5092 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5094 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5095 (grub_efi_loaded_image_guid): New variable.
5096 (grub_efi_get_loaded_image): New function.
5097 (grub_arch_modules_addr): Likewise.
5099 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5102 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5103 (struct grub_efi_loaded_image): New structure.
5104 (grub_efi_loaded_image_t): New type.
5106 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5108 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
5109 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
5110 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
5112 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
5114 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
5116 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
5118 * DISTLIST: Added include/grub/efi/console.h,
5119 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
5120 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5122 * include/grub/efi/console.h: New file.
5123 * include/grub/efi/time.h: Likewise.
5124 * include/grub/i386/efi/kernel.h: Likewise.
5125 * kern/efi/init.c: Likewise.
5126 * kern/efi/mm.c: Likewise.
5127 * term/efi/console.c: Likewise.
5129 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
5130 (grub_stop): Removed.
5131 (grub_get_rtc): Likewise.
5132 (grub_machine_init): Simply call grub_efi_init.
5133 (grub_machine_fini): Call grub_efi_fini.
5135 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
5136 (grub_efi_output_string): Removed.
5137 (grub_efi_stall): New function.
5138 (grub_stop): Likewise.
5139 (grub_get_rtc): Likewise.
5141 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
5142 (grub_efi_stall): New prototype.
5143 (grub_efi_allocate_pages): Likewise.
5144 (grub_efi_free_pages): Likewise.
5145 (grub_efi_get_memory_map): Likewise.
5146 (grub_efi_mm_init): Likewise.
5147 (grub_efi_mm_fini): Likewise.
5148 (grub_efi_init): Likewise.
5149 (grub_efi_fini): Likewise.
5151 * include/grub/i386/efi/time.h: Do not include
5152 grub/symbol.h. Include grub/efi/time.h.
5153 (GRUB_TICKS_PER_SECOND): Removed.
5154 (grub_get_rtc): Likewise.
5156 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
5157 Added padding. The EFI spec is buggy.
5158 (GRUB_EFI_BLACK): New macro.
5159 (GRUB_EFI_BLUE): Likewise.
5160 (GRUB_EFI_GREEN): Likewise.
5161 (GRUB_EFI_CYAN): Likewise.
5162 (GRUB_EFI_RED): Likewise.
5163 (GRUB_EFI_MAGENTA): Likewise.
5164 (GRUB_EFI_BROWN): Likewise.
5165 (GRUB_EFI_LIGHTGRAY): Likewise.
5166 (GRUB_EFI_BRIGHT): Likewise.
5167 (GRUB_EFI_DARKGRAY): Likewise.
5168 (GRUB_EFI_LIGHTBLUE): Likewise.
5169 (GRUB_EFI_LIGHTGREEN): Likewise.
5170 (GRUB_EFI_LIGHTCYAN): Likewise.
5171 (GRUB_EFI_LIGHTRED): Likewise.
5172 (GRUB_EFI_LIGHTMAGENTA): Likewise.
5173 (GRUB_EFI_YELLOW): Likewise.
5174 (GRUB_EFI_WHITE): Likewise.
5175 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
5176 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
5177 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
5178 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
5179 (GRUB_EFI_BACKGROUND_RED): Likewise.
5180 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
5181 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
5182 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
5183 (GRUB_EFI_TEXT_ATTR): Likewise.
5185 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
5186 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5187 (kernel_mod_HEADERS): Added efi/time.h.
5189 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
5191 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
5192 include/grub/efi/api.h, include/grub/efi/console_control.h,
5193 include/grub/efi/efi.h, include/grub/efi/pe32.h,
5194 include/grub/i386/efi/time.h, kern/efi/efi.c,
5195 kern/i386/efi/init.c, kern/i386/efi/startup.S,
5196 and util/i386/efi/grub-mkimage.c.
5198 * Makefile.in (RMKFILES): Added i386-efi.rmk.
5200 * genmk.rb (PModule#rule): Do not export symbols if
5201 #{prefix}_EXPORTS is set to "no".
5203 * conf/i386-efi.mk: New file.
5204 * conf/i386-efi.rmk: Likewise.
5205 * include/grub/efi/api.h: Likewise.
5206 * include/grub/efi/console_control.h: Likewise.
5207 * include/grub/efi/efi.h: Likewise.
5208 * include/grub/efi/pe32.h: Likewise.
5209 * include/grub/i386/efi/time.h: Likewise.
5210 * kern/efi/efi.c: Likewise.
5211 * kern/i386/efi/init.c: Likewise.
5212 * kern/i386/efi/startup.S: Likewise.
5213 * util/i386/efi/grub-mkimage.c: Likewise.
5215 2006-04-17 Marco Gerards <marco@gnu.org>
5217 * include/grub/script.h: Include <grub/parser.h> and
5218 "grub_script.tab.h".
5219 (struct grub_lexer_param): New struct.
5220 (struct grub_parser_param): Likewise.
5221 (grub_script_create_arglist): Pass the state in an argument.
5222 (grub_script_add_arglist): Likewise.
5223 (grub_script_create_cmdline): Likewise.
5224 (grub_script_create_cmdblock): Likewise.
5225 (grub_script_create_cmdif): Likewise.
5226 (grub_script_create_cmdmenu): Likewise.
5227 (grub_script_add_cmd): Likewise.
5228 (grub_script_arg_add): Likewise.
5229 (grub_script_lexer_ref): Likewise.
5230 (grub_script_lexer_deref): Likewise.
5231 (grub_script_lexer_record_start): Likewise.
5232 (grub_script_lexer_record_stop): Likewise.
5233 (grub_script_mem_record): Likewise.
5234 (grub_script_mem_record_stop): Likewise.
5235 (grub_script_malloc): Likewise.
5236 (grub_script_yylex): Likewise.
5237 (grub_script_yyparse): Likewise.
5238 (grub_script_yyerror): Likewise.
5239 (grub_script_yylex): Likewise.
5240 (grub_script_lexer_init): Return the state.
5242 * normal/lexer.c (grub_script_lexer_state): Removed variable.
5243 (grub_script_lexer_done): Likewise.
5244 (grub_script_lexer_getline): Likewise.
5245 (grub_script_lexer_refs): Likewise.
5247 (newscript): Likewise.
5249 (recording): Likewise.
5250 (recordpos): Likewise.
5251 (recordlen): Likewise.
5252 (grub_script_lexer_init): Return the state instead of setting
5254 (grub_script_lexer_ref): Use the newly added argument for state
5256 (grub_script_lexer_deref): Likewise.
5257 (grub_script_lexer_record_start): Likewise.
5258 (grub_script_lexer_record_stop): Likewise.
5259 (recordchar): Likewise.
5260 (nextchar): Likewise.
5261 (grub_script_yylex2): Likewise.
5262 (grub_script_yylex): Likewise.
5263 (grub_script_yyerror): Likewise.
5265 * normal/parser.y (func_mem): Removed variable.
5266 (menu_entry): Likewise.
5268 (%lex-param): New parser option.
5269 (%parse-param): Likewise.
5270 (script): Always return the AST.
5271 (argument): Pass the state around.
5272 (arguments): Likewise.
5273 (grubcmd): Likewise.
5274 (commands): Likewise.
5275 (function): Likewise.
5276 (menuentry): Likewise.
5277 (if_statement): Likewise.
5280 * normal/script.c (grub_script_memused): Removed variable.
5281 (grub_script_parsed): Likewise.
5282 (grub_script_malloc): Added a state argument. Use that instead of
5284 (grub_script_mem_record): Likewise.
5285 (grub_script_mem_record_stop): Likewise.
5286 (grub_script_arg_add): Likewise.
5287 (grub_script_add_arglist): Likewise.
5288 (grub_script_create_cmdline): Likewise.
5289 (grub_script_create_cmdif): Likewise.
5290 (grub_script_create_cmdmenu): Likewise.
5291 (grub_script_add_cmd): Likewise.
5292 (grub_script_parse): Setup the state before calling the parser.
5294 2006-04-16 Marco Gerards <marco@gnu.org>
5296 * normal/command.c (grub_command_init): Remove the title command.
5298 * normal/lexer.c (grub_script_yylex): Renamed from this...
5299 (grub_script_yylex2): ... to this.
5300 (grub_script_yylex): New function. Temporary
5301 introduced to filter some tokens.
5302 (grub_script_yyerror): Print a newline.
5304 * normal/main.c (read_config_file): Output information about the
5305 lines that contain errors. Wait for a key after all lines have
5306 been processed. Don't return an empty menu.
5308 * normal/parser.y (func_mem): Don't initialize.
5309 (menu_entry): Likewise.
5310 (err): New variable.
5311 (script): Don't return anything when an error was encountered.
5312 (ws, returns): Removed rules.
5313 (argument): Disabled concatenated variable support.
5314 (arguments): Remove explicit separators.
5315 (grubcmd): Likewise.
5316 (function): Likewise.
5317 (menuentry): Likewise.
5319 (commands): Likewise. Add error handling.
5321 * normal/script.c (grub_script_create_cmdline): If
5322 `grub_script_parsed' is 0, assume the parser encountered an error.
5324 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
5326 * configure.ac: Add support for EFI. Fix the typo
5327 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
5329 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5331 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
5332 foreign multibyte characters should be shown correctly.
5334 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5336 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
5338 (read_config_file): Made it to close file before returning.
5340 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
5342 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
5343 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
5344 video/i386/pc/vbefill.c.
5346 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
5347 video/i386/pc/vbefill.c.
5349 * include/grub/video.h (grub_video_blit_format): New enum.
5350 (grub_video_mode_info): Added new member blit_format.
5351 (grub_video_get_blit_format): New function prototype.
5353 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
5355 (grub_video_vbe_map_rgb): Likewise.
5356 (grub_video_vbe_unmap_color): Likewise.
5358 * include/grub/i386/pc/vbeblit.h: New file.
5360 * include/grub/i386/pc/vbefill.h: New file.
5362 * video/video.c (grub_video_get_blit_format): New function.
5363 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
5364 (grub_video_vbe_map_rgb): Likewise.
5365 (grub_video_vbe_unmap_color): Likewise.
5367 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
5369 (grub_video_vbe_blit_render_target): Changed to use more optimized
5371 (grub_video_vbe_setup): Added detection for optimized settings.
5372 (grub_video_vbe_create_render_target): Likewise.
5374 * video/i386/pc/vbeblit.c: New file.
5376 * video/i386/pc/vbefill.c: New file.
5378 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
5380 * font/manager.c (grub_font_get_glyph): Removed font fixup from
5383 * util/unifont2pff.rb: ... and moved it to here. Improved argument
5384 parsing to support both hex and dec ranges. If filename was missing
5385 show usage information.
5387 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
5389 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
5390 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
5392 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
5393 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
5394 (video_mod_SOURCES): Added.
5395 (video_mod_CFLAGS): Likewise.
5396 (video_mod_LDFLAGS): Likewise.
5397 (gfxterm_mod_SOURCES): Likewise.
5398 (gfxterm_mod_CFLAGS): Likewise.
5399 (gfxterm_mod_LDFLAGS): Likewise.
5400 (videotest_mod_SOURCES): Likewise.
5401 (videotest_mod_CFLAGS): Likewise.
5402 (videotest_mod_LDFLAGS): Likewise.
5403 (vesafb_mod_SOURCES): Removed.
5404 (vesafb_mod_CFLAGS): Likewise.
5405 (vesafb_mod_LDFLAGS): Likewise.
5406 (vga_mod_SOURCES): Likewise.
5407 (vga_mod_CFLAGS): Likewise.
5408 (vga_mod_LDFLAGS): Likewise.
5410 * commands/videotest.c: New file.
5412 * font/manager.c (fill_with_default_glyph): Modified to use
5414 (grub_font_get_glyph): Likewise.
5415 (fontmanager): Renamed from this...
5416 (font_manager): ... to this.
5418 * include/grub/font.h (grub_font_glyph): Added new structure.
5419 (grub_font_get_glyph): Modified to use grub_font_glyph.
5421 * include/grub/misc.h (grub_abs): Added as inline function.
5423 * include/grub/video.h: New file.
5425 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
5426 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
5427 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
5428 (grub_vbe_get_controller_info): Renamed from this...
5429 (grub_vbe_bios_get_controller_info): ... to this.
5430 (grub_vbe_get_mode_info): Renamed from this...
5431 (grub_vbe_bios_get_mode_info): ... to this.
5432 (grub_vbe_set_mode): Renamed from this...
5433 (grub_vbe_bios_set_mode): ... to this.
5434 (grub_vbe_get_mode): Renamed from this...
5435 (grub_vbe_bios_get_mode): ... to this.
5436 (grub_vbe_set_memory_window): Renamed from this...
5437 (grub_vbe_bios_set_memory_window): ... to this.
5438 (grub_vbe_get_memory_window): Renamed from this...
5439 (grub_vbe_bios_get_memory_window): ... to this.
5440 (grub_vbe_set_scanline_length): Renamed from this...
5441 (grub_vbe_set_scanline_length): ... to this.
5442 (grub_vbe_get_scanline_length): Renamed from this...
5443 (grub_vbe_bios_get_scanline_length): ... to this.
5444 (grub_vbe_set_display_start): Renamed from this...
5445 (grub_vbe_bios_set_display_start): ... to this.
5446 (grub_vbe_get_display_start): Renamed from this...
5447 (grub_vbe_bios_get_display_start): ... to this.
5448 (grub_vbe_set_palette_data): Renamed from this...
5449 (grub_vbe_bios_set_palette_data): ... to this.
5450 (grub_vbe_set_pixel_rgb): Removed.
5451 (grub_vbe_set_pixel_index): Likewise.
5453 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
5455 (grub_vbe_bios_get_controller_info): ... to this.
5456 (grub_vbe_get_mode_info): Renamed from this...
5457 (grub_vbe_bios_get_mode_info): ... to this.
5458 (grub_vbe_set_mode): Renamed from this...
5459 (grub_vbe_bios_set_mode): ... to this.
5460 (grub_vbe_get_mode): Renamed from this...
5461 (grub_vbe_bios_get_mode): ... to this.
5462 (grub_vbe_set_memory_window): Renamed from this...
5463 (grub_vbe_bios_set_memory_window): ... to this.
5464 (grub_vbe_get_memory_window): Renamed from this...
5465 (grub_vbe_bios_get_memory_window): ... to this.
5466 (grub_vbe_set_scanline_length): Renamed from this...
5467 (grub_vbe_set_scanline_length): ... to this.
5468 (grub_vbe_get_scanline_length): Renamed from this...
5469 (grub_vbe_bios_get_scanline_length): ... to this.
5470 (grub_vbe_set_display_start): Renamed from this...
5471 (grub_vbe_bios_set_display_start): ... to this.
5472 (grub_vbe_get_display_start): Renamed from this...
5473 (grub_vbe_bios_get_display_start): ... to this.
5474 (grub_vbe_set_palette_data): Renamed from this...
5475 (grub_vbe_bios_set_palette_data): ... to this.
5476 (grub_vbe_bios_get_controller_info): Fixed problem with registers
5477 getting corrupted after calling it. Added more pushes and pops.
5478 (grub_vbe_bios_set_mode): Likewise.
5479 (grub_vbe_bios_get_mode): Likewise.
5480 (grub_vbe_bios_get_memory_window): Likewise.
5481 (grub_vbe_bios_set_scanline_length): Likewise.
5482 (grub_vbe_bios_get_scanline_length): Likewise.
5483 (grub_vbe_bios_get_display_start): Likewise.
5484 (grub_vbe_bios_set_palette_data): Likewise.
5486 * normal/cmdline.c (cl_set_pos): Refresh the screen.
5487 (cl_insert): Likewise.
5488 (cl_delete): Likewise.
5490 * term/gfxterm.c: New file.
5492 * term/i386/pc/vesafb.c: Removed file.
5494 * video/video.c: New file.
5496 * video/i386/pc/vbe.c (real2pm): Added new function.
5497 (grub_video_vbe_draw_pixel): Likewise.
5498 (grub_video_vbe_get_video_ptr): Likewise.
5499 (grub_video_vbe_get_pixel): Likewise
5500 (grub_video_vbe_init): Likewise.
5501 (grub_video_vbe_fini): Likewise.
5502 (grub_video_vbe_setup): Likewise.
5503 (grub_video_vbe_get_info): Likewise.
5504 (grub_video_vbe_set_palette): Likewise.
5505 (grub_video_vbe_get_palette): Likewise.
5506 (grub_video_vbe_set_viewport): Likewise.
5507 (grub_video_vbe_get_viewport): Likewise.
5508 (grub_video_vbe_map_color): Likewise.
5509 (grub_video_vbe_map_rgb): Likewise.
5510 (grub_video_vbe_map_rgba): Likewise.
5511 (grub_video_vbe_unmap_color): Likewise.
5512 (grub_video_vbe_fill_rect): Likewise.
5513 (grub_video_vbe_blit_glyph): Likewise.
5514 (grub_video_vbe_blit_bitmap): Likewise.
5515 (grub_video_vbe_blit_render_target): Likewise.
5516 (grub_video_vbe_scroll): Likewise.
5517 (grub_video_vbe_swap_buffers): Likewise.
5518 (grub_video_vbe_create_render_target): Likewise.
5519 (grub_video_vbe_delete_render_target): Likewise.
5520 (grub_video_vbe_set_active_render_target): Likewise.
5521 (grub_vbe_set_pixel_rgb): Remove function.
5522 (grub_vbe_set_pixel_index): Likewise.
5523 (index_color_mode): Remove static variable.
5524 (active_mode): Likewise.
5525 (framebuffer): Likewise.
5526 (bytes_per_scan_line): Likewise.
5527 (grub_video_vbe_adapter): Added new static variable.
5528 (framebuffer): Likewise.
5529 (render_target): Likewise.
5530 (initial_mode): Likewise.
5531 (mode_in_use): Likewise.
5532 (mode_list): Likewise.
5534 2006-03-10 Marco Gerards <marco@gnu.org>
5536 * configure.ac (AC_INIT): Bumped to 1.93.
5538 * DISTLIST: Added `include/grub/hfs.h'.
5540 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
5542 * boot/i386/pc/boot.S (general_error): Before looping, try INT
5543 18H, which might help the BIOS falling back to next boot media.
5545 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
5547 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
5548 Poe Chen <poe.poechen@gmail.com>.
5550 2006-01-17 Marco Gerards <marco@gnu.org>
5552 * include/grub/normal.h: Include <grub/script.h>.
5553 (grub_command_list): Removed struct.
5554 (grub_command_list_t): Removed type.
5555 (grub_menu_entry): Remove members `num' and `command_list'. Add
5556 members `commands' and `sourcecode'.
5557 * include/grub/script.h: Add inclusion guards.
5558 (grub_script_cmd_menuentry): New struct.
5559 (grub_script_execute_menuentry): New prototype.
5560 (grub_script_lexer_record_start): Likewise.
5561 (grub_script_lexer_record_stop): Likewise.
5562 * normal/execute.c (grub_script_execute_menuentry): New function.
5563 * normal/lexer.c (record, recording, recordpos, recordlen): New
5565 (grub_script_lexer_record_start): New function.
5566 (grub_script_lexer_record_stop): Likewise.
5567 (recordchar): Likewise.
5568 (nextchar): Likewise.
5569 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
5570 2048 as the buffer size. Add the tokens `menuentry' and `@'.
5571 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
5572 (current_menu): New variable.
5573 (free_menu): Mainly rewritten.
5574 (grub_normal_menu_addentry): New function.
5575 (read_config_file): Rewritten.
5576 * normal/menu.c (run_menu_entry): Mainly rewritten.
5577 * normal/menu_entry.c (make_screen): Rewritten te code to insert
5579 (run): Mainly rewritten.
5580 * normal/parser.y (menu_entry): New variable.
5581 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
5582 (menuentry): New rule.
5583 (command): Add `menuentry'.
5584 (if_statement): Allow additional returns before `fi'.
5585 * normal/script.c (grub_script_create_cmdmenu): New function.
5587 2006-01-03 Marco Gerards <marco@gnu.org>
5589 * INSTALL: GNU Bison is required.
5590 * configure.ac: Rewritten the test to detect Bison.
5591 * Makefile.in (YACC): New variable. Reported by Xun Sun
5592 <xun.sun.cn@gmail.com>.
5594 2006-01-03 Marco Gerards <marco@gnu.org>
5596 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
5597 the HFS+ filesystem to filesystem blocks.
5598 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
5599 GCC warning is silenced.
5601 2006-01-03 Marco Gerards <marco@gnu.org>
5603 * partmap/apple.c (apple_partition_map_iterate): Convert the data
5604 read from disk from big endian to host byte order.
5606 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
5608 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
5610 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
5611 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
5612 embedded HFS+ filesystem.
5613 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
5614 (grub_hfs_sblock): Move from here...
5615 * include/grub/hfs.h: To here... New file.
5616 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
5618 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
5620 (grub_hfsplus_volheader): Change type of member `magic' to
5622 (grub_hfsplus_data): Add new member `embedded_offset'.
5623 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
5625 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
5626 Calculate the offset.
5628 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5630 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
5632 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
5634 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5636 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
5637 ENV->NAME is NULL after allocating ENV->VALUE.
5639 2005-12-25 Marco Gerards <marco@gnu.org>
5641 * kern/env.c (grub_env_set): Rewritten the error handling code.
5643 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5645 * geninit.sh: Made more robust, and more portable.
5647 2005-12-25 Marco Gerards <marco@gnu.org>
5649 Add support for Apple HFS+ filesystems.
5651 * fs/hfsplus.c: New file.
5653 * DISTLIST: Added `fs/hfsplus.c'.
5655 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
5656 (hfsplus_mod_SOURCES): New variable.
5657 (hfsplus_mod_CFLAGS): Likewise.
5658 (hfsplus_mod_LDFLAGS): Likewise.
5659 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
5660 (grub_setup_SOURCES): Likewise.
5661 (grub_mkdevicemap_SOURCES): Likewise.
5662 (grub_emu_SOURCES): Likewise.
5663 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5665 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
5667 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
5669 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5671 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
5672 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
5673 include/grub/parser.h, include/grub/script.h, kern/parser.c,
5674 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
5675 normal/lexer.c, normal/parser.y, normal/script.c, and
5677 Removed kern/sparc64/cache.c.
5679 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
5680 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
5683 * configure.ac (AC_INIT): Bumped to 1.92.
5685 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
5687 * kern/err.c (grub_error_push): Added new function to support error
5689 (grub_error_pop): Likewise.
5690 (grub_error_stack_items): New local variable to support error stacks.
5691 (grub_error_stack_pos): Likewise.
5692 (grub_error_stack_assert): Likewise.
5693 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
5695 (grub_print_error): Added support to print errors from error stack.
5697 * include/grub/err.h (grub_error_push): Added function prototype.
5698 (grub_error_pop): Likewise.
5700 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
5702 * configure.ac: Accept `powerpc64' as host_cpu.
5703 (amd64): Rename to `biarch32'.
5705 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
5706 non-cacheline-aligned addresses.
5708 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
5709 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
5710 if `size' is non-zero.
5712 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
5714 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
5715 and `cd' to make sure the filename is not prefixed with a
5717 (pkgdata_MODULES): Add `gpt.mod'.
5718 (gpt_mod_SOURCES): New variable.
5719 (gpt_mod_CFLAGS): Likewise.
5720 (gpt_mod_LDFLAGS): Likewise.
5722 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
5724 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
5727 * partmap/gpt.c: New file.
5729 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
5730 GPT partition map is detected.
5732 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
5734 * commands/i386/pc/play.c: New file.
5735 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
5736 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
5739 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
5741 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
5742 ((unused))' to silence gcc warning.
5744 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
5746 * configure.ac: Correct `AC_PROG_YACC' test.
5748 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5750 * util/powerpc/ieee1275/grub-install.in: Run the mount point
5751 check before installing files.
5753 2005-11-22 Mike Small <smallm@panix.com>
5755 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
5756 number regex so multidigit numbers are recognized correctly.
5758 2005-11-22 Mike Small <smallm@panix.com>
5760 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
5761 debugging message before attempting to claim memory.
5762 (grub_rescue_cmd_initrd): Add a claim debugging message and try
5763 multiple addresses in case of failure.
5765 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5767 * term/tparm.c (get_space): Remove empty `if' statement.
5769 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
5771 * kern/parser.c (check_varstate): Rename `state' to 's'.
5773 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5775 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
5776 variable definitions to the beginning of each function. Sort stack
5778 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
5779 `buf' argument to `char *'.
5781 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5783 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
5784 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5785 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5786 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5787 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5788 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5789 configfile.mod, search.mod, gzio.mod and test.mod.
5790 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5791 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5792 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5793 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5794 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5795 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5796 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5797 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5798 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5799 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5800 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5801 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5802 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5803 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5804 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5805 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5806 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5807 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5808 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5809 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5810 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5811 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5812 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
5814 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
5816 (pkgdata_MODULES): Add test.mod.
5818 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5820 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
5821 appending to variables with "+=".
5822 (PModule): Use full pathname to generate *.lst filenames.
5824 * Makefile.in: Fixed list rules moved from genmk.rb.
5825 (.DELETE_ON_ERROR): New special target.
5826 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
5828 * conf/i386-pc.rmk: Include conf/common.mk.
5829 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5830 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5831 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5832 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5833 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5834 configfile.mod, search.mod, gzio.mod and test.mod.
5835 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5836 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5837 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5838 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5839 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5840 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5841 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5842 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5843 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5844 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5845 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5846 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5847 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5848 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5849 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5850 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5851 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5852 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5853 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5854 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5855 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5856 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5857 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
5859 * conf/common.rmk: ... to here. New file.
5861 * conf/common.mk: New file.
5863 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
5865 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
5866 (grub_script.tab.c): ... here.
5868 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
5869 (grub_script.tab.c): ... here.
5871 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
5872 (grub_script.tab.c): ... here.
5874 * normal/command.c (grub_command_find): Fixed a memory leak of
5875 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
5877 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5879 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
5880 "@" which marks the start of a comment on ARM.
5881 (VARIABLE): Likewise.
5883 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5885 Add support for Linux/ADFS partition tables.
5887 * partmap/acorn.c: New file.
5889 * include/grub/acorn_filecore.h: Likewise.
5891 * DISTLIST: Added `partmap/acorn.c' and
5892 `include/grub/acorn_filecore.h'.
5894 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
5896 (pkgdata_MODULES): Add `acorn.mod'.
5897 (acorn_mod_SOURCES): New variable.
5898 (acorn_mod_CFLAGS): Likewise.
5900 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
5902 (pkgdata_MODULES): Add `acorn.mod'.
5903 (acorn_mod_SOURCES): New variable.
5904 (acorn_mod_CFLAGS): Likewise.
5906 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
5907 (pkgdata_MODULES): Add `acorn.mod'.
5908 (acorn_mod_SOURCES): New variable.
5909 (acorn_mod_CFLAGS): Likewise.
5910 (acorn_mod_LDFLAGS): Likewise.
5912 * include/types.h (grub_disk_addr_t): New typedef.
5914 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
5916 * geninit.sh: New file.
5918 * geninitheader.sh: Likewise.
5920 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
5921 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
5922 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
5923 * commands/configfile.c (grub_configfile_init)
5924 (grub_configfile_fini): Likewise.
5925 * commands/default.c (grub_default_init, grub_default_fini):
5927 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
5928 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
5929 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
5930 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
5932 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
5933 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
5935 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
5936 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
5938 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
5940 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
5942 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
5943 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
5944 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
5945 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
5946 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
5947 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
5948 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
5949 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
5950 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
5951 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
5952 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
5953 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
5954 * partmap/amiga.c (grub_amiga_partition_map_init)
5955 (grub_amiga_partition_map_fini): Likewise.
5956 * partmap/apple.c (grub_apple_partition_map_init)
5957 (grub_apple_partition_map_fini): Likewise.
5958 * partmap/pc.c (grub_pc_partition_map_init)
5959 (grub_pc_partition_map_fini): Likewise.
5960 * partmap/sun.c (grub_sun_partition_map_init,
5961 grub_sun_partition_map_fini): Likewise.
5962 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
5965 * util/grub-emu.c: Include <grub_modules_init.h>.
5966 (main): Don't initialize and de-initialize any modules directly,
5967 use `grub_init_all' and `grub_fini_all' instead.
5969 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
5970 `grub_vesafb_mod_init'.
5971 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
5973 * term/i386/pc/vga.c (grub_vga_init): Renamed to
5974 `grub_vga_mod_init'. Updated all users.
5975 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
5977 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
5978 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
5981 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
5982 Generate a function to initialize the module in utilities.
5983 Updated all callers.
5984 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
5985 initialize the module in utilities. Updated all callers.
5987 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
5989 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
5990 escape sequence and a literal ^L to clear the screen.
5992 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
5993 when returning from Open Firmware.
5995 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
5997 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
5998 (grub_ofconsole_height): Likewise.
5999 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6000 manually insert a '\n'.
6001 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6002 `grub_ofconsole_height'. Return early if these are already set.
6004 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6006 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6007 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6008 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6009 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6010 and `normal/script.c'.
6011 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6012 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6013 (test_mod_SOURCES): New variable.
6014 (test_mod_CFLAGS): Likewise.
6015 (test_mod_LDFLAGS): Likewise.
6016 (pkgdata_MODULES): Add `test.mod'.
6017 (grub_script.tab.c): New rule.
6018 (grub_script.tab.h): Likewise.
6020 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
6022 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6023 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6024 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6025 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6026 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6027 (test_mod_SOURCES): New variable.
6028 (test_mod_CFLAGS): Likewise.
6029 (pkgdata_MODULES): Add `test.mod'.
6030 (grub_script.tab.c): New rule.
6031 (grub_script.tab.h): Likewise.
6033 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
6035 Add initial scripting support.
6037 * commands/test.c: New file.
6038 * include/grub/script.h: Likewise.
6039 * normal/execute.c: Likewise.
6040 * normal/function.c: Likewise.
6041 * normal/lexer.c: Likewise.
6042 * normal/parser.y: Likewise.
6043 * normal/script.c: Likewise.
6045 * configure.ac: Add `AC_PROG_YACC' test.
6047 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6048 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6049 `normal/function.c' and `normal/script.c'.
6050 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6051 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6052 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6054 (pkgdata_MODULES): Add `test.mod'.
6055 (grub_script.tab.c): New rule.
6056 (grub_script.tab.h): Likewise.
6058 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6060 * include/grub/normal.h (grub_test_init): New prototype.
6061 (grub_test_fini): Likewise.
6063 * normal/command.c: Include <grub/script.h>.
6064 (grub_command_execute): Rewritten.
6066 * util/grub-emu.c (main): Call `grub_test_init' and
6069 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6071 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6073 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6074 there are no pending characters.
6076 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6078 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6079 `grub_strndup' to drop device arguments. Replace unnecessary
6080 `grub_strndup' with `grub_strdup'.
6082 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6084 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6085 `debug' environment variable has been set.
6087 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
6089 * Makefile.in (install-local): Use $(DATA).
6090 (uninstall): Likewise.
6091 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6092 (sbin_UTILITIES): ... to here.
6093 (sbin_SCRIPTS): New variable.
6094 (grub_install_SOURCES): New variable.
6095 * util/powerpc/ieee1275/grub-install.in: New file.
6096 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6098 (add_segments): Call `grub_util_get_path'.
6100 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6102 From Timothy Baldwin:
6103 * commands/ls.c (grub_ls_list_files): Close FILE with
6105 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6107 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
6109 * include/grub/parser.h: New file.
6111 * kern/parser.c: Likewise.
6113 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
6114 (grub_setup_SOURCES): Likewise.
6115 (grub_probefs_SOURCES): Likewise.
6116 (grub_emu_SOURCES): Likewise.
6117 (kernel_img_HEADERS): Add `parser.h'.
6119 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6120 (grub_emu_SOURCES): Add `kern/parser.c'.
6121 (grubof_SOURCES): Likewise.
6123 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6124 (grubof_SOURCES): Add `kern/parser.c'.
6126 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
6128 * kern/misc.c (grub_split_cmdline): Removed function.
6130 * kern/rescue.c: Include <grub/parser.h>.
6131 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
6132 of `grub_split_cmdline'.
6134 * normal/command.c: Include <grub/parser.h>.
6135 (grub_command_execute): Use `grub_parser_split_cmdline' instead
6136 of `grub_split_cmdline'.
6138 * normal/completion.c: Include <grub/parser.h>.
6139 (cmdline_state): New variable.
6140 (iterate_dir): End the filename with a quote depending on the
6142 (get_state): new function.
6143 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
6144 split the arguments and determine the current argument. When the
6145 argument string is not quoted, escape all spaces.
6147 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6149 * normal/sparc64/setjmp.S: New file.
6151 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6153 * include/grub/sparc64/libgcc.h: New file.
6154 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
6155 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
6156 normal/sparc64/setjmp.c.
6158 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6160 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
6161 * kern/sparc64/cache.S: New file.
6162 * kern/sparc64/cache.c: Removed.
6163 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
6164 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
6166 (COMMON_LDFLAGS): Add -melf64_sparc.
6167 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
6168 (grubof_SOURCES): Use cache.S instead of cache.c.
6169 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
6170 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
6171 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
6173 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
6174 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
6175 (linux_mod_CFLAGS): Commented out.
6176 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
6177 out because module isn't built.
6178 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
6179 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
6180 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
6181 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
6182 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
6183 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6184 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6185 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
6186 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
6187 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
6188 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6189 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6190 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
6191 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
6193 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
6195 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
6196 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
6197 longer, because HFS should not be used on PC.
6199 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6201 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
6202 consistently within the loop.
6204 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
6206 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
6207 directory can not be read.
6209 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6211 * configure.ac (AC_INIT): Increase the version number to 1.91.
6213 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
6214 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
6215 term/i386/pc/serial.c.
6217 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6219 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
6220 file size must be permitted.
6222 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
6223 between %ah and %al.
6225 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6227 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
6229 Call the hook with a NUL-terminated filename.
6230 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
6233 * kern/term.c (cursor_state): New variable.
6234 (grub_term_set_current): Reset the cursor state on a new
6236 (grub_setcursor): Rewritten to use CURSOR_STATE.
6237 (grub_getcursor): New function.
6239 * include/grub/term.h (grub_getcursor): New prototype.
6241 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
6242 integers on ARM. Reported by Timothy Baldwin
6243 <T.E.Baldwin99@members.leeds.ac.uk>.
6245 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
6247 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
6249 (grub_sfs_dir): Likewise.
6251 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
6253 Add support for the SFS filesystem.
6255 * fs/sfs.c: New file.
6257 * DISTLIST: Added `fs/sfs.c'.
6259 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
6260 (grub_probefs_SOURCES): Likewise.
6261 (grub_emu_SOURCES): Likewise.
6262 (pkgdata_MODULES): Add `sfs.mod'.
6263 (sfs_mod_SOURCES): New variable.
6264 (sfs_mod_CFLAGS): Likewise.
6265 (sfs_mod_LDFLAGS): Likewise.
6267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
6268 (pkgdata_MODULES): Add `sfs.mod'.
6269 (sfs_mod_SOURCES): New variable.
6270 (sfs_mod_CFLAGS): Likewise.
6272 * util/grub-emu.c (main): Call `grub_sfs_init' and
6275 * include/grub/fs.h (grub_sfs_init): New prototype.
6276 (grub_sfs_fini): Likewise.
6278 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
6280 Add support for the AFFS filesystem.
6282 * fs/affs.c: New file.
6284 * DISTLIST: Added `fs/affs.c'.
6286 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
6287 (grub_probefs_SOURCES): Likewise.
6288 (grub_emu_SOURCES): Likewise.
6289 (pkgdata_MODULES): Add `affs.mod'.
6290 (affs_mod_SOURCES): New variable.
6291 (affs_mod_CFLAGS): Likewise.
6292 (affs_mod_LDFLAGS): Likewise.
6294 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
6295 (pkgdata_MODULES): Add `affs.mod'.
6296 (affs_mod_SOURCES): New variable.
6297 (affs_mod_CFLAGS): Likewise.
6299 * util/grub-emu.c (main): Call `grub_affs_init' and
6302 * include/grub/fs.h (grub_affs_init): New prototype.
6303 (grub_affs_fini): Likewise.
6305 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
6307 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
6309 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
6311 * configure.ac: Accept `x86_64' as host_cpu. In that case add
6314 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
6317 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
6318 (COMMON_LDFLAGS): New variable.
6319 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
6320 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
6321 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
6322 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
6323 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
6324 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
6325 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
6326 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
6327 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
6328 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
6329 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6330 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6331 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
6332 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
6333 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
6335 (normal_mod_ASFLAGS): Add `-m32'.
6337 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
6338 (grub_host_size_t, grub_host_ssize_t): New types.
6339 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
6340 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
6341 `GRUB_HOST_SIZEOF_VOID_P'.
6343 * include/grub/kernel.h (struct grub_module_header): Type of
6344 member offset changed to `grub_host_off_t'. Type of member size
6345 changed to `grub_host_size_t'.
6346 (struct grub_module_info): Type of member offset changed to
6347 `grub_host_off_t'. Type of member size changed to
6350 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
6352 Make GRUB's kernel compliant to Multiboot Specification.
6354 * kern/i386/pc/startup.S (multiboot_header): New label.
6355 (multiboot_entry): Likewise.
6356 (multiboot_trampoline): Likewise.
6358 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6361 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
6362 put parentheses after a question mark.
6363 [!GRUB_UTIL] (my_mod): New variable.
6365 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
6367 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
6369 Adds support for the XFS filesystem. Btrees are not supported
6372 * fs/xfs.c: New file.
6374 * DISTLIST: Added `fs/xfs.c'.
6376 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
6377 (grub_probefs_SOURCES): Likewise.
6378 (grub_emu_SOURCES): Likewise.
6379 (pkgdata_MODULES): Add `xfs.mod'.
6380 (xfs_mod_SOURCES): New variable.
6381 (xfs_mod_CFLAGS): Likewise.
6383 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
6384 (pkgdata_MODULES): Add `xfs.mod'.
6385 (xfs_mod_SOURCES): New variable.
6386 (xfs_mod_CFLAGS): Likewise.
6388 * util/grub-emu.c (main): Call `grub_xfs_init' and
6391 * include/grub/fs.h (grub_xfs_init): New prototype.
6392 (grub_xfs_fini): Likewise.
6395 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
6397 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
6398 color modes, allow greater than 16 colors to be configured as
6401 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6403 * normal/completion.c (complete_arguments): Add the qualifier
6406 From Omniflux <omniflux+lists@omniflux.com>:
6407 * include/grub/terminfo.h: New file.
6408 * include/grub/tparm.h: Likewise.
6409 * include/grub/i386/pc/serial.h: Likewise.
6410 * term/terminfo.c: Likewise.
6411 * term/tparm.c: Likewise.
6412 * term/i386/pc/serial.c: Likewise.
6413 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
6415 (terminfo_mod_SOURCES): New variable.
6416 (terminfo_mod_CFLAGS): Likewise.
6417 (serial_mod_SOURCES): Likewise.
6418 (serial_mod_CFLAGS): Likewise.
6420 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
6422 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
6423 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
6424 and kern/powerpc/ieee1275/cmain.c, respectively.
6426 * boot/powerpc/ieee1275/crt0.S: Moved to ...
6427 * kern/powerpc/ieee1275/crt0.S: ... here.
6429 * boot/powerpc/ieee1275/cmain.c: Moved to ...
6430 * kern/powerpc/ieee1275/cmain.c: ... here.
6432 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
6433 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
6434 instead of boot/powerpc/ieee1275/crt0.S and
6435 boot/powerpc/ieee1275/cmain.c, respectively.
6437 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
6438 sectors. It was not used anyway.
6440 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6442 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
6443 `unused parameter' warning.
6445 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6447 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
6449 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
6452 2005-08-28 Marco Gerards <metgerards@student.han.nl>
6454 * include/grub/normal.h (enum grub_completion_type): Added
6455 `GRUB_COMPLETION_TYPE_ARGUMENT'.
6457 * normal/cmdline.c (print_completion): Handle
6458 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
6459 * normal/menu_entry.c (store_completion): Likewise.
6461 * normal/completion.c (complete_arguments): New function.
6462 (grub_normal_do_completion): Call `complete_arguments' when the
6463 current words start with a dash.
6465 2005-08-27 Marco Gerards <metgerards@student.han.nl>
6467 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
6468 `gzio.mod' instead of `io.mod').
6470 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
6472 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
6473 (DISTDIRS): Added io and video.
6474 Rewrite the search routine to make an output consistently.
6476 * DISTLIST: Added conf/sparc64-ieee1275.mk,
6477 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
6478 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
6479 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
6480 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
6481 util/powerpc/ieee1275/misc.c.
6483 * include/grub/gzio.h: New file.
6484 * io/gzio.c: Likewise.
6486 * kern/file.c (grub_file_close): Call grub_device_close only if
6487 FILE->DEVICE is not NULL.
6489 * include/grub/mm.h [!NULL] (NULL): New macro.
6491 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
6493 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
6494 (pkgdata_MODULES): Added gzio.mod.
6495 (gzio_mod_SOURCES): New variable.
6496 (gzio_mod_CFLAGS): Likewise.
6498 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
6499 (pkgdata_MODULES): Added gzio.mod.
6500 (gzio_mod_SOURCES): New variable.
6501 (gzio_mod_CFLAGS): Likewise.
6503 * commands/cat.c: Include grub/gzio.h.
6504 (grub_cmd_cat): Use grub_gzfile_open instead of
6507 * commands/cmp.c: Include grub/gzio.h.
6508 (grub_cmd_cmp): Use grub_gzfile_open instead of
6511 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
6512 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
6514 (grub_rescue_cmd_module): Likewise.
6516 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6518 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
6519 kern/sparc64/ieee1275/init.c because it contains _start.
6520 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
6522 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6524 * configure.ac: Add support for sparc64 host with ieee1275
6526 * configure: Generated from configure.ac.
6527 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
6529 (grub_ofdisk_read): Likewise.
6530 (grub_ofdisk_open): Use %p to print pointer values, and cast the
6531 pointers as (void *) to remove a warning.
6532 (grub_ofdisk_close): Likewise.
6533 (grub_ofdisk_read): Likewise.
6534 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
6535 returns, so make it return void to remove a warning.
6536 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
6537 Corresponding prototype change.
6538 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
6539 values, and cast the pointers as (void *) to remove a warning.
6540 (grub_mm_dump): Likewise.
6541 * conf/sparc64-ieee1275.mk: New file.
6542 * conf/sparc64-ieee1275.rmk: Likewise.
6543 * include/grub/sparc64/setjmp.h: Likewise.
6544 * include/grub/sparc64/types.h: Likewise.
6545 * include/grub/sparc64/ieee1275/console.h: Likewise.
6546 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6547 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6548 * include/grub/sparc64/ieee1275/time.h: Likewise.
6549 * kern/sparc64/cache.c: Likewise.
6550 * kern/sparc64/dl.c: Likewise.
6551 * kern/sparc64/ieee1275/init.c: Likewise.
6552 * kern/sparc64/ieee1275/openfw.c: Likewise.
6554 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
6556 * util/console.c (grub_ncurses_putchar): If C is greater than
6557 0x7f, set C to a question mark.
6558 (grub_ncurses_getcharwidth): New function.
6559 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
6562 * normal/menu.c (print_entry): Made aware of Unicode. First,
6563 convert TITLE to UCS-4, and predict the cursor position by
6566 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
6568 * kern/misc.c (grub_utf16_to_utf8): Likewise.
6570 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6572 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
6573 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6576 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
6577 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6578 grub_strcpy and grub_strlen. Take it into account that a space
6579 character is inserted as a delimiter.
6581 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6583 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
6584 invalid magic in thre error.
6586 * commands/search.c: New file.
6588 * util/grub-emu.c (main): Call grub_search_init and
6591 * kern/rescue.c (grub_rescue_print_disks): Removed.
6592 (grub_rescue_print_devices): New function.
6593 (grub_rescue_cmd_ls): Use grub_device_iterate with
6594 grub_rescue_print_devices instead of grub_disk_dev_iterate with
6595 grub_rescue_print_disks.
6597 * kern/partition.c (grub_partition_iterate): Return the result of
6598 PARTMAP->ITERATE instead of GRUB_ERRNO.
6600 * kern/device.c: Include grub/partition.h.
6601 (grub_device_iterate): New function.
6603 * include/grub/partition.h (grub_partition_iterate): Return int
6604 instead of grub_err_t.
6606 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
6608 [GRUB_UTIL] (grub_search_fini): Likewise.
6610 * include/grub/device.h (grub_device_iterate): New prototype.
6612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6614 (pkgdata_MODULES): Added search.mod.
6615 (search_mod_SOURCES): New variable.
6616 (search_mod_CFLAGS): Likewise.
6618 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
6619 (pkgdata_MODULES): Added search.mod.
6620 (search_mod_SOURCES): New variable.
6621 (search_mod_CFLAGS): Likewise.
6623 * commands/ls.c (grub_ls_list_disks): Renamed to ...
6624 (grub_ls_list_devices): ... this, and use grub_device_iterate.
6625 All callers changed.
6627 * DISTLIST: Added commands/search.c.
6629 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6631 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
6633 (grub_getcharwidth): New function.
6635 * kern/misc.c (grub_utf8_to_ucs4): New function.
6637 * include/grub/term.h (struct grub_term): Added a new member
6639 (grub_getcharwidth): New prototype.
6641 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
6643 * term/i386/pc/console.c (map_char): New function. Segregated from
6644 grub_console_putchar.
6645 (grub_console_putchar): Use map_char.
6646 (grub_console_getcharwidth): New function.
6647 (grub_console_term): Specified grub_console_getcharwidth as
6650 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
6651 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
6653 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
6655 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
6656 on grub_strtoul completely.
6657 (write_char): Declare local variables in the beginning of the
6659 (grub_vesafb_getcharwidth): New function.
6660 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
6663 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
6665 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
6666 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
6667 commands/i386/pc/vbetest.c.
6669 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
6670 call grub_vbe_get_controller_info again, because the returned
6671 information is volatile.
6672 (grub_vbe_set_video_mode): Mostly rewritten.
6673 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
6674 grub_vbe_status_t correctly.
6675 (grub_vbe_get_video_mode_info): Likewise.
6676 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
6677 several if statements.
6679 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
6680 * commands/i386/pc/vbeinfo.c: ... this.
6682 * commands/i386/pc/vbe_test.c: Renamed to ...
6683 * commands/i386/pc/vbetest.c: ... this.
6685 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
6687 (grub_cmd_vbeinfo): ... this. Save video modes before
6688 iterating. Skip a video mode, if it is not available, not enough
6689 information is given or it is monochrome. Show the memory
6690 model. Leave the interpretation of MODEVAR to grub_strtoul
6692 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
6693 (GRUB_MOD_FINI): Likewise.
6695 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
6696 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
6697 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
6698 duplicated grub_env_get. Leave the interpretation of MODEVAR to
6699 grub_strtoul completely.
6701 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
6702 (GRUB_MOD_FINI): Likewise.
6704 * normal/misc.c: Include grub/mm.h.
6706 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
6707 vbe_list_modes with vbetest.mod and vbeinfo.mod.
6708 (vbe_list_modes_mod_SOURCES): Removed.
6709 (vbe_list_modes_mod_CFLAGS): Likewise.
6710 (vbe_test_mod_SOURCES): Likewise.
6711 (vbe_test_mod_CFLAGS): Likewise.
6712 (vbeinfo_mod_SOURCES): New variable.
6713 (vbeinfo_mod_CFLAGS): Likewise.
6714 (vbetest_mod_SOURCES): Likewise.
6715 (vbetest_mod_CFLAGS): Likewise.
6717 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
6719 * normal/misc.c: New file.
6721 * DISTLIST: Added normal/misc.c.
6723 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
6724 DISK to HOOK. Call HOOK with DISK.
6725 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6726 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6727 * partmap/sun.c (sun_partition_map_iterate): Likewise.
6729 * normal/menu_entry.c (struct screen): Added a new member
6731 (completion_buffer): New global variable.
6732 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
6733 (store_completion): New function.
6734 (complete): Likewise.
6735 (clear_completions): Likewise.
6736 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
6737 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
6738 a tab, call complete.
6740 * normal/completion.c (disk_dev): Removed.
6741 (print_simple_completion): Likewise.
6742 (print_partition_completion): Likewise.
6743 (print_func): New global variable.
6744 (add_completion): Do not take the arguments WHAT or PRINT any
6745 longer. Added a new argument TYPE. Instead of printing directly,
6746 call PRINT_FUNC if not NULL.
6747 All callers changed.
6748 (complete_device): Use a local variable DEV instead of
6749 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
6750 (grub_normal_do_completion): Take a new argument HOOK. Do not
6751 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
6752 empty string, return NULL instead.
6753 All callers changed.
6755 * normal/cmdline.c (print_completion): New function.
6757 * kern/partition.c (grub_partition_iterate): Add an argument DISK
6759 All callers changed.
6761 * kern/disk.c (grub_print_partinfo): Removed.
6763 * include/grub/partition.h (struct grub_partition_map): Add a new
6764 argument DISK into HOOK of ITERATE.
6765 (grub_partition_iterate): Add a new argument DISK to HOOK.
6767 * include/grub/normal.h (enum grub_completion_type): New enum.
6768 (grub_completion_type_t): New type.
6769 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
6770 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
6771 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
6772 (GRUB_COMPLETION_TYPE_FILE): Likewise.
6773 (grub_normal_do_completion): Added a new argument HOOK.
6774 (grub_normal_print_device_info): New prototype.
6776 * include/grub/disk.h (grub_print_partinfo): Removed.
6778 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
6779 (normal_mod_SOURCES): Likewise.
6780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6781 (normal_mod_SOURCES): Likewise.
6783 * commands/ls.c (grub_ls_list_disks): Use
6784 grub_normal_print_device_info instead of grub_print_partinfo. Free
6786 (grub_ls_list_files): Use grub_normal_print_device_info instead of
6787 duplicating the code.
6789 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6791 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
6792 follow GCS more precisely.
6793 * commands/i386/pc/vbe_test.c: Likewise.
6794 * include/grub/i386/pc/vbe.h: Likewise.
6795 * term/i386/pc/vesafb.c: Likewise.
6796 * video/i386/pc/vbe.c: Likewise.
6798 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6800 * DISTLIST: Added term/i386/pc/vesafb.c
6801 DISTLIST: Added video/i386/pc/vbe.c
6802 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
6803 DISTLIST: Added commands/i386/pc/vbe_test.c.
6804 * commands/i386/pc/vbe_list_modes.c: New file.
6805 * commands/i386/pc/vbe_test.c: Likewise.
6806 * term/i386/pc/vesafb.c: Likewise.
6807 * video/i386/pc/vbe.c: Likewise.
6808 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
6809 (grub_vbe_probe) Added prototype.
6810 (grub_vbe_set_video_mode) Likewise.
6811 (grub_vbe_get_video_mode) Likewise.
6812 (grub_vbe_get_video_mode_info) Likewise.
6813 (grub_vbe_set_pixel_rgb) Likewise.
6814 (grub_vbe_set_pixel_index) Likewise.
6815 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
6816 (pkgdata_MODULES): Added vesafb.mod.
6817 (pkgdata_MODULES): Added vbe_list_modes.mod.
6818 (pkgdata_MODULES): Added vbe_test.mod.
6819 (vbe_mod_SOURCES): Added.
6820 (vbe_mod_CFLAGS): Likewise.
6821 (vesafb_mod_SOURCES): Likewise.
6822 (vesafb_mod_CFLAGS): Likewise.
6823 (vbe_list_modes_mod_SOURCES): Likewise.
6824 (vbe_list_modes_mod_CFLAGS): Likewise.
6825 (vbe_test_mod_SOURCES): Likewise.
6826 (vbe_test_mod_CFLAGS): Likewise.
6828 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
6830 * normal/command.c (grub_command_execute): If INTERACTIVE is
6831 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
6832 CMDLINE. Disable the pager if INTERACTIVE is true.
6833 All callers are changed.
6835 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
6836 before reading a config file.
6837 * normal/main.c (read_config_file): Even if a command is not
6838 found, register it if it is within an entry.
6840 * util/grub-emu.c: Include sys/types.h and unistd.h.
6841 (options): Added --hold.
6842 (struct arguments): Added a new member "hold".
6843 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
6845 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
6846 cleared by a debugger, if it is not zero.
6848 * include/grub/normal.h (grub_command_execute): Add an argument
6851 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
6853 * DISTLIST: Added include/grub/i386/pc/vbe.h.
6855 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
6857 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
6858 program with another one, because the old one didn't detect a bug
6859 in gcc-3.4. Always use regparm 2, because the new test is still
6860 not enough for gcc-4.0. Someone must investigate a simple test
6861 case which detects a bug in gcc-4.0.
6863 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
6865 * DISTLIST: Added normal/completion.c.
6867 * normal/completion.c: New file.
6869 * term/i386/pc/console.c (grub_console_getwh): New function.
6870 (grub_console_term): Assign grub_console_getwh to getwh.
6872 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
6873 function is defined in normal/completion.c as
6874 grub_normal_do_completion.
6875 (grub_cmdline_get): Use grub_normal_do_completion instead of
6878 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
6879 returns non-zero, otherwise return 0.
6880 (grub_partition_iterate): First, probe the partition map. Then,
6881 call ITERATE only for this partition map.
6883 * kern/misc.c (grub_strncmp): Rewritten.
6885 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
6886 returns non-zero. Otherwise return 0.
6888 * include/grub/partition.h (grub_partition_map_iterate): Return
6889 int instead of void.
6891 * include/grub/normal.h (grub_normal_do_completion): New prototype.
6893 * include/grub/misc.h (grub_strncmp): Change the type of N to
6896 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
6899 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
6900 unsigned explictly before comparing it with I.
6902 * kern/main.c (grub_env_write_root): Add the attribute unused into
6905 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6906 normal/completion.c.
6907 (normal_mod_SOURCES): Likewise.
6908 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6909 (normal_mod_SOURCES): Likewise.
6911 * normal/command.c (grub_iterate_commands): If ITERATE returns
6912 non-zero, return one immediately.
6914 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
6916 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
6917 * kern/i386/pc/startup.S: Updated Global Descriptor table's
6919 (grub_vbe_get_controller_info): New function.
6920 (grub_vbe_get_mode_info): Likewise.
6921 (grub_vbe_set_mode): Likewise.
6922 (grub_vbe_get_mode): Likewise.
6923 (grub_vbe_set_memory_window): Likewise.
6924 (grub_vbe_get_memory_window): Likewise.
6925 (grub_vbe_set_scanline_length): Likewise.
6926 (grub_vbe_get_scanline_length): Likewise.
6927 (grub_vbe_set_display_start): Likewise.
6928 (grub_vbe_get_display_start): Likewise.
6929 (grub_vbe_set_palette_data): Likewise.
6930 * include/grub/i386/pc/vbe.h: New file.
6932 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6934 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
6935 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
6936 * DISTLIST: Likewise.
6937 * kern/ieee1275/of.c: Moved to ...
6938 * kern/ieee1275/ieee1275.c: ... here.
6940 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6942 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
6943 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
6944 Pass 0 as `end' parameter to grub_strtoul().
6946 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6948 * include/grub/powerpc/ieee1275/console.h: Do not include
6949 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
6951 (grub_console_cur_color): Remove i386-specific prototype.
6952 (grub_console_real_putchar): Likewise.
6953 (grub_console_checkkey): Likewise.
6954 (grub_console_getkey): Likewise.
6955 (grub_console_getxy): Likewise.
6956 (grub_console_gotoxy): Likewise.
6957 (grub_console_cls): Likewise.
6958 (grub_console_setcursor): Likewise.
6959 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
6960 Include <grub/machine/console.h>.
6961 * term/ieee1275/ofconsole.c: Likewise.
6963 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
6965 * Makefile.in (LIBLZO): New variable.
6967 * configure.ac: Check for LZO version 2.
6969 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
6970 lzo/lzo1x.h instead of lzo1x.h.
6972 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
6975 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
6976 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
6978 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
6979 copying the data from PARTITION to P.
6981 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
6983 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
6984 negative, unload the module.
6986 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
6987 map is "pc_partition_map" but not "pc".
6988 (usage): Fix the description. The options are --boot-image and
6989 --core-image but not --boot-file or --core-file.
6990 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
6991 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
6994 * util/i386/pc/grub-install.in: Do not specify --boot-file or
6995 --core-file. Specify INSTALL_DEVICE as an argument.
6997 * util/console.c: Include config.h.
6998 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
6999 [HAVE_NCURSES_H]: Include ncurses.h.
7000 [HAVE_CURSES_H]: Include curses.h.
7001 [!A_NORMAL] (A_NORMAL): Defined as zero.
7002 [!A_STANDOUT] (A_STANDOUT): Likewise.
7004 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7006 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7008 * configure.ac: Check for curses libraries and headers.
7010 * Makefile.in (LIBCURSES): New variable.
7012 * genmk.rb (Script::rule): Set the executable bits.
7014 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7015 name of the PC partition map is "pc_partition_map" but not "pc".
7017 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7019 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7020 (modules): Likewise.
7021 (usage): Added descriptions for --modules and --grub-probefs.
7022 Handle --modules and --grub-probefs. Save the arguments in MODULES
7023 and GRUB_PROBEFS, respectively.
7024 Auto-detect a filesystem module against GRUBDIR. If the result is
7025 empty and modules are not specified explicitly, abort the
7026 installation. Add the result to MODULES.
7028 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7029 disk/powerpc/ieee1275/ofdisk.c,
7030 include/grub/powerpc/ieee1275/init.h and
7031 term/powerpc/ieee1275/ofconsole.c.
7032 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7033 term/ieee1275/ofconsole.c.
7035 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7037 * COPYING: Upgraded to the latest version. Only the address of the
7038 FSF office has changed.
7040 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7042 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7043 kern/ieee1275.c with kern/ieee1275/of.c.
7045 * kern/ieee1275.c: Moved to ...
7046 * kern/ieee1275/of.c: ... here.
7048 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
7050 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7053 * config.guess: Updated to the latest version from gnulib.
7054 * config.sub: Likewise.
7055 * install.sh: Likewise.
7056 * mkinstalldirs: Likewise.
7058 * include/grub/console.h: Removed. This file is arch-specific. Do
7059 not put this in include/grub.
7061 * include/grub/i386/pc/console.h: Resurrected.
7063 * util/console.c: Include grub/machine/console.h instead of
7065 * util/grub-emu.c: Likewise.
7067 2005-08-04 Marco Gerards <metgerards@student.han.nl>
7069 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7072 From Vincent Pelletier <subdino2004@yahoo.fr>
7073 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7074 Redefined to use grub_getwh.
7075 (grub_term): New member named getwh.
7076 (grub_getwh): New prototype.
7077 * kern/term.c (grub_getwh): New function.
7078 * term/i386/pc/console.c (grub_console_getwh): New function.
7079 (grub_console_term): New member `getwh'.
7080 * term/i386/pc/vga.c (grub_vga_getwh): New function.
7081 (grub_vga_term): New member `getwh'.
7082 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
7084 (grub_ofconsole_getw): New function.
7085 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7086 (grub_ofconsole_term): New field named getwh and new initial
7089 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
7091 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7092 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
7093 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7094 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7095 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7096 of <grub/machine/ieee1275.h>.
7097 * commands/ieee1275/reboot.c: Likewise.
7098 * boot/powerpc/ieee1275/ieee1275.c: Move ...
7099 * kern/ieee1275.c: ... to here. All users updated. Change all
7100 parameter structs to use new type `grub_ieee1275_cell_t'.
7101 * term/powerpc/ieee1275/ofconsole.c: Move ...
7102 * term/ieee1275/ofconsole.c: ... to here. All users updated.
7103 * disk/powerpc/ieee1275/ofdisk.c: Move ...
7104 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
7105 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7107 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
7108 Remove unused prototypes. All users updated.
7109 * include/grub/powerpc/ieee1275/console.h: Removed.
7110 * include/grub/powerpc/ieee1275/ieee1275.h: Define
7111 `grub_ieee1275_cell_t'.
7112 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
7113 Cast comparisons with -1 to the correct type.
7114 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
7115 type to match `grub_ieee1275_entry_fn'.
7117 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
7119 * DISTLIST: Added util/i386/pc/grub-probefs.c.
7121 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
7122 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
7124 (grub_probefs_SOURCES): New variable.
7126 * util/i386/pc/grub-probefs.c: New file.
7128 * util/i386/pc/grub-setup.c (main): Call
7129 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
7130 grub_hfs_init and grub_jfs_init to initialize the system. Call
7131 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
7132 grub_pc_partition_map_fini to finish the system.
7134 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
7136 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
7138 (grub_multiboot_load_elf32): Likewise.
7139 (grub_multiboot_is_elf64): Likewise.
7140 (grub_multiboot_load_elf64): Likewise.
7141 (grub_multiboot_load_elf): Likewise.
7142 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
7143 an ELF32 or ELF64 file.
7144 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
7146 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
7147 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
7148 NULL before calling FS->LABEL.
7149 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
7150 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
7151 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
7152 before calling FS->LABEL.
7154 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
7156 * util/i386/pc/grub-install.in (datadir): New variable.
7158 (pkgdatadir): New variable.
7159 (pkglibdir): Removed.
7161 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
7163 * DISTLIST: Added util/i386/pc/grub-install.in.
7165 * util/i386/pc/grub-install.in: New file.
7167 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
7168 (grub_install_SOURCES): Likewise.
7170 * genmk.rb: Added support for scripts.
7171 (Script): New class.
7172 (scripts): New variable.
7174 * Makefile.in (install-local): Install sbin_SCRIPTS by
7176 (uninstall): Remove sbin_SCRIPTS.
7178 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
7179 device, try to get a GRUB device by
7180 grub_util_biosdisk_get_grub_dev.
7183 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
7184 description for --device-map.
7186 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7188 Change the semantics of variable hooks. They now return strings
7189 instead of error values.
7191 * util/i386/pc/grub-setup.c: Include grub/env.h.
7192 (setup): Use grub_device_set_root instead of grub_env_set.
7194 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
7195 grub_env_get instead of grub_device_set_root and
7196 grub_device_get_root, respectively.
7198 * kern/main.c (grub_env_write_root): New function.
7199 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
7200 grub_env_set instead of grub_device_set_root.
7202 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
7204 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
7205 rather than calling ENV->WRITE_HOOK afterwards.
7206 (grub_env_get): Return the result of ENV->READ_HOOK rather than
7207 passing a pointer of a pointer.
7208 (grub_register_variable_hook): Change the types of "read_hook" and
7209 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
7211 Allocate the default empty string on the heap, because this string
7214 * kern/device.c: Include grub/env.h.
7215 (grub_device_set_root): Removed.
7216 (grub_device_get_root): Likewise.
7217 (grub_device_open): Use grub_env_get instead of
7218 grub_device_get_root.
7220 * include/grub/env.h (grub_env_read_hook_t): New type.
7221 (grub_env_write_hook_t): Likewise.
7222 (grub_env_var): Change the types of "read_hook" and "write_hook"
7223 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
7224 (grub_register_variable_hook): Likewise.
7226 * include/grub/device.h (grub_device_set_root): Removed.
7227 (grub_device_set_root): Likewise.
7229 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
7230 make sure that DIRNAME terminates with '/', so that
7231 grub_fat_find_dir will fail if PATH is not a directory.
7233 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
7235 Use the qualifier auto for print_files and print_files_long.
7236 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
7238 Put a newline only if there is no error.
7239 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
7242 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7244 * kern/partition.c (grub_partition_probe): Initialize PART to
7245 NULL. Otherwise, when no partition map is registered, this returns
7248 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
7250 * partmap/apple.c (apple_partition_map_iterate): Check if POS
7251 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
7254 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
7256 * commands/ls.c (grub_ls_list_disks): Print the filesystem
7257 information on each device, if it does not have partitions. Print
7258 "Device" instead of "Disk", because this function is not specific
7261 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
7262 static to ensure that it is put on the memory rather than a
7265 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7267 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
7268 (grub_cat_init): Likewise.
7269 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
7270 (options): Likewise.
7271 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
7272 (grub_configfile_init): Likewise.
7273 * font/manager.c (GRUB_MOD_INIT): Likewise.
7274 * commands/help.c (GRUB_MOD_INIT): Likewise.
7275 (grub_help_init): Likewise.
7276 * normal/command.c (grub_command_init): Likewise.
7277 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
7278 * disk/loopback.c (grub_loop_init): Likewise.
7279 (GRUB_MOD_INIT): Likewise.
7280 * commands/ls.c (grub_ls_init): Likewise.
7281 (GRUB_MOD_INIT): Likewise.
7282 (options): Likewise.
7283 * commands/boot.c (grub_boot_init): Likewise.
7284 (GRUB_MOD_INIT): Likewise.
7285 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
7286 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
7287 (GRUB_MOD_INIT): Likewise.
7288 * commands/cmp.c (grub_cmp_init): Likewise.
7289 (GRUB_MOD_INIT): Likewise.
7291 * normal/arg.c: Use <> instead of "" to include header files.
7292 (SHORT_ARG_HELP): New macro.
7293 (SHORT_ARG_USAGE): Likewise.
7294 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
7295 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
7297 (find_short): Check if C is 'h' or 'u' explicitly.
7298 (grub_arg_show_help): Use space characters instead of tabs. Treat
7299 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
7300 are shown with --help and --usage only if they are not used for
7302 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
7305 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
7306 const into "longarg". Change the type of "shortarg" to int.
7308 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7310 * boot/i386/pc/boot.S (boot_drive_check): New label.
7312 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
7315 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
7316 which do not pass a boot drive correctly. Copied from GRUB Legacy.
7318 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7320 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
7321 When turning off Gate A20, skip the check and return immediately,
7322 because this is not fatal usually.
7324 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
7326 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
7327 be 0x7C00 instead of 0x8000.
7329 * boot/i386/pc/pxeboot.S: Rewritten.
7331 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
7333 (gate_a20_check_state): Read a byte from 0x108000. Invert the
7336 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
7338 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
7339 robustness. This routine now supports a BIOS call and System
7340 Control Port A to modify the gate A20.
7342 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7345 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
7347 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
7348 device path and resulting ihandle.
7349 (grub_ofdisk_close): dprintf the ihandle being closed.
7350 (grub_ofdisk_read): dprintf function parameters.
7351 * kern/mm.c (grub_mm_init_region): Likewise.
7352 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
7353 (grub_linux_boot): dprintf the Linux entry point, initrd address and
7354 size, and boot arguments.
7355 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
7356 before loading into memory.
7357 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
7358 before loading into memory.
7360 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
7362 * kern/mm.c: Added much documentation.
7363 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
7364 8, set to 5 instead of 8.
7366 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
7368 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
7370 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
7371 (grub_mkdevicemap_SOURCES): New variable.
7373 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
7374 lib/device.c of GRUB Legacy.
7376 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
7378 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
7379 instead of PATH is NULL.
7381 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
7383 * commands/cmp.c (BUFFER_SIZE): New macro.
7384 (grub_cmd_cmp): Close the right file at the right time. Compare
7385 only data just read. Don't report files of different size as
7386 identical. Dynamically allocate buffers. Move variable
7387 declarations at the beginning of function.
7389 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
7391 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
7394 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
7396 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
7397 when backspace is pressed at beginning of line.
7399 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
7401 * DISTLIST: Added genfslist.sh.
7403 * normal/main.c (fs_module_list): New variable.
7404 (autoload_fs_module): New function.
7405 (read_fs_list): Likewise.
7406 (grub_normal_execute): Call read_fs_list.
7408 * kern/fs.c (grub_fs_autoload_hook): New variable.
7409 (grub_fs_probe): Added support for auto-loading.
7411 * include/grub/normal.h (struct grub_fs_module_list): New struct.
7412 (grub_fs_module_list_t): New type.
7414 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
7415 (grub_fs_autoload_hook): New prototype.
7417 * genfslist.sh: New file.
7419 * genmk.rb: Added a rule to generate a filesystem list.
7421 2005-06-30 Marco Gerards <metgerards@student.han.nl>
7423 * configure.ac: Fix the test for cross-compiling.
7425 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
7426 define GRUB_UTIL anymore.
7428 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
7429 so this function works on other systems than just big endian.
7430 (load_modules): Likewise.
7431 (add_segments): Likewise.
7433 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
7435 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
7436 contains `l' modifier, get a long from va_arg().
7438 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
7440 * kern/mm.c (grub_free): If the next free block which is being
7441 merged is the first free block, set the first block to the block
7443 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
7445 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7447 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
7448 `grub_ieee1275_chosen'.
7450 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7452 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
7453 (grub_ieee1275_chosen): New variable.
7454 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
7456 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
7457 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7458 Rename first argument to `phandle' for consistency.
7459 (grub_ieee1275_get_property_length): Likewise.
7460 (grub_ieee1275_next_property): Likewise. Change type of first argument
7461 to grub_ieee1275_phandle_t.
7462 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
7463 Move export next to declaration.
7464 (grub_ieee1275_chosen): New variable.
7465 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
7466 Correct cosmetic typo.
7467 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
7468 `grub_ieee1275_chosen'.
7469 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
7470 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
7471 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
7472 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
7473 `grub_ieee1275_chosen'.
7475 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
7477 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
7479 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
7480 /chosen/bootargs as "variable=value" pairs.
7482 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
7484 * include/grub/misc.h (grub_dprintf): New macro.
7485 (grub_real_dprintf): New prototype.
7486 (grub_strword): Likewise.
7487 (grub_iswordseparator): Likewise.
7488 * kern/misc.c (grub_real_dprintf): New function.
7489 (grub_strword): Likewise.
7490 (grub_iswordseparator): Likewise.
7492 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
7494 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
7495 (roundup): Remove macro.
7496 (grub_ieee1275_flags): Make static.
7497 (grub_ieee1275_realmode): Remove.
7498 (grub_ieee1275_test_flag): New function.
7499 (grub_ieee1275_set_flag): Likewise.
7500 (find_options): Rename to `grub_ieee1275_find_options'; update
7501 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
7502 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
7503 (cmain): New prototype.
7504 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
7505 `grub_ieee1275_flags' directly.
7506 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
7508 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
7509 Don't include grub/machine/init.h.
7510 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
7511 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7513 (grub_ieee1275_realmode): Likewise.
7514 (grub_ieee1275_flag): New enum.
7515 (grub_ieee1275_test_flag): New prototype.
7516 (grub_ieee1275_set_flag): New prototype.
7517 * include/grub/powerpc/ieee1275/init.h: Remove file.
7518 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
7519 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
7520 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
7521 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
7523 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
7524 `grub_ieee1275_test_flag'.
7525 (grub_ieee1275_encode_devname): Likewise.
7527 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
7529 * include/grub/powerpc/ieee1275/ieee1275.h
7530 (grub_ieee1275_encode_devname): New prototype.
7531 (grub_ieee1275_get_filename): Likewise.
7532 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
7534 (grub_set_prefix): Likewise.
7535 (grub_machine_init): Call grub_set_prefix.
7536 * kern/powerpc/ieee1275/openfw.c: Fix typos.
7537 (grub_parse_type): New enum.
7538 (grub_ieee1275_get_devargs): New function.
7539 (grub_ieee1275_get_devname): Likewise.
7540 (grub_ieee1275_parse_args): Likewise.
7541 (grub_ieee1275_get_filename): Likewise.
7542 (grub_ieee1275_encode_devname): Likewise.
7544 2005-03-30 Marco Gerards <metgerards@student.han.nl>
7546 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
7547 `grub_loader_unset'.
7549 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
7551 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
7552 instead of grub_ieee1275_interpret.
7553 (grub_halt_init): New function.
7554 (grub_halt_fini): Likewise.
7555 (GRUB_MOD_INIT): Correct message grammar.
7556 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
7557 instead of grub_ieee1275_interpret.
7558 (grub_reboot_init): New function.
7559 (grub_reboot_fini): Likewise.
7560 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
7561 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
7562 util/i386/pc/misc.c with commands/ieee1275/halt.c,
7563 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
7564 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
7566 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
7568 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
7570 (grub_halt): Likewise.
7571 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
7572 (cmain): Remove __attribute__((unused)).
7573 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
7574 (grub_heap_len): Likewise.
7575 (grub_machine_fini): New function.
7576 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
7577 (grub_halt): Likewise.
7578 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
7580 * util/powerpc/ieee1275/misc.c: New file.
7582 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7584 * DISTLIST: New file.
7585 * gendistlist.sh: Likewise.
7587 * Makefile.in (COMMON_DISTFILES): Removed.
7588 (BOOT_DISTFILES): Likewise.
7589 (CONF_DISTFILES): Likewise.
7590 (DISK_DISTFILES): Likewise.
7591 (FS_DISTFILES): Likewise.
7592 (INCLUDE_DISTFILES): Likewise.
7593 (KERN_DISTFILES): Likewise.
7594 (LOADER_DISTFILES): Likewise.
7595 (TERM_DISTFILES): Likewise.
7596 (UTIL_DISTFILES): Likewise.
7597 (DISTFILES): Likewise.
7598 (uninstall): Uninstall files in $(pkgdata_DATA).
7599 (DISTLIST): New target.
7600 (distdir): Use the contents of the file DISTLIST to get a list of
7603 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7605 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
7606 descriptor. This is ported from GRUB Legacy.
7608 * gencmdlist.sh: Added an extra semicolon to make it work with
7609 old sed versions. Reported by Robert Bihlmeyer
7610 <robbe@orcus.priv.at>.
7612 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
7614 Automatic loading of commands is supported.
7616 * normal/main.c (read_command_list): New function.
7617 (grub_normal_execute): Call read_command_list.
7619 * normal/command.c (grub_register_command): Return zero or CMD.
7620 Allocate CMD->NAME from the heap.
7621 Initialize CMD->MODULE_NAME to zero.
7622 Find the same name as well. If the same command is found and it is
7623 a dummy command, overwrite members. If it is not a dummy command,
7625 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
7626 (grub_command_find): If a dummy command is found, load a module
7627 and retry to find a command only once.
7629 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
7630 make sure that each command is loaded.
7632 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
7634 (struct grub_command): Remove const from the member `name'.
7635 Add a new member `module_name'.
7636 (grub_register_command): Return grub_command_t.
7638 * commands/help.c (grub_cmd_help): Call grub_command_find to make
7639 sure that each command is loaded.
7641 * genmk.rb (PModule::rule): Specify a module name without the
7642 suffix ".mod" to gencmdlist.sh.
7644 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7646 * gencmdlist.sh: New file.
7648 * genmk.rb (PModule::rule): Generate a rule for a command list.
7650 Generate command.lst from $(COMMANDFILES).
7652 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
7653 (DATA): Added $(pkgdata_DATA).
7654 (install-local): Install files in $(pkgdata_DATA).
7656 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7658 * term/i386/pc/vga.c (debug_command): Removed.
7659 (GRUB_MOD_INIT): Do not register the command "debug".
7661 From Hollis Blanchard:
7662 * commands/configfile.c: New file.
7663 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7664 commands/configfile.c.
7665 (pkgdata_MODULES): Added configfile.mod.
7666 (configfile_mod_SOURCES): New variable.
7667 (configfile_mod_CFLAGS): Likewise.
7668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7669 commands/configfile.c.
7670 (pkgdata_MODULES): Added configfile.mod.
7671 (configfile_mod_SOURCES): New variable.
7672 (configfile_mod_CFLAGS): Likewise.
7673 * util/grub-emu.c (main): Call grub_configfile_init and
7674 grub_configfile_fini.
7675 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
7677 [GRUB_UTIL] (grub_configfile_fini): Likewise.
7679 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
7681 * normal/arg.c (grub_arg_show_help): Do not show the bug report
7684 * commands/help.c (grub_cmd_help): Do not print newlines after
7685 the last command in print_command_help.
7687 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
7689 * commands/default.h: New file.
7690 * commands/timeout.h: Likewise.
7691 * normal/context.c: Likewise.
7693 * util/misc.c: Do not include sys/times.h.
7694 Include sys/time.h and grub/machine/time.h.
7695 (grub_get_rtc): Rewritten with gettimeofday.
7697 * util/grub-emu.c (main): Call grub_default_init and
7698 grub_timeout_init before grub_normal_init, and call
7699 grub_timeout_fini and grub_default_fini after grub_main.
7701 * util/console.c (grub_ncurses_checkkey): Return the read
7704 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
7707 * normal/main.c (read_config_file): Push MENU. If this fails,
7708 print an error and wait for a user input.
7709 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
7710 If a menu is empty or an error occurs, pop MENU.
7711 (grub_normal_execute): Pop and free MENU after grub_menu_run
7714 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
7716 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
7718 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7720 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
7722 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7725 * include/grub/normal.h (struct grub_menu_list): New struct.
7726 (grub_menu_list_t): New type.
7727 (struct grub_context): New struct.
7728 (grub_context_t): New type.
7729 (grub_register_command): Got rid of EXPORT_FUNC.
7730 (grub_unregister_command): Likewise.
7731 (grub_context_get): New prototype.
7732 (grub_context_get_current_menu): Likewise.
7733 (grub_context_push_menu): Likewise.
7734 (grub_context_pop_menu): Likewise.
7735 [GRUB_UTIL] (grub_default_init): Likewise.
7736 [GRUB_UTIL] (grub_default_fini): Likewise.
7737 [GRUB_UTIL] (grub_timeout_init): Likewise.
7738 [GRUB_UTIL] (grub_timeout_fini): Likewise.
7740 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
7741 commands/timeout.c and normal/context.c.
7742 (pkgdata_MODULES): Added default.mod and timeout.mod.
7743 (normal_mod_SOURCES): Added normal/context.c.
7744 (default_mod_SOURCES): New variable.
7745 (default_mod_CFLAGS): Likewise.
7746 (timeout_mod_SOURCES): Likewise.
7747 (timeout_mod_CFLAGS): Likewise.
7748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
7750 (pkgdata_MODULES): Added default.mod and timeout.mod.
7751 (normal_mod_SOURCES): Added normal/context.c.
7752 (default_mod_SOURCES): New variable.
7753 (default_mod_CFLAGS): Likewise.
7754 (timeout_mod_SOURCES): Likewise.
7755 (timeout_mod_CFLAGS): Likewise.
7757 * Makefile.in (all-local): Added $(MKFILES).
7759 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
7761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
7762 (grub_emu_SOURCES): Likewise.
7763 (pkgdata_MODULES): Add `sun.mod'.
7764 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7765 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7767 (pkgdata_MODULES): Add `sun.mod'.
7768 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7769 * include/grub/partition.h (grub_sun_partition_map_init): New
7771 (grub_sun_partition_map_fini): Likewise.
7772 * partmap/sun.c: New file.
7773 * util/grub-emu.c (main): Initialize and de-initialize the sun
7774 partitionmap support.
7776 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
7778 This implements an Emacs-like menu entry editor.
7780 * normal/menu_entry.c: New file.
7782 * util/console.c (grub_ncurses_putchar): Translate some Unicode
7783 characters to ASCII.
7784 (saved_char): New variable.
7785 (grub_ncurses_checkkey): Rewritten completely.
7786 (grub_ncurses_getkey): Likewise.
7787 (grub_ncurses_init): Call raw instead of cbreak.
7789 * normal/menu.c (print_entry): Do not put a space.
7790 (init_page): Renamed to ...
7791 (grub_menu_init_page): ... this. All callers changed.
7792 (edit_menu_entry): Removed.
7793 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
7795 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
7797 * kern/misc.c (grub_vprintf): Call grub_refresh.
7799 * normal/menu.c (DISP_LEFT): Renamed to ...
7800 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
7801 * normal/menu.c (DISP_UP): Renamed to ...
7802 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
7803 * normal/menu.c (DISP_RIGHT): Renamed to ...
7804 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
7805 * normal/menu.c (DISP_DOWN): Renamed to ...
7806 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
7807 * normal/menu.c (DISP_HLINE): Renamed to ...
7808 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
7809 * normal/menu.c (DISP_VLINE): Renamed to ...
7810 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
7811 * normal/menu.c (DISP_UL): Renamed to ...
7812 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
7813 * normal/menu.c (DISP_UR): Renamed to ...
7814 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
7815 * normal/menu.c (DISP_LL): Renamed to ...
7816 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
7817 * normal/menu.c (DISP_LR): Renamed to ...
7818 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
7819 * normal/menu.c (TERM_WIDTH): Renamed to ...
7820 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
7821 * normal/menu.c (TERM_HEIGHT): Renamed to ...
7822 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
7823 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
7824 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
7825 * normal/menu.c (TERM_MARGIN): Renamed to ...
7826 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
7827 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
7828 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
7829 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
7830 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
7831 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
7832 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
7833 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
7834 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
7835 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
7836 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
7837 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
7838 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
7839 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
7840 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
7841 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
7842 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
7843 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
7844 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
7845 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
7846 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
7847 All callers changed.
7849 * include/grub/normal.h: New prototype.
7851 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7852 normal/menu_entry.c.
7853 (normal_mod_SOURCES): Likewise.
7854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7855 (normal_mod_SOURCES): Likewise.
7857 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
7859 * include/grub/normal.h (grub_halt_init): New prototype.
7860 (grub_halt_fini): Likewise.
7861 (grub_reboot_init): Likewise.
7862 (grub_reboot_fini): Likewise.
7864 * util/grub-emu.c: Include signal.h.
7865 (main_env): New global variable.
7866 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
7868 (grub_machine_fini): New function.
7869 (main): Call grub_halt_init and grub_reboot_init before
7870 grub_main, and grub_reboot_fini and grub_halt_fini after it.
7871 Call setjmp with MAIN_ENV to go back afterwards.
7872 Call grub_machine_fini right before return.
7874 * include/grub/util/misc.h: Include setjmp.h.
7875 (main_env): New prototype.
7877 * include/grub/kernel.h (grub_machine_fini): New prototype.
7878 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
7879 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
7881 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
7882 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
7883 * term/i386/pc/console.c (grub_console_fini): Likewise.
7885 * util/i386/pc/misc.c: New file.
7887 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7888 util/i386/pc/misc.c, commands/i386/pc/halt.c and
7889 commands/i386/pc/reboot.c.
7891 2005-02-14 Guillem Jover <guillem@hadrons.org>
7893 * include/grub/dl.h (grub_dl_check_header): New prototype.
7894 (grub_arch_dl_check_header): Change return type to grub_err_t,
7895 remove size parameter and export function. Update all callers.
7896 * kern/dl.c (grub_dl_check_header): New function.
7897 (grub_dl_load_core): Use `grub_dl_check_header' instead of
7898 `grub_arch_dl_check_header'. Check ELF type. Check if sections
7899 are inside the core.
7900 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
7901 independent ELF header checks.
7902 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
7903 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
7904 `grub_dl_check_header' instead of explicit checks. Check for the
7906 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
7907 `grub_dl_check_header' instead of explicit checks. Remove arch
7908 specific ELF header checks.
7910 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
7913 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
7915 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
7916 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
7918 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
7920 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
7921 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
7922 (part_map_iterate): Clear `grub_errno' and return 0 if
7923 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
7924 * partmap/amiga.c (amiga_partition_map_iterate): Return
7925 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
7926 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7928 2005-02-01 Guillem Jover <guillem@hadrons.org>
7930 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
7933 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7935 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
7937 (grub_rescue_cmd_linux): New prototype.
7938 (grub_rescue_cmd_initrd): Likewise.
7939 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
7941 (grub_linux_release_mem): Release the memory for the initrd.
7942 (grub_load_linux): Renamed from this...
7943 (grub_rescue_cmd_linux): ...To this. Changed all callers.
7944 Changed `entry' not to be static. Loop over memory regions to
7945 find another one when the default fails.
7946 (grub_rescue_cmd_initrd): New function.
7947 (grub_linux_init): Remove function.
7948 (grub_linux_fini): Likewise.
7949 (GRUB_MOD_INIT): Register `initrd'.
7950 (GRUB_MOD_FINI): Unregister `initrd'.
7951 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
7953 (grub_linux_normal_fini): Likewise.
7954 (GRUB_MOD_INIT): Register `initrd'.
7955 (GRUB_MOD_FINI): Unregister `initrd'.
7957 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7959 * commands/help.c: New file.
7960 * normal/arg.c (show_help): Renamed to...
7961 (grub_arg_show_help): ... this.
7962 * commands/i386/pc/halt.c: New file.
7963 * commands/i386/pc/reboot.c: Likewise.
7964 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
7965 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
7966 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
7967 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
7969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7971 (pkgdata_MODULES): Add `help.mod'.
7972 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
7973 * grub/i386/pc/init.h (grub_reboot): New prototype.
7974 (grub_halt): Likewise.
7975 * include/grub/normal.h (grub_arg_show_help): New prototype.
7976 (grub_help_init): Likewise.
7977 (grub_help_fini): Likewise.
7978 * util/grub-emu.c (main): Initialize and deinitialize the help
7981 * normal/cmdline.c (grub_cmdline_get): Doc fix.
7983 * normal/command.c (grub_command_init): Fixed the description of
7984 the `set' and `unset' commands.
7986 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7988 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
7990 * commands/ieee1275/halt.c: New file.
7991 * commands/ieee1275/reboot.c: Likewise.
7992 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
7993 `__attribute__ ((unused))'. Some GCS related fixed.
7994 (grub_suspend_init) [GRUB_UTIL]: Function removed.
7995 (grub_suspend_fini): Likewise.
7996 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
7998 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
7999 (halt_mod_CFLAGS): New variables.
8000 * include/grub/powerpc/ieee1275/ieee1275.h
8001 (grub_ieee1275_interpret): New prototype.
8003 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8005 * include/grub/misc.h (memmove): New prototype.
8008 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8010 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8011 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8013 2005-01-22 Marco Gerards <metgerards@student.han.nl>
8015 * kern/misc.c (grub_strndup): Function rewritten.
8017 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8019 * normal/menu.c (TERM_WIDTH): Macro redefined.
8020 (TERM_TOP_BORDER_Y): Likewise.
8021 (draw_border): Replaced while-loop by a for-loop. Make the number
8022 of lines consistent with the number of lines displayed in
8023 print_entries. Added a margin below the rectangle.
8024 (print_entry): Make the entry fit in the rectangle.
8025 (print_entries): Display the scroll arrows next to the right
8028 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8030 * fs/minix.c (grub_minix_find_file): Reserve more space for
8031 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8032 `grub_strncpy' to copy `path' into it.
8034 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8036 Add the loopback device, a device via which files can be accessed
8039 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8040 (pkgdata_MODULES): Add loopback.mod.
8041 (loopback_mod_SOURCES): New variable.
8042 (loopback_mod_CFLAGS): Likewise.
8043 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8045 (pkgdata_MODULES): Add loopback.mod.
8046 (loopback_mod_SOURCES): New variable.
8047 (loopback_mod_CFLAGS): Likewise.
8048 * disk/loopback.c: new file.
8049 * include/grub/normal.h (grub_loop_init): New prototype.
8050 (grub_loop_fini): New prototype.
8051 * util/grub-emu.c (main): Initialize and de-initialize loopback
8053 * include/grub/disk.h (grub_disk_dev_id): Add
8054 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8056 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
8058 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8060 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8061 (suspend_mod_SOURCES): New variable.
8062 (suspend_mod_CFLAGS): Likewise.
8063 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8065 * commands/ieee1275/suspend.c: New file.
8067 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8069 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8070 ((unused))' to `__attribute__ ((used))'.
8071 (GRUB_MOD_FINI): Likewise.
8072 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8073 * genmk.rb (PModule): Assign space to common symbols when linking
8076 2005-01-20 Marco Gerards <metgerards@student.han.nl>
8078 * include/grub/mm.h (grub_mm_init_region): Change the type of the
8079 `unsigned' arguments to `grub_size_t'.
8080 (grub_malloc): Likewise.
8081 (grub_realloc): Likewise.
8082 (grub_memalign): Likewise.
8083 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8084 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8085 * util/misc.c (grub_malloc): Likewise.
8086 (grub_realloc): Likewise.
8087 * kern/mm.c (get_header_from_pointer): Change the casts to
8088 `unsigned' into a cast to `grub_size_t'.
8090 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8091 point to `currnode' when `currnode' is changed.
8093 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
8094 Schottelius <nico-linux@schottelius.org>.
8096 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
8098 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8099 (note_path): Remove variable.
8100 (GRUB_IEEE1275_NOTE_NAME): New macro.
8101 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8102 (grub_ieee1275_note_hdr): New structure.
8103 (grub_ieee1275_note_desc): Likewise.
8104 (grub_ieee1275_note): Likewise.
8105 (load_note): Remove `dir' argument. All callers updated. Remove
8106 `note_img' and `path'. Do not load a file from `note_path'.
8107 Initialize a struct grub_ieee1275_note and write that to `out'.
8108 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
8110 2005-01-05 Marco Gerards <metgerards@student.han.nl>
8112 * util/misc.c (grub_util_read_image): Revert last change. It
8113 called `grub_util_read_at', which seeks from the beginning of the
8116 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
8118 * TODO: Add note about endianness in grub-mkimage.
8119 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
8121 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
8122 (grub_mkimage_SOURCES): New target.
8123 * include/grub/kernel.h (grub_start_addr): Remove variable.
8124 (grub_end_addr): Likewise.
8125 (grub_total_module_size): Likewise.
8126 (grub_kernel_image_size): Likewise.
8127 (GRUB_MODULE_MAGIC): New constant.
8128 (grub_module_info): New structure.
8129 (grub_arch_modules_addr): New prototype.
8130 (grub_get_end_addr): Remove prototype.
8131 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
8132 * include/grub/powerpc/ieee1275/kernel.h: New file.
8133 * include/grub/util/misc.h (grub_util_get_fp_size): New
8135 (grub_util_read_at): Likewise.
8136 (grub_util_write_image_at): Likewise.
8137 * kern/main.c (grub_get_end_addr): Remove function.
8138 (grub_load_modules): Call grub_arch_modules_addr instead of using
8139 grub_end_addr. Look for a grub_module_info struct in memory. Use
8140 the grub_module_info fields instead of calling grub_get_end_addr
8141 as loop conditions. Move grub_add_unused_region code here.
8142 (grub_add_unused_region): Remove function.
8143 * kern/i386/pc/init.c: Include grub/cache.h.
8144 (grub_machine_init): Remove call to grub_get_end_addr. Remove
8145 one call to add_mem_region.
8146 (grub_arch_modules_addr): New function.
8147 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
8148 (grub_total_module_size): Likewise.
8149 Include grub/machine/kernel.h.
8150 (grub_arch_modules_addr): New function.
8151 * util/grub-emu.c (grub_end_addr): Remove variable.
8152 (grub_total_module_size): Likewise.
8153 (grub_arch_modules_addr): New function.
8154 * util/misc.c: Include unistd.h.
8155 (grub_util_get_fp_size): New function.
8156 (grub_util_read_at): Likewise.
8157 (grub_util_write_image_at): Likewise.
8158 (grub_util_read_image): Call grub_util_read_at.
8159 (grub_util_write_image): Call grub_util_write_image_at.
8160 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
8161 additional memory in kernel_img for a struct grub_module_info.
8162 Fill in that grub_module_info.
8163 * util/powerpc/ieee1275/grub-mkimage.c: New file.
8165 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8167 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
8169 * include/grub/powerpc/ieee1275/ieee1275.h
8170 (grub_ieee1275_milliseconds): New prototype.
8171 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
8173 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
8174 grub_ieee1275_milliseconds.
8176 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8178 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
8180 (find_options): New function.
8181 (cmain): Call find_options.
8182 * include/grub/powerpc/ieee1275/ieee1275.h
8183 (grub_ieee1275_realmode): New extern variable.
8184 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
8185 grub_map if grub_ieee1275_realmode is false.
8187 2004-12-29 Marco Gerards <metgerards@student.han.nl>
8189 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
8190 lines are inserted and make it work like readline. Reported by
8191 Vincent Pelletier <subdino2004@yahoo.fr>.
8193 2004-12-28 Marco Gerards <metgerards@student.han.nl>
8195 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
8197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
8198 `kern/powerpc/cache.S'.
8200 2004-12-27 Marco Gerards <metgerards@student.han.nl>
8202 * genmk.rb: Handle the `Program' class in the main loop. Written
8203 by Johan Rydberg <jrydberg@gnu.org>.
8204 (Program): New class.
8205 (programs): New variable.
8206 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
8207 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
8208 instead of "grub/kernel.h". Include <grub/machine/init.h>.
8209 (help_arch): Function removed.
8210 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
8211 `powerpc/libgcc.h' and `loader.h'.
8212 (pkgdata_PROGRAMS): New variable.
8213 (sbin_UTILITIES): Variable removed.
8214 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
8215 (grubof_SOURCES): Variable re-defined so it only includes the
8217 (grubof_CFLAGS): Remove `-DGRUBOF'.
8218 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
8219 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
8220 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
8221 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
8222 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
8223 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
8224 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
8225 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
8226 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
8227 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
8228 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8229 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
8230 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
8231 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
8232 (pc_mod_CFLAGS): New variables.
8233 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
8234 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
8235 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
8236 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
8238 * include/grub/i386/pc/init.h (grub_os_area_addr)
8239 (rub_os_area_size): ... to here.
8240 * include/grub/powerpc/ieee1275/ieee1275.h
8241 (grub_ieee1275_entry_fn): Export symbol.
8242 * include/grub/powerpc/ieee1275/init.h: New file.
8243 * include/grub/powerpc/libgcc.h: Likewise.
8244 * include/grub/cache.h: Likewise.
8245 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
8246 <hollis@penguinppc.org>.
8247 * kern/dl.c: Include <grub/cache.h>.
8248 (grub_dl_flush_cache): New function.
8249 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
8251 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
8252 (grub_console_init): Removed prototypes.
8253 (grub_machine_init): Don't initialize the modules anymore.
8254 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
8256 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
8257 Macro undef removed.
8258 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
8259 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
8260 relocation `R_PPC_REL32'. Return an error when the relocation is
8262 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
8263 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
8264 * util/misc.c (grub_arch_sync_caches): Likewise.
8266 2004-12-19 Marco Gerards <metgerards@student.han.nl>
8268 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
8269 `symlist.c', add `grubof_symlist.c'.
8270 (symlist.c): Variable removed.
8271 (grubof_HEADERS): Variable added.
8272 (grubof_symlist.c): New target.
8273 (kernel_syms.lst): Use `grubof_HEADERS' instead of
8274 `kernel_img_HEADERS'.
8275 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
8276 * kern/powerpc/dl.c: New file.
8277 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
8279 (grub_arch_dl_relocate_symbols): Likewise.
8280 (grub_register_exported_symbols): Likewise.
8282 2004-12-13 Marco Gerards <metgerards@student.han.nl>
8284 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
8285 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
8286 to fail instead. Reported by Vincent Pelletier
8287 <subdino2004@yahoo.fr>.
8289 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
8290 it is not allocated. Reported by Vincent Pelletier
8291 <subdino2004@yahoo.fr>.
8293 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
8294 output so the output looks better.
8296 2004-12-04 Marco Gerards <metgerards@student.han.nl>
8298 Modulize the partition map support and add support for the amiga
8301 * commands/ls.c: Include <grub/partition.h> instead of
8302 <grub/machine/partition.h>.
8303 * kern/disk.c: Likewise.
8304 * kern/rescue.c: Likewise.
8305 * loader/i386/pc/chainloader.c: Likewise.
8306 * normal/cmdline.c: Likewise.
8307 * kern/powerpc/ieee1275/init.c: Likewise.
8308 (grub_machine_init): Call `grub_pc_partition_map_init',
8309 `grub_amiga_partition_map_init' and
8310 `grub_apple_partition_map_init'.
8311 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
8312 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
8313 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
8314 `partition.h' and `pc_partition.h'.
8315 (grub_setup_SOURCES): Remove
8316 `disk/i386/pc/partition.c'. Add `kern/partition.c',
8317 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8318 (grub_emu_SOURCES): Likewise.
8319 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
8320 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
8321 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
8322 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8323 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
8324 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8325 (grubof_SOURCES): Likewise.
8326 * disk/i386/pc/partition.c: File removed.
8327 * disk/powerpc/ieee1275/partition.c: Likewise.
8328 * include/grub/powerpc/ieee1275/partition.h: Likewise.
8329 * include/grub/i386/pc/partition.h: Likewise.
8330 * kern/partition.c: New file.
8331 * partmap/amiga.c: Likewise.
8332 * partmap/apple.c: Likewise.
8333 * partmap/pc.c: Likewise.
8334 * include/grub/partition.h: Likewise..
8335 * include/grub/pc_partition.h: Likewise.
8336 * util/grub-emu.c: Include <grub/partition.h> instead of
8337 <grub/machine/partition.h>.
8338 (main): Call `grub_pc_partition_map_init',
8339 `grub_amiga_partition_map_init' and
8340 `grub_apple_partition_map_init' and deinitialize afterwards.
8341 * util/i386/pc/biosdisk.c: Include `#include
8342 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8343 `<grub/machine/partition.h>'.
8344 * util/i386/pc/grub-setup.c: Likewise.
8345 * util/i386/pc/biosdisk.c: Likewise.
8346 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
8347 partition information in case of a PC partition.
8348 * util/i386/pc/grub-setup.c: Include `#include
8349 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8350 `<grub/machine/partition.h>'.
8351 (setup): Only access the PC specific partition information in case
8354 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
8356 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
8357 (grub_longjmp): Likewise.
8358 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
8360 * normal/powerpc/setjmp.S: New file.
8361 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8362 `normal/powerpc/setjmp.S'.
8363 (grubof_CFLAGS): Add `-DGRUBOF'.
8364 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
8365 [GRUB_UTIL && !GRUBOF].
8367 2004-11-16 Marco Gerards <metgerards@student.han.nl>
8369 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
8370 property named `name'. Correctly handle the error returned by
8371 `grub_ieee1275_finddevice' if a device can not be opened.
8373 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
8375 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
8376 `actual' for negativity.
8377 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8380 2004-11-01 Marco Gerards <metgerards@student.han.nl>
8382 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
8383 (PAGE_OFFSET): New macro.
8384 (CRTC_ADDR_PORT): Likewise.
8385 (CRTC_DATA_PORT): Likewise.
8386 (START_ADDR_HIGH_REGISTER): Likewise.
8387 (START_ADDR_LOW_REGISTER): Likewise.
8388 (GRAPHICS_ADDR_PORT): Likewise.
8389 (GRAPHICS_DATA_PORT): Likewise.
8390 (READ_MAP_REGISTER): Likewise.
8391 (INPUT_STATUS1_REGISTER): Likewise.
8392 (INPUT_STATUS1_VERTR_BIT): Likewise.
8393 (page): New variable.
8394 (wait_vretrace): New function.
8395 (set_read_map): Likewise.
8396 (set_start_address): Likewise.
8397 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
8399 (check_vga_mem): Take the page into account.
8400 (write_char): Likewise.
8401 (write_cursor): Likewise.
8402 (scroll_up): Likewise. Copy the page to the page that is not
8403 shown and switch between both pages.
8404 (grub_vga_putchar): Fix off by one error.
8405 (grub_vga_cls): Wait for the vertical retrace. Take the page into
8408 2004-11-01 Marco Gerards <metgerards@student.han.nl>
8410 Add support for iso9660 (including rockridge).
8412 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8413 (iso9660_mod_SOURCES): New variable.
8414 (iso9660_mod_CFLAGS): Likewise.
8415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8416 * include/grub/fs.h (grub_iso9660_init): New prototype.
8417 * util/grub-emu.c (main): Call `grub_iso9660_init'.
8418 * fs/iso9660.c: New file.
8420 * include/grub/misc.h (grub_strncat): New prototype.
8421 * kern/misc.c (grub_strncat): New function.
8423 * fs/hfs.c (grub_hfs_mount): Translate the error
8424 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
8425 * fs/jfs.c (grub_jfs_mount): Likewise.
8426 * fs/ufs.c (grub_ufs_mount): Likewise.
8428 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
8430 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
8431 which initialized BAT registers.
8432 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
8433 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8435 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
8436 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8438 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
8439 (grub_mapclaim): Likewise.
8440 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
8441 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
8444 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
8446 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
8447 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
8448 -ffreestanding and -msoft-float.
8450 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
8452 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
8453 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
8454 set in grub_ieee1275_flags.
8456 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
8458 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
8460 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
8461 grub_console_init first.
8462 Change the memory range used for grub_ieee1275_claim and
8463 grub_mm_init_region.
8464 Print an error message if the claim fails.
8465 Include <grub/misc.h>.
8467 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
8469 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
8470 Call grub_children_iterate for device nodes of type `scsi',
8472 (grub_ofdisk_open): Remove manual device alias resolution.
8473 Fix memory leak when device cannot be opened.
8474 * include/grub/powerpc/ieee1275/ieee1275.h
8475 (grub_children_iterate): New prototype.
8476 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
8478 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8479 Return -1 if args.size was -1.
8481 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8483 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
8484 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
8485 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
8486 Open Firmware's memory for it; claim memory from _start to _end.
8487 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
8489 (_start): Zero BSS from __bss_start to _end.
8490 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8492 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
8494 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8496 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
8497 -1 if args.base was -1.
8499 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
8501 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
8502 escape sequence instead of a literal ^L. Also call
8503 grub_ofconsole_gotoxy.
8505 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
8507 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
8508 void * arguments to grub_addr_t. All callers updated. Also make
8509 the `result' argument optional.
8510 (grub_ieee1275_release): change void * arguments to grub_addr_t.
8511 All callers updated.
8513 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
8515 * commands/ls.c (grub_ls_list_files): Use the string following the
8516 initial ')', if present, as the filesystem path.
8517 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
8519 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
8521 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
8523 Make the source code of the menu interface more readable.
8525 * normal/menu.c: Include grub/mm.h.
8526 (TERM_WIDTH): New macro.
8527 (TERM_HEIGHT): Likewise.
8528 (TERM_INFO_HEIGHT): Likewise.
8529 (TERM_MARGIN): Likewise.
8530 (TERM_SCROLL_WIDTH): Likewise.
8531 (TERM_TOP_BORDER_Y): Likewise.
8532 (TERM_LEFT_BORDER_X): Likewise.
8533 (TERM_BORDER_WIDTH): Likewise.
8534 (TERM_MESSAGE_HEIGHT): Likewise.
8535 (TERM_BORDER_HEIGHT): Likewise.
8536 (TERM_NUM_ENTRIES): Likewise.
8537 (TERM_FIRST_ENTRY_Y): Likewise.
8538 (TERM_ENTRY_WIDTH): Likewise.
8539 (TERM_CURSOR_X): Likewise.
8540 (draw_border): Use macros instead of magic numbers.
8541 (print_entry): Likewise.
8542 (print_entries): Likewise.
8543 (run_menu): Likewise. Also, handle the key 'e'.
8544 (run_menu_entry): Ignore empty command lines.
8545 (print_message): Added a new argument EDIT. If EDIT is true,
8546 print a different message.
8547 (init_page): Likewise.
8548 (edit_menu_entry): New function. Not implemented yet.
8550 2004-09-17 Marco Gerards <metgerards@student.han.nl>
8552 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
8553 can be loaded from normal mode.
8555 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
8557 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
8558 (multiboot_mod_CFLAGS): New variables.
8559 * loader/i386/pc/linux_normal.c: New file.
8560 * loader/i386/pc/multiboot_normal.c: Likewise.
8562 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
8565 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
8566 `fdiro' to read the mode information from instead of `diro'.
8568 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
8569 looking up a symlink.
8571 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
8573 * normal/command.c (grub_command_execute): Don't parse the
8574 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
8575 flags of the command.
8577 * normal/menu.c (grub_menu_run): Fix typo.
8579 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
8581 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
8583 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
8584 `y + 1' instead of `y - 1'.
8586 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
8588 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
8590 From Hollis Blanchard <hollis@penguinppc.org>:
8591 * kern/misc.c (memmove): New alias for grub_memmove.
8592 (memcmp): New alias for grub_memcmp.
8593 (memset): New alias for grub_memset.
8594 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8595 Change "int handle" to "grub_ieee1275_phandle_t handle".
8596 * include/grub/powerpc/ieee1275/ieee1275.h
8597 (grub_ieee1275_get_property): Likewise.
8599 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
8601 Added normal mode command `chainloader' as module chain.mod, which
8602 depends on normal.mod and _chain.mod.
8604 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
8605 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
8606 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
8608 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
8609 but arguments parsing moved to ...
8610 (grub_chainloader_cmd): ... here. New function.
8611 * include/grub/i386/pc/chainloader.h: New file.
8612 * loader/i386/pc/chainloader_normal.c: Likewise.
8614 2004-09-11 Marco Gerards <metgerards@student.han.nl>
8616 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
8617 (grub_mkimage_LDFLAGS): Likewise.
8618 (grub_emu_SOURCES): Likewise.
8619 (kernel_img_HEADERS): Added fshelp.h.
8620 * fs/ext2.c: Include <grub/fshelp.h>.
8621 (FILETYPE_REG): New macro.
8622 (FILETYPE_INO_REG): Likewise.
8623 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
8625 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
8627 (grub_fshelp_node): New struct.
8628 (grub_ext2_data): Added member `diropen'. Changed member `inode'
8630 (grub_ext2_get_file_block): Removed function.
8631 (grub_ext2_read_block): New function.
8632 (grub_ext2_read_file): Replaced parameter `data' by `node'.
8633 This function was written.
8634 (grub_ext2_mount): Read the root inode. Create a diropen struct.
8635 (grub_ext2_find_file): Removed function.
8636 (grub_ext2_read_symlink): New function.
8637 (grub_ext2_iterate_dir): Likewise.
8638 (grub_ext2_open): Rewritten.
8639 (grub_ext2_dir): Rewritten.
8640 * include/grub/fshelp.h: New file.
8641 * fs/fshelp.c: Likewise.
8643 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
8645 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
8646 (print_message): Add a missing newline.
8647 (run_menu): Added timeout support.
8648 (run_menu_entry): New local function.
8649 (grub_menu_run): Added support for booting.
8651 * kern/loader.c (grub_loader_is_loaded): New function.
8653 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
8654 (grub_get_rtc): Exported.
8656 * include/grub/i386/pc/time.h: Include grub/symbol.h.
8657 (grub_get_rtc): Exported.
8659 * include/grub/normal.h (struct grub_command_list): Remove
8660 constant from the member `command'.
8662 * include/grub/loader.h (grub_loader_is_loaded): Declared.
8664 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
8666 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
8668 2004-08-28 Marco Gerards <metgerards@student.han.nl>
8670 Add support for the JFS filesystem.
8672 * fs/jfs.c: New file.
8673 * include/grub/fs.h (grub_jfs_init): New prototype.
8674 (grub_jfs_fini): New prototype.
8675 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
8676 (grub_emu_SOURCES): Likewise.
8677 (pkgdata_MODULES): Add jfs.mod.
8678 (jfs_mod_SOURCES): New variable.
8679 (jfs_mod_CFLAGS): Likewise.
8680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
8681 (grubof_SOURCES): Likewise.
8682 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
8684 * fs/fat.c (grub_fat_find_dir): Convert the filename little
8685 endian to the host endian.
8686 (grub_fat_utf16_to_utf8): Move function from there...
8687 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
8688 the endianess of the source string anymore.
8689 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
8691 2004-08-24 Marco Gerards <metgerards@student.han.nl>
8693 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
8694 (grub_boot_fini) [GRUB_UTIL]: Likewise.
8695 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
8696 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
8698 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
8699 (grub_hfs_iterate_dir): Make the function static. Add prototypes
8700 for `node_found' and `it_dir'.
8701 (grub_hfs_dir): Add prototype for `dir_hook'.
8703 * fs/minix.c (grub_minix_get_file_block): Add prototype for
8704 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
8705 and `indir32' to silence a gcc warning.
8707 * include/grub/fs.h (grub_hfs_init): New prototype.
8708 (grub_hfs_fini): Likewise.
8711 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8713 Each disk device has its own id now. This is useful to make use
8714 of multiple disk devices.
8716 * include/grub/disk.h (grub_disk_dev_id): New enum.
8717 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
8718 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
8720 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
8721 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8723 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
8724 GRUB_DISK_DEVICE_OFDISK_ID as an id.
8726 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
8727 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8729 * include/grub/disk.h (struct grub_disk_dev): Added a new member
8730 "id" which is used by the cache manager.
8732 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
8735 2004-08-18 Marco Gerards <metgerards@student.han.nl>
8737 * fs/hfs.c: New file.
8738 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
8739 (grub_emu_SOURCES): Likewise.
8740 (pkgdata_MODULES): Add hfs.mod.
8741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
8742 (grubof_SOURCES): Likewise.
8743 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
8745 * include/grub/misc.h (grub_strncasecmp): Add prototype.
8746 * kern/misc.c (grub_strncasecmp): Add function.
8748 2004-08-14 Marco Gerards <metgerards@student.han.nl>
8750 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
8753 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
8754 (grub_ext2_dir): In case the directory entry type is unknown, read
8757 2004-08-02 Peter Bruin <pjbruin@dds.nl>
8759 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
8760 grub_load_linux instead of grub_rescue_cmd_linux as second
8761 argument of grub_rescue_register_command.
8763 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
8765 2004-07-27 Marco Gerards <metgerards@student.han.nl>
8767 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
8769 * commands/boot.c: Remove the check for `GRUB_UTIL'.
8770 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8771 `loader/powerpc/ieee1275/linux.c',
8772 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
8773 * include/grub/powerpc/ieee1275/ieee1275.h
8774 (grub_ieee1275_release): New prototype.
8775 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
8776 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
8777 normal, boot, linux and linux_normal.
8778 * loader/powerpc/ieee1275/linux.c: New file.
8779 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8781 2004-07-12 Marco Gerards <metgerards@student.han.nl>
8783 * normal/arg.c (grub_arg_parse): Correct error handling after
8784 reallocating the argumentlist (check if `argl' is not null instead
8785 of checking if `args' is not null).
8786 * kern/mm.c (grub_realloc): Return the same pointer when using the
8787 same region, instead of returning the header address.
8789 2004-07-11 Marco Gerards <metgerards@student.han.nl>
8791 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
8792 one block instead of two when looking for the initial partition.
8793 (grub_partition_probe): Initialize the local variable `p' with 0.
8794 Use base 10 for the grub_strtoul call.
8795 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
8796 need for one local variable.
8797 (grub_strtoul): Don't add the new value to `num', instead of that
8800 2004-07-11 Marco Gerards <metgerards@student.han.nl>
8802 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
8803 (pxeboot_img_SOURCES): New variable.
8804 (pxeboot_img_ASFLAGS): Likewise.
8805 (pxeboot_img_LDFLAGS): Likewise.
8806 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
8807 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
8808 <lode_leroy@hotmail.com>.
8810 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8812 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
8815 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8817 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
8818 the history buffer logic.
8820 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8822 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
8823 (FILETYPE_INO_SYMLINK): New macros.
8824 (grub_ext2_find_file): Check if the node is a directory using the
8825 inode stat information instead of using the filetype in the
8826 dirent. Exclude the first character of an absolute symlink.
8827 (grub_ext2_dir): Mask out the filetype part of the mode member of
8830 2004-05-24 Marco Gerards <metgerards@student.han.nl>
8832 Add support for UFS version 1 and 2. Add support for the minix
8833 filesystem version 1 and 2, both the variants with 14 and 30 long
8836 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
8838 (grub_emu_SOURCES): Likewise.
8839 (pkgdata_MODULES): Add ufs.mod and minix.mod.
8840 (ufs_mod_SOURCES): New variable.
8841 (ufs_mod_CFLAGS): Likewise.
8842 (minix_mod_SOURCES): Likewise.
8843 (minix_mod_CFLAGS): Likewise.
8844 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
8846 (grubof_SOURCES): Likewise.
8847 * fs/ufs.c: New file.
8848 * fs/minix.c: New file.
8849 * include/grub/fs.h (grub_ufs_init): New prototype.
8850 (grub_ufs_fini): Likewise.
8851 (grub_minix_init): Likewise.
8852 (grub_minix_fini): Likewise.
8853 * util/grub-emu.c (main): Initialize and deinitialize UFS and
8856 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
8858 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
8859 commands/ls.c, commands/terminal.c, commands/boot.c,
8860 commands/cmp.c and commands/cat.c.
8861 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
8863 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
8866 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
8868 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
8869 and grub_, respectively. Because the conversion is trivial and
8870 mechanical, I omit the details here. Please refer to the CVS
8871 if you need more information.
8873 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
8875 * include/pupa: Renamed to ...
8876 * include/grub: ... this.
8877 * util/i386/pc/pupa-mkimage.c: Renamed to ...
8878 * util/i386/pc/grub-mkimage.c: ... this.
8879 * util/i386/pc/pupa-setup.c: Renamed to ...
8880 * util/i386/pc/grub-setup.c: ... this.
8881 * util/pupa-emu.c: Renamed to ...
8882 * util/grub-emu.c: ... this.
8884 2004-03-29 Marco Gerards <metgerards@student.han.nl>
8886 Add support for the newworld apple macintosh (PPC). This has been
8887 tested on the powerbook 2000 only. It only adds support for
8888 generic ieee1275 functions, console and disk support. This should
8889 be easy to port to other architectures with support for Open
8892 * configure.ac: Accept the powerpc as host_cpu. In the case of
8893 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
8894 specific tests are only executed while building for the i386.
8895 Inverse test for crosscompile.
8896 * genmk.rb (Utility): Allow assembler files.
8897 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
8898 * conf/powerpc-ieee1275.rmk: New file.
8899 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
8900 * disk/powerpc/ieee1275/partition.c: Likewise.
8901 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
8902 * include/pupa/powerpc/ieee1275/console.h: Likewise.
8903 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
8904 * include/pupa/powerpc/ieee1275/time.h: Likewise.
8905 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
8906 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
8907 * include/pupa/powerpc/ieee1275/loader.h
8908 * include/pupa/powerpc/setjmp.h: Likewise.
8909 * include/pupa/powerpc/types.h: Likewise.
8910 * kern/powerpc/ieee1275/init.c: Likewise.
8911 * kern/powerpc/ieee1275/openfw.c: Likewise.
8912 * term/powerpc/ieee1275/ofconsole.c: Likewise.
8914 These files were written by Johan Rydberg
8915 (jrydberg@night.trouble.net) and I only modified them slightly.
8917 * boot/powerpc/ieee1275/cmain.c: New file.
8918 * boot/powerpc/ieee1275/crt0.S: Likewise.
8919 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
8920 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
8922 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
8924 * Makefile.in: Update copyright.
8925 * genmodsrc.sh: Likewise.
8926 * gensymlist.sh: Likewise.
8927 * term/i386/pc/vga.c: Indent correctly.
8929 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
8930 bugreporting address.
8931 * util/i386/pc/pupa-setup.c (usage): Likewise,
8932 (main): Call pupa_ext2_init and pupa_ext2_fini.
8934 * fs/fat.c (log2): Renamed to ...
8935 (fat_log2): ... this.
8936 All callers changed.
8937 * kern/misc.c (memcpy): Alias to pupa_memmove.
8938 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
8940 * util/console.c (pupa_ncurses_fini): Return 0.
8942 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
8943 Move fail label here.
8944 [__GNU__]: Don't warn when using stat.
8945 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
8946 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
8947 long int. Use strtol instead of strtoul.
8949 2004-03-14 Marco Gerards <metgerards@student.han.nl>
8951 * commands/boot.c: New file.
8952 * commands/cat.c: Likewise.
8953 * commands/cmp.c: Likewise.
8954 * commands/ls.c: Likewise.
8955 * commands/terminal.c: Likewise.
8956 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
8957 (pupa_register_command): Changed interface to match the new
8959 (pupa_command_execute): Changed (almost rewritten) so it uses
8960 pupa_split_command. Added support for setting variables using the
8962 (rescue_command): Changed to work with the new argument parser.
8963 (terminal_command): Moved from here to commands/terminal.c.
8964 (set_command): New function.
8965 (unset_command): New function.
8966 (insmod_command): New function.
8967 (rmmod_command): New function.
8968 (lsmod_command): New function.
8969 (pupa_command_init): Don't initialize the command terminal
8970 anymore. Initialize the commands set, unset, insmod, rmmod and
8972 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
8973 (kernel_img_HEADERS): Add arg.h and env.h.
8974 (pupa_mkimage_LDFLAGS): Add kern/env.c.
8975 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
8976 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
8978 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
8980 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
8981 (boot_mod_SOURCES): New variable.
8982 (terminal_mod_SOURCES): Likewise.
8983 (ls_mod_SOURCES): Likewise.
8984 (cmp_mod_SOURCES): Likewise.
8985 (cat_mod_SOURCES): Likewise.
8987 * normal/arg.c: New file.
8988 * kern/env.c: Likewise.
8989 * include/pupa/arg.h: Likewise.
8990 * include/pupa/env.h: Likewise.
8991 * font/manager.c (font_command): Changed to match argument parsing
8993 (PUPA_MOD_INIT): Likewise.
8994 * hello/hello.c (pupa_cmd_hello): Likewise.
8995 (PUPA_MOD_INIT): Likewise.
8996 * include/pupa/disk.h: Include <pupa/device.h>.
8997 (pupa_print_partinfo): New prototype.
8998 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
8999 (pupa_dl_get_prefix): Likewise.
9000 * include/pupa/misc.h: Include <pupa/err.h>.
9001 (pupa_isgraph): New prototype.
9002 (pupa_isdigit): Likewise.
9003 (pupa_split_cmdline): Likewise.
9004 * include/pupa/normal.h: Include <pupa/arg.h>.
9005 (pupa_command): Changed the prototype of the member `func' to
9006 match the argument parsing interface. Added member `options'.
9007 (pupa_register_command): Updated to match function.
9008 (pupa_arg_parse): New prototype.
9009 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9010 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9011 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9012 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9013 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9014 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9015 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9016 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9017 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9018 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9019 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9020 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9021 * kern/disk.c: Include <pupa/file.h>.
9022 (pupa_print_partinfo): New function.
9023 * kern/dl.c: Include <pupa/env.h>.
9024 (pupa_dl_dir): Variable removed.
9025 (pupa_dl_load): Use the environment variable `prefix' instead of
9026 the variable pupa_dl_dir.
9027 (pupa_dl_set_prefix): Function removed.
9028 (pupa_dl_get_prefix): Likewise.
9029 * kern/i386/pc/init.c: Include <pupa/env.h>.
9030 (pupa_machine_init): Use the environment variable `prefix' instead of
9031 using pupa_dl_set_prefix to set the prefix.
9032 * kern/main.c: Include <pupa/env.h>.
9033 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9034 using pupa_dl_get_prefix to get the prefix.
9035 * kern/misc.c: Include <pupa/env.h>.
9036 (pupa_isdigit): New function.
9037 (pupa_isgraph): Likewise.
9038 (pupa_ftoa): Likewise.
9039 (pupa_vsprintf): Added support for printing values of the type
9040 `double'. Make it possible to format variable output when using
9041 formatting like `%1.2%f'.
9042 (pupa_split_cmdline): New function.
9043 * kern/rescue.c: Include <pupa/env.h>.
9044 (next_word): Removed function.
9045 (pupa_rescue_cmd_prefix): Likewise.
9046 (pupa_rescue_cmd_set): New function.
9047 (pupa_rescue_cmd_unset): New function.
9048 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9049 split the command line instead of splitting it here. Added
9050 support for setting variables using the syntax `foo=bar'. Don't
9051 initialize the prefix command anymore. Initialized the set and
9053 * normal/cmdline.c: Include <pupa/env.h>.
9054 (pupa_tab_complete): Added prototypes for print_simple_completion,
9055 print_partition_completion, add_completion, iterate_commands,
9056 iterate_dev, iterate_part and iterate_dir. Moved code to print
9057 partition information from here to kern/disk.c.
9058 (pupa_cmdline_run): Don't check if the funtion exists anymore.
9059 * normal/main.c: Include <pupa/env.h>.
9060 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9061 instead of using pupa_dl_get_prefix to get the prefix.
9062 * term/i386/pc/vga.c: Include <pupa/arg.h>.
9063 (check_vga_mem): Cast pointers to `void *' to silence a gcc
9065 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9066 (pupa_vga_setcolor): Declare unused variables with `__attribute__
9067 ((unused))' to silence a gcc warning.
9068 (pupa_vga_setcolor): Likewise.
9069 (debug_command): Changed to match argument parsing
9071 * util/pupa-emu.c: Include <pupa/env.h>.
9072 (options): Added 0's for unused fields to silence a gcc warning.
9074 (main): Use the environment variable `prefix' instead of using
9075 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
9076 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
9079 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9080 * util/misc.c: Include <malloc.h>.
9081 (pupa_malloc): Rewritten so errors are correctly reported.
9082 (pupa_realloc): Likewise.
9083 (pupa_memalign): Likewise.
9084 (pupa_mm_init_region): Declare unused variables with
9085 `__attribute__ ((unused))' to silence a gcc warning.
9086 * normal/i386/setjmp.S: Remove tab at the end of the file to
9087 silence a gcc warning.
9088 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9089 variables with `__attribute__ ((unused))' to silence a gcc
9091 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9092 local variable i unsigned to silence a gcc warning.
9094 * kern/term.c: Include <pupa/misc.h>.
9095 (pupa_more_lines): New variable.
9096 (pupa_more): Likewise.
9097 (pupa_putcode): When the pager is active pause at the end of every
9099 (pupa_set_more): New function.
9100 * include/pupa/term.h (pupa_set_more): New prototype.
9103 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
9105 Now this project is GRUB 2 rather than PUPA. The location of
9106 the CVS repository was moved to GRUB's.
9108 * configure.ac: Use bug-grub as the reporting address.
9109 Use GRUB instead of PUPA.
9110 Change the version number to 1.90.
9112 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
9114 * genkernsyms.sh: Updated copyright information.
9115 * genmk.rb: Likewise.
9116 * genmodsrc.sh: Likewise.
9117 * gensymlist.sh: Likewise.
9118 * boot/i386/pc/boot.S: Likewise.
9119 * boot/i386/pc/diskboot.S: Likewise.
9120 * disk/i386/pc/biosdisk.c: Likewise.
9121 * disk/i386/pc/partition.c: Likewise.
9122 * font/manager.c: Likewise.
9123 * fs/ext2.c: Likewise.
9124 * fs/fat.c: Likewise.
9125 * include/pupa/boot.h: Likewise.
9126 * include/pupa/device.h: Likewise.
9127 * include/pupa/disk.h: Likewise.
9128 * include/pupa/dl.h: Likewise.
9129 * include/pupa/elf.h: Likewise.
9130 * include/pupa/err.h: Likewise.
9131 * include/pupa/file.h: Likewise.
9132 * include/pupa/font.h: Likewise.
9133 * include/pupa/fs.h: Likewise.
9134 * include/pupa/kernel.h: Likewise.
9135 * include/pupa/loader.h: Likewise.
9136 * include/pupa/misc.h: Likewise.
9137 * include/pupa/mm.h: Likewise.
9138 * include/pupa/net.h: Likewise.
9139 * include/pupa/normal.h: Likewise.
9140 * include/pupa/rescue.h: Likewise.
9141 * include/pupa/setjmp.h: Likewise.
9142 * include/pupa/symbol.h: Likewise.
9143 * include/pupa/term.h: Likewise.
9144 * include/pupa/types.h: Likewise.
9145 * include/pupa/i386/setjmp.h: Likewise.
9146 * include/pupa/i386/types.h: Likewise.
9147 * include/pupa/i386/pc/biosdisk.h: Likewise.
9148 * include/pupa/i386/pc/boot.h: Likewise.
9149 * include/pupa/i386/pc/console.h: Likewise.
9150 * include/pupa/i386/pc/init.h: Likewise.
9151 * include/pupa/i386/pc/kernel.h: Likewise.
9152 * include/pupa/i386/pc/linux.h: Likewise.
9153 * include/pupa/i386/pc/loader.h: Likewise.
9154 * include/pupa/i386/pc/memory.h: Likewise.
9155 * include/pupa/i386/pc/multiboot.h: Likewise.
9156 * include/pupa/i386/pc/partition.h: Likewise.
9157 * include/pupa/i386/pc/time.h: Likewise.
9158 * include/pupa/i386/pc/vga.h: Likewise.
9159 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
9160 * include/pupa/util/getroot.h: Likewise.
9161 * include/pupa/util/misc.h: Likewise.
9162 * include/pupa/util/resolve.h: Likewise.
9163 * kern/device.c: Likewise.
9164 * kern/disk.c: Likewise.
9165 * kern/dl.c: Likewise.
9166 * kern/err.c: Likewise.
9167 * kern/file.c: Likewise.
9168 * kern/fs.c: Likewise.
9169 * kern/loader.c: Likewise.
9170 * kern/main.c: Likewise.
9171 * kern/misc.c: Likewise.
9172 * kern/mm.c: Likewise.
9173 * kern/rescue.c: Likewise.
9174 * kern/term.c: Likewise.
9175 * kern/i386/dl.c: Likewise.
9176 * kern/i386/pc/init.c: Likewise.
9177 * kern/i386/pc/lzo1x.S: Likewise.
9178 * kern/i386/pc/startup.S: Likewise.
9179 * loader/i386/pc/chainloader.c: Likewise.
9180 * loader/i386/pc/linux.c: Likewise.
9181 * loader/i386/pc/multiboot.c: Likewise.
9182 * normal/cmdline.c: Likewise.
9183 * normal/command.c: Likewise.
9184 * normal/main.c: Likewise.
9185 * normal/menu.c: Likewise.
9186 * normal/i386/setjmp.S: Likewise.
9187 * term/i386/pc/console.c: Likewise.
9188 * term/i386/pc/vga.c: Likewise.
9189 * util/console.c: Likewise.
9190 * util/genmoddep.c: Likewise.
9191 * util/misc.c: Likewise.
9192 * util/pupa-emu.c: Likewise.
9193 * util/resolve.c: Likewise.
9194 * util/unifont2pff.rb: Likewise.
9195 * util/i386/pc/biosdisk.c: Likewise.
9196 * util/i386/pc/getroot.c: Likewise.
9197 * util/i386/pc/pupa-mkimage.c: Likewise.
9198 * util/i386/pc/pupa-setup.c: Likewise.
9200 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
9202 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
9203 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
9204 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
9205 reading and reset it after reading.
9206 (pupa_ext2_close): Return PUPA_ERR_NONE.
9208 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
9210 (struct linux_kernel_header): Add kernel_version and
9212 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
9213 pupa_file_read succeeds.
9214 (pupa_rescue_cmd_initrd): Implement.
9216 2003-12-03 Marco Gerards <metgerards@student.han.nl>
9218 * fs/ext2.c (pupa_ext2_label): New function.
9219 (pupa_ext2_fs): Added label.
9220 * fs/fat.c (pupa_fat_label): New function.
9221 (pupa_fat_fs): Added label.
9222 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
9224 * kern/misc.c (pupa_strndup): New function.
9225 * include/pupa/misc.h (pupa_strndup): New prototype.
9227 * include/pupa/normal.h: Include <pupa/err.h>.
9228 (pupa_set_history): New prototype.
9229 (pupa_iterate_commands): New prototype.
9230 * normal/cmdline.c: Include <pupa/machine/partition.h>,
9231 <pupa/disk.h>, <pupa/file.h>.
9232 (hist_size): New variable.
9233 (hist_lines): Likewise.
9234 (hist_end): Likewise.
9235 (hist_used): Likewise.
9236 (pupa_set_history): New function.
9237 (pupa_history_get): Likewise.
9238 (pupa_history_add): Likewise.
9239 (pupa_history_replace): Likewise.
9240 (pupa_tab_complete): Likewise.
9241 (pupa_cmdline_run): Added tab completion and history buffer. Tab
9242 completion shows partitionnames while completing partitions, this
9243 feature was suggested by Jeff Bailey.
9244 * normal/command.c (pupa_iterate_commands): New function.
9245 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
9246 (pupa_normal_init): Initialize history buffer.
9247 (PUPA_MOD_INIT): Likewise.
9248 (pupa_normal_fini): Free the history buffer.
9249 (PUPA_MOD_FINI): Likewise.
9251 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
9254 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
9255 * configure.ac [i386]: Check for regparam bug.
9256 (NESTED_FUNC_ATTR) [! i386]: Defined.
9258 2003-11-17 Marco Gerards <metgerards@student.han.nl>
9260 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
9261 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
9262 (pupa_emu_SOURCES): New variable.
9263 (pupa_emu_LDFLAGS): Likewise.
9264 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
9265 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
9266 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
9267 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9268 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
9269 (pupa_jmp_buf): New typedef.
9270 (pupa_setjmp) [PUPA_UTIL]: New macro.
9271 (pupa_longjmp) [PUPA_UTIL]: Likewise.
9272 * include/pupa/term.h (struct pupa_term): New member `refresh'.
9273 (pupa_refresh): New prototype.
9274 * include/pupa/util/getroot.h: New file.
9275 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
9277 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
9278 (pupa_rescue_cmd_cat): Likewise.
9279 (pupa_rescue_cmd_ls): Likewise.
9280 (pupa_rescue_cmd_testload): Likewise.
9281 (pupa_rescue_cmd_lsmod): Likewise.
9282 * normal/cmdline.c (pupa_cmdline_get): Likewise.
9283 * normal/menu.c (run_menu): Likewise.
9284 * kern/term.c (pupa_cls): Likewise.
9285 (pupa_refresh): New function.
9286 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
9287 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9288 * util/console.c: New file.
9290 * util/i386/pc/getroot.c: New file.
9291 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
9292 (pupa_putchar): New function.
9293 (pupa_refresh): Likewise.
9294 (xgetcwd): Function moved to ...
9295 (strip_extra_slashes): Likewise.
9296 (get_prefix): Likewise.
9297 * util/i386/pc/getroot.c: ... here.
9298 (find_root_device): Function moved and renamed to...
9299 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
9300 Changed all callers.
9301 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
9303 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
9304 Changed all callers.
9305 * util/misc.c (pupa_memalign): New function.
9306 (pupa_mm_init_region): Likewise.
9307 (pupa_register_exported_symbols): Likewise.
9308 (pupa_putchar): Function removed.
9309 * util/pupa-emu.c: New file.
9311 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
9313 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
9314 (_multiboot_mod_SOURCES): New variable.
9315 (_multiboot_mod_CFLAGS): Likewise.
9316 * loader/i386/pc/multiboot.c: New file.
9317 * include/pupa/i386/pc/multiboot.h: Likewise.
9318 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
9319 (pupa_multiboot_real_boot): New function.
9320 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
9321 (pupa_multiboot_real_boot): New prototype.
9322 (pupa_rescue_cmd_multiboot): Likewise
9323 (pupa_rescue_cmd_module): Likewise.
9325 * kern/loader.c (pupa_loader_set): Continue when
9326 pupa_loader_unload_func() fails.
9327 (pupa_loader_unset): New function.
9328 * include/pupa/loader.h (pupa_loader_unset): New prototype.
9330 * kern/misc.c (pupa_stpcpy): New function.
9331 * include/pupa/misc.h (pupa_stpcpy): New prototype.
9333 2003-11-12 Marco Gerards <metgerards@student.han.nl>
9335 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
9336 for available extensions.
9338 * include/pupa/i386/pc/time.h: New file.
9339 * kern/disk.c: Include <pupa/machine/time.h>.
9340 (PUPA_CACHE_TIMEOUT): New macro.
9341 (pupa_last_time): New variable.
9342 (pupa_disk_open): Flush the cache when there was a timeout.
9343 (pupa_disk_close): Reset the timer.
9344 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
9346 * util/misc.c: Include <sys/times.h>
9347 (pupa_get_rtc): New function.
9349 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9351 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
9353 (pupa_ext2_get_file_block): Use blocks member.
9355 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
9356 first block. Return -1 instead of pupa_errno on error.
9358 2003-10-27 Marco Gerards <metgerards@student.han.nl>
9360 * README: In the pupa-mkimage example use _chain instead of chain
9361 and ext2 instead of fat.
9362 * TODO: Replace ext2fs with jfs as an example. Add an item for
9363 adding journal playback for ext2fs.
9364 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
9365 (pkgdata_MODULES): Added ext2.mod.
9366 (ext2_mod_SOURCES): New variable.
9367 (ext2_mod_CFLAGS): Likewise.
9368 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
9369 * include/pupa/misc.h (pupa_strncpy): New prototype.
9370 (pupa_strcat): Likewise.
9371 (pupa_strncmp): Likewise.
9372 * kern/misc.c (pupa_strcat): Enable function.
9373 (pupa_strncpy): New function.
9374 (pupa_strncmp): Likewise.
9375 * fs/ext2.c: New file.
9377 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
9378 when the read failed before retrying.
9379 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
9380 (_FILE_OFFSET_BITS): Likewise.
9381 * configure.ac: Added AC_SYS_LARGEFILE.
9383 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9385 * genmk.rb (PModule#rule): Make sure to get only symbol names
9386 from the output of nm.
9387 Reported by Robert Millan <zeratul2@wanadoo.es>.
9389 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9391 I forgot to check in these changes for a long time. This adds
9392 incomplete support for VGA console, and this is still very
9393 buggy. Also, a lot of consideration is required for I18N,
9394 UNICODE, and VGA font issues. Therefore, assume that this is
9395 such that "better than nothing".
9397 * font/manager.c: New file.
9398 * include/pupa/font.h: Likewise.
9399 * include/pupa/i386/pc/vga.h: Likewise.
9400 * term/i386/pc/vga.c: Likewise.
9401 * util/unifont2pff.rb: Likewise.
9403 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
9404 (pkgdata_MODULES): Added vga.mod and font.mod.
9405 (vga_mod_SOURCES): New variables.
9406 (vga_mod_CFLAGS): Likewise.
9407 (font_mod_SOURCES): Likewise.
9408 (font_mod_CFLAGS): Likewise.
9410 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
9412 * include/pupa/term.h: Include pupa/err.h.
9413 (struct pupa_term): Added init and fini.
9414 Changed the argument of putchar to pupa_uint32_t.
9416 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
9417 (pupa_console_real_putchar): New prototype.
9418 (pupa_console_putchar): Removed.
9419 (pupa_console_checkkey): Exported.
9420 (pupa_console_getkey): Likewise.
9422 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
9425 * kern/term.c (pupa_term_set_current): Rewritten.
9426 (pupa_putchar): Likewise.
9427 (pupa_putcode): New function.
9429 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
9430 (pupa_console_real_putchar): ... this.
9431 (pupa_vga_set_mode): New function.
9432 (pupa_vga_get_font): Likewise.
9434 * normal/command.c: Include pupa/term.h.
9435 (terminal_command): New function.
9436 (pupa_command_init): Register the command "terminal".
9438 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
9439 (DISP_UP): Likewise.
9440 (DISP_RIGHT): Likewise.
9441 (DISP_DOWN): Likewise.
9442 (DISP_HLINE): Likewise.
9443 (DISP_VLINE): Likewise.
9444 (DISP_UL): Likewise.
9445 (DISP_UR): Likewise.
9446 (DISP_LL): Likewise.
9447 (DISP_LR): Likewise.
9449 * term/i386/pc/console.c (pupa_console_putchar): New function.
9451 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
9453 * util/resolve.c (pupa_util_resolve_dependencies): BUG
9454 FIX. Reverse the path_list.
9456 * include/pupa/normal.h: Export pupa_register_command and
9457 pupa_unregister_command.
9459 * hello/hello.c (pupa_cmd_hello): New module.
9460 * conf/i386-pc.rmk: Added hello.mod.
9462 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
9464 * kern/i386/pc/lzo1x.S: New file.
9466 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
9467 (compress_kernel): New variable.
9468 (generate_image): Heavily modified to support compressing a
9469 large part of the core image.
9471 * util/misc.c (pupa_util_read_image): Fix a file descriptor
9473 (pupa_util_load_image): New function.
9475 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
9476 (pupa_compressed_size): New variable.
9477 (codestart): Enable Gate A20 here.
9478 Decompress the compressed part of the core image.
9479 Rearrange the code to put functions and variables which are
9480 required for initialization in the non-compressed part.
9483 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
9486 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
9488 * include/pupa/i386/pc/kernel.h
9489 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
9490 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
9491 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9492 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9493 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
9495 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
9497 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
9498 (Utility#rule): Likewise.
9500 * configure.ac: Check if LZO is available.
9502 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
9504 * include/pupa/normal.h: New file.
9505 * include/pupa/setjmp.h: Likewise.
9506 * include/pupa/i386/setjmp.h: Likewise.
9507 * normal/cmdline.c: Likewise.
9508 * normal/command.c: Likewise.
9509 * normal/main.c: Likewise.
9510 * normal/menu.c: Likewise.
9511 * normal/i386/setjmp.S: Likewise.
9513 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
9514 (pupa_rescue_cmd_initrd): Likewise.
9516 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
9519 * kern/i386/pc/startup.S (translation_table): New variable.
9520 (translate_keycode): New function.
9521 (pupa_console_getkey): Call translate_keycode.
9523 * kern/rescue.c (attempt_normal_mode): New function.
9524 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
9525 it failed, print a message.
9527 * kern/mm.c (pupa_real_malloc): Print more information when a
9528 free magic is broken.
9529 (pupa_free): If the first free header is not free actually, set
9532 * kern/main.c (pupa_load_normal_mode): Just load the module
9534 (pupa_main): Don't print the message
9535 "Entering into rescue mode..." here.
9537 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
9539 (pupa_rescue_cmd_initrd): Likewise.
9540 (pupa_rescue_cmd_initrd): Likewise.
9542 * include/pupa/symbol.h (FUNCTION): Specify the type.
9543 (VARIABLE): Likewise.
9545 * include/pupa/err.h (pupa_err_t): Added
9546 PUPA_ERR_UNKNOWN_COMMAND.
9548 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
9549 (pupa_dl_get_prefix): Likewise.
9551 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
9552 Added _chain.mod and _linux.mod instead of chain.mod and
9554 (chain_mod_SOURCES): Renamed to ...
9555 (_chain_mod_SOURCES): ... this.
9556 (chain_mod_CFLAGS): Renamed to ...
9557 (_chain_mod_CFLAGS): ... this.
9558 (linux_mod_SOURCES): Renamed to ...
9559 (_linux_mod_SOURCES): ... this.
9560 (linux_mod_CFLAGS): Renamed to ...
9561 (_linux_mod_CFLAGS): ... this.
9562 (normal_mod_SOURCES): New variable.
9563 (normal_mod_CFLAGS): Likewise.
9564 (normal_mod_ASFLAGS): Likewise.
9566 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
9568 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
9571 * kern/dl.c (pupa_dl_ref): Refer dependending modules
9573 (pupa_dl_unref): Unrefer depending modules recursively.
9574 Don't call pupa_dl_unload implicitly, because PUPA can crash if
9575 a module is unloaded before one depending on that module is
9577 (pupa_dl_unload): Unload depending modules explicitly,
9580 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
9582 * include/pupa/i386/pc/linux.h: New file.
9583 * loader/i386/pc/linux.c: Likewise.
9585 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
9587 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
9588 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
9589 of PUPA_CHAINLOADER_BOOT_SECTOR.
9591 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
9592 (pupa_linux_prot_size): New variable.
9593 (pupa_linux_tmp_addr): Likewise.
9594 (pupa_linux_real_addr): Likewise.
9595 (pupa_linux_boot_zimage): New function.
9596 (pupa_linux_boot_bzimage): Likewise.
9598 * kern/i386/pc/init.c (struct mem_region): New structure.
9599 (MAX_REGIONS): New macro.
9600 (mem_regions): New variable.
9601 (num_regions): Likewise.
9602 (pupa_os_area_addr): Likewise.
9603 (pupa_os_area_size): Likewise.
9604 (pupa_lower_mem): Likewise.
9605 (pupa_upper_mem): Likewise.
9606 (add_mem_region): New function.
9607 (compact_mem_regions): Likewise.
9608 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
9609 the size of the conventional memory and that of so-called upper
9610 memory (before the first memory hole).
9611 Instead of adding each found region to free memory, use
9612 add_mem_region and add them after removing overlaps.
9613 Also, add only 1/4 of the upper memory to free memory. The rest
9614 is used for loading OS images. Maybe this is ad hoc, but this
9615 makes it much easier to relocate OS images when booting.
9617 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
9618 (pupa_enter_rescue_mode): Don't register initrd and module.
9620 * kern/mm.c: Include pupa/dl.h.
9622 * kern/main.c: Include pupa/file.h and pupa/device.h.
9624 * kern/loader.c (pupa_loader_load_module_func): Removed.
9625 (pupa_loader_load_module): Likewise.
9627 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
9630 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
9631 (pupa_linux_tmp_addr): Likewise.
9632 (pupa_linux_real_addr): Likewise.
9633 (pupa_linux_boot_zimage): Likewise.
9634 (pupa_linux_boot_bzimage): Likewise.
9636 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
9637 (pupa_upper_mem): Likewise.
9638 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
9639 module is too dangerous.
9641 * include/pupa/loader.h (pupa_os_area_addr): Declared.
9642 (pupa_os_area_size): Likewise.
9643 (pupa_loader_set): Remove the first argument. Loader doesn't
9644 manage modules or initrd any longer.
9645 (pupa_loader_load_module): Removed.
9647 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
9648 (linux_mod_SOURCES): New variable.
9649 (linux_mod_CFLAGS): Likewise.
9651 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
9653 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
9654 the length of a blocklist correctly.
9656 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
9657 Use ioctl only if the OS file is a block device.
9658 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
9659 not very useful for normal files.
9661 * kern/main.c (pupa_set_root_dev): New function.
9662 (pupa_load_normal_mode): Likewise.
9663 (pupa_main): Call those above.
9665 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
9668 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
9670 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9672 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
9673 (setup): Configure the installed partition information and the
9676 * loader/i386/pc/chainloader.c (my_mod): New variable.
9677 (pupa_chainloader_unload): New function.
9678 (pupa_rescue_cmd_chainloader): Refer itself.
9679 (PUPA_MOD_INIT): Save its own module in MY_MOD.
9681 * kern/i386/pc/startup.S (install_partition): Removed.
9682 (version_string): Likewise.
9683 (config_file): Likewise.
9684 (pupa_install_dos_part): New variable.
9685 (pupa_install_bsd_part): Likewise.
9686 (pupa_prefix): Likewise.
9687 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
9689 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
9691 (make_install_device): New function.
9692 (pupa_machine_init): Set the dl prefix.
9694 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
9695 (buf): Renamed to ...
9696 (linebuf): ... this.
9697 (pupa_rescue_cmd_prefix): New function.
9698 (pupa_rescue_cmd_insmod): Likewise.
9699 (pupa_rescue_cmd_rmmod): Likewise.
9700 (pupa_rescue_cmd_lsmod): Likewise.
9701 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
9704 * kern/mm.c (pupa_memalign): If failed even after invalidating
9705 disk caches, unload unneeded modules and retry.
9707 * kern/misc.c (pupa_memmove): New function.
9708 (pupa_memcpy): Removed.
9709 (pupa_strcpy): New function.
9710 (pupa_itoa): Made static.
9712 * kern/dl.c (pupa_dl_iterate): New function.
9713 (pupa_dl_ref): Likewise.
9714 (pupa_dl_unref): Likewise.
9715 (pupa_dl_unload): Return if succeeded or not.
9716 (pupa_dl_unload_unneeded): New function.
9717 (pupa_dl_unload_all): Likewise.
9718 (pupa_dl_init): Renamed to ...
9719 (pupa_dl_set_prefix): ... this.
9720 (pupa_dl_get_prefix): New function.
9722 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
9723 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
9724 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9725 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9726 (pupa_install_dos_part): Declared.
9727 (pupa_install_bsd_part): Likewise.
9728 (pupa_prefix): Likewise.
9729 (pupa_boot_drive): Likewise.
9731 * include/pupa/types.h: Fix a typo.
9733 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
9735 (pupa_memmove): Declared.
9736 (pupa_strcpy): Likewise.
9738 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
9739 pupa_mod_init takes one argument, its own module.
9740 (pupa_dl_unload_unneeded): Declared.
9741 (pupa_dl_unload_all): Likewise.
9742 (pupa_dl_ref): Likewise.
9743 (pupa_dl_unref): Likewise.
9744 (pupa_dl_iterate): Likewise.
9745 (pupa_dl_init): Renamed to ...
9746 (pupa_dl_set_prefix): ... this.
9747 (pupa_dl_get_prefix): Declared.
9749 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
9750 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
9752 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
9753 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
9755 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
9756 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
9758 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9760 * util/i386/pc/pupa-setup.c (setup): Define the internal
9761 function find_first_partition_start at the top level, because GCC
9762 3.0.x cannot compile internal functions in deeper scopes
9764 (find_root_device): Use lstat instead of stat.
9765 Don't follow symbolic links.
9766 Fix the path-constructing code.
9768 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
9769 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
9770 by a BLKGETSIZE ioctl first, because block devices don't fill
9771 the member st_mode of the structure stat on Linux.
9772 [__linux__] (linux_find_partition): Use a temporary buffer
9773 REAL_DEV for the working space. Copy it to DEV before returning.
9774 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
9775 buffer cache consistent.
9776 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
9777 strncmp. The previous value was merely wrong.
9778 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
9780 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
9781 FAT size is 12. The previous value was merely wrong.
9783 * kern/main.c (pupa_main): Don't split the starting message from
9786 * kern/term.c (pupa_putchar): Put CR after LF instead of before
9787 LF, because BIOS goes crazy about character attributes in this
9790 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9792 * include/i386/pc/util/biosdisk.h: New file.
9793 * util/i386/pc/biosdisk.c: Likewise.
9794 * util/i386/pc/pupa-setup.c: Likewise.
9796 * Makefile.in (INCLUDE_DISTFILES): Added
9797 include/pupa/i386/pc/util/biosdisk.h.
9798 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
9799 directory util/i386/pc.
9800 (install-local): Added a rule for sbin_UTILITIES.
9801 (uninstall): Likewise.
9803 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
9805 * util/misc.c (xrealloc): New function.
9806 (pupa_malloc): Likewise.
9807 (pupa_free): Likewise.
9808 (pupa_realloc): Likewise.
9809 (pupa_stop): Likewise.
9810 (pupa_putchar): Likewise.
9812 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
9814 * include/pupa/util/misc.h (xrealloc): Declared.
9816 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
9818 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
9819 (PUPA_BOOT_MACHINE_BPB_END): ... this.
9821 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
9822 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9824 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
9825 way should be implemented.
9826 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9828 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
9829 the size of NAME for safety.
9830 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
9833 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
9834 (pupa_setup_SOURCES): Likewise.
9836 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
9838 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9840 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
9841 bunch of pushl's from pusha, because this destroys the return
9844 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9846 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
9847 This means that any missing prototypes could be fatal. Also, you
9848 must take care when writing assembly code. See the comments at
9849 the beginning of startup.S, for more details.
9851 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
9852 compilation mechanism.
9853 (pupa_chainloader_real_boot): Likewise.
9854 (pupa_biosdisk_rw_int13_extensions): Likewise.
9855 (pupa_biosdisk_rw_standard): Likewise.
9856 (pupa_biosdisk_check_int13_extensions): Likewise.
9857 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
9858 (pupa_biosdisk_get_diskinfo_standard): Likewise.
9859 (pupa_get_memsize): Likewise.
9860 (pupa_get_mmap_entry): Likewise.
9861 (pupa_console_putchar): Likewise.
9862 (pupa_console_setcursor): Likewise.
9863 (pupa_getrtsecs): Use pushl instead of push.
9865 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
9866 memory instead of the stack for a mmap entry, because some
9867 BIOSes may ignore the maximum size and overflow.
9869 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
9871 * genmk.rb (PModule#rule): Compile automatically generated
9872 sources with module-specific CFLAGS as well as other sources.
9874 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9876 * configure.ac: Check ld.
9877 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
9878 respectively, before checking endianness and sizes.
9880 * Makefile.in (LD): New variable.
9882 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9884 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
9886 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9888 * Changelog: New file.