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