1 2007-04-10 Jerone Young <jerone@gmail.com>
3 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4 continue on and look for device node with real device name.
6 2007-04-10 Jerone Young <jerone@gmail.com>
8 * configure.ac: Add argument for autoconf to use tranformation
10 * Makefile.in: Add autoconf package transformation code.
11 * util/i386/pc/grub-install.in: Likewise.
12 * util/powerpc/ieee1275/grub-install.in: Likewise.
14 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
17 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
18 (EXT2_REVISION): Likewise.
19 (EXT2_INODE_SIZE): Likewise.
20 (struct grub_ext2_block_group): Added a missing member
22 (grub_ext2_read_inode): Divide by the inode size in a superblock
23 instead of 128 to obtain INODES_PER_BLOCK.
24 Use the macro EXT2_INODE_SIZE instead of directly using
27 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
29 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
30 superblock instead of the structure size to compute an
31 offset. This fixes the problem that GRUB could not read a
32 filesystem when inode size is different from 128-byte.
34 2007-03-05 Marco Gerards <marco@gnu.org>
36 * normal/main.c (read_config_file): When "menu" is not set, create
39 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
41 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
42 (HEAP_LIMIT): New macro.
43 (grub_claim_heap): Claim memory up to `heaplimit'.
45 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
47 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
48 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
50 (grub_arch_modules_addr): Return address after `_end'.
51 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
52 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
53 (add_segments): Calculate `_end' from phdr size and location.
54 (ALIGN_UP): Moved to ...
55 * include/grub/misc.h: here.
56 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
58 (GRUB_IEEE1275_MODULE_BASE): Removed.
60 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
62 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
65 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
67 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
69 (grub_elf64_load_hook_t): Likewise.
70 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
73 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
75 * kern/mm.c: Update copyright.
76 (grub_mm_debug): Correct syntax error.
77 (grub_mm_dump_free): New function.
78 (grub_debug_free): Call `grub_free'.
79 * include/grub/mm.h: Update copyright.
80 (grub_mm_dump_free): Add declaration.
82 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
84 * include/grub/ieee1275/ieee1275.h: Update copyright.
85 * kern/powerpc/ieee1275/init.c: Likewise.
86 * kern/powerpc/ieee1275/openfw.c: Likewise.
88 * loader/powerpc/ieee1275/linux.c: Likewise.
89 * include/grub/elfload.h: Likewise.
90 * kern/elf.c: Likewise.
91 (grub_elf32_load): Pass `base' and `size' parameters. Update all
93 (grub_elf64_load): Likewise.
94 (grub_elf32_load_segment): Move to a nested function.
95 (grub_elf64_load_segment): Likewise.
97 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
99 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
101 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
102 (grub_heap_len): Likewise.
103 (HEAP_SIZE): New macro.
104 (grub_claim_heap): New function.
105 (grub_machine_init): Don't claim heap directly. Call
107 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
108 (grub_available_iterate): New function.
110 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
112 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
113 * configure.ac: Use it for testing the HOST and TARGET compilers.
115 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
117 * Makefile.in (enable_grub_emu): New variable.
118 * configure.ac (--enable-grub-emu): New option.
119 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
120 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
121 * conf/i386-pc.rmk: Likewise.
122 * conf/powerpc-ieee1275.rmk: Likewise.
123 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
125 2006-12-12 Marco Gerards <marco@gnu.org>
127 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
129 * kern/env.c (grub_env_unset): Don't free the member `value' when
130 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
133 * normal/main.c (current_menu): Removed.
134 (free_menu): Unset the `menu' environment variable.
135 (grub_normal_menu_addentry): Make use of the environment variable
136 `menu', instead of using the global `current_menu'. Allocate
137 memory for the sourcecode of this entry.
138 (read_config_file): New argument `nested', changed all callers.
139 Only in the case of a new context, initialize a new menu. Set the
140 `menu' environment variable.
141 (grub_normal_execute): Don't set and unset the environment
142 variable `menu' here anymore. Only free the menu when leaving the
145 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
148 2006-12-11 Marco Gerards <marco@gnu.org>
150 * normal/menu_entry.c (run): Fix off by one bug so the last line
151 is executed. Move the loader check to outside the loop.
153 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
155 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
157 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
159 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
160 the number of sectors. Reported by Andrey Shuvikov
163 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
165 * kern/disk.c (grub_disk_read): When there is a read error, always
166 try to read only the necessary data.
168 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
170 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
172 [GRUB_UTIL] (grub_raid_fini): Likewise.
173 [GRUB_UTIL] (grub_lvm_init): Likewise.
174 [GRUB_UTIL] (grub_lvm_fini): Likewise.
175 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
176 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
177 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
178 and grub_raid_fini().
180 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
182 * include/grub/types.h (__unused): Rename to UNUSED.
183 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
184 (grub_elf64_size): Likewise.
186 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
188 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
189 grub_error_push and grub_error_pop in the error-handling path.
190 (grub_elf32_load_segment): Only call grub_file_read with non-zero
193 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
195 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
196 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
198 (kernel_elf_SOURCES): Likewise.
199 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
200 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
201 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
202 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
203 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
204 (elf_mod_SOURCES): New variable.
205 (elf_mod_CFLAGS): Likewise.
206 (elf_mod_LDFLAGS): Likewise.
207 * include/grub/types.h (__unused): New macro.
208 * include/grub/elfload.h: New file.
209 * kern/elf.c: Likewise.
210 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
211 (ELF32_LOADMASK): New macro.
212 (ELF64_LOADMASK): Likewise.
214 (grub_linux_load32): New function.
215 (grub_linux_load64): Likewise.
216 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
217 Use grub_elf_t instead of grub_file_t.
219 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
221 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
222 `catch_result' to struct set_color_args.
224 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
226 * normal/menu.c: Include grub/script.h.
227 * normal/menu_entry.c: Likewise.
228 * include/grub/normal.h: Do not include grub/script.h.
230 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
232 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
234 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
236 * kern/disk.c (grub_disk_open): Print debug messages when opening a
238 (grub_disk_close): Print debug messages when closing a disk.
239 (grub_disk_read): Print debug messages when disk read fails.
240 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
242 * kern/partition.c: Include misc.h.
243 (grub_partition_iterate): Print debug messages when detecting
246 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
248 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
250 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
252 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
254 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
255 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
257 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
259 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
260 instead of sizeof(lv). Patch by Michael Guntsche.
262 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
264 * disk/lvm.c: Rename VGS to VG_LIST.
265 (grub_lvm_iterate): Change VGS->LV to VG-LV.
266 (grub_lvm_open): Likewise.
267 Thanks to Michael Guntsche for finding this bug.
269 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
271 * configure.ac (AC_INIT): Bumped to 1.95.
273 2006-10-14 Robert Millan <rmh@aybabtu.com>
275 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
276 with "/dev/.static/dev/md".
278 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
280 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
281 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
282 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
283 DRIVE_NAME are always freed.
285 * util/i386/pc/biosdisk.c (make_device_name): Add one into
286 DOS_PART, as a DOS partition is counted from one instead of zero
287 now. Reported by Robert Millan.
289 2006-10-14 Robert Millan <rmh@aybabtu.com>
291 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
292 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
293 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
294 string returned by grub_guess_root_device.
295 * util/i386/pc/grub-setup.c: Likewise.
296 * util/i386/pc/grub-probefs.c: Likewise.
298 * util/i386/pc/grub-probefs.c: Rename to ...
299 * util/i386/pc/grub-probe.c: ... this.
300 * DISTLIST: Remove grub-probefs, add grub-probe.
301 * conf/i386-efi.rmk: Likewise.
302 * conf/i386-pc.rmk: Likewise.
303 * util/i386/pc/grub-install.in: Likewise.
305 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
306 choose which information we want to print.
308 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
310 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
311 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
312 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
313 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
314 video/readers/tga.c and video/i386/pc/vbeutil.c.
316 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
318 Added support for RAID and LVM.
320 * disk/lvm.c: New file.
321 * disk/raid.c: Likewise.
322 * include/grub/lvm.h: Likewise.
323 * include/grub/raid.h: Likewise.
324 * include/grub/util/lvm.h: Likewise.
325 * include/grub/util/raid.h: Likewise.
326 * util/lvm.c: Likewise.
327 * util/raid.c: Likewise.
329 * include/grub/disk.h (grub_disk_dev_id): Add
330 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
331 (grub_disk_get_size): New prototype.
332 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
334 (grub_disk_get_size): New function.
336 * kern/i386/pc/init.c (make_install_device): Copy the prefix
337 verbatim if grub_install_dos_part is -2.
339 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
342 * util/i386/pc/grub-setup.c (setup): New argument
343 MUST_EMBED. Force embedding of GRUB when the argument is
344 true. Close FILE before returning.
345 (main): Add support for RAID and LVM.
347 * conf/common.rmk: Add RAID and LVM modules.
348 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
350 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
352 * kern/misc.c (grub_strstr): New function.
353 * include/grub/misc.h (grub_strstr): New prototype.
355 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
357 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
359 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
361 * kern/misc.c (grub_strtoull): Guess the base only if not
364 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
366 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
369 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
371 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
373 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
374 Remove `flags' argument. All callers changed.
375 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
376 (IEEE1275_IHANDLE_INVALID): New variable.
377 (IEEE1275_CELL_INVALID): New variable.
378 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
379 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
380 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
381 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
382 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
383 codes from Open Firmware. All callers updated.
384 (grub_ieee1275_next_property): Directly return Open Firmware return
386 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
387 Standardize error checking from `grub_ieee1275_get_property'.
388 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
389 `devalias' to `aliases'. Correct comments. Consolidate error paths.
391 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
393 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
394 `instance_to_package_args' to `instance_to_path_args'.
396 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
397 `grub_ieee1275_chosen'.
399 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
400 `grub_ieee1275_interpret'.
402 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
404 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
406 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
408 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
411 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
412 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
415 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
417 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
418 to type `grub_ssize_t'.
419 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
421 2006-09-22 Marco Gerards <marco@gnu.org>
423 * normal/script.c (grub_script_create_cmdmenu): Skip leading
426 2006-09-22 Marco Gerards <marco@gnu.org>
428 * commands/echo.c: New file.
430 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
432 * conf/common.rmk (echo_mod_SOURCES): New variable.
433 (echo_mod_CFLAGS): Likewise.
434 (echo_mod_LDFLAGS): Likewise.
436 2006-09-22 Marco Gerards <marco@gnu.org>
438 * normal/main.c (get_line): Malloc memory instead of using
439 preallocated memory. Removed the arguments `cmdline' and
440 `max_len'. Updated all callers.
442 2006-09-22 Marco Gerards <marco@gnu.org>
444 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
445 (normal_mod_DEPENDENCIES): Likewise.
447 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
448 (normal_mod_DEPENDENCIES): Likewise.
450 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
452 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
454 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
456 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
457 (normal_mod_DEPENDENCIES): Likewise.
458 * conf/i386-pc.mk: Regenerate.
459 * conf/i386-efi.mk: Likewise
460 * conf/common.mk: Likewise.
461 * conf/powerpc-ieee1275.mk: Likewise.
462 * conf/sparc64-ieee1275.mk: Likewise.
464 2006-09-22 Robert Millan <rmh@aybabtu.com>
466 Sync with i386 version.
467 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
468 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
470 2006-09-21 Robert Millan <rmh@aybabtu.com>
472 Import from GRUB Legacy (lib/device.c):
473 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
474 (init_device_map) [__linux__]: Add support for I2O devices.
476 2006-09-14 Marco Gerards <marco@gnu.org>
478 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
481 2006-09-14 Robert Millan <rmh@aybabtu.com>
483 * util/i386/pc/grub-install.in: Skip menu.lst when removing
486 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
488 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
489 before adding it to device.map.
491 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
493 * genmk.rb: Let GCC generate dependenceies the first time it
494 compiles a file; using the -MD option.
495 * conf/common.mk: Regenerate.
496 * conf/i386-pc.mk: Likewise.
497 * conf/i386-efi.mk: Likewise.
498 * conf/powerpc-ieee1275.mk: Likewise.
499 * conf/sparc64-ieee1275.mk: Likewise.
501 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
503 Move the prototypes of grub_setjmp and grub_longjmp to
504 cpu/setjmp.h, so that each architecture may specify different
507 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
508 (grub_longjmp): Likewise.
509 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
510 (grub_longjmp): Likewise.
511 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
512 (grub_longjmp): Likewise.
514 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
515 [!GRUB_UTIL] (grub_longjmp): Removed.
517 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
519 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
520 "color!" method does not return any value.
522 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
524 * include/grub/bitmap.h: New file.
526 * include/grub/i386/pc/vbeutil.h: Likewise.
528 * video/bitmap.c: Likewise.
530 * video/readers/tga.c: Likewise.
532 * video/i386/pc/vbeutil.c: Likewise.
534 * commands/videotest.c: Code cleanup and updated to reflect to new
537 * term/gfxterm.c: Likewise.
539 * video/video.c: Likewise.
541 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
542 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
543 (bitmap_mod_SOURCES): New entry.
544 (bitmap_mod_CFLAGS): Likewise.
545 (bitmap_mod_LDFLAGS): Likewise.
546 (tga_mod_SOURCES): Likewise.
547 (tga_mod_CFLAGS): Likewise.
548 (tga_mod_LDFLAGS): Likewise.
550 * include/grub/video.h (grub_video_blit_operators): New enum type.
551 (grub_video_render_target): Changed as forward declaration and moved
552 actual definition to be video driver specific.
553 (grub_video_adapter.blit_bitmap): Added blitting operator.
554 (grub_video_adapter.blit_render_target): Likewise.
555 (grub_video_blit_bitmap): Likewise.
556 (grub_video_blit_render_target): Likewise.
558 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
559 driver specific render target definition.
560 (grub_video_vbe_map_rgba): Added driver internal helper.
561 (grub_video_vbe_unmap_color): Updated to use
562 grub_video_i386_vbeblit_info.
563 (grub_video_vbe_get_video_ptr): Likewise.
565 * include/grub/i386/pc/vbeblit.h
566 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
567 grub_video_i386_vbeblit_info.
568 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
569 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
570 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
571 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
572 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
573 (grub_video_i386_vbeblit_index_index): Likewise.
574 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
575 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
576 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
577 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
579 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
582 * video/i386/pc/vbeblit.c: Updated to reflect changes on
583 include/grub/i386/pc/vbeblit.h.
585 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
586 Updated to use grub_video_i386_vbeblit_info.
587 (grub_video_i386_vbefill_R8G8B8): Likewise.
588 (grub_video_i386_vbefill_index): Likewise.
589 (grub_video_i386_vbefill): Added generic filler.
591 * video/i386/pc/vbefill.c: Updated to reflect changes on
592 include/grub/i386/pc/vbefill.h.
594 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
595 grub_video_i386_vbeblit_info.
596 (grub_video_vbe_unmap_color): Likewise.
597 (grub_video_vbe_blit_glyph): Likewise.
598 (grub_video_vbe_scroll): Likewise.
599 (grub_video_vbe_draw_pixel): Removed function.
600 (grub_video_vbe_get_pixel): Likewise.
601 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
602 updated code to use it.
603 (common_blitter): Added common blitter for render target and bitmap.
604 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
605 (grub_video_vbe_blit_render_target): Likewise.
607 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
609 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
610 is in text mode if there is no console control protocol instance
613 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
615 * include/grub/video.h: Code cleanup.
617 * include/grub/i386/pc/vbe.h: Likewise.
619 * video/i386/pc/vbe.c: Likewise.
621 * video/i386/pc/vbeblit.c: Likewise.
623 * video/i386/pc/vbefill.c: Likewise.
625 * video/video.c: Likewise. Also added more comments.
627 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
629 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
630 (struct grub_biosdisk_dap): Likewise.
632 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
633 linkage settings for all functions.
635 2006-07-12 Marco Gerards <marco@gnu.org>
637 * configure.ac (--enable-mm-debug): Fix typo.
639 * genkernsyms.sh.in: Use proper quoting for `CC'.
641 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
643 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
644 (normal_mod_ASFLAGS): Remove "-m32".
646 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
648 * util/misc.c: Include config.h.
649 [!HAVE_MEMALIGN]: Do not include malloc.h.
650 (grub_memalign): Use posix_memalign, if present. Then, use
651 memalign, if present. Otherwise, emit an error.
653 * util/grub-emu.c: Do not include malloc.h.
655 * include/grub/util/misc.h: Include unistd.h. This is required for
656 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
657 D. Eades III <hde@foobar-qux.org>.
659 * configure.ac (AC_GNU_SOURCE): Added.
660 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
663 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
665 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
666 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
668 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
670 * include/grub/types.h (grub_host_addr_t): Rename to
672 (grub_host_off_t): Rename to grub_target_off_t.
673 (grub_host_size_t): Rename to grub_target_size_t.
674 (grub_host_ssize_t): Rename to grub_target_ssize_t.
675 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
677 * include/grub/kernel.h (struct grub_module_header): Change type
678 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
679 (grub_module_info): Likewise.
681 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
683 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
684 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
685 Velazquez <jesus.velazquez@gmail.com>.
687 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
689 Count partitions from 1 instead of 0 in the string representation
690 of partitions. Still use 0-based internally.
692 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
693 (sun_partition_map_iterate): Use grub_partition_t instead of
694 struct grub_partition *. Cast DESC->START_CYLINDER to
695 grub_uint64_t after converting the endian.
696 (sun_partition_map_probe): Subtract 1 for PARTNUM.
697 (sun_partition_map_get_name): Add 1 to P->INDEX.
699 * partmap/pc.c (grub_partition_parse): Subtract 1 for
701 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
703 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
705 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
706 (gpt_partition_map_get_name): Add 1 into P->INDEX.
708 * partmap/apple.c (apple_partition_map_iterate): Change the type
710 (apple_partition_map_probe): Subtract 1 for PARTNUM.
711 (apple_partition_map_get_name): Add 1 into P->INDEX.
713 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
715 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
716 calculate the offset of a partition.
717 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
718 (amiga_partition_map_get_name): Add 1 into P->INDEX.
720 * partmap/acorn.c (acorn_partition_map_find): Change the type of
721 SECTOR to grub_disk_addr_t.
722 (acorn_partition_map_iterate): Likewise.
723 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
724 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
726 (acorn_partition_map_get_name): Add 1 into P->INDEX.
728 * kern/i386/pc/init.c (make_install_device): Add 1 into
729 GRUB_INSTALL_DOS_PART.
731 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
734 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
736 Clean up the code to support 64-bit addressing in disks and
737 files. This change is not enough for filesystems yet.
739 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
740 type of "start" to grub_uint64_t.
741 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
742 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
743 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
746 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
749 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
752 * partmap/pc.c (pc_partition_map_iterate): Likewise.
754 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
757 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
759 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
761 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
763 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
764 to grub_off_t, to detect an error from grub_file_seek.
765 (grub_multiboot_load_elf32): Likewise.
767 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
768 maximum unsigned long value when an overflow is detected.
769 (grub_strtoull): New function.
770 (grub_divmod64): Likewise.
771 (grub_lltoa): use grub_divmod64.
773 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
775 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
776 the pointer to next character. Use grub_strtoull instead of
778 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
779 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
782 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
783 return value is signed.
784 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
785 test if OFFSET is less than zero, as OFFSET is unsigned now.
787 * kern/disk.c (struct grub_disk_cache): Change the type of
788 "sector" to grub_disk_addr_t.
789 (grub_disk_cache_get_index): Change the type of SECTOR to
790 grub_disk_addr_t. Calculate the hash with SECTOR casted to
791 unsigned after shifting.
792 (grub_disk_cache_invalidate): Change the type of SECTOR to
794 (grub_disk_cache_unlock): Likewise.
795 (grub_disk_cache_store): Likewise.
796 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
797 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
798 grub_disk_addr_t and grub_uint64_t, respectively.
799 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
800 body, as the value of OFFSET is tweaked by
801 grub_disk_check_range. Change the types of START_SECTOR, LEN and
802 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
804 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
805 body, as the value of OFFSET is tweaked by
806 grub_disk_check_range. Change the types of LEN and N to
809 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
810 and "saved_offset" to grub_off_t.
811 (test_header): Cast BUF to char *.
812 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
814 (grub_gzio_read): Change the types of OFFSET and SIZE to
815 grub_off_t and grub_size_t, respectively.
817 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
819 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
820 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
821 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
822 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
823 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
825 * include/grub/types.h (grub_off_t): Unconditionally set to
827 (grub_disk_addr_t): Changed to grub_uint64_t.
829 * include/grub/partition.h (struct grub_partition): Change the
830 types of "start", "len" and "offset" to grub_disk_addr_t,
831 grub_uint64_t and grub_disk_addr_t, respectively.
832 (grub_partition_get_start): Return grub_disk_addr_t.
833 (grub_partition_get_len): Return grub_uint64_t.
835 * include/grub/misc.h (grub_strtoull): New prototype.
836 (grub_divmod64): Likewise.
838 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
839 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
840 grub_off_t, respectively.
841 All callers and references changed.
843 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
844 grub_size_t in "read".
845 All callers and references changed.
847 * include/grub/file.h (struct grub_file): Change the types of
848 "offset" and "size" to grub_off_t and grub_off_t,
849 respectively. Change the type of SECTOR to grub_disk_addr_t in
851 (grub_file_read): Change the type of LEN to grub_size_t.
852 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
854 (grub_file_size): Return grub_off_t.
855 (grub_file_tell): Likewise.
856 All callers and references changed.
858 * include/grub/disk.h (struct grub_disk_dev): Change the types of
859 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
861 (struct grub_disk): Change the type of "total_sectors" to
862 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
864 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
865 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
866 (grub_disk_write): Likewise.
867 All callers and references changed.
869 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
870 char * for grub_strncmp to silence gcc.
871 (grub_iso9660_mount): Likewise.
872 (grub_iso9660_mount): Likewise.
873 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
875 (grub_iso9660_iterate_dir): Likewise.
876 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
878 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
879 LEN to grub_disk_addr_t and grub_size_t, respectively.
881 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
883 * fs/jfs.c (grub_jfs_read_file): Likewise.
885 * fs/minix.c (grub_jfs_read_file): Likewise.
887 * fs/sfs.c (grub_jfs_read_file): Likewise.
889 * fs/ufs.c (grub_jfs_read_file): Likewise.
891 * fs/xfs.c (grub_jfs_read_file): Likewise.
893 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
894 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
897 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
898 BLKNR to -1 instead of returning GRUB_ERRNO.
899 (grub_ext2_read_file): Change the types of SECTOR and
900 LEN to grub_disk_addr_t and grub_size_t, respectively.
902 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
903 LEN to grub_disk_addr_t and grub_size_t, respectively.
905 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
908 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
909 string. Do not cast SECTOR explicitly.
911 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
912 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
913 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
914 grub_disk_addr_t and grub_size_t, respectively. If the sector is
915 over 2TB and LBA mode is not supported, raise an error.
916 (get_safe_sectors): New function.
917 (grub_biosdisk_read): Use get_safe_sectors.
918 (grub_biosdisk_write): Likewise.
920 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
921 (grub_efidisk_write): Likewise.
923 * disk/loopback.c (delete_loopback): Cosmetic changes.
924 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
926 (grub_loopback_open): Likewise.
927 (grub_loopback_read): Likewise. Also, change the type of POS to
928 grub_off_t, and fix the usage of grub_memset.
930 * commands/i386/pc/play.c: Include grub/machine/time.h.
932 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
935 * commands/configfile.c: Include grub/env.h.
937 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
938 GRUB_ERRNO directly instead. Change the type of POS to
939 grub_off_t. Follow the coding standard.
941 * commands/blocklist.c: Include grub/partition.h.
942 (grub_cmd_blocklist): Return an error if the underlying device is
943 not a disk. Take the starting sector of a partition into account,
944 if a partition is used.
946 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
948 (lba_mode): Support 64-bit addresses.
949 (chs_mode): Likewise.
950 (copy_buffer): Adapted to the new offsets of a length field and a
952 (blocklist_default_start): Allocate 64-bit space.
954 * boot/i386/pc/boot.S (force_lba): Removed.
955 (boot_drive): Moved to under KERNEL_SECTOR.
956 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
958 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
960 (lba_mode): Refactored to support a 64-bit address. More size
962 (setup_sectors): Likewise.
964 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
966 * DISTLIST: Added include/grub/i386/linux.h. Removed
967 include/grub/i386/pc/linux.h
969 * configure.ac (AC_INIT): Bumped to 1.94.
971 * config.guess: Updated from gnulib.
972 * config.sub: Likewise.
973 * install-sh: Likewise.
974 * mkinstalldirs: Likewise.
976 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
978 * conf/common.rmk (grub_modules_init.lst): Depended on
979 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
982 * genmk.rb (PModule::rule): Reverted the previous change.
984 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
986 * conf/common.rmk (grub_modules_init.lst): Depends on
987 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
988 that the target does not exist before producing.
989 (grub_modules_init.h): Remove the target before generating.
990 (grub_emu_init.c): Likewise.
992 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
994 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
996 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
997 for the target-specific tests. Make sure that we also have the
998 up-to-date target variables for those tests.
1000 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
1002 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
1003 (PModule::rule): Likewise.
1005 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
1007 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
1008 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
1009 target-specific flags should be prefixed.
1010 (PModule::rule): Likewise.
1012 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
1014 * configure.ac (CMP): Check if cmp is available explicitly.
1016 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
1018 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
1019 (target_cpu): New variable.
1020 (pkglibdir): Use target_cpu instead of host_cpu.
1022 * util/i386/pc/grub-install.in (host_cpu): Removed.
1023 (target_cpu): New variable.
1024 (pkglibdir): Use target_cpu instead of host_cpu.
1026 * util/genmoddep.c: Removed.
1028 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
1029 instead of GRUB_HOST_SIZEOF_VOID_P.
1030 * kern/dl.c: Likewise.
1032 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
1034 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
1035 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
1036 (GRUB_TARGET_SIZEOF_LONG): ... this.
1037 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
1038 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
1039 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
1041 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
1042 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
1043 (GRUB_TARGET_SIZEOF_LONG): ... this.
1044 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
1045 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
1046 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
1048 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
1049 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
1050 (GRUB_TARGET_SIZEOF_LONG): ... this.
1051 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
1052 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
1054 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
1055 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
1056 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
1057 instead of GRUB_HOST_SIZEOF_LONG.
1058 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
1059 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
1060 GRUB_CPU_WORDS_BIGENDIAN.
1061 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
1062 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
1065 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
1066 (genmoddep_SOURCES): Likewise.
1067 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
1068 (genmoddep_SOURCES): Likewise.
1069 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
1070 (genmoddep_SOURCES): Likewise.
1071 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
1073 (genmoddep_SOURCES): Likewise.
1075 * genmoddep.awk: New file.
1077 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
1078 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
1079 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
1080 (PModule::rule): Likewise.
1081 (Program::rule): Likewise.
1082 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
1083 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
1086 * configure.ac: Rewritten intensively to use host and target
1087 instead of build and host, respectively.
1089 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
1090 (host_cpu): Removed.
1091 (target_cpu): New variable.
1092 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
1093 (BUILD_CC): Removed.
1094 (BUILD_CFLAGS): Likewise.
1095 (BUILD_CPPFLAGS): Likewise.
1096 (TARGET_CC): New variable.
1097 (TARGET_CFLAGS): Likewise.
1098 (TARGET_CPPFLAGS): Likewise.
1099 (TARGET_LDFLAGS): Likewise.
1101 (include): Use target_cpu instead of host_cpu.
1102 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
1104 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
1106 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
1108 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
1109 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
1110 field 'false' to 'exec_on_false'.
1111 (grub_script_create_cmdif): Renamed argument names to reflect above
1114 * normal/execute.c (grub_script_execute_cmdif): Likewise.
1116 * normal/script.c (grub_script_create_cmdif): Likewise.
1118 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
1120 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
1122 (grub_hfsplus_btree_recptr): Likewise.
1123 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
1124 FILEBLOCK both to pass a block number and store next block
1126 (grub_hfsplus_read_block): Rewritten heavily to support an extent
1127 overflow file correctly. Specify errors appropriately, because
1128 fshelp expects that GRUB_ERRNO is set when fails. Reuse
1129 grub_hfsplus_btree_recptr to get the pointer to a found key.
1130 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
1133 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
1135 (_linux_mod_SOURCES): New variable.
1136 (_linux_mod_CFLAGS): Likewise.
1137 (_linux_mod_LDFLAGS): Likewise.
1138 (linux_mod_SOURCES): Likewise.
1139 (linux_mod_CFLAGS): Likewise.
1140 (linux_mod_LDFLAGS): Likewise.
1142 * DISTLIST: Added loader/i386/efi/linux.c,
1143 loader/i386/efi/linux_normal.c and
1144 include/grub/i386/efi/loader.h.
1146 * loader/i386/efi/linux.c: New file.
1147 * loader/i386/efi/linux_normal.c: Likewise.
1148 * include/grub/i386/efi/loader.h: Likewise.
1150 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
1152 * commands/blocklist.c: New file.
1154 * DISTLIST: Added commands/blocklist.c.
1156 * term/efi/console.c (grub_console_highlight_color): Use a lighter
1157 color for the background, and a darker color for the foreground.
1158 (grub_console_checkkey): Return READ_KEY.
1159 (grub_console_cls): Set the background to
1160 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
1162 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
1164 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
1165 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
1167 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
1170 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
1171 BG. The spec is wrong again.
1173 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
1175 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
1177 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1178 commands/blocklist.c.
1179 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1181 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
1182 (blocklist_mod_SOURCES): New variable.
1183 (blocklist_mod_CFLAGS): Likewise.
1184 (blocklist_mod_LDFLAGS): Likewise.
1186 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
1188 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
1190 (lba_mode): Use %eax more intensively to reduce the code size.
1192 2006-05-20 Marco Gerards <marco@gnu.org>
1194 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
1196 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
1198 (script): Accept leading newlines.
1199 (newlines): New rule to describe 0 or more newlines.
1200 (commands): Accept `command' with trailing newline. Fixed the
1201 order in which arguments were passed to `grub_script_add_cmd'.
1202 Accept commands separated by newlines.
1203 (function): Changed to accept newlines.
1204 (menuentry) Rewritten.
1206 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
1207 front of the list, instead of to the end.
1209 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
1211 * util/i386/pc/grub-install.in (bindir): New variable.
1212 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
1213 Shaver <lbgwjl@gmail.com>.
1215 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
1217 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
1218 grub/machine/linux.h
1219 * loader/i386/pc/linux.c: Likewise.
1221 * include/grub/i386/pc/linux.h: Moved to ...
1222 * include/grub/i386/linux.h: ... here.
1224 * include/grub/i386/linux.h (struct linux_kernel_params): New
1227 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
1229 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
1231 (grub_video_vbe_blit_glyph): Likewise.
1232 (grub_video_vbe_blit_bitmap): Likewise.
1233 (grub_video_vbe_blit_render_target): Likewise.
1235 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
1237 * configure.ac (--with-platform): Properly quote the square
1240 2006-05-08 Marco Gerards <marco@gnu.org>
1242 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
1244 (kernel_elf_HEADERS): ...to this. Updated all users.
1245 (grubof_symlist.c): Renamed from this...
1246 (kernel_elf_symlist.c): ...to this. Updated all users.
1247 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
1248 (grubof_SOURCES): Renamed from this...
1249 (kernel_elf_SOURCES): ...to this.
1250 (grubof_HEADERS): Renamed from this...
1251 (kernel_elf_HEADERS): ...to this.
1252 (grubof_CFLAGS): Renamed from this...
1253 (kernel_elf_CFLAGS): ...to this.
1254 (grubof_ASFLAGS): Renamed from this...
1255 (kernel_elf_ASFLAGS): ...to this.
1256 (grubof_LDFLAGS): Renamed from this...
1257 (kernel_elf_LDFLAGS): ...to this.
1259 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
1261 (kernel_elf_HEADERS): ...to this. Updated all users.
1262 (grubof_symlist.c): Renamed from this...
1263 (kernel_elf_symlist.c): ...to this. Updated all users.
1264 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
1265 (grubof_SOURCES): Renamed from this...
1266 (kernel_elf_SOURCES): ...to this.
1267 (grubof_HEADERS): Renamed from this...
1268 (kernel_elf_HEADERS): ...to this.
1269 (grubof_CFLAGS): Renamed from this...
1270 (kernel_elf_CFLAGS): ...to this.
1271 (grubof_ASFLAGS): Renamed from this...
1272 (kernel_elf_ASFLAGS): ...to this.
1273 (grubof_LDFLAGS): Renamed from this...
1274 (kernel_elf_LDFLAGS): ...to this.
1276 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
1277 `kernel.elf' instead of `grubof'.
1279 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
1281 Add --with-platform to configure. Use pkglibdir instead of
1282 pkgdatadir. This is reported by Roger Leigh.
1284 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
1285 (host_vendor): Likewise.
1286 (host_os): Likewise.
1287 (pkgdatadir): Likewise.
1288 (platform): New variable.
1289 (pkglibdir): Likewise.
1290 Use PKGLIBDIR instead of PKGDATADIR.
1292 * util/i386/pc/grub-install.in (datadir): Removed.
1293 (host_vendor): Likewise.
1294 (host_os): Likewise.
1295 (pkgdatadir): Likewise.
1296 (platform): New variable.
1297 (pkglibdir): Likewise.
1298 Use PKGLIBDIR instead of PKGDATADIR.
1300 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
1301 instead of GRUB_DATADIR.
1303 * util/i386/pc/grub-mkimage.c (usage): Likewise.
1305 * util/i386/efi/grub-mkimage.c (usage): Likewise.
1308 * configure.ac (--with-platform): New option.
1309 Use PLATFORM instead of HOST_VENDOR to specify a platform.
1311 * Makefile.in: Include a makefile based on PLATFORM instead of
1313 (pkgdatadir): Not appended by the machine type.
1314 (pkglibdir): Appended by the machine type.
1315 (host_vendor): Removed.
1316 (platform): New variable.
1317 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
1318 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
1319 (uninstall): Likewise.
1321 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
1323 Use the environment context in the menu. Remove the commands
1324 "default" and "timeout", and use variables instead.
1326 * normal/menu.c: Include grub/env.h.
1327 (print_entry): Cast TITLE to silence gcc.
1328 (get_timeout): New function.
1329 (set_timeout): Likewise.
1330 (get_entry_number): Likewise.
1331 (run_menu): Use a default entry, a fallback entry and a timeout
1332 in the environment variables "default", "fallback" and
1333 "timeout". Also, tweak the default entry if it is not within the
1334 current menu entries.
1335 (grub_menu_run): Use a fallback entry in the environment variable
1338 * normal/main.c (read_config_file): Do not initialize
1339 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
1341 (grub_normal_execute): Use a data slot to store the menu.
1343 * include/grub/normal.h (struct grub_menu): Removed default_entry,
1344 fallback_entry and timeout.
1345 (struct grub_menu_list): Removed.
1346 (grub_menu_list_t): Likewise.
1347 (struct grub_context): Likewise.
1348 (grub_context_t): Likewise.
1349 (grub_context_get): Likewise.
1350 (grub_context_get_current_menu): Likewise.
1351 (grub_context_push_menu): Likewise.
1352 (grub_context_pop_menu): Likewise.
1353 (grub_default_init): Likewise.
1354 (grub_default_fini): Likewise.
1355 (grub_timeout_init): Likewise.
1356 (grub_timeout_fini): Likewise.
1358 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
1360 (normal_mod_SOURCES): Removed normal/context.c.
1362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
1363 commands/default.c, commands/timeout.c and normal/context.c.
1364 (normal_mod_SOURCES): Removed normal/context.c.
1366 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
1367 commands/timeout.c and normal/context.c.
1368 (normal_mod_SOURCES): Removed normal/context.c.
1370 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
1371 commands/default.c, commands/timeout.c and normal/context.c.
1372 (normal_mod_SOURCES): Removed normal/context.c.
1374 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
1376 (default_mod_SOURCES): Removed.
1377 (default_mod_CFLAGS): Likewise.
1378 (default_mod_LDFLAGS): Likewise.
1379 (timeout_mod_SOURCES): Removed.
1380 (timeout_mod_CFLAGS): Likewise.
1381 (timeout_mod_LDFLAGS): Likewise.
1383 * DISTLIST: Removed commands/default.c, commands/timeout.c and
1386 * commands/default.c: Removed.
1387 * commands/timeout.c: Likewise.
1388 * normal/context.c: Likewise.
1390 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
1392 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
1394 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
1396 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
1397 "next" to "prev" for readability.
1398 (struct grub_env_sorted_var): New struct.
1399 (grub_env_context): Renamed to ...
1400 (initial_context): ... this.
1401 (grub_env_var_context): Renamed to ...
1402 (current_context): ... this.
1403 (grub_env_find): Look only at CURRENT_CONTEXT.
1404 (grub_env_context_open): Rewritten to copy exported variables from
1406 (grub_env_context_close): Rewritten according to the new
1407 scheme. Also, add an assertion to prevent the initial context from
1409 (grub_env_insert): Removed the code for the sorted list.
1410 (grub_env_remove): Likewise.
1411 (grub_env_export): Simply mark the variable with
1412 GRUB_ENV_VAR_GLOBAL.
1413 (grub_env_set): A cosmetic change for naming consistency.
1414 (grub_env_get): Likewise.
1415 (grub_env_unset): Likewise.
1416 (grub_env_iterate): Rewritten to sort variables within this
1418 (grub_register_variable_hook): Fixed for naming consistency. Call
1419 grub_env_find again, only if NAME is not found at the first time.
1420 (mangle_data_slot_name): New function.
1421 (grub_env_set_data_slot): Likewise.
1422 (grub_env_get_data_slot): Likewise.
1423 (grub_env_unset_data_slot): Likewise.
1425 * include/grub/env.h (grub_env_var_type): New enum.
1426 (GRUB_ENV_VAR_LOCAL): New constant.
1427 (GRUB_ENV_VAR_GLOBAL): Likewise.
1428 (GRUB_ENV_VAR_DATA): Likewise.
1429 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
1431 (grub_env_set): Replace VAR with NAME for consistency.
1432 (grub_register_variable_hook): Likewise.
1433 (grub_env_export): Specify the name of the argument.
1434 (grub_env_set_data_slot): New prototype.
1435 (grub_env_get_data_slot): Likewise.
1436 (grub_env_unset_data_slot): Likewise.
1438 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
1440 Extend the loader so that GRUB can accept a loader which comes
1441 back to GRUB when a loaded image exits. Also, this change adds
1442 support for a chainloader on EFI.
1444 * term/efi/console.c: Include grub/misc.h.
1445 (grub_console_checkkey): Display a scan code on the top for
1446 debugging. This will be removed once the EFI port gets stable.
1447 Correct the scan code mapping.
1449 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
1450 allocate memory from larger regions, in order to reduce the number
1451 of allocated regions. Otherwise, the MacOSX loader panics.
1452 (filter_memory_map): Avoid less than 1MB for compatibility with
1454 (add_memory_regions): Allocate from the tail of a region, if
1455 possible, to avoid allocating a region near to 1MB, for the MacOSX
1458 * kern/efi/init.c (grub_efi_set_prefix): Specify
1459 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
1461 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
1462 argument IMAGE_HANDLE and specify it to get a loaded image.
1463 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
1464 grub_efi_get_loaded_image.
1465 (grub_efi_get_filename): Divide the legnth by the size of
1467 (grub_efi_get_device_path): New function.
1468 (grub_efi_print_device_path): Print End Device Path nodes. Divide
1469 the length by the size of grub_efi_char16_t for a file path device
1472 * kern/loader.c (grub_loader_noreturn): New variable.
1473 (grub_loader_set): Accept a new argument NORETURN. Set
1474 GRUB_LOADER_NORETURN to NORETURN.
1475 All callers changed.
1476 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
1479 * include/grub/efi/efi.h (grub_efi_get_device_path): New
1481 (grub_efi_get_loaded_image): Take an argument to specify an image
1484 * include/grub/loader.h (grub_loader_set): Added one more argument
1487 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
1488 instead of grub_efi_open_protocol.
1489 (grub_efidisk_get_device_name): Likewise.
1490 (grub_efidisk_close): Print a newline.
1491 (grub_efidisk_get_device_handle): Fixed to use
1492 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
1493 GRUB_EFI_DEVICE_PATH_TYPE.
1495 * disk/efi/efidisk.c (device_path_guid): Moved to ...
1496 * kern/efi/efi.c (device_path_guid): ... here.
1498 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
1500 (kernel_mod_HEADERS): Added efi/disk.h.
1501 (_chain_mod_SOURCES): New variable.
1502 (_chain_mod_CFLAGS): Likewise.
1503 (_chain_mod_LDFLAGS): Likewise.
1504 (chain_mod_SOURCES): Likewise.
1505 (chain_mod_CFLAGS): Likewise.
1506 (chain_mod_LDFLAGS): Likewise.
1508 * DISTLIST: Added include/grub/efi/chainloader.h,
1509 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
1511 * include/grub/efi/chainloader.h: New file.
1512 * loader/efi/chainloader.c: Likewise.
1513 * loader/efi/chainloader_normal.c: Likewise.
1515 2006-04-30 Marco Gerards <marco@gnu.org>
1517 * commands/configfile.c (grub_cmd_source): New function.
1518 (GRUB_MOD_INIT): Register the commands `source' and `.'.
1519 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
1521 2006-04-30 Marco Gerards <marco@gnu.org>
1523 * normal/execute.c (grub_script_execute_cmd): Change the return
1524 type to `grub_err_t'. Correctly return the error.
1525 (grub_script_execute_cmdline): In case a command line is not a
1526 command or a function, try to interpret it as an assignment.
1528 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
1530 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
1531 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
1532 skip a node whose name is obviously invalid as UTF-16,
1533 i.e. contains a NUL character. Stop the iteration when the last
1534 directory entry is found. Instead of using the return value of
1535 grub_hfsplus_btree_iterate_node, store the value in RET and use
1536 it, because the iterator can be stopped by the last directory
1539 2006-04-30 Marco Gerards <marco@gnu.org>
1541 * include/grub/env.h (grub_env_export): New prototype. Reported
1542 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
1544 2006-04-30 Marco Gerards <marco@gnu.org>
1546 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
1547 size of the extents in a catalog file record.
1549 2006-04-29 Marco Gerards <marco@gnu.org>
1551 * commands/configfile.c (grub_cmd_configfile): Execute the
1552 configfile within its own context.
1554 * include/grub/env.h (grub_env_context_open): New prototype.
1555 (grub_env_context_close): Likewise.
1557 * kern/env.c (grub_env): Removed.
1558 (grub_env_sorted): Likewise.
1559 (grub_env_context): New variable.
1560 (grub_env_var_context): Likewise.
1561 (grub_env_find): Search both the active context and the global
1563 (grub_env_context_open): New function.
1564 (grub_env_context_close): Likewise.
1565 (grub_env_insert): Likewise.
1566 (grub_env_remove): Likewise.
1567 (grub_env_export): Likewise.
1568 (grub_env_set): Changed to use helper functions to avoid code
1570 (grub_env_iterate): Rewritten so both the current context and the
1571 global context are being used.
1573 * normal/command.c (export_command): New function.
1574 (grub_command_init): Register the `export' function.
1576 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
1578 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
1579 explicitly to suppress gcc's warnings.
1580 * fs/fat.c (grub_fat_find_dir): Likewise.
1581 (grub_fat_label): Likewise.
1582 * fs/xfs.c (grub_xfs_read_inode): Likewise.
1583 (grub_xfs_mount): Likewise.
1584 (grub_xfs_label): Likewise.
1585 * fs/affs.c (grub_affs_mount): Likewise.
1586 (grub_affs_label): Likewise.
1587 (grub_affs_iterate_dir): Likewise.
1588 * fs/sfs.c (grub_sfs_mount): Likewise.
1589 (grub_sfs_iterate_dir): Likewise.
1590 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
1591 * fs/hfs.c (grub_hfs_mount): Likewise.
1592 (grub_hfs_cmp_catkeys): Likewise.
1593 (grub_hfs_find_dir): Likewise.
1594 (grub_hfs_dir): Likewise.
1595 (grub_hfs_label): Likewise.
1596 * fs/jfs.c (grub_jfs_mount): Likewise.
1597 (grub_jfs_opendir): Likewise.
1598 (grub_jfs_getent): Likewise.
1599 (grub_jfs_lookup_symlink): Likewise.
1600 (grub_jfs_label): Likewise.
1601 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
1602 (grub_hfsplus_iterate_dir): Likewise.
1603 (grub_hfsplus_btree_iterate_node): Made static.
1605 * util/grub-emu.c (prefix): New variable.
1606 (grub_machine_set_prefix): New function.
1607 (main): Do not set the environment variable "prefix" here. Only
1608 set PREFIX, which is used later by grub_machine_set_prefix.
1610 * include/grub/video.h: Do not include grub/symbol.h.
1611 (grub_video_register): Not exported. This symbol is not defined in
1613 (grub_video_unregister): Likewise.
1614 (grub_video_iterate): Likewise.
1615 (grub_video_setup): Likewise.
1616 (grub_video_restore): Likewise.
1617 (grub_video_get_info): Likewise.
1618 (grub_video_get_blit_format): Likewise.
1619 (grub_video_set_palette): Likewise.
1620 (grub_video_get_palette): Likewise.
1621 (grub_video_set_viewport): Likewise.
1622 (grub_video_get_viewport): Likewise.
1623 (grub_video_map_color): Likewise.
1624 (grub_video_map_rgb): Likewise.
1625 (grub_video_map_rgba): Likewise.
1626 (grub_video_fill_rect): Likewise.
1627 (grub_video_blit_glyph): Likewise.
1628 (grub_video_blit_bitmap): Likewise.
1629 (grub_video_blit_render_target): Likewise.
1630 (grub_video_scroll): Likewise.
1631 (grub_video_swap_buffers): Likewise.
1632 (grub_video_create_render_target): Likewise.
1633 (grub_video_delete_render_target): Likewise.
1634 (grub_video_set_active_render_target): Likewise.
1636 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
1638 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
1640 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
1641 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
1642 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
1643 instead of $(srcdir)/genkernsyms.sh.
1645 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
1646 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
1647 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
1648 instead of $(srcdir)/genkernsyms.sh.
1650 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
1651 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
1652 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
1653 instead of $(srcdir)/genkernsyms.sh.
1655 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
1656 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
1657 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
1658 instead of $(srcdir)/genkernsyms.sh.
1660 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
1663 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
1665 (gensymlist.sh): New target.
1666 (genkernsyms.sh): Likewise.
1668 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
1669 genkernsyms.sh.in and gensymlist.sh.in.
1671 * genkernsyms.sh: Removed.
1672 * gensymlist.sh: Likewise.
1674 * genkernsyms.sh.in: New file.
1675 * gensymlist.sh.in: Likewise.
1677 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
1679 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
1680 clobber "prefix", since we may have already set it manually.
1682 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
1684 * kern/misc.c (abort): New alias for grub_abort.
1686 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
1688 A new machine-specific function "grub_machine_set_prefix" is
1689 defined. This is called after loading modules, so that a prefix
1690 initialization can use modules. Also, this change adds an
1691 intensive debugging feature for the memory manager via the
1692 configure option "--enable-mm-debug".
1694 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
1697 * kern/sparc64/ieee1275/init.c (abort): Removed.
1698 (grub_stop): Likewise.
1699 (grub_exit): New function.
1700 (grub_set_prefix): Renamed to ...
1701 (grub_machine_set_prefix): ... this.
1702 (grub_machine_init): Do not call grub_set_prefix.
1704 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
1705 (grub_machine_set_prefix): ... this.
1706 (grub_machine_init): Do not call grub_set_prefix.
1708 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
1709 (grub_machine_init): Do not set the prefix here.
1711 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
1713 * kern/efi/init.c: Include grub/mm.h.
1714 (grub_efi_set_prefix): New function.
1716 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
1717 (grub_efi_get_filename): New function.
1718 (grub_print_device_path): Renamed to ...
1719 (grub_efi_print_device_path): ... this.
1721 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
1722 [MM_DEBUG] (grub_realloc): Likewise.
1723 [MM_DEBUG] (grub_free): Likewise.
1724 [MM_DEBUG] (grub_memalign): Likewise.
1725 [MM_DEBUG] (grub_mm_debug): New variable.
1726 [MM_DEBUG] (grub_debug_malloc): New function.
1727 [MM_DEBUG] (grub_debug_free): New function.
1728 [MM_DEBUG] (grub_debug_realloc): New function.
1729 [MM_DEBUG] (grub_debug_memalign): New function.
1731 * kern/misc.c (grub_abort): Print a newline to distinguish
1734 * kern/main.c (grub_main): Call grub_machine_set_prefix and
1735 grub_set_root_dev after loading modules. This is necessary when
1736 setting a prefix depends on modules.
1738 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
1739 (grub_efi_print_device_path): ... this.
1740 (grub_efi_get_filename): New prototype.
1741 (grub_efi_set_prefix): Likewise.
1743 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
1745 (grub_efidisk_get_device_handle): New prototype.
1746 (grub_efidisk_get_device_name): Likewise.
1748 * include/grub/mm.h: Include config.h.
1749 (MM_DEBUG): Removed.
1750 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
1751 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
1752 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
1753 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
1754 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
1755 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
1756 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
1757 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
1758 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
1760 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
1762 * disk/efi/efidisk.c: Include grub/partition.h.
1763 (iterate_child_devices): New function.
1764 (add_device): First, compare only last device path nodes, so that
1765 devices are sorted by the types.
1766 (grub_efidisk_get_device_handle): New function.
1767 (grub_efidisk_get_device_name): Likewise.
1769 * configure.ac (--enable-mm-debug): New option to enable the
1770 memory manager debugging feature. This makes the binary much
1771 bigger, so is disabled by default.
1773 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
1775 Use grub_abort instead of grub_stop, and grub_exit must be
1776 define in each architecture now. Also, this change adds support
1779 * util/i386/pc/grub-probefs.c: Include grub/term.h.
1780 (grub_getkey): New function.
1781 (grub_term_get_current): Likewise.
1783 * util/i386/pc/grub-setup.c: Include grub/term.h.
1784 (grub_getkey): New function.
1785 (grub_term_get_current): Likewise.
1787 * util/misc.c (grub_stop): Renamed to ...
1788 (grub_exit): ... this.
1790 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
1791 (grub_exit): ... this.
1792 (grub_machine_init): Use grub_abort instead of abort.
1793 (grub_stop): Removed.
1795 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
1798 * kern/i386/pc/startup.S (grub_exit): New function.
1799 (cold_reboot): New label.
1801 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
1802 (grub_efi_init): Call grub_efidisk_init.
1803 (grub_efi_fini): Call grub_efidisk_fini.
1805 * kern/efi/efi.c: Include grub/mm.h.
1806 (grub_efi_console_control_guid): Renamed to ...
1807 (console_control_guid): ... this.
1808 (grub_efi_loaded_image_guid): Renamed to ...
1809 (loaded_image_guid): ... this.
1810 (grub_efi_locate_handle): New function.
1811 (grub_efi_open_protocol): Likewise.
1812 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
1813 GRUB_EFI_CONSOLE_CONTROL_GUID.
1814 (grub_efi_exit): Removed.
1815 (grub_stop): Likewise.
1816 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
1817 (grub_exit): New function.
1818 (grub_print_device_path): Likewise.
1820 * kern/rescue.c (grub_rescue_cmd_exit): New function.
1821 (grub_enter_rescue_mode): Register "exit".
1823 * kern/misc.c (grub_real_dprintf): A cosmetic change.
1824 (grub_abort): New function.
1826 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
1828 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
1830 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
1832 * include/grub/efi/efi.h (grub_efi_exit): Removed.
1833 (grub_print_device_path): New prototype.
1834 (grub_efi_locate_handle): Likewise.
1835 (grub_efi_open_protocol): Likewise.
1837 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
1838 * disk/efi/efidisk.c: Likewise.
1840 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
1842 * include/grub/efi/console_control.h
1843 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
1845 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
1846 last 8 bytes as an array.
1847 (GRUB_EFI_DISK_IO_GUID): New macro.
1848 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
1849 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
1850 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
1852 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
1853 (struct grub_efi_device_path): Rename the member "sub_type" to
1855 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
1856 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
1857 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
1858 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
1859 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
1860 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
1861 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
1862 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
1863 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
1864 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
1865 (struct grub_efi_pci_device_path): New structure.
1866 (grub_efi_pci_device_path_t): New type.
1867 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
1868 (struct grub_efi_pccard_device_path): New structure.
1869 (grub_efi_pccard_device_path_t): New type.
1870 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
1871 (struct grub_efi_memory_mapped_device_path): New structure.
1872 (grub_efi_memory_mapped_device_path_t): New type.
1873 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
1874 (struct grub_efi_vendor_device_path): New structure.
1875 (grub_efi_vendor_device_path_t): New type.
1876 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
1877 (struct grub_efi_controller_device_path): New structure.
1878 (grub_efi_controller_device_path_t): New type.
1879 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
1880 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
1881 (struct grub_efi_acpi_device_path): New structure.
1882 (grub_efi_acpi_device_path_t): New type.
1883 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
1884 (struct grub_efi_expanded_acpi_device_path): New structure.
1885 (grub_efi_expanded_acpi_device_path_t): New type.
1886 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
1887 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
1888 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
1889 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
1890 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
1891 (struct grub_efi_atapi_device_path): New structure.
1892 (grub_efi_atapi_device_path_t): New type.
1893 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
1894 (struct grub_efi_fibre_channel_device_path): New structure.
1895 (grub_efi_fibre_channel_device_path_t): New type.
1896 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
1897 (struct grub_efi_1394_device_path): New structure.
1898 (grub_efi_1394_device_path_t): New type.
1899 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
1900 (struct grub_efi_usb_device_path): New structure.
1901 (grub_efi_usb_device_path_t): New type.
1902 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
1903 (struct grub_efi_usb_class_device_path): New structure.
1904 (grub_efi_usb_class_device_path_t): New type.
1905 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
1906 (struct grub_efi_i2o_device_path): New structure.
1907 (grub_efi_i2o_device_path_t): New type.
1908 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
1909 (struct grub_efi_mac_address_device_path): New structure.
1910 (grub_efi_mac_address_device_path_t): New type.
1911 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
1912 (struct grub_efi_ipv4_device_path): New structure.
1913 (grub_efi_ipv4_device_path_t): New type.
1914 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
1915 (struct grub_efi_ipv6_device_path): New structure.
1916 (grub_efi_ipv6_device_path_t): New type.
1917 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
1918 (struct grub_efi_infiniband_device_path): New structure.
1919 (grub_efi_infiniband_device_path_t): New type.
1920 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
1921 (struct grub_efi_uart_device_path): New structure.
1922 (grub_efi_uart_device_path_t): New type.
1923 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
1924 (struct grub_efi_vendor_messaging_device_path): New structure.
1925 (grub_efi_vendor_messaging_device_path_t): New type.
1926 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
1927 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
1928 (struct grub_efi_hard_drive_device_path): New structure.
1929 (grub_efi_hard_drive_device_path_t): New type.
1930 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
1931 (struct grub_efi_cdrom_device_path): New structure.
1932 (grub_efi_cdrom_device_path_t): New type.
1933 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
1934 (struct grub_efi_vendor_media_device_path): New structure.
1935 (grub_efi_vendor_media_device_path_t): New type.
1936 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
1937 (struct grub_efi_file_path_device_path): New structure.
1938 (grub_efi_file_path_device_path_t): New type.
1939 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
1940 (struct grub_efi_protocol_device_path): New structure.
1941 (grub_efi_protocol_device_path_t): New type.
1942 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
1943 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
1944 (struct grub_efi_bios_device_path): New structure.
1945 (grub_efi_bios_device_path_t): New type.
1946 (struct grub_efi_disk_io): New structure.
1947 (grub_efi_disk_io_t): New type.
1948 (struct grub_efi_block_io_media): New structure.
1949 (grub_efi_block_io_media_t): New type.
1950 (struct grub_efi_block_io): New structure.
1951 (grub_efi_block_io_t): New type.
1953 * include/grub/misc.h (grub_stop): Removed.
1954 (grub_exit): New prototype.
1955 (grub_abort): Likewise.
1957 * include/grub/disk.h (enum grub_disk_dev_id): Added
1958 GRUB_DISK_DEVICE_EFIDISK_ID.
1960 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
1962 (kernel_syms.lst): Remove the target if an error occurs.
1964 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
1966 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
1967 as it was simply too buggy.
1969 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
1971 * kern/misc.c (grub_lltoa): New function.
1972 (grub_vsprintf): Added support for the long long suffix,
1975 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
1977 * Makefile.in (LDFLAGS): Add variable.
1978 (LD): Remove variable.
1979 * configure.ac: Add -m32 to LDFLAGS.
1980 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
1981 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
1982 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
1983 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
1984 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
1986 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
1987 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
1988 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
1990 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
1992 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
1993 length for unknown glyph.
1995 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
1997 Add support for pre-loaded modules into the EFI port.
1999 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
2000 completely. Accept one more argument DIR. The caller has changed.
2002 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
2004 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
2005 (grub_efi_loaded_image_guid): New variable.
2006 (grub_efi_get_loaded_image): New function.
2007 (grub_arch_modules_addr): Likewise.
2009 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
2012 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
2013 (struct grub_efi_loaded_image): New structure.
2014 (grub_efi_loaded_image_t): New type.
2016 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
2018 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
2019 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
2020 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
2022 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
2024 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
2026 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
2028 * DISTLIST: Added include/grub/efi/console.h,
2029 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
2030 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
2032 * include/grub/efi/console.h: New file.
2033 * include/grub/efi/time.h: Likewise.
2034 * include/grub/i386/efi/kernel.h: Likewise.
2035 * kern/efi/init.c: Likewise.
2036 * kern/efi/mm.c: Likewise.
2037 * term/efi/console.c: Likewise.
2039 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
2040 (grub_stop): Removed.
2041 (grub_get_rtc): Likewise.
2042 (grub_machine_init): Simply call grub_efi_init.
2043 (grub_machine_fini): Call grub_efi_fini.
2045 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
2046 (grub_efi_output_string): Removed.
2047 (grub_efi_stall): New function.
2048 (grub_stop): Likewise.
2049 (grub_get_rtc): Likewise.
2051 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
2052 (grub_efi_stall): New prototype.
2053 (grub_efi_allocate_pages): Likewise.
2054 (grub_efi_free_pages): Likewise.
2055 (grub_efi_get_memory_map): Likewise.
2056 (grub_efi_mm_init): Likewise.
2057 (grub_efi_mm_fini): Likewise.
2058 (grub_efi_init): Likewise.
2059 (grub_efi_fini): Likewise.
2061 * include/grub/i386/efi/time.h: Do not include
2062 grub/symbol.h. Include grub/efi/time.h.
2063 (GRUB_TICKS_PER_SECOND): Removed.
2064 (grub_get_rtc): Likewise.
2066 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
2067 Added padding. The EFI spec is buggy.
2068 (GRUB_EFI_BLACK): New macro.
2069 (GRUB_EFI_BLUE): Likewise.
2070 (GRUB_EFI_GREEN): Likewise.
2071 (GRUB_EFI_CYAN): Likewise.
2072 (GRUB_EFI_RED): Likewise.
2073 (GRUB_EFI_MAGENTA): Likewise.
2074 (GRUB_EFI_BROWN): Likewise.
2075 (GRUB_EFI_LIGHTGRAY): Likewise.
2076 (GRUB_EFI_BRIGHT): Likewise.
2077 (GRUB_EFI_DARKGRAY): Likewise.
2078 (GRUB_EFI_LIGHTBLUE): Likewise.
2079 (GRUB_EFI_LIGHTGREEN): Likewise.
2080 (GRUB_EFI_LIGHTCYAN): Likewise.
2081 (GRUB_EFI_LIGHTRED): Likewise.
2082 (GRUB_EFI_LIGHTMAGENTA): Likewise.
2083 (GRUB_EFI_YELLOW): Likewise.
2084 (GRUB_EFI_WHITE): Likewise.
2085 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
2086 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
2087 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
2088 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
2089 (GRUB_EFI_BACKGROUND_RED): Likewise.
2090 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
2091 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
2092 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
2093 (GRUB_EFI_TEXT_ATTR): Likewise.
2095 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
2096 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
2097 (kernel_mod_HEADERS): Added efi/time.h.
2099 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
2101 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
2102 include/grub/efi/api.h, include/grub/efi/console_control.h,
2103 include/grub/efi/efi.h, include/grub/efi/pe32.h,
2104 include/grub/i386/efi/time.h, kern/efi/efi.c,
2105 kern/i386/efi/init.c, kern/i386/efi/startup.S,
2106 and util/i386/efi/grub-mkimage.c.
2108 * Makefile.in (RMKFILES): Added i386-efi.rmk.
2110 * genmk.rb (PModule#rule): Do not export symbols if
2111 #{prefix}_EXPORTS is set to "no".
2113 * conf/i386-efi.mk: New file.
2114 * conf/i386-efi.rmk: Likewise.
2115 * include/grub/efi/api.h: Likewise.
2116 * include/grub/efi/console_control.h: Likewise.
2117 * include/grub/efi/efi.h: Likewise.
2118 * include/grub/efi/pe32.h: Likewise.
2119 * include/grub/i386/efi/time.h: Likewise.
2120 * kern/efi/efi.c: Likewise.
2121 * kern/i386/efi/init.c: Likewise.
2122 * kern/i386/efi/startup.S: Likewise.
2123 * util/i386/efi/grub-mkimage.c: Likewise.
2125 2006-04-17 Marco Gerards <marco@gnu.org>
2127 * include/grub/script.h: Include <grub/parser.h> and
2128 "grub_script.tab.h".
2129 (struct grub_lexer_param): New struct.
2130 (struct grub_parser_param): Likewise.
2131 (grub_script_create_arglist): Pass the state in an argument.
2132 (grub_script_add_arglist): Likewise.
2133 (grub_script_create_cmdline): Likewise.
2134 (grub_script_create_cmdblock): Likewise.
2135 (grub_script_create_cmdif): Likewise.
2136 (grub_script_create_cmdmenu): Likewise.
2137 (grub_script_add_cmd): Likewise.
2138 (grub_script_arg_add): Likewise.
2139 (grub_script_lexer_ref): Likewise.
2140 (grub_script_lexer_deref): Likewise.
2141 (grub_script_lexer_record_start): Likewise.
2142 (grub_script_lexer_record_stop): Likewise.
2143 (grub_script_mem_record): Likewise.
2144 (grub_script_mem_record_stop): Likewise.
2145 (grub_script_malloc): Likewise.
2146 (grub_script_yylex): Likewise.
2147 (grub_script_yyparse): Likewise.
2148 (grub_script_yyerror): Likewise.
2149 (grub_script_yylex): Likewise.
2150 (grub_script_lexer_init): Return the state.
2152 * normal/lexer.c (grub_script_lexer_state): Removed variable.
2153 (grub_script_lexer_done): Likewise.
2154 (grub_script_lexer_getline): Likewise.
2155 (grub_script_lexer_refs): Likewise.
2157 (newscript): Likewise.
2159 (recording): Likewise.
2160 (recordpos): Likewise.
2161 (recordlen): Likewise.
2162 (grub_script_lexer_init): Return the state instead of setting
2164 (grub_script_lexer_ref): Use the newly added argument for state
2166 (grub_script_lexer_deref): Likewise.
2167 (grub_script_lexer_record_start): Likewise.
2168 (grub_script_lexer_record_stop): Likewise.
2169 (recordchar): Likewise.
2170 (nextchar): Likewise.
2171 (grub_script_yylex2): Likewise.
2172 (grub_script_yylex): Likewise.
2173 (grub_script_yyerror): Likewise.
2175 * normal/parser.y (func_mem): Removed variable.
2176 (menu_entry): Likewise.
2178 (%lex-param): New parser option.
2179 (%parse-param): Likewise.
2180 (script): Always return the AST.
2181 (argument): Pass the state around.
2182 (arguments): Likewise.
2183 (grubcmd): Likewise.
2184 (commands): Likewise.
2185 (function): Likewise.
2186 (menuentry): Likewise.
2187 (if_statement): Likewise.
2190 * normal/script.c (grub_script_memused): Removed variable.
2191 (grub_script_parsed): Likewise.
2192 (grub_script_malloc): Added a state argument. Use that instead of
2194 (grub_script_mem_record): Likewise.
2195 (grub_script_mem_record_stop): Likewise.
2196 (grub_script_arg_add): Likewise.
2197 (grub_script_add_arglist): Likewise.
2198 (grub_script_create_cmdline): Likewise.
2199 (grub_script_create_cmdif): Likewise.
2200 (grub_script_create_cmdmenu): Likewise.
2201 (grub_script_add_cmd): Likewise.
2202 (grub_script_parse): Setup the state before calling the parser.
2204 2006-04-16 Marco Gerards <marco@gnu.org>
2206 * normal/command.c (grub_command_init): Remove the title command.
2208 * normal/lexer.c (grub_script_yylex): Renamed from this...
2209 (grub_script_yylex2): ... to this.
2210 (grub_script_yylex): New function. Temporary
2211 introduced to filter some tokens.
2212 (grub_script_yyerror): Print a newline.
2214 * normal/main.c (read_config_file): Output information about the
2215 lines that contain errors. Wait for a key after all lines have
2216 been processed. Don't return an empty menu.
2218 * normal/parser.y (func_mem): Don't initialize.
2219 (menu_entry): Likewise.
2220 (err): New variable.
2221 (script): Don't return anything when an error was encountered.
2222 (ws, returns): Removed rules.
2223 (argument): Disabled concatenated variable support.
2224 (arguments): Remove explicit separators.
2225 (grubcmd): Likewise.
2226 (function): Likewise.
2227 (menuentry): Likewise.
2229 (commands): Likewise. Add error handling.
2231 * normal/script.c (grub_script_create_cmdline): If
2232 `grub_script_parsed' is 0, assume the parser encountered an error.
2234 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
2236 * configure.ac: Add support for EFI. Fix the typo
2237 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
2239 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
2241 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
2242 foreign multibyte characters should be shown correctly.
2244 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
2246 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
2248 (read_config_file): Made it to close file before returning.
2250 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
2252 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
2253 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
2254 video/i386/pc/vbefill.c.
2256 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
2257 video/i386/pc/vbefill.c.
2259 * include/grub/video.h (grub_video_blit_format): New enum.
2260 (grub_video_mode_info): Added new member blit_format.
2261 (grub_video_get_blit_format): New function prototype.
2263 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
2265 (grub_video_vbe_map_rgb): Likewise.
2266 (grub_video_vbe_unmap_color): Likewise.
2268 * include/grub/i386/pc/vbeblit.h: New file.
2270 * include/grub/i386/pc/vbefill.h: New file.
2272 * video/video.c (grub_video_get_blit_format): New function.
2273 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
2274 (grub_video_vbe_map_rgb): Likewise.
2275 (grub_video_vbe_unmap_color): Likewise.
2277 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
2279 (grub_video_vbe_blit_render_target): Changed to use more optimized
2281 (grub_video_vbe_setup): Added detection for optimized settings.
2282 (grub_video_vbe_create_render_target): Likewise.
2284 * video/i386/pc/vbeblit.c: New file.
2286 * video/i386/pc/vbefill.c: New file.
2288 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
2290 * font/manager.c (grub_font_get_glyph): Removed font fixup from
2293 * util/unifont2pff.rb: ... and moved it to here. Improved argument
2294 parsing to support both hex and dec ranges. If filename was missing
2295 show usage information.
2297 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
2299 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
2300 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
2302 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
2303 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
2304 (video_mod_SOURCES): Added.
2305 (video_mod_CFLAGS): Likewise.
2306 (video_mod_LDFLAGS): Likewise.
2307 (gfxterm_mod_SOURCES): Likewise.
2308 (gfxterm_mod_CFLAGS): Likewise.
2309 (gfxterm_mod_LDFLAGS): Likewise.
2310 (videotest_mod_SOURCES): Likewise.
2311 (videotest_mod_CFLAGS): Likewise.
2312 (videotest_mod_LDFLAGS): Likewise.
2313 (vesafb_mod_SOURCES): Removed.
2314 (vesafb_mod_CFLAGS): Likewise.
2315 (vesafb_mod_LDFLAGS): Likewise.
2316 (vga_mod_SOURCES): Likewise.
2317 (vga_mod_CFLAGS): Likewise.
2318 (vga_mod_LDFLAGS): Likewise.
2320 * commands/videotest.c: New file.
2322 * font/manager.c (fill_with_default_glyph): Modified to use
2324 (grub_font_get_glyph): Likewise.
2325 (fontmanager): Renamed from this...
2326 (font_manager): ... to this.
2328 * include/grub/font.h (grub_font_glyph): Added new structure.
2329 (grub_font_get_glyph): Modified to use grub_font_glyph.
2331 * include/grub/misc.h (grub_abs): Added as inline function.
2333 * include/grub/video.h: New file.
2335 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
2336 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
2337 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
2338 (grub_vbe_get_controller_info): Renamed from this...
2339 (grub_vbe_bios_get_controller_info): ... to this.
2340 (grub_vbe_get_mode_info): Renamed from this...
2341 (grub_vbe_bios_get_mode_info): ... to this.
2342 (grub_vbe_set_mode): Renamed from this...
2343 (grub_vbe_bios_set_mode): ... to this.
2344 (grub_vbe_get_mode): Renamed from this...
2345 (grub_vbe_bios_get_mode): ... to this.
2346 (grub_vbe_set_memory_window): Renamed from this...
2347 (grub_vbe_bios_set_memory_window): ... to this.
2348 (grub_vbe_get_memory_window): Renamed from this...
2349 (grub_vbe_bios_get_memory_window): ... to this.
2350 (grub_vbe_set_scanline_length): Renamed from this...
2351 (grub_vbe_set_scanline_length): ... to this.
2352 (grub_vbe_get_scanline_length): Renamed from this...
2353 (grub_vbe_bios_get_scanline_length): ... to this.
2354 (grub_vbe_set_display_start): Renamed from this...
2355 (grub_vbe_bios_set_display_start): ... to this.
2356 (grub_vbe_get_display_start): Renamed from this...
2357 (grub_vbe_bios_get_display_start): ... to this.
2358 (grub_vbe_set_palette_data): Renamed from this...
2359 (grub_vbe_bios_set_palette_data): ... to this.
2360 (grub_vbe_set_pixel_rgb): Removed.
2361 (grub_vbe_set_pixel_index): Likewise.
2363 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
2365 (grub_vbe_bios_get_controller_info): ... to this.
2366 (grub_vbe_get_mode_info): Renamed from this...
2367 (grub_vbe_bios_get_mode_info): ... to this.
2368 (grub_vbe_set_mode): Renamed from this...
2369 (grub_vbe_bios_set_mode): ... to this.
2370 (grub_vbe_get_mode): Renamed from this...
2371 (grub_vbe_bios_get_mode): ... to this.
2372 (grub_vbe_set_memory_window): Renamed from this...
2373 (grub_vbe_bios_set_memory_window): ... to this.
2374 (grub_vbe_get_memory_window): Renamed from this...
2375 (grub_vbe_bios_get_memory_window): ... to this.
2376 (grub_vbe_set_scanline_length): Renamed from this...
2377 (grub_vbe_set_scanline_length): ... to this.
2378 (grub_vbe_get_scanline_length): Renamed from this...
2379 (grub_vbe_bios_get_scanline_length): ... to this.
2380 (grub_vbe_set_display_start): Renamed from this...
2381 (grub_vbe_bios_set_display_start): ... to this.
2382 (grub_vbe_get_display_start): Renamed from this...
2383 (grub_vbe_bios_get_display_start): ... to this.
2384 (grub_vbe_set_palette_data): Renamed from this...
2385 (grub_vbe_bios_set_palette_data): ... to this.
2386 (grub_vbe_bios_get_controller_info): Fixed problem with registers
2387 getting corrupted after calling it. Added more pushes and pops.
2388 (grub_vbe_bios_set_mode): Likewise.
2389 (grub_vbe_bios_get_mode): Likewise.
2390 (grub_vbe_bios_get_memory_window): Likewise.
2391 (grub_vbe_bios_set_scanline_length): Likewise.
2392 (grub_vbe_bios_get_scanline_length): Likewise.
2393 (grub_vbe_bios_get_display_start): Likewise.
2394 (grub_vbe_bios_set_palette_data): Likewise.
2396 * normal/cmdline.c (cl_set_pos): Refresh the screen.
2397 (cl_insert): Likewise.
2398 (cl_delete): Likewise.
2400 * term/gfxterm.c: New file.
2402 * term/i386/pc/vesafb.c: Removed file.
2404 * video/video.c: New file.
2406 * video/i386/pc/vbe.c (real2pm): Added new function.
2407 (grub_video_vbe_draw_pixel): Likewise.
2408 (grub_video_vbe_get_video_ptr): Likewise.
2409 (grub_video_vbe_get_pixel): Likewise
2410 (grub_video_vbe_init): Likewise.
2411 (grub_video_vbe_fini): Likewise.
2412 (grub_video_vbe_setup): Likewise.
2413 (grub_video_vbe_get_info): Likewise.
2414 (grub_video_vbe_set_palette): Likewise.
2415 (grub_video_vbe_get_palette): Likewise.
2416 (grub_video_vbe_set_viewport): Likewise.
2417 (grub_video_vbe_get_viewport): Likewise.
2418 (grub_video_vbe_map_color): Likewise.
2419 (grub_video_vbe_map_rgb): Likewise.
2420 (grub_video_vbe_map_rgba): Likewise.
2421 (grub_video_vbe_unmap_color): Likewise.
2422 (grub_video_vbe_fill_rect): Likewise.
2423 (grub_video_vbe_blit_glyph): Likewise.
2424 (grub_video_vbe_blit_bitmap): Likewise.
2425 (grub_video_vbe_blit_render_target): Likewise.
2426 (grub_video_vbe_scroll): Likewise.
2427 (grub_video_vbe_swap_buffers): Likewise.
2428 (grub_video_vbe_create_render_target): Likewise.
2429 (grub_video_vbe_delete_render_target): Likewise.
2430 (grub_video_vbe_set_active_render_target): Likewise.
2431 (grub_vbe_set_pixel_rgb): Remove function.
2432 (grub_vbe_set_pixel_index): Likewise.
2433 (index_color_mode): Remove static variable.
2434 (active_mode): Likewise.
2435 (framebuffer): Likewise.
2436 (bytes_per_scan_line): Likewise.
2437 (grub_video_vbe_adapter): Added new static variable.
2438 (framebuffer): Likewise.
2439 (render_target): Likewise.
2440 (initial_mode): Likewise.
2441 (mode_in_use): Likewise.
2442 (mode_list): Likewise.
2444 2006-03-10 Marco Gerards <marco@gnu.org>
2446 * configure.ac (AC_INIT): Bumped to 1.93.
2448 * DISTLIST: Added `include/grub/hfs.h'.
2450 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
2452 * boot/i386/pc/boot.S (general_error): Before looping, try INT
2453 18H, which might help the BIOS falling back to next boot media.
2455 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
2457 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
2458 Poe Chen <poe.poechen@gmail.com>.
2460 2006-01-17 Marco Gerards <marco@gnu.org>
2462 * include/grub/normal.h: Include <grub/script.h>.
2463 (grub_command_list): Removed struct.
2464 (grub_command_list_t): Removed type.
2465 (grub_menu_entry): Remove members `num' and `command_list'. Add
2466 members `commands' and `sourcecode'.
2467 * include/grub/script.h: Add inclusion guards.
2468 (grub_script_cmd_menuentry): New struct.
2469 (grub_script_execute_menuentry): New prototype.
2470 (grub_script_lexer_record_start): Likewise.
2471 (grub_script_lexer_record_stop): Likewise.
2472 * normal/execute.c (grub_script_execute_menuentry): New function.
2473 * normal/lexer.c (record, recording, recordpos, recordlen): New
2475 (grub_script_lexer_record_start): New function.
2476 (grub_script_lexer_record_stop): Likewise.
2477 (recordchar): Likewise.
2478 (nextchar): Likewise.
2479 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
2480 2048 as the buffer size. Add the tokens `menuentry' and `@'.
2481 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
2482 (current_menu): New variable.
2483 (free_menu): Mainly rewritten.
2484 (grub_normal_menu_addentry): New function.
2485 (read_config_file): Rewritten.
2486 * normal/menu.c (run_menu_entry): Mainly rewritten.
2487 * normal/menu_entry.c (make_screen): Rewritten te code to insert
2489 (run): Mainly rewritten.
2490 * normal/parser.y (menu_entry): New variable.
2491 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
2492 (menuentry): New rule.
2493 (command): Add `menuentry'.
2494 (if_statement): Allow additional returns before `fi'.
2495 * normal/script.c (grub_script_create_cmdmenu): New function.
2497 2006-01-03 Marco Gerards <marco@gnu.org>
2499 * INSTALL: GNU Bison is required.
2500 * configure.ac: Rewritten the test to detect Bison.
2501 * Makefile.in (YACC): New variable. Reported by Xun Sun
2502 <xun.sun.cn@gmail.com>.
2504 2006-01-03 Marco Gerards <marco@gnu.org>
2506 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
2507 the HFS+ filesystem to filesystem blocks.
2508 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
2509 GCC warning is silenced.
2511 2006-01-03 Marco Gerards <marco@gnu.org>
2513 * partmap/apple.c (apple_partition_map_iterate): Convert the data
2514 read from disk from big endian to host byte order.
2516 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
2518 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
2520 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
2521 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
2522 embedded HFS+ filesystem.
2523 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
2524 (grub_hfs_sblock): Move from here...
2525 * include/grub/hfs.h: To here... New file.
2526 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
2528 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
2530 (grub_hfsplus_volheader): Change type of member `magic' to
2532 (grub_hfsplus_data): Add new member `embedded_offset'.
2533 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
2535 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
2536 Calculate the offset.
2538 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
2540 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
2542 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
2544 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
2546 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
2547 ENV->NAME is NULL after allocating ENV->VALUE.
2549 2005-12-25 Marco Gerards <marco@gnu.org>
2551 * kern/env.c (grub_env_set): Rewritten the error handling code.
2553 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
2555 * geninit.sh: Made more robust, and more portable.
2557 2005-12-25 Marco Gerards <marco@gnu.org>
2559 Add support for Apple HFS+ filesystems.
2561 * fs/hfsplus.c: New file.
2563 * DISTLIST: Added `fs/hfsplus.c'.
2565 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
2566 (hfsplus_mod_SOURCES): New variable.
2567 (hfsplus_mod_CFLAGS): Likewise.
2568 (hfsplus_mod_LDFLAGS): Likewise.
2569 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
2570 (grub_setup_SOURCES): Likewise.
2571 (grub_mkdevicemap_SOURCES): Likewise.
2572 (grub_emu_SOURCES): Likewise.
2573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2575 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
2577 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
2579 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
2581 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
2582 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
2583 include/grub/parser.h, include/grub/script.h, kern/parser.c,
2584 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
2585 normal/lexer.c, normal/parser.y, normal/script.c, and
2587 Removed kern/sparc64/cache.c.
2589 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
2590 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
2593 * configure.ac (AC_INIT): Bumped to 1.92.
2595 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
2597 * kern/err.c (grub_error_push): Added new function to support error
2599 (grub_error_pop): Likewise.
2600 (grub_error_stack_items): New local variable to support error stacks.
2601 (grub_error_stack_pos): Likewise.
2602 (grub_error_stack_assert): Likewise.
2603 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
2605 (grub_print_error): Added support to print errors from error stack.
2607 * include/grub/err.h (grub_error_push): Added function prototype.
2608 (grub_error_pop): Likewise.
2610 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
2612 * configure.ac: Accept `powerpc64' as host_cpu.
2613 (amd64): Rename to `biarch32'.
2615 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
2616 non-cacheline-aligned addresses.
2618 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
2619 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
2620 if `size' is non-zero.
2622 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
2624 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
2625 and `cd' to make sure the filename is not prefixed with a
2627 (pkgdata_MODULES): Add `gpt.mod'.
2628 (gpt_mod_SOURCES): New variable.
2629 (gpt_mod_CFLAGS): Likewise.
2630 (gpt_mod_LDFLAGS): Likewise.
2632 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
2634 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
2637 * partmap/gpt.c: New file.
2639 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
2640 GPT partition map is detected.
2642 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
2644 * commands/i386/pc/play.c: New file.
2645 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
2646 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
2649 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
2651 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
2652 ((unused))' to silence gcc warning.
2654 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
2656 * configure.ac: Correct `AC_PROG_YACC' test.
2658 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
2660 * util/powerpc/ieee1275/grub-install.in: Run the mount point
2661 check before installing files.
2663 2005-11-22 Mike Small <smallm@panix.com>
2665 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
2666 number regex so multidigit numbers are recognized correctly.
2668 2005-11-22 Mike Small <smallm@panix.com>
2670 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
2671 debugging message before attempting to claim memory.
2672 (grub_rescue_cmd_initrd): Add a claim debugging message and try
2673 multiple addresses in case of failure.
2675 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
2677 * term/tparm.c (get_space): Remove empty `if' statement.
2679 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
2681 * kern/parser.c (check_varstate): Rename `state' to 's'.
2683 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
2685 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
2686 variable definitions to the beginning of each function. Sort stack
2688 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
2689 `buf' argument to `char *'.
2691 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
2693 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
2694 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
2695 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
2696 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
2697 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
2698 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
2699 configfile.mod, search.mod, gzio.mod and test.mod.
2700 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
2701 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
2702 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
2703 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
2704 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
2705 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
2706 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
2707 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
2708 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
2709 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
2710 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
2711 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
2712 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
2713 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
2714 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
2715 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
2716 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
2717 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
2718 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
2719 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
2720 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
2721 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
2722 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
2724 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
2726 (pkgdata_MODULES): Add test.mod.
2728 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2730 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
2731 appending to variables with "+=".
2732 (PModule): Use full pathname to generate *.lst filenames.
2734 * Makefile.in: Fixed list rules moved from genmk.rb.
2735 (.DELETE_ON_ERROR): New special target.
2736 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
2738 * conf/i386-pc.rmk: Include conf/common.mk.
2739 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
2740 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
2741 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
2742 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
2743 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
2744 configfile.mod, search.mod, gzio.mod and test.mod.
2745 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
2746 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
2747 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
2748 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
2749 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
2750 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
2751 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
2752 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
2753 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
2754 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
2755 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
2756 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
2757 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
2758 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
2759 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
2760 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
2761 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
2762 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
2763 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
2764 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
2765 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
2766 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
2767 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
2769 * conf/common.rmk: ... to here. New file.
2771 * conf/common.mk: New file.
2773 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
2775 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
2776 (grub_script.tab.c): ... here.
2778 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
2779 (grub_script.tab.c): ... here.
2781 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
2782 (grub_script.tab.c): ... here.
2784 * normal/command.c (grub_command_find): Fixed a memory leak of
2785 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
2787 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2789 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
2790 "@" which marks the start of a comment on ARM.
2791 (VARIABLE): Likewise.
2793 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2795 Add support for Linux/ADFS partition tables.
2797 * partmap/acorn.c: New file.
2799 * include/grub/acorn_filecore.h: Likewise.
2801 * DISTLIST: Added `partmap/acorn.c' and
2802 `include/grub/acorn_filecore.h'.
2804 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2806 (pkgdata_MODULES): Add `acorn.mod'.
2807 (acorn_mod_SOURCES): New variable.
2808 (acorn_mod_CFLAGS): Likewise.
2810 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
2812 (pkgdata_MODULES): Add `acorn.mod'.
2813 (acorn_mod_SOURCES): New variable.
2814 (acorn_mod_CFLAGS): Likewise.
2816 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
2817 (pkgdata_MODULES): Add `acorn.mod'.
2818 (acorn_mod_SOURCES): New variable.
2819 (acorn_mod_CFLAGS): Likewise.
2820 (acorn_mod_LDFLAGS): Likewise.
2822 * include/types.h (grub_disk_addr_t): New typedef.
2824 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
2826 * geninit.sh: New file.
2828 * geninitheader.sh: Likewise.
2830 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
2831 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
2832 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
2833 * commands/configfile.c (grub_configfile_init)
2834 (grub_configfile_fini): Likewise.
2835 * commands/default.c (grub_default_init, grub_default_fini):
2837 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
2838 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
2839 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
2840 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
2842 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
2843 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
2845 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
2846 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
2848 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
2850 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
2852 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
2853 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
2854 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
2855 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
2856 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
2857 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
2858 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
2859 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
2860 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
2861 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
2862 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
2863 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
2864 * partmap/amiga.c (grub_amiga_partition_map_init)
2865 (grub_amiga_partition_map_fini): Likewise.
2866 * partmap/apple.c (grub_apple_partition_map_init)
2867 (grub_apple_partition_map_fini): Likewise.
2868 * partmap/pc.c (grub_pc_partition_map_init)
2869 (grub_pc_partition_map_fini): Likewise.
2870 * partmap/sun.c (grub_sun_partition_map_init,
2871 grub_sun_partition_map_fini): Likewise.
2872 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
2875 * util/grub-emu.c: Include <grub_modules_init.h>.
2876 (main): Don't initialize and de-initialize any modules directly,
2877 use `grub_init_all' and `grub_fini_all' instead.
2879 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
2880 `grub_vesafb_mod_init'.
2881 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
2883 * term/i386/pc/vga.c (grub_vga_init): Renamed to
2884 `grub_vga_mod_init'. Updated all users.
2885 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
2887 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
2888 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
2891 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
2892 Generate a function to initialize the module in utilities.
2893 Updated all callers.
2894 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
2895 initialize the module in utilities. Updated all callers.
2897 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
2899 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
2900 escape sequence and a literal ^L to clear the screen.
2902 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
2903 when returning from Open Firmware.
2905 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
2907 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
2908 (grub_ofconsole_height): Likewise.
2909 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
2910 manually insert a '\n'.
2911 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
2912 `grub_ofconsole_height'. Return early if these are already set.
2914 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
2916 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
2917 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
2918 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
2919 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
2920 and `normal/script.c'.
2921 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
2922 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
2923 (test_mod_SOURCES): New variable.
2924 (test_mod_CFLAGS): Likewise.
2925 (test_mod_LDFLAGS): Likewise.
2926 (pkgdata_MODULES): Add `test.mod'.
2927 (grub_script.tab.c): New rule.
2928 (grub_script.tab.h): Likewise.
2930 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
2932 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2933 `commands/test.c', `normal/execute.c', `normal/lexer.c',
2934 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
2935 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
2936 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
2937 (test_mod_SOURCES): New variable.
2938 (test_mod_CFLAGS): Likewise.
2939 (pkgdata_MODULES): Add `test.mod'.
2940 (grub_script.tab.c): New rule.
2941 (grub_script.tab.h): Likewise.
2943 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
2945 Add initial scripting support.
2947 * commands/test.c: New file.
2948 * include/grub/script.h: Likewise.
2949 * normal/execute.c: Likewise.
2950 * normal/function.c: Likewise.
2951 * normal/lexer.c: Likewise.
2952 * normal/parser.y: Likewise.
2953 * normal/script.c: Likewise.
2955 * configure.ac: Add `AC_PROG_YACC' test.
2957 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
2958 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
2959 `normal/function.c' and `normal/script.c'.
2960 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
2961 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
2962 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
2964 (pkgdata_MODULES): Add `test.mod'.
2965 (grub_script.tab.c): New rule.
2966 (grub_script.tab.h): Likewise.
2968 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
2970 * include/grub/normal.h (grub_test_init): New prototype.
2971 (grub_test_fini): Likewise.
2973 * normal/command.c: Include <grub/script.h>.
2974 (grub_command_execute): Rewritten.
2976 * util/grub-emu.c (main): Call `grub_test_init' and
2979 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2981 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
2983 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
2984 there are no pending characters.
2986 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2988 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
2989 `grub_strndup' to drop device arguments. Replace unnecessary
2990 `grub_strndup' with `grub_strdup'.
2992 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
2994 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
2995 `debug' environment variable has been set.
2997 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
2999 * Makefile.in (install-local): Use $(DATA).
3000 (uninstall): Likewise.
3001 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
3002 (sbin_UTILITIES): ... to here.
3003 (sbin_SCRIPTS): New variable.
3004 (grub_install_SOURCES): New variable.
3005 * util/powerpc/ieee1275/grub-install.in: New file.
3006 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
3008 (add_segments): Call `grub_util_get_path'.
3010 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
3012 From Timothy Baldwin:
3013 * commands/ls.c (grub_ls_list_files): Close FILE with
3015 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
3017 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
3019 * include/grub/parser.h: New file.
3021 * kern/parser.c: Likewise.
3023 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
3024 (grub_setup_SOURCES): Likewise.
3025 (grub_probefs_SOURCES): Likewise.
3026 (grub_emu_SOURCES): Likewise.
3027 (kernel_img_HEADERS): Add `parser.h'.
3029 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
3030 (grub_emu_SOURCES): Add `kern/parser.c'.
3031 (grubof_SOURCES): Likewise.
3033 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
3034 (grubof_SOURCES): Add `kern/parser.c'.
3036 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
3038 * kern/misc.c (grub_split_cmdline): Removed function.
3040 * kern/rescue.c: Include <grub/parser.h>.
3041 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
3042 of `grub_split_cmdline'.
3044 * normal/command.c: Include <grub/parser.h>.
3045 (grub_command_execute): Use `grub_parser_split_cmdline' instead
3046 of `grub_split_cmdline'.
3048 * normal/completion.c: Include <grub/parser.h>.
3049 (cmdline_state): New variable.
3050 (iterate_dir): End the filename with a quote depending on the
3052 (get_state): new function.
3053 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
3054 split the arguments and determine the current argument. When the
3055 argument string is not quoted, escape all spaces.
3057 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
3059 * normal/sparc64/setjmp.S: New file.
3061 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
3063 * include/grub/sparc64/libgcc.h: New file.
3064 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
3065 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
3066 normal/sparc64/setjmp.c.
3068 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
3070 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
3071 * kern/sparc64/cache.S: New file.
3072 * kern/sparc64/cache.c: Removed.
3073 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
3074 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
3076 (COMMON_LDFLAGS): Add -melf64_sparc.
3077 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
3078 (grubof_SOURCES): Use cache.S instead of cache.c.
3079 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
3080 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
3081 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
3083 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
3084 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
3085 (linux_mod_CFLAGS): Commented out.
3086 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
3087 out because module isn't built.
3088 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
3089 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
3090 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
3091 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
3092 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
3093 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
3094 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
3095 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
3096 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
3097 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
3098 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
3099 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
3100 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
3101 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
3103 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
3105 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
3106 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
3107 longer, because HFS should not be used on PC.
3109 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
3111 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
3112 consistently within the loop.
3114 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
3116 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
3117 directory can not be read.
3119 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3121 * configure.ac (AC_INIT): Increase the version number to 1.91.
3123 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
3124 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
3125 term/i386/pc/serial.c.
3127 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3129 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
3130 file size must be permitted.
3132 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
3133 between %ah and %al.
3135 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3137 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
3139 Call the hook with a NUL-terminated filename.
3140 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
3143 * kern/term.c (cursor_state): New variable.
3144 (grub_term_set_current): Reset the cursor state on a new
3146 (grub_setcursor): Rewritten to use CURSOR_STATE.
3147 (grub_getcursor): New function.
3149 * include/grub/term.h (grub_getcursor): New prototype.
3151 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
3152 integers on ARM. Reported by Timothy Baldwin
3153 <T.E.Baldwin99@members.leeds.ac.uk>.
3155 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
3157 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
3159 (grub_sfs_dir): Likewise.
3161 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
3163 Add support for the SFS filesystem.
3165 * fs/sfs.c: New file.
3167 * DISTLIST: Added `fs/sfs.c'.
3169 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
3170 (grub_probefs_SOURCES): Likewise.
3171 (grub_emu_SOURCES): Likewise.
3172 (pkgdata_MODULES): Add `sfs.mod'.
3173 (sfs_mod_SOURCES): New variable.
3174 (sfs_mod_CFLAGS): Likewise.
3175 (sfs_mod_LDFLAGS): Likewise.
3177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
3178 (pkgdata_MODULES): Add `sfs.mod'.
3179 (sfs_mod_SOURCES): New variable.
3180 (sfs_mod_CFLAGS): Likewise.
3182 * util/grub-emu.c (main): Call `grub_sfs_init' and
3185 * include/grub/fs.h (grub_sfs_init): New prototype.
3186 (grub_sfs_fini): Likewise.
3188 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
3190 Add support for the AFFS filesystem.
3192 * fs/affs.c: New file.
3194 * DISTLIST: Added `fs/affs.c'.
3196 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
3197 (grub_probefs_SOURCES): Likewise.
3198 (grub_emu_SOURCES): Likewise.
3199 (pkgdata_MODULES): Add `affs.mod'.
3200 (affs_mod_SOURCES): New variable.
3201 (affs_mod_CFLAGS): Likewise.
3202 (affs_mod_LDFLAGS): Likewise.
3204 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
3205 (pkgdata_MODULES): Add `affs.mod'.
3206 (affs_mod_SOURCES): New variable.
3207 (affs_mod_CFLAGS): Likewise.
3209 * util/grub-emu.c (main): Call `grub_affs_init' and
3212 * include/grub/fs.h (grub_affs_init): New prototype.
3213 (grub_affs_fini): Likewise.
3215 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
3217 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
3219 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
3221 * configure.ac: Accept `x86_64' as host_cpu. In that case add
3224 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
3227 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
3228 (COMMON_LDFLAGS): New variable.
3229 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
3230 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
3231 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
3232 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
3233 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
3234 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
3235 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
3236 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
3237 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
3238 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
3239 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
3240 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
3241 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
3242 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
3243 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
3245 (normal_mod_ASFLAGS): Add `-m32'.
3247 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
3248 (grub_host_size_t, grub_host_ssize_t): New types.
3249 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
3250 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
3251 `GRUB_HOST_SIZEOF_VOID_P'.
3253 * include/grub/kernel.h (struct grub_module_header): Type of
3254 member offset changed to `grub_host_off_t'. Type of member size
3255 changed to `grub_host_size_t'.
3256 (struct grub_module_info): Type of member offset changed to
3257 `grub_host_off_t'. Type of member size changed to
3260 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
3262 Make GRUB's kernel compliant to Multiboot Specification.
3264 * kern/i386/pc/startup.S (multiboot_header): New label.
3265 (multiboot_entry): Likewise.
3266 (multiboot_trampoline): Likewise.
3268 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3271 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
3272 put parentheses after a question mark.
3273 [!GRUB_UTIL] (my_mod): New variable.
3275 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
3277 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
3279 Adds support for the XFS filesystem. Btrees are not supported
3282 * fs/xfs.c: New file.
3284 * DISTLIST: Added `fs/xfs.c'.
3286 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
3287 (grub_probefs_SOURCES): Likewise.
3288 (grub_emu_SOURCES): Likewise.
3289 (pkgdata_MODULES): Add `xfs.mod'.
3290 (xfs_mod_SOURCES): New variable.
3291 (xfs_mod_CFLAGS): Likewise.
3293 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
3294 (pkgdata_MODULES): Add `xfs.mod'.
3295 (xfs_mod_SOURCES): New variable.
3296 (xfs_mod_CFLAGS): Likewise.
3298 * util/grub-emu.c (main): Call `grub_xfs_init' and
3301 * include/grub/fs.h (grub_xfs_init): New prototype.
3302 (grub_xfs_fini): Likewise.
3305 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
3307 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
3308 color modes, allow greater than 16 colors to be configured as
3311 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3313 * normal/completion.c (complete_arguments): Add the qualifier
3316 From Omniflux <omniflux+lists@omniflux.com>:
3317 * include/grub/terminfo.h: New file.
3318 * include/grub/tparm.h: Likewise.
3319 * include/grub/i386/pc/serial.h: Likewise.
3320 * term/terminfo.c: Likewise.
3321 * term/tparm.c: Likewise.
3322 * term/i386/pc/serial.c: Likewise.
3323 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
3325 (terminfo_mod_SOURCES): New variable.
3326 (terminfo_mod_CFLAGS): Likewise.
3327 (serial_mod_SOURCES): Likewise.
3328 (serial_mod_CFLAGS): Likewise.
3330 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
3332 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
3333 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
3334 and kern/powerpc/ieee1275/cmain.c, respectively.
3336 * boot/powerpc/ieee1275/crt0.S: Moved to ...
3337 * kern/powerpc/ieee1275/crt0.S: ... here.
3339 * boot/powerpc/ieee1275/cmain.c: Moved to ...
3340 * kern/powerpc/ieee1275/cmain.c: ... here.
3342 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
3343 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
3344 instead of boot/powerpc/ieee1275/crt0.S and
3345 boot/powerpc/ieee1275/cmain.c, respectively.
3347 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
3348 sectors. It was not used anyway.
3350 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
3352 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
3353 `unused parameter' warning.
3355 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
3357 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
3359 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
3362 2005-08-28 Marco Gerards <metgerards@student.han.nl>
3364 * include/grub/normal.h (enum grub_completion_type): Added
3365 `GRUB_COMPLETION_TYPE_ARGUMENT'.
3367 * normal/cmdline.c (print_completion): Handle
3368 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
3369 * normal/menu_entry.c (store_completion): Likewise.
3371 * normal/completion.c (complete_arguments): New function.
3372 (grub_normal_do_completion): Call `complete_arguments' when the
3373 current words start with a dash.
3375 2005-08-27 Marco Gerards <metgerards@student.han.nl>
3377 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
3378 `gzio.mod' instead of `io.mod').
3380 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
3382 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
3383 (DISTDIRS): Added io and video.
3384 Rewrite the search routine to make an output consistently.
3386 * DISTLIST: Added conf/sparc64-ieee1275.mk,
3387 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
3388 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
3389 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
3390 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
3391 util/powerpc/ieee1275/misc.c.
3393 * include/grub/gzio.h: New file.
3394 * io/gzio.c: Likewise.
3396 * kern/file.c (grub_file_close): Call grub_device_close only if
3397 FILE->DEVICE is not NULL.
3399 * include/grub/mm.h [!NULL] (NULL): New macro.
3401 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
3403 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
3404 (pkgdata_MODULES): Added gzio.mod.
3405 (gzio_mod_SOURCES): New variable.
3406 (gzio_mod_CFLAGS): Likewise.
3408 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
3409 (pkgdata_MODULES): Added gzio.mod.
3410 (gzio_mod_SOURCES): New variable.
3411 (gzio_mod_CFLAGS): Likewise.
3413 * commands/cat.c: Include grub/gzio.h.
3414 (grub_cmd_cat): Use grub_gzfile_open instead of
3417 * commands/cmp.c: Include grub/gzio.h.
3418 (grub_cmd_cmp): Use grub_gzfile_open instead of
3421 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
3422 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
3424 (grub_rescue_cmd_module): Likewise.
3426 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
3428 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
3429 kern/sparc64/ieee1275/init.c because it contains _start.
3430 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
3432 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
3434 * configure.ac: Add support for sparc64 host with ieee1275
3436 * configure: Generated from configure.ac.
3437 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
3439 (grub_ofdisk_read): Likewise.
3440 (grub_ofdisk_open): Use %p to print pointer values, and cast the
3441 pointers as (void *) to remove a warning.
3442 (grub_ofdisk_close): Likewise.
3443 (grub_ofdisk_read): Likewise.
3444 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
3445 returns, so make it return void to remove a warning.
3446 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
3447 Corresponding prototype change.
3448 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
3449 values, and cast the pointers as (void *) to remove a warning.
3450 (grub_mm_dump): Likewise.
3451 * conf/sparc64-ieee1275.mk: New file.
3452 * conf/sparc64-ieee1275.rmk: Likewise.
3453 * include/grub/sparc64/setjmp.h: Likewise.
3454 * include/grub/sparc64/types.h: Likewise.
3455 * include/grub/sparc64/ieee1275/console.h: Likewise.
3456 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
3457 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
3458 * include/grub/sparc64/ieee1275/time.h: Likewise.
3459 * kern/sparc64/cache.c: Likewise.
3460 * kern/sparc64/dl.c: Likewise.
3461 * kern/sparc64/ieee1275/init.c: Likewise.
3462 * kern/sparc64/ieee1275/openfw.c: Likewise.
3464 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
3466 * util/console.c (grub_ncurses_putchar): If C is greater than
3467 0x7f, set C to a question mark.
3468 (grub_ncurses_getcharwidth): New function.
3469 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
3472 * normal/menu.c (print_entry): Made aware of Unicode. First,
3473 convert TITLE to UCS-4, and predict the cursor position by
3476 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
3478 * kern/misc.c (grub_utf16_to_utf8): Likewise.
3480 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
3482 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
3483 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
3486 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
3487 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
3488 grub_strcpy and grub_strlen. Take it into account that a space
3489 character is inserted as a delimiter.
3491 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
3493 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
3494 invalid magic in thre error.
3496 * commands/search.c: New file.
3498 * util/grub-emu.c (main): Call grub_search_init and
3501 * kern/rescue.c (grub_rescue_print_disks): Removed.
3502 (grub_rescue_print_devices): New function.
3503 (grub_rescue_cmd_ls): Use grub_device_iterate with
3504 grub_rescue_print_devices instead of grub_disk_dev_iterate with
3505 grub_rescue_print_disks.
3507 * kern/partition.c (grub_partition_iterate): Return the result of
3508 PARTMAP->ITERATE instead of GRUB_ERRNO.
3510 * kern/device.c: Include grub/partition.h.
3511 (grub_device_iterate): New function.
3513 * include/grub/partition.h (grub_partition_iterate): Return int
3514 instead of grub_err_t.
3516 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
3518 [GRUB_UTIL] (grub_search_fini): Likewise.
3520 * include/grub/device.h (grub_device_iterate): New prototype.
3522 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
3524 (pkgdata_MODULES): Added search.mod.
3525 (search_mod_SOURCES): New variable.
3526 (search_mod_CFLAGS): Likewise.
3528 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
3529 (pkgdata_MODULES): Added search.mod.
3530 (search_mod_SOURCES): New variable.
3531 (search_mod_CFLAGS): Likewise.
3533 * commands/ls.c (grub_ls_list_disks): Renamed to ...
3534 (grub_ls_list_devices): ... this, and use grub_device_iterate.
3535 All callers changed.
3537 * DISTLIST: Added commands/search.c.
3539 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
3541 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
3543 (grub_getcharwidth): New function.
3545 * kern/misc.c (grub_utf8_to_ucs4): New function.
3547 * include/grub/term.h (struct grub_term): Added a new member
3549 (grub_getcharwidth): New prototype.
3551 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
3553 * term/i386/pc/console.c (map_char): New function. Segregated from
3554 grub_console_putchar.
3555 (grub_console_putchar): Use map_char.
3556 (grub_console_getcharwidth): New function.
3557 (grub_console_term): Specified grub_console_getcharwidth as
3560 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
3561 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
3563 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
3565 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
3566 on grub_strtoul completely.
3567 (write_char): Declare local variables in the beginning of the
3569 (grub_vesafb_getcharwidth): New function.
3570 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
3573 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
3575 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
3576 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
3577 commands/i386/pc/vbetest.c.
3579 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
3580 call grub_vbe_get_controller_info again, because the returned
3581 information is volatile.
3582 (grub_vbe_set_video_mode): Mostly rewritten.
3583 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
3584 grub_vbe_status_t correctly.
3585 (grub_vbe_get_video_mode_info): Likewise.
3586 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
3587 several if statements.
3589 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
3590 * commands/i386/pc/vbeinfo.c: ... this.
3592 * commands/i386/pc/vbe_test.c: Renamed to ...
3593 * commands/i386/pc/vbetest.c: ... this.
3595 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
3597 (grub_cmd_vbeinfo): ... this. Save video modes before
3598 iterating. Skip a video mode, if it is not available, not enough
3599 information is given or it is monochrome. Show the memory
3600 model. Leave the interpretation of MODEVAR to grub_strtoul
3602 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
3603 (GRUB_MOD_FINI): Likewise.
3605 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
3606 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
3607 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
3608 duplicated grub_env_get. Leave the interpretation of MODEVAR to
3609 grub_strtoul completely.
3611 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
3612 (GRUB_MOD_FINI): Likewise.
3614 * normal/misc.c: Include grub/mm.h.
3616 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
3617 vbe_list_modes with vbetest.mod and vbeinfo.mod.
3618 (vbe_list_modes_mod_SOURCES): Removed.
3619 (vbe_list_modes_mod_CFLAGS): Likewise.
3620 (vbe_test_mod_SOURCES): Likewise.
3621 (vbe_test_mod_CFLAGS): Likewise.
3622 (vbeinfo_mod_SOURCES): New variable.
3623 (vbeinfo_mod_CFLAGS): Likewise.
3624 (vbetest_mod_SOURCES): Likewise.
3625 (vbetest_mod_CFLAGS): Likewise.
3627 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
3629 * normal/misc.c: New file.
3631 * DISTLIST: Added normal/misc.c.
3633 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
3634 DISK to HOOK. Call HOOK with DISK.
3635 * partmap/apple.c (apple_partition_map_iterate): Likewise.
3636 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3637 * partmap/sun.c (sun_partition_map_iterate): Likewise.
3639 * normal/menu_entry.c (struct screen): Added a new member
3641 (completion_buffer): New global variable.
3642 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
3643 (store_completion): New function.
3644 (complete): Likewise.
3645 (clear_completions): Likewise.
3646 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
3647 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
3648 a tab, call complete.
3650 * normal/completion.c (disk_dev): Removed.
3651 (print_simple_completion): Likewise.
3652 (print_partition_completion): Likewise.
3653 (print_func): New global variable.
3654 (add_completion): Do not take the arguments WHAT or PRINT any
3655 longer. Added a new argument TYPE. Instead of printing directly,
3656 call PRINT_FUNC if not NULL.
3657 All callers changed.
3658 (complete_device): Use a local variable DEV instead of
3659 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
3660 (grub_normal_do_completion): Take a new argument HOOK. Do not
3661 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
3662 empty string, return NULL instead.
3663 All callers changed.
3665 * normal/cmdline.c (print_completion): New function.
3667 * kern/partition.c (grub_partition_iterate): Add an argument DISK
3669 All callers changed.
3671 * kern/disk.c (grub_print_partinfo): Removed.
3673 * include/grub/partition.h (struct grub_partition_map): Add a new
3674 argument DISK into HOOK of ITERATE.
3675 (grub_partition_iterate): Add a new argument DISK to HOOK.
3677 * include/grub/normal.h (enum grub_completion_type): New enum.
3678 (grub_completion_type_t): New type.
3679 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
3680 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
3681 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
3682 (GRUB_COMPLETION_TYPE_FILE): Likewise.
3683 (grub_normal_do_completion): Added a new argument HOOK.
3684 (grub_normal_print_device_info): New prototype.
3686 * include/grub/disk.h (grub_print_partinfo): Removed.
3688 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
3689 (normal_mod_SOURCES): Likewise.
3690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3691 (normal_mod_SOURCES): Likewise.
3693 * commands/ls.c (grub_ls_list_disks): Use
3694 grub_normal_print_device_info instead of grub_print_partinfo. Free
3696 (grub_ls_list_files): Use grub_normal_print_device_info instead of
3697 duplicating the code.
3699 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
3701 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
3702 follow GCS more precisely.
3703 * commands/i386/pc/vbe_test.c: Likewise.
3704 * include/grub/i386/pc/vbe.h: Likewise.
3705 * term/i386/pc/vesafb.c: Likewise.
3706 * video/i386/pc/vbe.c: Likewise.
3708 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
3710 * DISTLIST: Added term/i386/pc/vesafb.c
3711 DISTLIST: Added video/i386/pc/vbe.c
3712 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
3713 DISTLIST: Added commands/i386/pc/vbe_test.c.
3714 * commands/i386/pc/vbe_list_modes.c: New file.
3715 * commands/i386/pc/vbe_test.c: Likewise.
3716 * term/i386/pc/vesafb.c: Likewise.
3717 * video/i386/pc/vbe.c: Likewise.
3718 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
3719 (grub_vbe_probe) Added prototype.
3720 (grub_vbe_set_video_mode) Likewise.
3721 (grub_vbe_get_video_mode) Likewise.
3722 (grub_vbe_get_video_mode_info) Likewise.
3723 (grub_vbe_set_pixel_rgb) Likewise.
3724 (grub_vbe_set_pixel_index) Likewise.
3725 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
3726 (pkgdata_MODULES): Added vesafb.mod.
3727 (pkgdata_MODULES): Added vbe_list_modes.mod.
3728 (pkgdata_MODULES): Added vbe_test.mod.
3729 (vbe_mod_SOURCES): Added.
3730 (vbe_mod_CFLAGS): Likewise.
3731 (vesafb_mod_SOURCES): Likewise.
3732 (vesafb_mod_CFLAGS): Likewise.
3733 (vbe_list_modes_mod_SOURCES): Likewise.
3734 (vbe_list_modes_mod_CFLAGS): Likewise.
3735 (vbe_test_mod_SOURCES): Likewise.
3736 (vbe_test_mod_CFLAGS): Likewise.
3738 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
3740 * normal/command.c (grub_command_execute): If INTERACTIVE is
3741 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
3742 CMDLINE. Disable the pager if INTERACTIVE is true.
3743 All callers are changed.
3745 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
3746 before reading a config file.
3747 * normal/main.c (read_config_file): Even if a command is not
3748 found, register it if it is within an entry.
3750 * util/grub-emu.c: Include sys/types.h and unistd.h.
3751 (options): Added --hold.
3752 (struct arguments): Added a new member "hold".
3753 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
3755 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
3756 cleared by a debugger, if it is not zero.
3758 * include/grub/normal.h (grub_command_execute): Add an argument
3761 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
3763 * DISTLIST: Added include/grub/i386/pc/vbe.h.
3765 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
3767 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
3768 program with another one, because the old one didn't detect a bug
3769 in gcc-3.4. Always use regparm 2, because the new test is still
3770 not enough for gcc-4.0. Someone must investigate a simple test
3771 case which detects a bug in gcc-4.0.
3773 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
3775 * DISTLIST: Added normal/completion.c.
3777 * normal/completion.c: New file.
3779 * term/i386/pc/console.c (grub_console_getwh): New function.
3780 (grub_console_term): Assign grub_console_getwh to getwh.
3782 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
3783 function is defined in normal/completion.c as
3784 grub_normal_do_completion.
3785 (grub_cmdline_get): Use grub_normal_do_completion instead of
3788 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
3789 returns non-zero, otherwise return 0.
3790 (grub_partition_iterate): First, probe the partition map. Then,
3791 call ITERATE only for this partition map.
3793 * kern/misc.c (grub_strncmp): Rewritten.
3795 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
3796 returns non-zero. Otherwise return 0.
3798 * include/grub/partition.h (grub_partition_map_iterate): Return
3799 int instead of void.
3801 * include/grub/normal.h (grub_normal_do_completion): New prototype.
3803 * include/grub/misc.h (grub_strncmp): Change the type of N to
3806 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
3809 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
3810 unsigned explictly before comparing it with I.
3812 * kern/main.c (grub_env_write_root): Add the attribute unused into
3815 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
3816 normal/completion.c.
3817 (normal_mod_SOURCES): Likewise.
3818 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3819 (normal_mod_SOURCES): Likewise.
3821 * normal/command.c (grub_iterate_commands): If ITERATE returns
3822 non-zero, return one immediately.
3824 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
3826 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
3827 * kern/i386/pc/startup.S: Updated Global Descriptor table's
3829 (grub_vbe_get_controller_info): New function.
3830 (grub_vbe_get_mode_info): Likewise.
3831 (grub_vbe_set_mode): Likewise.
3832 (grub_vbe_get_mode): Likewise.
3833 (grub_vbe_set_memory_window): Likewise.
3834 (grub_vbe_get_memory_window): Likewise.
3835 (grub_vbe_set_scanline_length): Likewise.
3836 (grub_vbe_get_scanline_length): Likewise.
3837 (grub_vbe_set_display_start): Likewise.
3838 (grub_vbe_get_display_start): Likewise.
3839 (grub_vbe_set_palette_data): Likewise.
3840 * include/grub/i386/pc/vbe.h: New file.
3842 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
3844 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
3845 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
3846 * DISTLIST: Likewise.
3847 * kern/ieee1275/of.c: Moved to ...
3848 * kern/ieee1275/ieee1275.c: ... here.
3850 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
3852 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
3853 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
3854 Pass 0 as `end' parameter to grub_strtoul().
3856 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
3858 * include/grub/powerpc/ieee1275/console.h: Do not include
3859 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
3861 (grub_console_cur_color): Remove i386-specific prototype.
3862 (grub_console_real_putchar): Likewise.
3863 (grub_console_checkkey): Likewise.
3864 (grub_console_getkey): Likewise.
3865 (grub_console_getxy): Likewise.
3866 (grub_console_gotoxy): Likewise.
3867 (grub_console_cls): Likewise.
3868 (grub_console_setcursor): Likewise.
3869 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
3870 Include <grub/machine/console.h>.
3871 * term/ieee1275/ofconsole.c: Likewise.
3873 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
3875 * Makefile.in (LIBLZO): New variable.
3877 * configure.ac: Check for LZO version 2.
3879 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
3880 lzo/lzo1x.h instead of lzo1x.h.
3882 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
3885 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
3886 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
3888 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
3889 copying the data from PARTITION to P.
3891 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
3893 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
3894 negative, unload the module.
3896 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
3897 map is "pc_partition_map" but not "pc".
3898 (usage): Fix the description. The options are --boot-image and
3899 --core-image but not --boot-file or --core-file.
3900 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
3901 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
3904 * util/i386/pc/grub-install.in: Do not specify --boot-file or
3905 --core-file. Specify INSTALL_DEVICE as an argument.
3907 * util/console.c: Include config.h.
3908 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
3909 [HAVE_NCURSES_H]: Include ncurses.h.
3910 [HAVE_CURSES_H]: Include curses.h.
3911 [!A_NORMAL] (A_NORMAL): Defined as zero.
3912 [!A_STANDOUT] (A_STANDOUT): Likewise.
3914 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
3916 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
3918 * configure.ac: Check for curses libraries and headers.
3920 * Makefile.in (LIBCURSES): New variable.
3922 * genmk.rb (Script::rule): Set the executable bits.
3924 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
3925 name of the PC partition map is "pc_partition_map" but not "pc".
3927 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
3929 * util/i386/pc/grub-install.in (grub_probefs): New variable.
3930 (modules): Likewise.
3931 (usage): Added descriptions for --modules and --grub-probefs.
3932 Handle --modules and --grub-probefs. Save the arguments in MODULES
3933 and GRUB_PROBEFS, respectively.
3934 Auto-detect a filesystem module against GRUBDIR. If the result is
3935 empty and modules are not specified explicitly, abort the
3936 installation. Add the result to MODULES.
3938 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
3939 disk/powerpc/ieee1275/ofdisk.c,
3940 include/grub/powerpc/ieee1275/init.h and
3941 term/powerpc/ieee1275/ofconsole.c.
3942 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
3943 term/ieee1275/ofconsole.c.
3945 * include/grub/powerpc/ieee1275/console.h: Resurrected.
3947 * COPYING: Upgraded to the latest version. Only the address of the
3948 FSF office has changed.
3950 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
3952 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
3953 kern/ieee1275.c with kern/ieee1275/of.c.
3955 * kern/ieee1275.c: Moved to ...
3956 * kern/ieee1275/of.c: ... here.
3958 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
3960 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
3963 * config.guess: Updated to the latest version from gnulib.
3964 * config.sub: Likewise.
3965 * install.sh: Likewise.
3966 * mkinstalldirs: Likewise.
3968 * include/grub/console.h: Removed. This file is arch-specific. Do
3969 not put this in include/grub.
3971 * include/grub/i386/pc/console.h: Resurrected.
3973 * util/console.c: Include grub/machine/console.h instead of
3975 * util/grub-emu.c: Likewise.
3977 2005-08-04 Marco Gerards <metgerards@student.han.nl>
3979 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
3982 From Vincent Pelletier <subdino2004@yahoo.fr>
3983 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
3984 Redefined to use grub_getwh.
3985 (grub_term): New member named getwh.
3986 (grub_getwh): New prototype.
3987 * kern/term.c (grub_getwh): New function.
3988 * term/i386/pc/console.c (grub_console_getwh): New function.
3989 (grub_console_term): New member `getwh'.
3990 * term/i386/pc/vga.c (grub_vga_getwh): New function.
3991 (grub_vga_term): New member `getwh'.
3992 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
3994 (grub_ofconsole_getw): New function.
3995 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
3996 (grub_ofconsole_term): New field named getwh and new initial
3999 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
4001 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
4002 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
4003 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
4004 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
4005 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
4006 of <grub/machine/ieee1275.h>.
4007 * commands/ieee1275/reboot.c: Likewise.
4008 * boot/powerpc/ieee1275/ieee1275.c: Move ...
4009 * kern/ieee1275.c: ... to here. All users updated. Change all
4010 parameter structs to use new type `grub_ieee1275_cell_t'.
4011 * term/powerpc/ieee1275/ofconsole.c: Move ...
4012 * term/ieee1275/ofconsole.c: ... to here. All users updated.
4013 * disk/powerpc/ieee1275/ofdisk.c: Move ...
4014 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
4015 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
4017 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
4018 Remove unused prototypes. All users updated.
4019 * include/grub/powerpc/ieee1275/console.h: Removed.
4020 * include/grub/powerpc/ieee1275/ieee1275.h: Define
4021 `grub_ieee1275_cell_t'.
4022 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
4023 Cast comparisons with -1 to the correct type.
4024 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
4025 type to match `grub_ieee1275_entry_fn'.
4027 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
4029 * DISTLIST: Added util/i386/pc/grub-probefs.c.
4031 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
4032 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
4034 (grub_probefs_SOURCES): New variable.
4036 * util/i386/pc/grub-probefs.c: New file.
4038 * util/i386/pc/grub-setup.c (main): Call
4039 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
4040 grub_hfs_init and grub_jfs_init to initialize the system. Call
4041 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
4042 grub_pc_partition_map_fini to finish the system.
4044 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
4046 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
4048 (grub_multiboot_load_elf32): Likewise.
4049 (grub_multiboot_is_elf64): Likewise.
4050 (grub_multiboot_load_elf64): Likewise.
4051 (grub_multiboot_load_elf): Likewise.
4052 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
4053 an ELF32 or ELF64 file.
4054 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
4056 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
4057 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
4058 NULL before calling FS->LABEL.
4059 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
4060 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
4061 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
4062 before calling FS->LABEL.
4064 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
4066 * util/i386/pc/grub-install.in (datadir): New variable.
4068 (pkgdatadir): New variable.
4069 (pkglibdir): Removed.
4071 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
4073 * DISTLIST: Added util/i386/pc/grub-install.in.
4075 * util/i386/pc/grub-install.in: New file.
4077 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
4078 (grub_install_SOURCES): Likewise.
4080 * genmk.rb: Added support for scripts.
4081 (Script): New class.
4082 (scripts): New variable.
4084 * Makefile.in (install-local): Install sbin_SCRIPTS by
4086 (uninstall): Remove sbin_SCRIPTS.
4088 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
4089 device, try to get a GRUB device by
4090 grub_util_biosdisk_get_grub_dev.
4093 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
4094 description for --device-map.
4096 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
4098 Change the semantics of variable hooks. They now return strings
4099 instead of error values.
4101 * util/i386/pc/grub-setup.c: Include grub/env.h.
4102 (setup): Use grub_device_set_root instead of grub_env_set.
4104 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
4105 grub_env_get instead of grub_device_set_root and
4106 grub_device_get_root, respectively.
4108 * kern/main.c (grub_env_write_root): New function.
4109 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
4110 grub_env_set instead of grub_device_set_root.
4112 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
4114 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
4115 rather than calling ENV->WRITE_HOOK afterwards.
4116 (grub_env_get): Return the result of ENV->READ_HOOK rather than
4117 passing a pointer of a pointer.
4118 (grub_register_variable_hook): Change the types of "read_hook" and
4119 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
4121 Allocate the default empty string on the heap, because this string
4124 * kern/device.c: Include grub/env.h.
4125 (grub_device_set_root): Removed.
4126 (grub_device_get_root): Likewise.
4127 (grub_device_open): Use grub_env_get instead of
4128 grub_device_get_root.
4130 * include/grub/env.h (grub_env_read_hook_t): New type.
4131 (grub_env_write_hook_t): Likewise.
4132 (grub_env_var): Change the types of "read_hook" and "write_hook"
4133 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
4134 (grub_register_variable_hook): Likewise.
4136 * include/grub/device.h (grub_device_set_root): Removed.
4137 (grub_device_set_root): Likewise.
4139 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
4140 make sure that DIRNAME terminates with '/', so that
4141 grub_fat_find_dir will fail if PATH is not a directory.
4143 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
4145 Use the qualifier auto for print_files and print_files_long.
4146 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
4148 Put a newline only if there is no error.
4149 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
4152 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
4154 * kern/partition.c (grub_partition_probe): Initialize PART to
4155 NULL. Otherwise, when no partition map is registered, this returns
4158 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
4160 * partmap/apple.c (apple_partition_map_iterate): Check if POS
4161 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
4164 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
4166 * commands/ls.c (grub_ls_list_disks): Print the filesystem
4167 information on each device, if it does not have partitions. Print
4168 "Device" instead of "Disk", because this function is not specific
4171 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
4172 static to ensure that it is put on the memory rather than a
4175 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
4177 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
4178 (grub_cat_init): Likewise.
4179 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
4180 (options): Likewise.
4181 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
4182 (grub_configfile_init): Likewise.
4183 * font/manager.c (GRUB_MOD_INIT): Likewise.
4184 * commands/help.c (GRUB_MOD_INIT): Likewise.
4185 (grub_help_init): Likewise.
4186 * normal/command.c (grub_command_init): Likewise.
4187 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
4188 * disk/loopback.c (grub_loop_init): Likewise.
4189 (GRUB_MOD_INIT): Likewise.
4190 * commands/ls.c (grub_ls_init): Likewise.
4191 (GRUB_MOD_INIT): Likewise.
4192 (options): Likewise.
4193 * commands/boot.c (grub_boot_init): Likewise.
4194 (GRUB_MOD_INIT): Likewise.
4195 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
4196 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
4197 (GRUB_MOD_INIT): Likewise.
4198 * commands/cmp.c (grub_cmp_init): Likewise.
4199 (GRUB_MOD_INIT): Likewise.
4201 * normal/arg.c: Use <> instead of "" to include header files.
4202 (SHORT_ARG_HELP): New macro.
4203 (SHORT_ARG_USAGE): Likewise.
4204 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
4205 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
4207 (find_short): Check if C is 'h' or 'u' explicitly.
4208 (grub_arg_show_help): Use space characters instead of tabs. Treat
4209 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
4210 are shown with --help and --usage only if they are not used for
4212 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
4215 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
4216 const into "longarg". Change the type of "shortarg" to int.
4218 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
4220 * boot/i386/pc/boot.S (boot_drive_check): New label.
4222 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
4225 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
4226 which do not pass a boot drive correctly. Copied from GRUB Legacy.
4228 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
4230 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
4231 When turning off Gate A20, skip the check and return immediately,
4232 because this is not fatal usually.
4234 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
4236 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
4237 be 0x7C00 instead of 0x8000.
4239 * boot/i386/pc/pxeboot.S: Rewritten.
4241 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
4243 (gate_a20_check_state): Read a byte from 0x108000. Invert the
4246 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
4248 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
4249 robustness. This routine now supports a BIOS call and System
4250 Control Port A to modify the gate A20.
4252 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4255 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
4257 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
4258 device path and resulting ihandle.
4259 (grub_ofdisk_close): dprintf the ihandle being closed.
4260 (grub_ofdisk_read): dprintf function parameters.
4261 * kern/mm.c (grub_mm_init_region): Likewise.
4262 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
4263 (grub_linux_boot): dprintf the Linux entry point, initrd address and
4264 size, and boot arguments.
4265 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
4266 before loading into memory.
4267 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
4268 before loading into memory.
4270 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
4272 * kern/mm.c: Added much documentation.
4273 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
4274 8, set to 5 instead of 8.
4276 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
4278 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
4280 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
4281 (grub_mkdevicemap_SOURCES): New variable.
4283 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
4284 lib/device.c of GRUB Legacy.
4286 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
4288 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
4289 instead of PATH is NULL.
4291 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
4293 * commands/cmp.c (BUFFER_SIZE): New macro.
4294 (grub_cmd_cmp): Close the right file at the right time. Compare
4295 only data just read. Don't report files of different size as
4296 identical. Dynamically allocate buffers. Move variable
4297 declarations at the beginning of function.
4299 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
4301 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
4304 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
4306 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
4307 when backspace is pressed at beginning of line.
4309 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
4311 * DISTLIST: Added genfslist.sh.
4313 * normal/main.c (fs_module_list): New variable.
4314 (autoload_fs_module): New function.
4315 (read_fs_list): Likewise.
4316 (grub_normal_execute): Call read_fs_list.
4318 * kern/fs.c (grub_fs_autoload_hook): New variable.
4319 (grub_fs_probe): Added support for auto-loading.
4321 * include/grub/normal.h (struct grub_fs_module_list): New struct.
4322 (grub_fs_module_list_t): New type.
4324 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
4325 (grub_fs_autoload_hook): New prototype.
4327 * genfslist.sh: New file.
4329 * genmk.rb: Added a rule to generate a filesystem list.
4331 2005-06-30 Marco Gerards <metgerards@student.han.nl>
4333 * configure.ac: Fix the test for cross-compiling.
4335 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
4336 define GRUB_UTIL anymore.
4338 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
4339 so this function works on other systems than just big endian.
4340 (load_modules): Likewise.
4341 (add_segments): Likewise.
4343 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
4345 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
4346 contains `l' modifier, get a long from va_arg().
4348 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
4350 * kern/mm.c (grub_free): If the next free block which is being
4351 merged is the first free block, set the first block to the block
4353 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
4355 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
4357 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
4358 `grub_ieee1275_chosen'.
4360 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
4362 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
4363 (grub_ieee1275_chosen): New variable.
4364 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
4366 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
4367 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
4368 Rename first argument to `phandle' for consistency.
4369 (grub_ieee1275_get_property_length): Likewise.
4370 (grub_ieee1275_next_property): Likewise. Change type of first argument
4371 to grub_ieee1275_phandle_t.
4372 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
4373 Move export next to declaration.
4374 (grub_ieee1275_chosen): New variable.
4375 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
4376 Correct cosmetic typo.
4377 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
4378 `grub_ieee1275_chosen'.
4379 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
4380 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
4381 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
4382 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
4383 `grub_ieee1275_chosen'.
4385 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
4387 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
4389 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
4390 /chosen/bootargs as "variable=value" pairs.
4392 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
4394 * include/grub/misc.h (grub_dprintf): New macro.
4395 (grub_real_dprintf): New prototype.
4396 (grub_strword): Likewise.
4397 (grub_iswordseparator): Likewise.
4398 * kern/misc.c (grub_real_dprintf): New function.
4399 (grub_strword): Likewise.
4400 (grub_iswordseparator): Likewise.
4402 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
4404 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
4405 (roundup): Remove macro.
4406 (grub_ieee1275_flags): Make static.
4407 (grub_ieee1275_realmode): Remove.
4408 (grub_ieee1275_test_flag): New function.
4409 (grub_ieee1275_set_flag): Likewise.
4410 (find_options): Rename to `grub_ieee1275_find_options'; update
4411 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
4412 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
4413 (cmain): New prototype.
4414 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
4415 `grub_ieee1275_flags' directly.
4416 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
4418 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
4419 Don't include grub/machine/init.h.
4420 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
4421 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
4423 (grub_ieee1275_realmode): Likewise.
4424 (grub_ieee1275_flag): New enum.
4425 (grub_ieee1275_test_flag): New prototype.
4426 (grub_ieee1275_set_flag): New prototype.
4427 * include/grub/powerpc/ieee1275/init.h: Remove file.
4428 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
4429 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
4430 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
4431 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
4433 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
4434 `grub_ieee1275_test_flag'.
4435 (grub_ieee1275_encode_devname): Likewise.
4437 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
4439 * include/grub/powerpc/ieee1275/ieee1275.h
4440 (grub_ieee1275_encode_devname): New prototype.
4441 (grub_ieee1275_get_filename): Likewise.
4442 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
4444 (grub_set_prefix): Likewise.
4445 (grub_machine_init): Call grub_set_prefix.
4446 * kern/powerpc/ieee1275/openfw.c: Fix typos.
4447 (grub_parse_type): New enum.
4448 (grub_ieee1275_get_devargs): New function.
4449 (grub_ieee1275_get_devname): Likewise.
4450 (grub_ieee1275_parse_args): Likewise.
4451 (grub_ieee1275_get_filename): Likewise.
4452 (grub_ieee1275_encode_devname): Likewise.
4454 2005-03-30 Marco Gerards <metgerards@student.han.nl>
4456 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
4457 `grub_loader_unset'.
4459 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
4461 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
4462 instead of grub_ieee1275_interpret.
4463 (grub_halt_init): New function.
4464 (grub_halt_fini): Likewise.
4465 (GRUB_MOD_INIT): Correct message grammar.
4466 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
4467 instead of grub_ieee1275_interpret.
4468 (grub_reboot_init): New function.
4469 (grub_reboot_fini): Likewise.
4470 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
4471 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
4472 util/i386/pc/misc.c with commands/ieee1275/halt.c,
4473 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
4474 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
4476 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
4478 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
4480 (grub_halt): Likewise.
4481 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
4482 (cmain): Remove __attribute__((unused)).
4483 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
4484 (grub_heap_len): Likewise.
4485 (grub_machine_fini): New function.
4486 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
4487 (grub_halt): Likewise.
4488 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
4490 * util/powerpc/ieee1275/misc.c: New file.
4492 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
4494 * DISTLIST: New file.
4495 * gendistlist.sh: Likewise.
4497 * Makefile.in (COMMON_DISTFILES): Removed.
4498 (BOOT_DISTFILES): Likewise.
4499 (CONF_DISTFILES): Likewise.
4500 (DISK_DISTFILES): Likewise.
4501 (FS_DISTFILES): Likewise.
4502 (INCLUDE_DISTFILES): Likewise.
4503 (KERN_DISTFILES): Likewise.
4504 (LOADER_DISTFILES): Likewise.
4505 (TERM_DISTFILES): Likewise.
4506 (UTIL_DISTFILES): Likewise.
4507 (DISTFILES): Likewise.
4508 (uninstall): Uninstall files in $(pkgdata_DATA).
4509 (DISTLIST): New target.
4510 (distdir): Use the contents of the file DISTLIST to get a list of
4513 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
4515 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
4516 descriptor. This is ported from GRUB Legacy.
4518 * gencmdlist.sh: Added an extra semicolon to make it work with
4519 old sed versions. Reported by Robert Bihlmeyer
4520 <robbe@orcus.priv.at>.
4522 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
4524 Automatic loading of commands is supported.
4526 * normal/main.c (read_command_list): New function.
4527 (grub_normal_execute): Call read_command_list.
4529 * normal/command.c (grub_register_command): Return zero or CMD.
4530 Allocate CMD->NAME from the heap.
4531 Initialize CMD->MODULE_NAME to zero.
4532 Find the same name as well. If the same command is found and it is
4533 a dummy command, overwrite members. If it is not a dummy command,
4535 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
4536 (grub_command_find): If a dummy command is found, load a module
4537 and retry to find a command only once.
4539 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
4540 make sure that each command is loaded.
4542 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
4544 (struct grub_command): Remove const from the member `name'.
4545 Add a new member `module_name'.
4546 (grub_register_command): Return grub_command_t.
4548 * commands/help.c (grub_cmd_help): Call grub_command_find to make
4549 sure that each command is loaded.
4551 * genmk.rb (PModule::rule): Specify a module name without the
4552 suffix ".mod" to gencmdlist.sh.
4554 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
4556 * gencmdlist.sh: New file.
4558 * genmk.rb (PModule::rule): Generate a rule for a command list.
4560 Generate command.lst from $(COMMANDFILES).
4562 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
4563 (DATA): Added $(pkgdata_DATA).
4564 (install-local): Install files in $(pkgdata_DATA).
4566 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
4568 * term/i386/pc/vga.c (debug_command): Removed.
4569 (GRUB_MOD_INIT): Do not register the command "debug".
4571 From Hollis Blanchard:
4572 * commands/configfile.c: New file.
4573 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4574 commands/configfile.c.
4575 (pkgdata_MODULES): Added configfile.mod.
4576 (configfile_mod_SOURCES): New variable.
4577 (configfile_mod_CFLAGS): Likewise.
4578 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
4579 commands/configfile.c.
4580 (pkgdata_MODULES): Added configfile.mod.
4581 (configfile_mod_SOURCES): New variable.
4582 (configfile_mod_CFLAGS): Likewise.
4583 * util/grub-emu.c (main): Call grub_configfile_init and
4584 grub_configfile_fini.
4585 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
4587 [GRUB_UTIL] (grub_configfile_fini): Likewise.
4589 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
4591 * normal/arg.c (grub_arg_show_help): Do not show the bug report
4594 * commands/help.c (grub_cmd_help): Do not print newlines after
4595 the last command in print_command_help.
4597 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
4599 * commands/default.h: New file.
4600 * commands/timeout.h: Likewise.
4601 * normal/context.c: Likewise.
4603 * util/misc.c: Do not include sys/times.h.
4604 Include sys/time.h and grub/machine/time.h.
4605 (grub_get_rtc): Rewritten with gettimeofday.
4607 * util/grub-emu.c (main): Call grub_default_init and
4608 grub_timeout_init before grub_normal_init, and call
4609 grub_timeout_fini and grub_default_fini after grub_main.
4611 * util/console.c (grub_ncurses_checkkey): Return the read
4614 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
4617 * normal/main.c (read_config_file): Push MENU. If this fails,
4618 print an error and wait for a user input.
4619 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
4620 If a menu is empty or an error occurs, pop MENU.
4621 (grub_normal_execute): Pop and free MENU after grub_menu_run
4624 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
4626 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
4628 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
4630 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
4632 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
4635 * include/grub/normal.h (struct grub_menu_list): New struct.
4636 (grub_menu_list_t): New type.
4637 (struct grub_context): New struct.
4638 (grub_context_t): New type.
4639 (grub_register_command): Got rid of EXPORT_FUNC.
4640 (grub_unregister_command): Likewise.
4641 (grub_context_get): New prototype.
4642 (grub_context_get_current_menu): Likewise.
4643 (grub_context_push_menu): Likewise.
4644 (grub_context_pop_menu): Likewise.
4645 [GRUB_UTIL] (grub_default_init): Likewise.
4646 [GRUB_UTIL] (grub_default_fini): Likewise.
4647 [GRUB_UTIL] (grub_timeout_init): Likewise.
4648 [GRUB_UTIL] (grub_timeout_fini): Likewise.
4650 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
4651 commands/timeout.c and normal/context.c.
4652 (pkgdata_MODULES): Added default.mod and timeout.mod.
4653 (normal_mod_SOURCES): Added normal/context.c.
4654 (default_mod_SOURCES): New variable.
4655 (default_mod_CFLAGS): Likewise.
4656 (timeout_mod_SOURCES): Likewise.
4657 (timeout_mod_CFLAGS): Likewise.
4658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
4660 (pkgdata_MODULES): Added default.mod and timeout.mod.
4661 (normal_mod_SOURCES): Added normal/context.c.
4662 (default_mod_SOURCES): New variable.
4663 (default_mod_CFLAGS): Likewise.
4664 (timeout_mod_SOURCES): Likewise.
4665 (timeout_mod_CFLAGS): Likewise.
4667 * Makefile.in (all-local): Added $(MKFILES).
4669 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
4671 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
4672 (grub_emu_SOURCES): Likewise.
4673 (pkgdata_MODULES): Add `sun.mod'.
4674 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
4675 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4677 (pkgdata_MODULES): Add `sun.mod'.
4678 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
4679 * include/grub/partition.h (grub_sun_partition_map_init): New
4681 (grub_sun_partition_map_fini): Likewise.
4682 * partmap/sun.c: New file.
4683 * util/grub-emu.c (main): Initialize and de-initialize the sun
4684 partitionmap support.
4686 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
4688 This implements an Emacs-like menu entry editor.
4690 * normal/menu_entry.c: New file.
4692 * util/console.c (grub_ncurses_putchar): Translate some Unicode
4693 characters to ASCII.
4694 (saved_char): New variable.
4695 (grub_ncurses_checkkey): Rewritten completely.
4696 (grub_ncurses_getkey): Likewise.
4697 (grub_ncurses_init): Call raw instead of cbreak.
4699 * normal/menu.c (print_entry): Do not put a space.
4700 (init_page): Renamed to ...
4701 (grub_menu_init_page): ... this. All callers changed.
4702 (edit_menu_entry): Removed.
4703 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
4705 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
4707 * kern/misc.c (grub_vprintf): Call grub_refresh.
4709 * normal/menu.c (DISP_LEFT): Renamed to ...
4710 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
4711 * normal/menu.c (DISP_UP): Renamed to ...
4712 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
4713 * normal/menu.c (DISP_RIGHT): Renamed to ...
4714 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
4715 * normal/menu.c (DISP_DOWN): Renamed to ...
4716 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
4717 * normal/menu.c (DISP_HLINE): Renamed to ...
4718 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
4719 * normal/menu.c (DISP_VLINE): Renamed to ...
4720 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
4721 * normal/menu.c (DISP_UL): Renamed to ...
4722 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
4723 * normal/menu.c (DISP_UR): Renamed to ...
4724 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
4725 * normal/menu.c (DISP_LL): Renamed to ...
4726 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
4727 * normal/menu.c (DISP_LR): Renamed to ...
4728 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
4729 * normal/menu.c (TERM_WIDTH): Renamed to ...
4730 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
4731 * normal/menu.c (TERM_HEIGHT): Renamed to ...
4732 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
4733 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
4734 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
4735 * normal/menu.c (TERM_MARGIN): Renamed to ...
4736 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
4737 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
4738 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
4739 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
4740 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
4741 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
4742 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
4743 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
4744 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
4745 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
4746 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
4747 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
4748 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
4749 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
4750 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
4751 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
4752 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
4753 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
4754 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
4755 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
4756 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
4757 All callers changed.
4759 * include/grub/normal.h: New prototype.
4761 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4762 normal/menu_entry.c.
4763 (normal_mod_SOURCES): Likewise.
4764 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4765 (normal_mod_SOURCES): Likewise.
4767 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
4769 * include/grub/normal.h (grub_halt_init): New prototype.
4770 (grub_halt_fini): Likewise.
4771 (grub_reboot_init): Likewise.
4772 (grub_reboot_fini): Likewise.
4774 * util/grub-emu.c: Include signal.h.
4775 (main_env): New global variable.
4776 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
4778 (grub_machine_fini): New function.
4779 (main): Call grub_halt_init and grub_reboot_init before
4780 grub_main, and grub_reboot_fini and grub_halt_fini after it.
4781 Call setjmp with MAIN_ENV to go back afterwards.
4782 Call grub_machine_fini right before return.
4784 * include/grub/util/misc.h: Include setjmp.h.
4785 (main_env): New prototype.
4787 * include/grub/kernel.h (grub_machine_fini): New prototype.
4788 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
4789 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
4791 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
4792 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
4793 * term/i386/pc/console.c (grub_console_fini): Likewise.
4795 * util/i386/pc/misc.c: New file.
4797 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4798 util/i386/pc/misc.c, commands/i386/pc/halt.c and
4799 commands/i386/pc/reboot.c.
4801 2005-02-14 Guillem Jover <guillem@hadrons.org>
4803 * include/grub/dl.h (grub_dl_check_header): New prototype.
4804 (grub_arch_dl_check_header): Change return type to grub_err_t,
4805 remove size parameter and export function. Update all callers.
4806 * kern/dl.c (grub_dl_check_header): New function.
4807 (grub_dl_load_core): Use `grub_dl_check_header' instead of
4808 `grub_arch_dl_check_header'. Check ELF type. Check if sections
4809 are inside the core.
4810 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
4811 independent ELF header checks.
4812 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
4813 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
4814 `grub_dl_check_header' instead of explicit checks. Check for the
4816 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
4817 `grub_dl_check_header' instead of explicit checks. Remove arch
4818 specific ELF header checks.
4820 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
4823 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
4825 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
4826 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
4828 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
4830 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
4831 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
4832 (part_map_iterate): Clear `grub_errno' and return 0 if
4833 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
4834 * partmap/amiga.c (amiga_partition_map_iterate): Return
4835 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
4836 * partmap/apple.c (apple_partition_map_iterate): Likewise.
4838 2005-02-01 Guillem Jover <guillem@hadrons.org>
4840 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
4843 2005-01-31 Marco Gerards <metgerards@student.han.nl>
4845 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
4847 (grub_rescue_cmd_linux): New prototype.
4848 (grub_rescue_cmd_initrd): Likewise.
4849 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
4851 (grub_linux_release_mem): Release the memory for the initrd.
4852 (grub_load_linux): Renamed from this...
4853 (grub_rescue_cmd_linux): ...To this. Changed all callers.
4854 Changed `entry' not to be static. Loop over memory regions to
4855 find another one when the default fails.
4856 (grub_rescue_cmd_initrd): New function.
4857 (grub_linux_init): Remove function.
4858 (grub_linux_fini): Likewise.
4859 (GRUB_MOD_INIT): Register `initrd'.
4860 (GRUB_MOD_FINI): Unregister `initrd'.
4861 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
4863 (grub_linux_normal_fini): Likewise.
4864 (GRUB_MOD_INIT): Register `initrd'.
4865 (GRUB_MOD_FINI): Unregister `initrd'.
4867 2005-01-31 Marco Gerards <metgerards@student.han.nl>
4869 * commands/help.c: New file.
4870 * normal/arg.c (show_help): Renamed to...
4871 (grub_arg_show_help): ... this.
4872 * commands/i386/pc/halt.c: New file.
4873 * commands/i386/pc/reboot.c: Likewise.
4874 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
4875 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
4876 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
4877 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
4879 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4881 (pkgdata_MODULES): Add `help.mod'.
4882 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
4883 * grub/i386/pc/init.h (grub_reboot): New prototype.
4884 (grub_halt): Likewise.
4885 * include/grub/normal.h (grub_arg_show_help): New prototype.
4886 (grub_help_init): Likewise.
4887 (grub_help_fini): Likewise.
4888 * util/grub-emu.c (main): Initialize and deinitialize the help
4891 * normal/cmdline.c (grub_cmdline_get): Doc fix.
4893 * normal/command.c (grub_command_init): Fixed the description of
4894 the `set' and `unset' commands.
4896 2005-01-31 Marco Gerards <metgerards@student.han.nl>
4898 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
4900 * commands/ieee1275/halt.c: New file.
4901 * commands/ieee1275/reboot.c: Likewise.
4902 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
4903 `__attribute__ ((unused))'. Some GCS related fixed.
4904 (grub_suspend_init) [GRUB_UTIL]: Function removed.
4905 (grub_suspend_fini): Likewise.
4906 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
4908 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
4909 (halt_mod_CFLAGS): New variables.
4910 * include/grub/powerpc/ieee1275/ieee1275.h
4911 (grub_ieee1275_interpret): New prototype.
4913 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
4915 * include/grub/misc.h (memmove): New prototype.
4918 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
4920 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
4921 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
4923 2005-01-22 Marco Gerards <metgerards@student.han.nl>
4925 * kern/misc.c (grub_strndup): Function rewritten.
4927 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
4929 * normal/menu.c (TERM_WIDTH): Macro redefined.
4930 (TERM_TOP_BORDER_Y): Likewise.
4931 (draw_border): Replaced while-loop by a for-loop. Make the number
4932 of lines consistent with the number of lines displayed in
4933 print_entries. Added a margin below the rectangle.
4934 (print_entry): Make the entry fit in the rectangle.
4935 (print_entries): Display the scroll arrows next to the right
4938 2005-01-21 Marco Gerards <metgerards@student.han.nl>
4940 * fs/minix.c (grub_minix_find_file): Reserve more space for
4941 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
4942 `grub_strncpy' to copy `path' into it.
4944 2005-01-21 Marco Gerards <metgerards@student.han.nl>
4946 Add the loopback device, a device via which files can be accessed
4949 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
4950 (pkgdata_MODULES): Add loopback.mod.
4951 (loopback_mod_SOURCES): New variable.
4952 (loopback_mod_CFLAGS): Likewise.
4953 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4955 (pkgdata_MODULES): Add loopback.mod.
4956 (loopback_mod_SOURCES): New variable.
4957 (loopback_mod_CFLAGS): Likewise.
4958 * disk/loopback.c: new file.
4959 * include/grub/normal.h (grub_loop_init): New prototype.
4960 (grub_loop_fini): New prototype.
4961 * util/grub-emu.c (main): Initialize and de-initialize loopback
4963 * include/grub/disk.h (grub_disk_dev_id): Add
4964 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
4966 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
4968 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
4970 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
4971 (suspend_mod_SOURCES): New variable.
4972 (suspend_mod_CFLAGS): Likewise.
4973 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
4975 * commands/ieee1275/suspend.c: New file.
4977 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4979 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
4980 ((unused))' to `__attribute__ ((used))'.
4981 (GRUB_MOD_FINI): Likewise.
4982 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
4983 * genmk.rb (PModule): Assign space to common symbols when linking
4986 2005-01-20 Marco Gerards <metgerards@student.han.nl>
4988 * include/grub/mm.h (grub_mm_init_region): Change the type of the
4989 `unsigned' arguments to `grub_size_t'.
4990 (grub_malloc): Likewise.
4991 (grub_realloc): Likewise.
4992 (grub_memalign): Likewise.
4993 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
4994 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
4995 * util/misc.c (grub_malloc): Likewise.
4996 (grub_realloc): Likewise.
4997 * kern/mm.c (get_header_from_pointer): Change the casts to
4998 `unsigned' into a cast to `grub_size_t'.
5000 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
5001 point to `currnode' when `currnode' is changed.
5003 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
5004 Schottelius <nico-linux@schottelius.org>.
5006 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
5008 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
5009 (note_path): Remove variable.
5010 (GRUB_IEEE1275_NOTE_NAME): New macro.
5011 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
5012 (grub_ieee1275_note_hdr): New structure.
5013 (grub_ieee1275_note_desc): Likewise.
5014 (grub_ieee1275_note): Likewise.
5015 (load_note): Remove `dir' argument. All callers updated. Remove
5016 `note_img' and `path'. Do not load a file from `note_path'.
5017 Initialize a struct grub_ieee1275_note and write that to `out'.
5018 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
5020 2005-01-05 Marco Gerards <metgerards@student.han.nl>
5022 * util/misc.c (grub_util_read_image): Revert last change. It
5023 called `grub_util_read_at', which seeks from the beginning of the
5026 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
5028 * TODO: Add note about endianness in grub-mkimage.
5029 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
5031 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
5032 (grub_mkimage_SOURCES): New target.
5033 * include/grub/kernel.h (grub_start_addr): Remove variable.
5034 (grub_end_addr): Likewise.
5035 (grub_total_module_size): Likewise.
5036 (grub_kernel_image_size): Likewise.
5037 (GRUB_MODULE_MAGIC): New constant.
5038 (grub_module_info): New structure.
5039 (grub_arch_modules_addr): New prototype.
5040 (grub_get_end_addr): Remove prototype.
5041 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
5042 * include/grub/powerpc/ieee1275/kernel.h: New file.
5043 * include/grub/util/misc.h (grub_util_get_fp_size): New
5045 (grub_util_read_at): Likewise.
5046 (grub_util_write_image_at): Likewise.
5047 * kern/main.c (grub_get_end_addr): Remove function.
5048 (grub_load_modules): Call grub_arch_modules_addr instead of using
5049 grub_end_addr. Look for a grub_module_info struct in memory. Use
5050 the grub_module_info fields instead of calling grub_get_end_addr
5051 as loop conditions. Move grub_add_unused_region code here.
5052 (grub_add_unused_region): Remove function.
5053 * kern/i386/pc/init.c: Include grub/cache.h.
5054 (grub_machine_init): Remove call to grub_get_end_addr. Remove
5055 one call to add_mem_region.
5056 (grub_arch_modules_addr): New function.
5057 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
5058 (grub_total_module_size): Likewise.
5059 Include grub/machine/kernel.h.
5060 (grub_arch_modules_addr): New function.
5061 * util/grub-emu.c (grub_end_addr): Remove variable.
5062 (grub_total_module_size): Likewise.
5063 (grub_arch_modules_addr): New function.
5064 * util/misc.c: Include unistd.h.
5065 (grub_util_get_fp_size): New function.
5066 (grub_util_read_at): Likewise.
5067 (grub_util_write_image_at): Likewise.
5068 (grub_util_read_image): Call grub_util_read_at.
5069 (grub_util_write_image): Call grub_util_write_image_at.
5070 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
5071 additional memory in kernel_img for a struct grub_module_info.
5072 Fill in that grub_module_info.
5073 * util/powerpc/ieee1275/grub-mkimage.c: New file.
5075 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
5077 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
5079 * include/grub/powerpc/ieee1275/ieee1275.h
5080 (grub_ieee1275_milliseconds): New prototype.
5081 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
5083 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
5084 grub_ieee1275_milliseconds.
5086 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
5088 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
5090 (find_options): New function.
5091 (cmain): Call find_options.
5092 * include/grub/powerpc/ieee1275/ieee1275.h
5093 (grub_ieee1275_realmode): New extern variable.
5094 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
5095 grub_map if grub_ieee1275_realmode is false.
5097 2004-12-29 Marco Gerards <metgerards@student.han.nl>
5099 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
5100 lines are inserted and make it work like readline. Reported by
5101 Vincent Pelletier <subdino2004@yahoo.fr>.
5103 2004-12-28 Marco Gerards <metgerards@student.han.nl>
5105 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
5107 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
5108 `kern/powerpc/cache.S'.
5110 2004-12-27 Marco Gerards <metgerards@student.han.nl>
5112 * genmk.rb: Handle the `Program' class in the main loop. Written
5113 by Johan Rydberg <jrydberg@gnu.org>.
5114 (Program): New class.
5115 (programs): New variable.
5116 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
5117 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
5118 instead of "grub/kernel.h". Include <grub/machine/init.h>.
5119 (help_arch): Function removed.
5120 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
5121 `powerpc/libgcc.h' and `loader.h'.
5122 (pkgdata_PROGRAMS): New variable.
5123 (sbin_UTILITIES): Variable removed.
5124 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
5125 (grubof_SOURCES): Variable re-defined so it only includes the
5127 (grubof_CFLAGS): Remove `-DGRUBOF'.
5128 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
5129 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
5130 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
5131 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
5132 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
5133 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
5134 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
5135 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
5136 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
5137 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
5138 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5139 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
5140 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
5141 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
5142 (pc_mod_CFLAGS): New variables.
5143 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
5144 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
5145 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
5146 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
5148 * include/grub/i386/pc/init.h (grub_os_area_addr)
5149 (rub_os_area_size): ... to here.
5150 * include/grub/powerpc/ieee1275/ieee1275.h
5151 (grub_ieee1275_entry_fn): Export symbol.
5152 * include/grub/powerpc/ieee1275/init.h: New file.
5153 * include/grub/powerpc/libgcc.h: Likewise.
5154 * include/grub/cache.h: Likewise.
5155 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
5156 <hollis@penguinppc.org>.
5157 * kern/dl.c: Include <grub/cache.h>.
5158 (grub_dl_flush_cache): New function.
5159 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
5161 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
5162 (grub_console_init): Removed prototypes.
5163 (grub_machine_init): Don't initialize the modules anymore.
5164 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
5166 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
5167 Macro undef removed.
5168 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
5169 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
5170 relocation `R_PPC_REL32'. Return an error when the relocation is
5172 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
5173 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
5174 * util/misc.c (grub_arch_sync_caches): Likewise.
5176 2004-12-19 Marco Gerards <metgerards@student.han.nl>
5178 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
5179 `symlist.c', add `grubof_symlist.c'.
5180 (symlist.c): Variable removed.
5181 (grubof_HEADERS): Variable added.
5182 (grubof_symlist.c): New target.
5183 (kernel_syms.lst): Use `grubof_HEADERS' instead of
5184 `kernel_img_HEADERS'.
5185 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
5186 * kern/powerpc/dl.c: New file.
5187 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
5189 (grub_arch_dl_relocate_symbols): Likewise.
5190 (grub_register_exported_symbols): Likewise.
5192 2004-12-13 Marco Gerards <metgerards@student.han.nl>
5194 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
5195 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
5196 to fail instead. Reported by Vincent Pelletier
5197 <subdino2004@yahoo.fr>.
5199 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
5200 it is not allocated. Reported by Vincent Pelletier
5201 <subdino2004@yahoo.fr>.
5203 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
5204 output so the output looks better.
5206 2004-12-04 Marco Gerards <metgerards@student.han.nl>
5208 Modulize the partition map support and add support for the amiga
5211 * commands/ls.c: Include <grub/partition.h> instead of
5212 <grub/machine/partition.h>.
5213 * kern/disk.c: Likewise.
5214 * kern/rescue.c: Likewise.
5215 * loader/i386/pc/chainloader.c: Likewise.
5216 * normal/cmdline.c: Likewise.
5217 * kern/powerpc/ieee1275/init.c: Likewise.
5218 (grub_machine_init): Call `grub_pc_partition_map_init',
5219 `grub_amiga_partition_map_init' and
5220 `grub_apple_partition_map_init'.
5221 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
5222 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
5223 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
5224 `partition.h' and `pc_partition.h'.
5225 (grub_setup_SOURCES): Remove
5226 `disk/i386/pc/partition.c'. Add `kern/partition.c',
5227 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
5228 (grub_emu_SOURCES): Likewise.
5229 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
5230 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
5231 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
5232 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
5233 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
5234 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
5235 (grubof_SOURCES): Likewise.
5236 * disk/i386/pc/partition.c: File removed.
5237 * disk/powerpc/ieee1275/partition.c: Likewise.
5238 * include/grub/powerpc/ieee1275/partition.h: Likewise.
5239 * include/grub/i386/pc/partition.h: Likewise.
5240 * kern/partition.c: New file.
5241 * partmap/amiga.c: Likewise.
5242 * partmap/apple.c: Likewise.
5243 * partmap/pc.c: Likewise.
5244 * include/grub/partition.h: Likewise..
5245 * include/grub/pc_partition.h: Likewise.
5246 * util/grub-emu.c: Include <grub/partition.h> instead of
5247 <grub/machine/partition.h>.
5248 (main): Call `grub_pc_partition_map_init',
5249 `grub_amiga_partition_map_init' and
5250 `grub_apple_partition_map_init' and deinitialize afterwards.
5251 * util/i386/pc/biosdisk.c: Include `#include
5252 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
5253 `<grub/machine/partition.h>'.
5254 * util/i386/pc/grub-setup.c: Likewise.
5255 * util/i386/pc/biosdisk.c: Likewise.
5256 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
5257 partition information in case of a PC partition.
5258 * util/i386/pc/grub-setup.c: Include `#include
5259 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
5260 `<grub/machine/partition.h>'.
5261 (setup): Only access the PC specific partition information in case
5264 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
5266 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
5267 (grub_longjmp): Likewise.
5268 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
5270 * normal/powerpc/setjmp.S: New file.
5271 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
5272 `normal/powerpc/setjmp.S'.
5273 (grubof_CFLAGS): Add `-DGRUBOF'.
5274 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
5275 [GRUB_UTIL && !GRUBOF].
5277 2004-11-16 Marco Gerards <metgerards@student.han.nl>
5279 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
5280 property named `name'. Correctly handle the error returned by
5281 `grub_ieee1275_finddevice' if a device can not be opened.
5283 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
5285 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
5286 `actual' for negativity.
5287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
5290 2004-11-01 Marco Gerards <metgerards@student.han.nl>
5292 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
5293 (PAGE_OFFSET): New macro.
5294 (CRTC_ADDR_PORT): Likewise.
5295 (CRTC_DATA_PORT): Likewise.
5296 (START_ADDR_HIGH_REGISTER): Likewise.
5297 (START_ADDR_LOW_REGISTER): Likewise.
5298 (GRAPHICS_ADDR_PORT): Likewise.
5299 (GRAPHICS_DATA_PORT): Likewise.
5300 (READ_MAP_REGISTER): Likewise.
5301 (INPUT_STATUS1_REGISTER): Likewise.
5302 (INPUT_STATUS1_VERTR_BIT): Likewise.
5303 (page): New variable.
5304 (wait_vretrace): New function.
5305 (set_read_map): Likewise.
5306 (set_start_address): Likewise.
5307 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
5309 (check_vga_mem): Take the page into account.
5310 (write_char): Likewise.
5311 (write_cursor): Likewise.
5312 (scroll_up): Likewise. Copy the page to the page that is not
5313 shown and switch between both pages.
5314 (grub_vga_putchar): Fix off by one error.
5315 (grub_vga_cls): Wait for the vertical retrace. Take the page into
5318 2004-11-01 Marco Gerards <metgerards@student.han.nl>
5320 Add support for iso9660 (including rockridge).
5322 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
5323 (iso9660_mod_SOURCES): New variable.
5324 (iso9660_mod_CFLAGS): Likewise.
5325 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
5326 * include/grub/fs.h (grub_iso9660_init): New prototype.
5327 * util/grub-emu.c (main): Call `grub_iso9660_init'.
5328 * fs/iso9660.c: New file.
5330 * include/grub/misc.h (grub_strncat): New prototype.
5331 * kern/misc.c (grub_strncat): New function.
5333 * fs/hfs.c (grub_hfs_mount): Translate the error
5334 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
5335 * fs/jfs.c (grub_jfs_mount): Likewise.
5336 * fs/ufs.c (grub_ufs_mount): Likewise.
5338 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
5340 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
5341 which initialized BAT registers.
5342 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
5343 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
5345 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
5346 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
5348 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
5349 (grub_mapclaim): Likewise.
5350 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
5351 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
5354 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
5356 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
5357 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
5358 -ffreestanding and -msoft-float.
5360 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
5362 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
5363 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
5364 set in grub_ieee1275_flags.
5366 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
5368 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
5370 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
5371 grub_console_init first.
5372 Change the memory range used for grub_ieee1275_claim and
5373 grub_mm_init_region.
5374 Print an error message if the claim fails.
5375 Include <grub/misc.h>.
5377 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
5379 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
5380 Call grub_children_iterate for device nodes of type `scsi',
5382 (grub_ofdisk_open): Remove manual device alias resolution.
5383 Fix memory leak when device cannot be opened.
5384 * include/grub/powerpc/ieee1275/ieee1275.h
5385 (grub_children_iterate): New prototype.
5386 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
5388 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
5389 Return -1 if args.size was -1.
5391 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
5393 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
5394 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
5395 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
5396 Open Firmware's memory for it; claim memory from _start to _end.
5397 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
5399 (_start): Zero BSS from __bss_start to _end.
5400 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
5402 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
5404 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
5406 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
5407 -1 if args.base was -1.
5409 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
5411 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
5412 escape sequence instead of a literal ^L. Also call
5413 grub_ofconsole_gotoxy.
5415 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
5417 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
5418 void * arguments to grub_addr_t. All callers updated. Also make
5419 the `result' argument optional.
5420 (grub_ieee1275_release): change void * arguments to grub_addr_t.
5421 All callers updated.
5423 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
5425 * commands/ls.c (grub_ls_list_files): Use the string following the
5426 initial ')', if present, as the filesystem path.
5427 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
5429 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
5431 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
5433 Make the source code of the menu interface more readable.
5435 * normal/menu.c: Include grub/mm.h.
5436 (TERM_WIDTH): New macro.
5437 (TERM_HEIGHT): Likewise.
5438 (TERM_INFO_HEIGHT): Likewise.
5439 (TERM_MARGIN): Likewise.
5440 (TERM_SCROLL_WIDTH): Likewise.
5441 (TERM_TOP_BORDER_Y): Likewise.
5442 (TERM_LEFT_BORDER_X): Likewise.
5443 (TERM_BORDER_WIDTH): Likewise.
5444 (TERM_MESSAGE_HEIGHT): Likewise.
5445 (TERM_BORDER_HEIGHT): Likewise.
5446 (TERM_NUM_ENTRIES): Likewise.
5447 (TERM_FIRST_ENTRY_Y): Likewise.
5448 (TERM_ENTRY_WIDTH): Likewise.
5449 (TERM_CURSOR_X): Likewise.
5450 (draw_border): Use macros instead of magic numbers.
5451 (print_entry): Likewise.
5452 (print_entries): Likewise.
5453 (run_menu): Likewise. Also, handle the key 'e'.
5454 (run_menu_entry): Ignore empty command lines.
5455 (print_message): Added a new argument EDIT. If EDIT is true,
5456 print a different message.
5457 (init_page): Likewise.
5458 (edit_menu_entry): New function. Not implemented yet.
5460 2004-09-17 Marco Gerards <metgerards@student.han.nl>
5462 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
5463 can be loaded from normal mode.
5465 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
5467 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
5468 (multiboot_mod_CFLAGS): New variables.
5469 * loader/i386/pc/linux_normal.c: New file.
5470 * loader/i386/pc/multiboot_normal.c: Likewise.
5472 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
5475 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
5476 `fdiro' to read the mode information from instead of `diro'.
5478 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
5479 looking up a symlink.
5481 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
5483 * normal/command.c (grub_command_execute): Don't parse the
5484 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
5485 flags of the command.
5487 * normal/menu.c (grub_menu_run): Fix typo.
5489 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
5491 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
5493 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
5494 `y + 1' instead of `y - 1'.
5496 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
5498 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
5500 From Hollis Blanchard <hollis@penguinppc.org>:
5501 * kern/misc.c (memmove): New alias for grub_memmove.
5502 (memcmp): New alias for grub_memcmp.
5503 (memset): New alias for grub_memset.
5504 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
5505 Change "int handle" to "grub_ieee1275_phandle_t handle".
5506 * include/grub/powerpc/ieee1275/ieee1275.h
5507 (grub_ieee1275_get_property): Likewise.
5509 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
5511 Added normal mode command `chainloader' as module chain.mod, which
5512 depends on normal.mod and _chain.mod.
5514 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
5515 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
5516 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
5518 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
5519 but arguments parsing moved to ...
5520 (grub_chainloader_cmd): ... here. New function.
5521 * include/grub/i386/pc/chainloader.h: New file.
5522 * loader/i386/pc/chainloader_normal.c: Likewise.
5524 2004-09-11 Marco Gerards <metgerards@student.han.nl>
5526 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
5527 (grub_mkimage_LDFLAGS): Likewise.
5528 (grub_emu_SOURCES): Likewise.
5529 (kernel_img_HEADERS): Added fshelp.h.
5530 * fs/ext2.c: Include <grub/fshelp.h>.
5531 (FILETYPE_REG): New macro.
5532 (FILETYPE_INO_REG): Likewise.
5533 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
5535 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
5537 (grub_fshelp_node): New struct.
5538 (grub_ext2_data): Added member `diropen'. Changed member `inode'
5540 (grub_ext2_get_file_block): Removed function.
5541 (grub_ext2_read_block): New function.
5542 (grub_ext2_read_file): Replaced parameter `data' by `node'.
5543 This function was written.
5544 (grub_ext2_mount): Read the root inode. Create a diropen struct.
5545 (grub_ext2_find_file): Removed function.
5546 (grub_ext2_read_symlink): New function.
5547 (grub_ext2_iterate_dir): Likewise.
5548 (grub_ext2_open): Rewritten.
5549 (grub_ext2_dir): Rewritten.
5550 * include/grub/fshelp.h: New file.
5551 * fs/fshelp.c: Likewise.
5553 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
5555 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
5556 (print_message): Add a missing newline.
5557 (run_menu): Added timeout support.
5558 (run_menu_entry): New local function.
5559 (grub_menu_run): Added support for booting.
5561 * kern/loader.c (grub_loader_is_loaded): New function.
5563 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
5564 (grub_get_rtc): Exported.
5566 * include/grub/i386/pc/time.h: Include grub/symbol.h.
5567 (grub_get_rtc): Exported.
5569 * include/grub/normal.h (struct grub_command_list): Remove
5570 constant from the member `command'.
5572 * include/grub/loader.h (grub_loader_is_loaded): Declared.
5574 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
5576 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
5578 2004-08-28 Marco Gerards <metgerards@student.han.nl>
5580 Add support for the JFS filesystem.
5582 * fs/jfs.c: New file.
5583 * include/grub/fs.h (grub_jfs_init): New prototype.
5584 (grub_jfs_fini): New prototype.
5585 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
5586 (grub_emu_SOURCES): Likewise.
5587 (pkgdata_MODULES): Add jfs.mod.
5588 (jfs_mod_SOURCES): New variable.
5589 (jfs_mod_CFLAGS): Likewise.
5590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
5591 (grubof_SOURCES): Likewise.
5592 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
5594 * fs/fat.c (grub_fat_find_dir): Convert the filename little
5595 endian to the host endian.
5596 (grub_fat_utf16_to_utf8): Move function from there...
5597 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
5598 the endianess of the source string anymore.
5599 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
5601 2004-08-24 Marco Gerards <metgerards@student.han.nl>
5603 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
5604 (grub_boot_fini) [GRUB_UTIL]: Likewise.
5605 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
5606 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
5608 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
5609 (grub_hfs_iterate_dir): Make the function static. Add prototypes
5610 for `node_found' and `it_dir'.
5611 (grub_hfs_dir): Add prototype for `dir_hook'.
5613 * fs/minix.c (grub_minix_get_file_block): Add prototype for
5614 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
5615 and `indir32' to silence a gcc warning.
5617 * include/grub/fs.h (grub_hfs_init): New prototype.
5618 (grub_hfs_fini): Likewise.
5621 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
5623 Each disk device has its own id now. This is useful to make use
5624 of multiple disk devices.
5626 * include/grub/disk.h (grub_disk_dev_id): New enum.
5627 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
5628 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
5630 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
5631 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
5633 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
5634 GRUB_DISK_DEVICE_OFDISK_ID as an id.
5636 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
5637 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
5639 * include/grub/disk.h (struct grub_disk_dev): Added a new member
5640 "id" which is used by the cache manager.
5642 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
5645 2004-08-18 Marco Gerards <metgerards@student.han.nl>
5647 * fs/hfs.c: New file.
5648 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
5649 (grub_emu_SOURCES): Likewise.
5650 (pkgdata_MODULES): Add hfs.mod.
5651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
5652 (grubof_SOURCES): Likewise.
5653 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
5655 * include/grub/misc.h (grub_strncasecmp): Add prototype.
5656 * kern/misc.c (grub_strncasecmp): Add function.
5658 2004-08-14 Marco Gerards <metgerards@student.han.nl>
5660 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
5663 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
5664 (grub_ext2_dir): In case the directory entry type is unknown, read
5667 2004-08-02 Peter Bruin <pjbruin@dds.nl>
5669 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
5670 grub_load_linux instead of grub_rescue_cmd_linux as second
5671 argument of grub_rescue_register_command.
5673 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
5675 2004-07-27 Marco Gerards <metgerards@student.han.nl>
5677 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
5679 * commands/boot.c: Remove the check for `GRUB_UTIL'.
5680 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
5681 `loader/powerpc/ieee1275/linux.c',
5682 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
5683 * include/grub/powerpc/ieee1275/ieee1275.h
5684 (grub_ieee1275_release): New prototype.
5685 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
5686 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
5687 normal, boot, linux and linux_normal.
5688 * loader/powerpc/ieee1275/linux.c: New file.
5689 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5691 2004-07-12 Marco Gerards <metgerards@student.han.nl>
5693 * normal/arg.c (grub_arg_parse): Correct error handling after
5694 reallocating the argumentlist (check if `argl' is not null instead
5695 of checking if `args' is not null).
5696 * kern/mm.c (grub_realloc): Return the same pointer when using the
5697 same region, instead of returning the header address.
5699 2004-07-11 Marco Gerards <metgerards@student.han.nl>
5701 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
5702 one block instead of two when looking for the initial partition.
5703 (grub_partition_probe): Initialize the local variable `p' with 0.
5704 Use base 10 for the grub_strtoul call.
5705 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
5706 need for one local variable.
5707 (grub_strtoul): Don't add the new value to `num', instead of that
5710 2004-07-11 Marco Gerards <metgerards@student.han.nl>
5712 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
5713 (pxeboot_img_SOURCES): New variable.
5714 (pxeboot_img_ASFLAGS): Likewise.
5715 (pxeboot_img_LDFLAGS): Likewise.
5716 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
5717 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
5718 <lode_leroy@hotmail.com>.
5720 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
5722 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
5725 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
5727 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
5728 the history buffer logic.
5730 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
5732 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
5733 (FILETYPE_INO_SYMLINK): New macros.
5734 (grub_ext2_find_file): Check if the node is a directory using the
5735 inode stat information instead of using the filetype in the
5736 dirent. Exclude the first character of an absolute symlink.
5737 (grub_ext2_dir): Mask out the filetype part of the mode member of
5740 2004-05-24 Marco Gerards <metgerards@student.han.nl>
5742 Add support for UFS version 1 and 2. Add support for the minix
5743 filesystem version 1 and 2, both the variants with 14 and 30 long
5746 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
5748 (grub_emu_SOURCES): Likewise.
5749 (pkgdata_MODULES): Add ufs.mod and minix.mod.
5750 (ufs_mod_SOURCES): New variable.
5751 (ufs_mod_CFLAGS): Likewise.
5752 (minix_mod_SOURCES): Likewise.
5753 (minix_mod_CFLAGS): Likewise.
5754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
5756 (grubof_SOURCES): Likewise.
5757 * fs/ufs.c: New file.
5758 * fs/minix.c: New file.
5759 * include/grub/fs.h (grub_ufs_init): New prototype.
5760 (grub_ufs_fini): Likewise.
5761 (grub_minix_init): Likewise.
5762 (grub_minix_fini): Likewise.
5763 * util/grub-emu.c (main): Initialize and deinitialize UFS and
5766 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
5768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
5769 commands/ls.c, commands/terminal.c, commands/boot.c,
5770 commands/cmp.c and commands/cat.c.
5771 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
5773 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
5776 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5778 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
5779 and grub_, respectively. Because the conversion is trivial and
5780 mechanical, I omit the details here. Please refer to the CVS
5781 if you need more information.
5783 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5785 * include/pupa: Renamed to ...
5786 * include/grub: ... this.
5787 * util/i386/pc/pupa-mkimage.c: Renamed to ...
5788 * util/i386/pc/grub-mkimage.c: ... this.
5789 * util/i386/pc/pupa-setup.c: Renamed to ...
5790 * util/i386/pc/grub-setup.c: ... this.
5791 * util/pupa-emu.c: Renamed to ...
5792 * util/grub-emu.c: ... this.
5794 2004-03-29 Marco Gerards <metgerards@student.han.nl>
5796 Add support for the newworld apple macintosh (PPC). This has been
5797 tested on the powerbook 2000 only. It only adds support for
5798 generic ieee1275 functions, console and disk support. This should
5799 be easy to port to other architectures with support for Open
5802 * configure.ac: Accept the powerpc as host_cpu. In the case of
5803 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
5804 specific tests are only executed while building for the i386.
5805 Inverse test for crosscompile.
5806 * genmk.rb (Utility): Allow assembler files.
5807 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
5808 * conf/powerpc-ieee1275.rmk: New file.
5809 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
5810 * disk/powerpc/ieee1275/partition.c: Likewise.
5811 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
5812 * include/pupa/powerpc/ieee1275/console.h: Likewise.
5813 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
5814 * include/pupa/powerpc/ieee1275/time.h: Likewise.
5815 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
5816 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
5817 * include/pupa/powerpc/ieee1275/loader.h
5818 * include/pupa/powerpc/setjmp.h: Likewise.
5819 * include/pupa/powerpc/types.h: Likewise.
5820 * kern/powerpc/ieee1275/init.c: Likewise.
5821 * kern/powerpc/ieee1275/openfw.c: Likewise.
5822 * term/powerpc/ieee1275/ofconsole.c: Likewise.
5824 These files were written by Johan Rydberg
5825 (jrydberg@night.trouble.net) and I only modified them slightly.
5827 * boot/powerpc/ieee1275/cmain.c: New file.
5828 * boot/powerpc/ieee1275/crt0.S: Likewise.
5829 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
5830 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
5832 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
5834 * Makefile.in: Update copyright.
5835 * genmodsrc.sh: Likewise.
5836 * gensymlist.sh: Likewise.
5837 * term/i386/pc/vga.c: Indent correctly.
5839 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
5840 bugreporting address.
5841 * util/i386/pc/pupa-setup.c (usage): Likewise,
5842 (main): Call pupa_ext2_init and pupa_ext2_fini.
5844 * fs/fat.c (log2): Renamed to ...
5845 (fat_log2): ... this.
5846 All callers changed.
5847 * kern/misc.c (memcpy): Alias to pupa_memmove.
5848 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
5850 * util/console.c (pupa_ncurses_fini): Return 0.
5852 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
5853 Move fail label here.
5854 [__GNU__]: Don't warn when using stat.
5855 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
5856 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
5857 long int. Use strtol instead of strtoul.
5859 2004-03-14 Marco Gerards <metgerards@student.han.nl>
5861 * commands/boot.c: New file.
5862 * commands/cat.c: Likewise.
5863 * commands/cmp.c: Likewise.
5864 * commands/ls.c: Likewise.
5865 * commands/terminal.c: Likewise.
5866 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
5867 (pupa_register_command): Changed interface to match the new
5869 (pupa_command_execute): Changed (almost rewritten) so it uses
5870 pupa_split_command. Added support for setting variables using the
5872 (rescue_command): Changed to work with the new argument parser.
5873 (terminal_command): Moved from here to commands/terminal.c.
5874 (set_command): New function.
5875 (unset_command): New function.
5876 (insmod_command): New function.
5877 (rmmod_command): New function.
5878 (lsmod_command): New function.
5879 (pupa_command_init): Don't initialize the command terminal
5880 anymore. Initialize the commands set, unset, insmod, rmmod and
5882 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
5883 (kernel_img_HEADERS): Add arg.h and env.h.
5884 (pupa_mkimage_LDFLAGS): Add kern/env.c.
5885 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
5886 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
5888 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
5890 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
5891 (boot_mod_SOURCES): New variable.
5892 (terminal_mod_SOURCES): Likewise.
5893 (ls_mod_SOURCES): Likewise.
5894 (cmp_mod_SOURCES): Likewise.
5895 (cat_mod_SOURCES): Likewise.
5897 * normal/arg.c: New file.
5898 * kern/env.c: Likewise.
5899 * include/pupa/arg.h: Likewise.
5900 * include/pupa/env.h: Likewise.
5901 * font/manager.c (font_command): Changed to match argument parsing
5903 (PUPA_MOD_INIT): Likewise.
5904 * hello/hello.c (pupa_cmd_hello): Likewise.
5905 (PUPA_MOD_INIT): Likewise.
5906 * include/pupa/disk.h: Include <pupa/device.h>.
5907 (pupa_print_partinfo): New prototype.
5908 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
5909 (pupa_dl_get_prefix): Likewise.
5910 * include/pupa/misc.h: Include <pupa/err.h>.
5911 (pupa_isgraph): New prototype.
5912 (pupa_isdigit): Likewise.
5913 (pupa_split_cmdline): Likewise.
5914 * include/pupa/normal.h: Include <pupa/arg.h>.
5915 (pupa_command): Changed the prototype of the member `func' to
5916 match the argument parsing interface. Added member `options'.
5917 (pupa_register_command): Updated to match function.
5918 (pupa_arg_parse): New prototype.
5919 (pupa_hello_init) [PUPA_UTIL]: New prototype.
5920 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
5921 (pupa_ls_init) [PUPA_UTIL]: Likewise.
5922 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
5923 (pupa_cat_init) [PUPA_UTIL]: Likewise.
5924 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
5925 (pupa_boot_init) [PUPA_UTIL]: Likewise.
5926 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
5927 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
5928 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
5929 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
5930 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
5931 * kern/disk.c: Include <pupa/file.h>.
5932 (pupa_print_partinfo): New function.
5933 * kern/dl.c: Include <pupa/env.h>.
5934 (pupa_dl_dir): Variable removed.
5935 (pupa_dl_load): Use the environment variable `prefix' instead of
5936 the variable pupa_dl_dir.
5937 (pupa_dl_set_prefix): Function removed.
5938 (pupa_dl_get_prefix): Likewise.
5939 * kern/i386/pc/init.c: Include <pupa/env.h>.
5940 (pupa_machine_init): Use the environment variable `prefix' instead of
5941 using pupa_dl_set_prefix to set the prefix.
5942 * kern/main.c: Include <pupa/env.h>.
5943 (pupa_set_root_dev): Use the environment variable `prefix' instead of
5944 using pupa_dl_get_prefix to get the prefix.
5945 * kern/misc.c: Include <pupa/env.h>.
5946 (pupa_isdigit): New function.
5947 (pupa_isgraph): Likewise.
5948 (pupa_ftoa): Likewise.
5949 (pupa_vsprintf): Added support for printing values of the type
5950 `double'. Make it possible to format variable output when using
5951 formatting like `%1.2%f'.
5952 (pupa_split_cmdline): New function.
5953 * kern/rescue.c: Include <pupa/env.h>.
5954 (next_word): Removed function.
5955 (pupa_rescue_cmd_prefix): Likewise.
5956 (pupa_rescue_cmd_set): New function.
5957 (pupa_rescue_cmd_unset): New function.
5958 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
5959 split the command line instead of splitting it here. Added
5960 support for setting variables using the syntax `foo=bar'. Don't
5961 initialize the prefix command anymore. Initialized the set and
5963 * normal/cmdline.c: Include <pupa/env.h>.
5964 (pupa_tab_complete): Added prototypes for print_simple_completion,
5965 print_partition_completion, add_completion, iterate_commands,
5966 iterate_dev, iterate_part and iterate_dir. Moved code to print
5967 partition information from here to kern/disk.c.
5968 (pupa_cmdline_run): Don't check if the funtion exists anymore.
5969 * normal/main.c: Include <pupa/env.h>.
5970 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
5971 instead of using pupa_dl_get_prefix to get the prefix.
5972 * term/i386/pc/vga.c: Include <pupa/arg.h>.
5973 (check_vga_mem): Cast pointers to `void *' to silence a gcc
5975 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
5976 (pupa_vga_setcolor): Declare unused variables with `__attribute__
5977 ((unused))' to silence a gcc warning.
5978 (pupa_vga_setcolor): Likewise.
5979 (debug_command): Changed to match argument parsing
5981 * util/pupa-emu.c: Include <pupa/env.h>.
5982 (options): Added 0's for unused fields to silence a gcc warning.
5984 (main): Use the environment variable `prefix' instead of using
5985 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
5986 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
5989 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
5990 * util/misc.c: Include <malloc.h>.
5991 (pupa_malloc): Rewritten so errors are correctly reported.
5992 (pupa_realloc): Likewise.
5993 (pupa_memalign): Likewise.
5994 (pupa_mm_init_region): Declare unused variables with
5995 `__attribute__ ((unused))' to silence a gcc warning.
5996 * normal/i386/setjmp.S: Remove tab at the end of the file to
5997 silence a gcc warning.
5998 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
5999 variables with `__attribute__ ((unused))' to silence a gcc
6001 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
6002 local variable i unsigned to silence a gcc warning.
6004 * kern/term.c: Include <pupa/misc.h>.
6005 (pupa_more_lines): New variable.
6006 (pupa_more): Likewise.
6007 (pupa_putcode): When the pager is active pause at the end of every
6009 (pupa_set_more): New function.
6010 * include/pupa/term.h (pupa_set_more): New prototype.
6013 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
6015 Now this project is GRUB 2 rather than PUPA. The location of
6016 the CVS repository was moved to GRUB's.
6018 * configure.ac: Use bug-grub as the reporting address.
6019 Use GRUB instead of PUPA.
6020 Change the version number to 1.90.
6022 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
6024 * genkernsyms.sh: Updated copyright information.
6025 * genmk.rb: Likewise.
6026 * genmodsrc.sh: Likewise.
6027 * gensymlist.sh: Likewise.
6028 * boot/i386/pc/boot.S: Likewise.
6029 * boot/i386/pc/diskboot.S: Likewise.
6030 * disk/i386/pc/biosdisk.c: Likewise.
6031 * disk/i386/pc/partition.c: Likewise.
6032 * font/manager.c: Likewise.
6033 * fs/ext2.c: Likewise.
6034 * fs/fat.c: Likewise.
6035 * include/pupa/boot.h: Likewise.
6036 * include/pupa/device.h: Likewise.
6037 * include/pupa/disk.h: Likewise.
6038 * include/pupa/dl.h: Likewise.
6039 * include/pupa/elf.h: Likewise.
6040 * include/pupa/err.h: Likewise.
6041 * include/pupa/file.h: Likewise.
6042 * include/pupa/font.h: Likewise.
6043 * include/pupa/fs.h: Likewise.
6044 * include/pupa/kernel.h: Likewise.
6045 * include/pupa/loader.h: Likewise.
6046 * include/pupa/misc.h: Likewise.
6047 * include/pupa/mm.h: Likewise.
6048 * include/pupa/net.h: Likewise.
6049 * include/pupa/normal.h: Likewise.
6050 * include/pupa/rescue.h: Likewise.
6051 * include/pupa/setjmp.h: Likewise.
6052 * include/pupa/symbol.h: Likewise.
6053 * include/pupa/term.h: Likewise.
6054 * include/pupa/types.h: Likewise.
6055 * include/pupa/i386/setjmp.h: Likewise.
6056 * include/pupa/i386/types.h: Likewise.
6057 * include/pupa/i386/pc/biosdisk.h: Likewise.
6058 * include/pupa/i386/pc/boot.h: Likewise.
6059 * include/pupa/i386/pc/console.h: Likewise.
6060 * include/pupa/i386/pc/init.h: Likewise.
6061 * include/pupa/i386/pc/kernel.h: Likewise.
6062 * include/pupa/i386/pc/linux.h: Likewise.
6063 * include/pupa/i386/pc/loader.h: Likewise.
6064 * include/pupa/i386/pc/memory.h: Likewise.
6065 * include/pupa/i386/pc/multiboot.h: Likewise.
6066 * include/pupa/i386/pc/partition.h: Likewise.
6067 * include/pupa/i386/pc/time.h: Likewise.
6068 * include/pupa/i386/pc/vga.h: Likewise.
6069 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
6070 * include/pupa/util/getroot.h: Likewise.
6071 * include/pupa/util/misc.h: Likewise.
6072 * include/pupa/util/resolve.h: Likewise.
6073 * kern/device.c: Likewise.
6074 * kern/disk.c: Likewise.
6075 * kern/dl.c: Likewise.
6076 * kern/err.c: Likewise.
6077 * kern/file.c: Likewise.
6078 * kern/fs.c: Likewise.
6079 * kern/loader.c: Likewise.
6080 * kern/main.c: Likewise.
6081 * kern/misc.c: Likewise.
6082 * kern/mm.c: Likewise.
6083 * kern/rescue.c: Likewise.
6084 * kern/term.c: Likewise.
6085 * kern/i386/dl.c: Likewise.
6086 * kern/i386/pc/init.c: Likewise.
6087 * kern/i386/pc/lzo1x.S: Likewise.
6088 * kern/i386/pc/startup.S: Likewise.
6089 * loader/i386/pc/chainloader.c: Likewise.
6090 * loader/i386/pc/linux.c: Likewise.
6091 * loader/i386/pc/multiboot.c: Likewise.
6092 * normal/cmdline.c: Likewise.
6093 * normal/command.c: Likewise.
6094 * normal/main.c: Likewise.
6095 * normal/menu.c: Likewise.
6096 * normal/i386/setjmp.S: Likewise.
6097 * term/i386/pc/console.c: Likewise.
6098 * term/i386/pc/vga.c: Likewise.
6099 * util/console.c: Likewise.
6100 * util/genmoddep.c: Likewise.
6101 * util/misc.c: Likewise.
6102 * util/pupa-emu.c: Likewise.
6103 * util/resolve.c: Likewise.
6104 * util/unifont2pff.rb: Likewise.
6105 * util/i386/pc/biosdisk.c: Likewise.
6106 * util/i386/pc/getroot.c: Likewise.
6107 * util/i386/pc/pupa-mkimage.c: Likewise.
6108 * util/i386/pc/pupa-setup.c: Likewise.
6110 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
6112 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
6113 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
6114 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
6115 reading and reset it after reading.
6116 (pupa_ext2_close): Return PUPA_ERR_NONE.
6118 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
6120 (struct linux_kernel_header): Add kernel_version and
6122 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
6123 pupa_file_read succeeds.
6124 (pupa_rescue_cmd_initrd): Implement.
6126 2003-12-03 Marco Gerards <metgerards@student.han.nl>
6128 * fs/ext2.c (pupa_ext2_label): New function.
6129 (pupa_ext2_fs): Added label.
6130 * fs/fat.c (pupa_fat_label): New function.
6131 (pupa_fat_fs): Added label.
6132 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
6134 * kern/misc.c (pupa_strndup): New function.
6135 * include/pupa/misc.h (pupa_strndup): New prototype.
6137 * include/pupa/normal.h: Include <pupa/err.h>.
6138 (pupa_set_history): New prototype.
6139 (pupa_iterate_commands): New prototype.
6140 * normal/cmdline.c: Include <pupa/machine/partition.h>,
6141 <pupa/disk.h>, <pupa/file.h>.
6142 (hist_size): New variable.
6143 (hist_lines): Likewise.
6144 (hist_end): Likewise.
6145 (hist_used): Likewise.
6146 (pupa_set_history): New function.
6147 (pupa_history_get): Likewise.
6148 (pupa_history_add): Likewise.
6149 (pupa_history_replace): Likewise.
6150 (pupa_tab_complete): Likewise.
6151 (pupa_cmdline_run): Added tab completion and history buffer. Tab
6152 completion shows partitionnames while completing partitions, this
6153 feature was suggested by Jeff Bailey.
6154 * normal/command.c (pupa_iterate_commands): New function.
6155 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
6156 (pupa_normal_init): Initialize history buffer.
6157 (PUPA_MOD_INIT): Likewise.
6158 (pupa_normal_fini): Free the history buffer.
6159 (PUPA_MOD_FINI): Likewise.
6161 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
6164 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
6165 * configure.ac [i386]: Check for regparam bug.
6166 (NESTED_FUNC_ATTR) [! i386]: Defined.
6168 2003-11-17 Marco Gerards <metgerards@student.han.nl>
6170 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
6171 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
6172 (pupa_emu_SOURCES): New variable.
6173 (pupa_emu_LDFLAGS): Likewise.
6174 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
6175 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
6176 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
6177 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
6178 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
6179 (pupa_jmp_buf): New typedef.
6180 (pupa_setjmp) [PUPA_UTIL]: New macro.
6181 (pupa_longjmp) [PUPA_UTIL]: Likewise.
6182 * include/pupa/term.h (struct pupa_term): New member `refresh'.
6183 (pupa_refresh): New prototype.
6184 * include/pupa/util/getroot.h: New file.
6185 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
6187 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
6188 (pupa_rescue_cmd_cat): Likewise.
6189 (pupa_rescue_cmd_ls): Likewise.
6190 (pupa_rescue_cmd_testload): Likewise.
6191 (pupa_rescue_cmd_lsmod): Likewise.
6192 * normal/cmdline.c (pupa_cmdline_get): Likewise.
6193 * normal/menu.c (run_menu): Likewise.
6194 * kern/term.c (pupa_cls): Likewise.
6195 (pupa_refresh): New function.
6196 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
6197 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
6198 * util/console.c: New file.
6200 * util/i386/pc/getroot.c: New file.
6201 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
6202 (pupa_putchar): New function.
6203 (pupa_refresh): Likewise.
6204 (xgetcwd): Function moved to ...
6205 (strip_extra_slashes): Likewise.
6206 (get_prefix): Likewise.
6207 * util/i386/pc/getroot.c: ... here.
6208 (find_root_device): Function moved and renamed to...
6209 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
6210 Changed all callers.
6211 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
6213 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
6214 Changed all callers.
6215 * util/misc.c (pupa_memalign): New function.
6216 (pupa_mm_init_region): Likewise.
6217 (pupa_register_exported_symbols): Likewise.
6218 (pupa_putchar): Function removed.
6219 * util/pupa-emu.c: New file.
6221 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
6223 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
6224 (_multiboot_mod_SOURCES): New variable.
6225 (_multiboot_mod_CFLAGS): Likewise.
6226 * loader/i386/pc/multiboot.c: New file.
6227 * include/pupa/i386/pc/multiboot.h: Likewise.
6228 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
6229 (pupa_multiboot_real_boot): New function.
6230 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
6231 (pupa_multiboot_real_boot): New prototype.
6232 (pupa_rescue_cmd_multiboot): Likewise
6233 (pupa_rescue_cmd_module): Likewise.
6235 * kern/loader.c (pupa_loader_set): Continue when
6236 pupa_loader_unload_func() fails.
6237 (pupa_loader_unset): New function.
6238 * include/pupa/loader.h (pupa_loader_unset): New prototype.
6240 * kern/misc.c (pupa_stpcpy): New function.
6241 * include/pupa/misc.h (pupa_stpcpy): New prototype.
6243 2003-11-12 Marco Gerards <metgerards@student.han.nl>
6245 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
6246 for available extensions.
6248 * include/pupa/i386/pc/time.h: New file.
6249 * kern/disk.c: Include <pupa/machine/time.h>.
6250 (PUPA_CACHE_TIMEOUT): New macro.
6251 (pupa_last_time): New variable.
6252 (pupa_disk_open): Flush the cache when there was a timeout.
6253 (pupa_disk_close): Reset the timer.
6254 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
6256 * util/misc.c: Include <sys/times.h>
6257 (pupa_get_rtc): New function.
6259 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6261 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
6263 (pupa_ext2_get_file_block): Use blocks member.
6265 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
6266 first block. Return -1 instead of pupa_errno on error.
6268 2003-10-27 Marco Gerards <metgerards@student.han.nl>
6270 * README: In the pupa-mkimage example use _chain instead of chain
6271 and ext2 instead of fat.
6272 * TODO: Replace ext2fs with jfs as an example. Add an item for
6273 adding journal playback for ext2fs.
6274 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
6275 (pkgdata_MODULES): Added ext2.mod.
6276 (ext2_mod_SOURCES): New variable.
6277 (ext2_mod_CFLAGS): Likewise.
6278 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
6279 * include/pupa/misc.h (pupa_strncpy): New prototype.
6280 (pupa_strcat): Likewise.
6281 (pupa_strncmp): Likewise.
6282 * kern/misc.c (pupa_strcat): Enable function.
6283 (pupa_strncpy): New function.
6284 (pupa_strncmp): Likewise.
6285 * fs/ext2.c: New file.
6287 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
6288 when the read failed before retrying.
6289 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
6290 (_FILE_OFFSET_BITS): Likewise.
6291 * configure.ac: Added AC_SYS_LARGEFILE.
6293 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
6295 * genmk.rb (PModule#rule): Make sure to get only symbol names
6296 from the output of nm.
6297 Reported by Robert Millan <zeratul2@wanadoo.es>.
6299 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
6301 I forgot to check in these changes for a long time. This adds
6302 incomplete support for VGA console, and this is still very
6303 buggy. Also, a lot of consideration is required for I18N,
6304 UNICODE, and VGA font issues. Therefore, assume that this is
6305 such that "better than nothing".
6307 * font/manager.c: New file.
6308 * include/pupa/font.h: Likewise.
6309 * include/pupa/i386/pc/vga.h: Likewise.
6310 * term/i386/pc/vga.c: Likewise.
6311 * util/unifont2pff.rb: Likewise.
6313 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
6314 (pkgdata_MODULES): Added vga.mod and font.mod.
6315 (vga_mod_SOURCES): New variables.
6316 (vga_mod_CFLAGS): Likewise.
6317 (font_mod_SOURCES): Likewise.
6318 (font_mod_CFLAGS): Likewise.
6320 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
6322 * include/pupa/term.h: Include pupa/err.h.
6323 (struct pupa_term): Added init and fini.
6324 Changed the argument of putchar to pupa_uint32_t.
6326 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
6327 (pupa_console_real_putchar): New prototype.
6328 (pupa_console_putchar): Removed.
6329 (pupa_console_checkkey): Exported.
6330 (pupa_console_getkey): Likewise.
6332 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
6335 * kern/term.c (pupa_term_set_current): Rewritten.
6336 (pupa_putchar): Likewise.
6337 (pupa_putcode): New function.
6339 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
6340 (pupa_console_real_putchar): ... this.
6341 (pupa_vga_set_mode): New function.
6342 (pupa_vga_get_font): Likewise.
6344 * normal/command.c: Include pupa/term.h.
6345 (terminal_command): New function.
6346 (pupa_command_init): Register the command "terminal".
6348 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
6349 (DISP_UP): Likewise.
6350 (DISP_RIGHT): Likewise.
6351 (DISP_DOWN): Likewise.
6352 (DISP_HLINE): Likewise.
6353 (DISP_VLINE): Likewise.
6354 (DISP_UL): Likewise.
6355 (DISP_UR): Likewise.
6356 (DISP_LL): Likewise.
6357 (DISP_LR): Likewise.
6359 * term/i386/pc/console.c (pupa_console_putchar): New function.
6361 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
6363 * util/resolve.c (pupa_util_resolve_dependencies): BUG
6364 FIX. Reverse the path_list.
6366 * include/pupa/normal.h: Export pupa_register_command and
6367 pupa_unregister_command.
6369 * hello/hello.c (pupa_cmd_hello): New module.
6370 * conf/i386-pc.rmk: Added hello.mod.
6372 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
6374 * kern/i386/pc/lzo1x.S: New file.
6376 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
6377 (compress_kernel): New variable.
6378 (generate_image): Heavily modified to support compressing a
6379 large part of the core image.
6381 * util/misc.c (pupa_util_read_image): Fix a file descriptor
6383 (pupa_util_load_image): New function.
6385 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
6386 (pupa_compressed_size): New variable.
6387 (codestart): Enable Gate A20 here.
6388 Decompress the compressed part of the core image.
6389 Rearrange the code to put functions and variables which are
6390 required for initialization in the non-compressed part.
6393 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
6396 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
6398 * include/pupa/i386/pc/kernel.h
6399 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
6400 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
6401 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
6402 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
6403 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
6405 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
6407 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
6408 (Utility#rule): Likewise.
6410 * configure.ac: Check if LZO is available.
6412 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
6414 * include/pupa/normal.h: New file.
6415 * include/pupa/setjmp.h: Likewise.
6416 * include/pupa/i386/setjmp.h: Likewise.
6417 * normal/cmdline.c: Likewise.
6418 * normal/command.c: Likewise.
6419 * normal/main.c: Likewise.
6420 * normal/menu.c: Likewise.
6421 * normal/i386/setjmp.S: Likewise.
6423 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
6424 (pupa_rescue_cmd_initrd): Likewise.
6426 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
6429 * kern/i386/pc/startup.S (translation_table): New variable.
6430 (translate_keycode): New function.
6431 (pupa_console_getkey): Call translate_keycode.
6433 * kern/rescue.c (attempt_normal_mode): New function.
6434 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
6435 it failed, print a message.
6437 * kern/mm.c (pupa_real_malloc): Print more information when a
6438 free magic is broken.
6439 (pupa_free): If the first free header is not free actually, set
6442 * kern/main.c (pupa_load_normal_mode): Just load the module
6444 (pupa_main): Don't print the message
6445 "Entering into rescue mode..." here.
6447 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
6449 (pupa_rescue_cmd_initrd): Likewise.
6450 (pupa_rescue_cmd_initrd): Likewise.
6452 * include/pupa/symbol.h (FUNCTION): Specify the type.
6453 (VARIABLE): Likewise.
6455 * include/pupa/err.h (pupa_err_t): Added
6456 PUPA_ERR_UNKNOWN_COMMAND.
6458 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
6459 (pupa_dl_get_prefix): Likewise.
6461 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
6462 Added _chain.mod and _linux.mod instead of chain.mod and
6464 (chain_mod_SOURCES): Renamed to ...
6465 (_chain_mod_SOURCES): ... this.
6466 (chain_mod_CFLAGS): Renamed to ...
6467 (_chain_mod_CFLAGS): ... this.
6468 (linux_mod_SOURCES): Renamed to ...
6469 (_linux_mod_SOURCES): ... this.
6470 (linux_mod_CFLAGS): Renamed to ...
6471 (_linux_mod_CFLAGS): ... this.
6472 (normal_mod_SOURCES): New variable.
6473 (normal_mod_CFLAGS): Likewise.
6474 (normal_mod_ASFLAGS): Likewise.
6476 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
6478 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
6481 * kern/dl.c (pupa_dl_ref): Refer dependending modules
6483 (pupa_dl_unref): Unrefer depending modules recursively.
6484 Don't call pupa_dl_unload implicitly, because PUPA can crash if
6485 a module is unloaded before one depending on that module is
6487 (pupa_dl_unload): Unload depending modules explicitly,
6490 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
6492 * include/pupa/i386/pc/linux.h: New file.
6493 * loader/i386/pc/linux.c: Likewise.
6495 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
6497 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
6498 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
6499 of PUPA_CHAINLOADER_BOOT_SECTOR.
6501 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
6502 (pupa_linux_prot_size): New variable.
6503 (pupa_linux_tmp_addr): Likewise.
6504 (pupa_linux_real_addr): Likewise.
6505 (pupa_linux_boot_zimage): New function.
6506 (pupa_linux_boot_bzimage): Likewise.
6508 * kern/i386/pc/init.c (struct mem_region): New structure.
6509 (MAX_REGIONS): New macro.
6510 (mem_regions): New variable.
6511 (num_regions): Likewise.
6512 (pupa_os_area_addr): Likewise.
6513 (pupa_os_area_size): Likewise.
6514 (pupa_lower_mem): Likewise.
6515 (pupa_upper_mem): Likewise.
6516 (add_mem_region): New function.
6517 (compact_mem_regions): Likewise.
6518 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
6519 the size of the conventional memory and that of so-called upper
6520 memory (before the first memory hole).
6521 Instead of adding each found region to free memory, use
6522 add_mem_region and add them after removing overlaps.
6523 Also, add only 1/4 of the upper memory to free memory. The rest
6524 is used for loading OS images. Maybe this is ad hoc, but this
6525 makes it much easier to relocate OS images when booting.
6527 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
6528 (pupa_enter_rescue_mode): Don't register initrd and module.
6530 * kern/mm.c: Include pupa/dl.h.
6532 * kern/main.c: Include pupa/file.h and pupa/device.h.
6534 * kern/loader.c (pupa_loader_load_module_func): Removed.
6535 (pupa_loader_load_module): Likewise.
6537 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
6540 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
6541 (pupa_linux_tmp_addr): Likewise.
6542 (pupa_linux_real_addr): Likewise.
6543 (pupa_linux_boot_zimage): Likewise.
6544 (pupa_linux_boot_bzimage): Likewise.
6546 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
6547 (pupa_upper_mem): Likewise.
6548 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
6549 module is too dangerous.
6551 * include/pupa/loader.h (pupa_os_area_addr): Declared.
6552 (pupa_os_area_size): Likewise.
6553 (pupa_loader_set): Remove the first argument. Loader doesn't
6554 manage modules or initrd any longer.
6555 (pupa_loader_load_module): Removed.
6557 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
6558 (linux_mod_SOURCES): New variable.
6559 (linux_mod_CFLAGS): Likewise.
6561 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
6563 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
6564 the length of a blocklist correctly.
6566 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
6567 Use ioctl only if the OS file is a block device.
6568 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
6569 not very useful for normal files.
6571 * kern/main.c (pupa_set_root_dev): New function.
6572 (pupa_load_normal_mode): Likewise.
6573 (pupa_main): Call those above.
6575 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
6578 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
6580 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6582 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
6583 (setup): Configure the installed partition information and the
6586 * loader/i386/pc/chainloader.c (my_mod): New variable.
6587 (pupa_chainloader_unload): New function.
6588 (pupa_rescue_cmd_chainloader): Refer itself.
6589 (PUPA_MOD_INIT): Save its own module in MY_MOD.
6591 * kern/i386/pc/startup.S (install_partition): Removed.
6592 (version_string): Likewise.
6593 (config_file): Likewise.
6594 (pupa_install_dos_part): New variable.
6595 (pupa_install_bsd_part): Likewise.
6596 (pupa_prefix): Likewise.
6597 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
6599 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
6601 (make_install_device): New function.
6602 (pupa_machine_init): Set the dl prefix.
6604 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
6605 (buf): Renamed to ...
6606 (linebuf): ... this.
6607 (pupa_rescue_cmd_prefix): New function.
6608 (pupa_rescue_cmd_insmod): Likewise.
6609 (pupa_rescue_cmd_rmmod): Likewise.
6610 (pupa_rescue_cmd_lsmod): Likewise.
6611 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
6614 * kern/mm.c (pupa_memalign): If failed even after invalidating
6615 disk caches, unload unneeded modules and retry.
6617 * kern/misc.c (pupa_memmove): New function.
6618 (pupa_memcpy): Removed.
6619 (pupa_strcpy): New function.
6620 (pupa_itoa): Made static.
6622 * kern/dl.c (pupa_dl_iterate): New function.
6623 (pupa_dl_ref): Likewise.
6624 (pupa_dl_unref): Likewise.
6625 (pupa_dl_unload): Return if succeeded or not.
6626 (pupa_dl_unload_unneeded): New function.
6627 (pupa_dl_unload_all): Likewise.
6628 (pupa_dl_init): Renamed to ...
6629 (pupa_dl_set_prefix): ... this.
6630 (pupa_dl_get_prefix): New function.
6632 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
6633 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
6634 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
6635 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
6636 (pupa_install_dos_part): Declared.
6637 (pupa_install_bsd_part): Likewise.
6638 (pupa_prefix): Likewise.
6639 (pupa_boot_drive): Likewise.
6641 * include/pupa/types.h: Fix a typo.
6643 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
6645 (pupa_memmove): Declared.
6646 (pupa_strcpy): Likewise.
6648 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
6649 pupa_mod_init takes one argument, its own module.
6650 (pupa_dl_unload_unneeded): Declared.
6651 (pupa_dl_unload_all): Likewise.
6652 (pupa_dl_ref): Likewise.
6653 (pupa_dl_unref): Likewise.
6654 (pupa_dl_iterate): Likewise.
6655 (pupa_dl_init): Renamed to ...
6656 (pupa_dl_set_prefix): ... this.
6657 (pupa_dl_get_prefix): Declared.
6659 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
6660 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
6662 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
6663 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
6665 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
6666 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
6668 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
6670 * util/i386/pc/pupa-setup.c (setup): Define the internal
6671 function find_first_partition_start at the top level, because GCC
6672 3.0.x cannot compile internal functions in deeper scopes
6674 (find_root_device): Use lstat instead of stat.
6675 Don't follow symbolic links.
6676 Fix the path-constructing code.
6678 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
6679 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
6680 by a BLKGETSIZE ioctl first, because block devices don't fill
6681 the member st_mode of the structure stat on Linux.
6682 [__linux__] (linux_find_partition): Use a temporary buffer
6683 REAL_DEV for the working space. Copy it to DEV before returning.
6684 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
6685 buffer cache consistent.
6686 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
6687 strncmp. The previous value was merely wrong.
6688 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
6690 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
6691 FAT size is 12. The previous value was merely wrong.
6693 * kern/main.c (pupa_main): Don't split the starting message from
6696 * kern/term.c (pupa_putchar): Put CR after LF instead of before
6697 LF, because BIOS goes crazy about character attributes in this
6700 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
6702 * include/i386/pc/util/biosdisk.h: New file.
6703 * util/i386/pc/biosdisk.c: Likewise.
6704 * util/i386/pc/pupa-setup.c: Likewise.
6706 * Makefile.in (INCLUDE_DISTFILES): Added
6707 include/pupa/i386/pc/util/biosdisk.h.
6708 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
6709 directory util/i386/pc.
6710 (install-local): Added a rule for sbin_UTILITIES.
6711 (uninstall): Likewise.
6713 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
6715 * util/misc.c (xrealloc): New function.
6716 (pupa_malloc): Likewise.
6717 (pupa_free): Likewise.
6718 (pupa_realloc): Likewise.
6719 (pupa_stop): Likewise.
6720 (pupa_putchar): Likewise.
6722 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
6724 * include/pupa/util/misc.h (xrealloc): Declared.
6726 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
6728 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
6729 (PUPA_BOOT_MACHINE_BPB_END): ... this.
6731 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
6732 [PUPA_UTIL] (pupa_fat_fini): Likewise.
6734 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
6735 way should be implemented.
6736 [PUPA_UTIL] (pupa_fat_fini): Likewise.
6738 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
6739 the size of NAME for safety.
6740 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
6743 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
6744 (pupa_setup_SOURCES): Likewise.
6746 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
6748 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
6750 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
6751 bunch of pushl's from pusha, because this destroys the return
6754 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
6756 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
6757 This means that any missing prototypes could be fatal. Also, you
6758 must take care when writing assembly code. See the comments at
6759 the beginning of startup.S, for more details.
6761 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
6762 compilation mechanism.
6763 (pupa_chainloader_real_boot): Likewise.
6764 (pupa_biosdisk_rw_int13_extensions): Likewise.
6765 (pupa_biosdisk_rw_standard): Likewise.
6766 (pupa_biosdisk_check_int13_extensions): Likewise.
6767 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
6768 (pupa_biosdisk_get_diskinfo_standard): Likewise.
6769 (pupa_get_memsize): Likewise.
6770 (pupa_get_mmap_entry): Likewise.
6771 (pupa_console_putchar): Likewise.
6772 (pupa_console_setcursor): Likewise.
6773 (pupa_getrtsecs): Use pushl instead of push.
6775 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
6776 memory instead of the stack for a mmap entry, because some
6777 BIOSes may ignore the maximum size and overflow.
6779 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
6781 * genmk.rb (PModule#rule): Compile automatically generated
6782 sources with module-specific CFLAGS as well as other sources.
6784 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
6786 * configure.ac: Check ld.
6787 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
6788 respectively, before checking endianness and sizes.
6790 * Makefile.in (LD): New variable.
6792 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
6794 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
6796 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
6798 * Changelog: New file.