]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-01-20 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
3d7f54c9 12008-01-20 Robert Millan <rmh@aybabtu.com>
2
3 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4 grub_dprintf() calls from here ...
5 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6
0bf74728 72008-01-20 Robert Millan <rmh@aybabtu.com>
8
9 Fix detection of "real mode" when /options/real-mode? doesn't exist.
10
11 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
12 declaration.
13 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
14 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
15 `GRUB_IEEE1275_FLAG_REAL_MODE'.
16 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
17 property).
18 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
19 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
20
33bf70a7 212008-01-19 Robert Millan <rmh@aybabtu.com>
22
23 Get rid of confusing function (superceeded by
24 `grub_ieee1275_get_integer_property')
25 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
26 prototype.
27 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
28 function.
29 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
30 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
31 in native endianess from grub_ieee1275_get_integer_property().
32
e2da7d26 332008-01-19 Robert Millan <rmh@aybabtu.com>
34
35 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
36 command after "shut-down", since implementations differ on which
37 the command for halt is.
38
59f1fd8d 392008-01-19 Robert Millan <rmh@aybabtu.com>
40
41 * include/grub/i386/linuxbios/console.h: Add header protection.
42 (grub_keyboard_controller_init): New function prototype.
43 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
44 (KEYBOARD_COMMAND_READ): Likewise.
45 (KEYBOARD_COMMAND_WRITE): Likewise.
46 (KEYBOARD_SCANCODE_SET1): Likewise.
47 (grub_keyboard_controller_write): New function.
48 (grub_keyboard_controller_read): Likewise.
49 (grub_keyboard_controller_init): Likewise.
50
51 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
52 (grub_console_init): On coreboot/LinuxBIOS, call
53 grub_keyboard_controller_init().
54
5f5a7c15 552008-01-19 Robert Millan <rmh@aybabtu.com>
56
57 PowerPC changes provided by Pavel Roskin.
58
59 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
60 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
61 don't rely on cmain() doing it.
62 * kern/i386/ieee1275/startup.S (_start): Store %eax in
63 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
64
1210e168 652008-01-16 Robert Millan <rmh@aybabtu.com>
66
67 * include/grub/i386/linuxbios/memory.h
68 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
69 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
70 receive `table_header' as argument. Instead, probe for it in the
71 known memory ranges where it can be present.
72 (grub_available_iterate): Do not pass a fixed `table_header' address
73 to grub_linuxbios_table_iterate().
74
3d04eab8 752008-01-15 Robert Millan <rmh@aybabtu.com>
76
77 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
78 * conf/i386-ieee1275.rmk: New file.
79 * include/grub/i386/ieee1275/console.h: Likewise.
80 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
81 * include/grub/i386/ieee1275/kernel.h: Likewise.
82 * include/grub/i386/ieee1275/time.h: Likewise.
83 * kern/i386/ieee1275/init.c: Likewise.
84 * kern/i386/ieee1275/startup.S: Likewise.
85
d1bc1b73 862008-01-15 Robert Millan <rmh@aybabtu.com>
87
88 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
89 when pointers are 32-bit (but still do set it to one when they are
90 64-bit).
91
66a65807 922008-01-15 Robert Millan <rmh@aybabtu.com>
93
94 * include/grub/ieee1275/ieee1275.h
95 (grub_ieee1275_get_integer_property): New function prototype.
96
97 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
98 (grub_ieee1275_get_integer_property): New function. Wraps around
99 grub_ieee1275_get_property() to handle endianess.
100
101 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
102 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
103 where appropiate.
104 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
105 (grub_map): Likewise.
106 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
107
a83ccafd 1082008-01-15 Bean <bean123ch@gmail.com>
109
110 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
111 (grub_script_execute_cmdline): Reset grub_errno.
112
113 * normal/main.c (read_config_file): Reset grub_errno.
114
115 * normal/parse.y (script_init): New.
116 (script): Move function and menuentry here.
117 (delimiter): New.
118 (command): Add delimiter at the end of command.
119 (commands): Adjust to match the new command.
120 (commandblock): Remove grub_script_lexer_record_start.
121 (menuentry): Add grub_script_lexer_record_start, use the new commands.
122 (if): Use the new commands.
123
124 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
125
df6ecfc6 1262008-01-15 Robert Millan <rmh@aybabtu.com>
127
128 * normal/menu.c (run_menu): Move timeout message from here ...
129 (print_timeout): ... to here.
130 (run_menu): Use print_timeout() once during initial draw to print
131 the whole message, and again in every clock tick to update only
132 the number of seconds.
133
87ae25eb 1342008-01-15 Robert Millan <rmh@aybabtu.com>
135
136 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
137 actual size of `available' from grub_ieee1275_get_property(), and
138 restrict parsing to that bound.
139
47bf09a4 1402008-01-15 Christian Franke <franke@computer.org>
141
142 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
143 (argp_program_version): Remove variable.
144 (argp_program_bug_address): Likewise.
145 (options): Convert from struct argp_option to struct option.
146 (struct arguments): Remove.
147 (parse_opt): Remove.
148 (usage): New function.
149 (main): Replace struct args members by simple variables.
150 Replace argp_parse() by getopt_long().
151 Add switch to evaluate options.
152 Add missing "(...)" around root_dev in prefix string.
153
c86f1469 1542008-01-14 Robert Millan <rmh@aybabtu.com>
155
156 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
157 for grub_ieee1275_exit(), in order to improve portability.
158
e622c559 1592008-01-14 Robert Millan <rmh@aybabtu.com>
160
161 * util/grub.d/10_linux.in (prefix): Define.
162 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
163
44cb1ec8 1642008-01-13 Pavel Roskin <proski@gnu.org>
165
166 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
167 grub_errno if no errors have been detected.
168
1eb8c802 1692008-01-12 Robert Millan <rmh@aybabtu.com>
170
171 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
172 (grub_util_get_dev_abstraction): New function prototype.
173
174 * util/getroot.c: Include `<grub/util/getroot.h>'
175 (grub_util_get_grub_dev): Move detection of abstraction type to ...
176 (grub_util_get_dev_abstraction): ... here (new function).
177
178 * util/grub-probe.c: Convert PRINT_* to an enum. Add
179 `PRINT_ABSTRACTION'.
180 (probe): Probe for abstraction type when requested.
181 (main): Understand `--target=abstraction'.
182
183 * util/i386/efi/grub-install.in: Add abstraction module to core
184 image when it is found to be necessary.
185 * util/i386/pc/grub-install.in: Likewise.
186 * util/powerpc/ieee1275/grub-install.in: Likewise.
187
188 * util/update-grub_lib.in (font_path): Return system path without
189 converting to GRUB path.
190 * util/update-grub.in: Convert system path returned by font_path()
191 to a GRUB path. Use `grub-probe -t abstraction' to determine what
192 abstraction module is needed for loading fonts (if any). Export
193 that as `GRUB_PRELOAD_MODULES'.
194 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
195 insmod commands).
196
52bd3de9 1972008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
198
199 Remove some unused code from reiserfs.
200
201 * fs/reiserfs.c (struct grub_reiserfs_key)
202 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
203 (struct grub_reiserfs_node_body): Removed.
204 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
205 Likewise.
206 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
207 Likewise.
208 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
209 Likewise.
210 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
211 Likewise.
212 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
213 Likewise.
214 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
215 Likewise.
216 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
217 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
218 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
219
2f80039d 2202008-01-10 Robert Millan <rmh@aybabtu.com>
221
222 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
223 Determines if a file is garbage left by packaging systems, etc.
224 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
225 for processing /etc/grub.d scripts.
226 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
227 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
228 as a condition for processing Linux images.
229
87888032 2302008-01-10 Pavel Roskin <proski@gnu.org>
231
232 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
233 to compile reiserfs.c on PowerPC.
234
7e54fced 2352008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 236
237 * kern/device.c (grub_device_iterate): Do not abort device iteration
238 when one of the devices cannot be opened.
239 * kern/disk.c (grub_disk_open): Do not account previous failures of
240 unrelated functions when grub_errno is checked for.
241
5aa541e6 2422008-01-08 Robert Millan <rmh@aybabtu.com>
243
244 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
245 `! grub_linux_is_bzimage', change order of address comparison to make
246 it more intuitive, and improve "too big zImage" error message.
247
7076340d 2482008-01-08 Robert Millan <rmh@aybabtu.com>
249
250 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
251 `$(update-grub_DATA)'.
252 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
253 targets.
254
9ca70333 2552008-01-07 Robert Millan <rmh@aybabtu.com>
256
257 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
258 which instruction is modified by grub-setup during installation
259 (since it wasn't obvious by only looking at this file).
260
38ccf575 2612008-01-07 Robert Millan <rmh@aybabtu.com>
262
263 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
264 listing actual TODO items.
265
f5db4291 2662008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
267
868967cf 268 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
269 correctly.
270 (grub_reiserfs_get_key_offset): Likewise.
271 (grub_reiserfs_set_key_offset): Likewise.
272 (grub_reiserfs_set_key_type): Likewise.
273 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
274
275 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
276 better to remove the bitfield version completely.
277
2782008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
279
f5db4291 280 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
281 allocated from the heap, due to the fshelp implementation.
282 (grub_reiserfs_dir): Free NODE, due to the same reason.
283
492e6d9d 2842008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
285
286 Mostly from Vincent Pelletier:
287
288 * fs/reiserfs.c: New file.
289
290 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
291 (reiserfs_mod_SOURCES): New variable.
292 (reiserfs_mod_CFLAGS): Likewise.
293 (reiserfs_mod_LDFLAGS): Likewise.
294
295 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
296 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
297 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
298 normal/color.c.
299
9ce3e7c1 3002008-01-06 Robert Millan <rmh@aybabtu.com>
301
302 * normal/color.c: Remove `<grub/env.h>'.
303
f3b58148 3042008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
305
306 * include/grub/normal.h: Include <grub/env.h>.
307
7ac3bcfa 3082008-01-05 Robert Millan <rmh@aybabtu.com>
309
310 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
311 usage example with `(hd0,1)'.
fb358190 312 Reported by Samuel Thibault.
7ac3bcfa 313
c8ee99d7 3142008-01-05 Robert Millan <rmh@aybabtu.com>
315
316 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
317 (grub_linux_boot_zimage): Rename to ...
318 (grub_linux_boot): ... this.
319 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
320 (grub_linux_boot_zimage): Conditionalize zImage copy.
321
322 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
323 (grub_linux_boot_bzimage): Remove prototype.
324 (grub_linux_boot_zimage): Rename to ...
325 (grub_linux_boot): ... this.
326
327 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
328 (grub_linux_boot): Remove function.
329
0ece25b1 3302008-01-05 Robert Millan <rmh@aybabtu.com>
331
332 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
333 (grub_env_write_color_highlight): Likewise.
334 (grub_wait_after_message): Likewise.
335
336 * normal/color.c: New file.
337
338 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
339 (normal_mod_DEPENDENCIES): Likewise.
340
341 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
342 (normal_mod_DEPENDENCIES): Likewise.
343
344 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
345 (normal_mod_DEPENDENCIES): Likewise.
346
347 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
348 (normal_mod_DEPENDENCIES): Likewise.
349
350 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
351 for waiting after a message is printed.
352 * normal/main.c (read_config_file): Likewise.
353 (grub_normal_init): Register grub_env_write_color_normal() and
354 grub_env_write_color_highlight() hooks. Mark `color_normal' and
355 `color_highlight' variables as global.
356
357 * normal/menu.c (grub_wait_after_message): New function.
358 (grub_color_menu_normal): New variable. Replaces ...
359 (GRUB_COLOR_MENU_NORMAL): ... this macro.
360 (grub_color_menu_highlight): New variable. Replaces ...
361 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
362 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
363 `GRUB_TERM_COLOR_STANDARD'.
364 (print_message): Use `grub_setcolorstate' to reload colors. Rename
365 `normal_code' and `highlight_code' to `old_color_normal' and
366 `old_color_highlight', respectively.
367 (grub_menu_init_page): Update colors when drawing the menu, based on
368 `menu_color_normal' and `menu_color_highlight' variables.
369 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
370 a message is printed.
371
182dd4e5 3722008-01-05 Robert Millan <rmh@aybabtu.com>
373
374 * kern/env.c (grub_env_context_open): Propagate hooks for global
375 variables to new context.
376
377 * kern/main.c (grub_set_root_dev): Export `root' variable.
378
ddf8f6ad 3792008-01-05 Robert Millan <rmh@aybabtu.com>
380
381 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
382 discs unconditionaly, since udev and others have options to provide
383 them.
384
d8b43d9b 3852008-01-05 Robert Millan <rmh@aybabtu.com>
386
387 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
388
2bff2de3 3892008-01-04 Christian Franke <franke@computer.org>
390
391 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
392 of eisa_mmap.
393
97eab917 3942008-01-03 Pavel Roskin <proski@gnu.org>
395
396 * kern/i386/linuxbios/init.c: Put "void" to all function
397 declarations with no arguments.
398 * kern/powerpc/ieee1275/init.c: Likewise.
399 * term/i386/pc/at_keyboard.c: Likewise.
400 * term/i386/pc/vga_text.c: Likewise.
401 * util/grub-mkdevicemap.c: Likewise.
402
b9416d00 4032008-01-02 Robert Millan <rmh@aybabtu.com>
404
405 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
406 message when loaded image is out of bounds.
407 (grub_multiboot_load_elf64): Likewise.
408
92695df9 4092008-01-02 Pavel Roskin <proski@gnu.org>
410
411 * util/grub.d/10_linux.in: Try version without ".old" when
412 looking for initrd. It's better to use initrd from the newer
413 kernel of the same version than no initrd at all.
414
d98d9cad 4152008-01-01 Robert Millan <rmh@aybabtu.com>
416
417 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
418
dbfdce36 4192008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
420
421 * include/grub/video.h: Added grub_video_unmap_color and
422 grub_video_get_active_render_target.
423 (grub_video_adapter): Added unmap_color and get_active_render_target.
424
425 * video/video.c: Added grub_video_unmap_color and
426 grub_video_get_active_render_target.
427 (grub_video_get_info): Changed method to accept NULL pointer as an
428 argument to allow detection of active video adapter.
429
430 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
431 grub_video_vbe_unmap_color_int.
432 Added grub_video_vbe_unmap_color and
433 grub_video_vbe_get_active_render_target.
434 (grub_video_vbe_adapter): Added unmap_color and
435 get_active_render_target.
436
437 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
438 with grub_video_vbe_unmap_color_int.
439
440 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
441 (DEFAULT_NORMAL_COLOR): Likewise.
442 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
443 (DEFAULT_FG_COLOR): Removed.
444 (DEFAULT_BG_COLOR): Likewise.
445 (DEFAULT_CURSOR_COLOR): Changed value.
446 (grub_virtual_screen): Added standard_color_setting,
447 normal_color_setting, highlight_color_setting and term_color.
448 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
449 (bitmap_width): Added.
450 (bitmap_height): Likewise.
451 (bitmap): Likewise.
452 (set_term_color): Likewise.
453 (grub_virtual_screen_setup): Changed to use new terminal coloring
454 settings.
455 (grub_gfxterm_init): Added init for bitmap.
456 (grub_gfxterm_fini): Added destroy for bitmap.
457 (redraw_screen_rect): Updated to use background bitmap and new
458 terminal coloring.
459 (scroll_up): Added optimization for case when there is no bitmap.
460 (grub_gfxterm_cls): Fixed to use correct background color.
461 (grub_virtual_screen_setcolorstate): Changed to use new terminal
462 coloring.
463 (grub_virtual_screen_setcolor): Likewise.
464 (grub_virtual_screen_getcolor): Added.
465 (grub_gfxterm_background_image_cmd): Likewise.
466 (grub_video_term): Added setcolor and getcolor.
467 (MOD_INIT): Added registration of background_image command.
468 (MOD_TERM): Added unregistration for background_image command.
469
c3c20931 4702007-12-30 Pavel Roskin <proski@gnu.org>
471
472 * loader/multiboot_loader.c: Fix multiboot command
473 unregistration. Fix all typos in the word "multiboot".
474
df266716 4752007-12-29 Pavel Roskin <proski@gnu.org>
94239199 476
477 * util/grub.d/10_linux.in: Refactor search for initrd. Add
478 support for initrd names used in Fedora.
479
fc6e896c 4802007-12-26 Bean <bean123ch@gmail.com>
481
482 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
483 (cpio_mod_SOURCES): New variable.
484 (cpio_mod_CFLAGS): Likewise.
485 (cpio_mod_LDFLAGS): Likewise.
486
487 * fs/cpio.c: New file.
488
489 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
490
491 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
492
493 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
494
495 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
496
533110ad 4972007-12-25 Robert Millan <rmh@aybabtu.com>
498
499 * include/grub/term.h (struct grub_term): Add `getcolor' function.
500 (grub_getcolor): New function.
501
502 * kern/term.c (grub_getcolor): New function.
503 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
504 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
505 (print_entry): Set normal and highlight colors to
506 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
507 respectively, before printing and restore them to old
508 values afterwards.
509 (grub_menu_init_page): Likewise. Fill an additional colored space
510 that would otherwise be left blank.
511
512 * term/efi/console.c (grub_console_getcolor): New function.
513 (struct grub_console_term.getcolor): New variable.
514 * term/i386/pc/console.c (grub_console_getcolor): New function.
515 (struct grub_console_term.getcolor): New variable.
516 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
517 (struct grub_console_term.getcolor): New variable.
518
519 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
520 (struct grub_console_term.setcolor): Remove variable.
521 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
522 (struct grub_console_term.setcolor): Remove variable.
523 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
524 (struct grub_console_term.setcolor): Remove variable.
525 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
526 (struct grub_console_term.setcolor): Remove variable.
527
4931827f 5282007-12-25 Robert Millan <rmh@aybabtu.com>
529
530 * configure.ac: Search for possible unifont.hex locations, and
531 define UNIFONT_HEX if found.
532
533 * Makefile.in (UNIFONT_HEX): Define variable.
534 (DATA): Rename to ...
535 (PKGLIB): ... this. Update all users.
536 (PKGDATA): New variable.
537 (pkgdata_IMAGES): Rename to ...
538 (pkglib_IMAGES): ... this. Update all users.
539 (pkgdata_MODULES): Rename to ...
540 (pkglib_MODULES): ... this. Update all users.
541 (pkgdata_PROGRAMS): Rename to ...
542 (pkglib_PROGRAMS): ... this. Update all users.
543 (pkgdata_DATA): Rename to ...
544 (pkglib_DATA): ... this. Update all users.
545 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
546 (unicode.pff, ascii.pff): New rules.
547 (all-local): Add `$(PKGDATA)' dependency.
548 (install-local): Process `$(PKGDATA)'.
549
550 * util/update-grub_lib.in (font_path): Search for *.pff files in
551 a few more locations, including `${pkgdata}'.
552
57e57e31 5532007-12-23 Robert Millan <rmh@aybabtu.com>
554
555 Patch from Bean <bean123ch@gmail.com>:
556 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
557 `size'.
558
4bc72aa9 5592007-12-21 Bean <bean123ch@gmail.com>
560
561 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
562 (ntfscomp_mod_SOURCES): New variable.
563 (ntfscomp_mod_CFLAGS): Likewise.
564 (ntfscomp_mod_LDFLAGS): Likewise.
565
566 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
567 (grub_probe_SOURCES): Likewise.
568 (grub_emu_SOURCES): Likewise.
569
570 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
571 (grub_emu_SOURCES): Likewise.
572
573 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
574 (grub_emu_SOURCES): Likewise.
575
576 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
577 (grub_emu_SOURCES): Likewise.
578
579 * fs/ntfs.c (grub_ntfscomp_func): New variable.
580 (read_run_list): Renamed to grub_ntfs_read_run_list.
581 (decomp_nextvcn): Moved to ntfscomp.c.
582 (decomp_getch): Likewise.
583 (decomp_get16): Likewise.
584 (decomp_block): Likewise.
585 (read_block): Likewise.
586 (read_data): Partially moved to ntfscomp.c.
587 (fixup): Change unsigned to grub_uint16_t.
588 (read_mft): Change unsigned long to grub_uint32_t.
589 (read_attr): Likewise.
590 (read_data): Likewise.
591 (read_run_data): Likewise.
592 (read_run_list): Likewise.
593 (read_mft): Likewise.
594
595 * fs/ntfscomp.c: New file.
596
597 * include/grub/ntfs.h: New file.
598
af680a87 5992007-12-16 Robert Millan <rmh@aybabtu.com>
600
601 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
602 IDE disk check, since Linux is known to support 20 IDE disks.
603 Reported by Colin Watson.
604
84be7599 6052007-12-15 Bean <bean123ch@gmail.com>
606
607 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
608 (lnxboot_img_SOURCES): New variable.
609 (lnxboot_img_ASFLAGS): Likewise.
610 (lnxboot_img_LDFLAGS): Likewise.
611
612 * boot/i386/pc/lnxboot.S: New file.
613
6af9db01 6142007-11-24 Pavel Roskin <proski@gnu.org>
615
616 * configure.ac: Test if '--build-id=none' is supported by the
617 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
618 objcopy to generate incorrect binary files (binutils
619 2.17.50.0.18-1 as shipped by Fedora 8).
620 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
621 linking, so that build ID doesn't break the test.
622
7361cfe6 6232007-11-24 Pavel Roskin <proski@gnu.org>
624
625 * include/grub/i386/time.h: use "void" in the argument list
626 of grub_cpu_idle().
627 * include/grub/powerpc/time.h: Likewise.
628 * include/grub/sparc64/time.h: Likewise.
629
1593e10c 6302007-11-18 Christian Franke <franke@computer.org>
631
632 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
633 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
634 This fixes the problem that function keys did not work in grub-emu.
635
3b8db1a8 6362007-11-18 Christian Franke <franke@computer.org>
637
638 * disk/host.c (grub_host_open): Remove attribute unused from
639 name parameter. Add check for "host". This fixes the problem
640 that grub-emu does not find partitions.
641
2e29408d 6422007-11-18 Christian Franke <franke@computer.org>
643
644 * util/hostfs.c (is_dir): New function.
645 (grub_hostfs_dir): Handle missing dirent.d_type case.
646 (grub_hostfs_read): Add missing fseek().
647 (grub_hostfs_label): Clear label pointer. This fixes a crash
648 of grub-emu on "ls (host)".
649
398cd047 6502007-11-18 Christian Franke <franke@computer.org>
651
652 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
653 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
654 to 64 bit boundary by default.
655
c405c391 6562007-11-18 Bean <bean123ch@gmail.com>
657
658 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
659 (hexdump_mod_SOURCES): New variable.
660 (hexdump_mod_CFLAGS): Likewise.
661 (hexdump_mod_LDFLAGS): Likewise.
662
663 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
664
665 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
666
667 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
668
669 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
670
671 * include/grub/hexdump.h: New file.
672
673 * commands/hexdump.c: New file.
674
5cced7fd 6752007-11-10 Robert Millan <rmh@aybabtu.com>
676
677 * commands/i386/pc/play.c (beep_off): Switch order of arguments
678 in grub_outb() calls.
679 (beep_on): Likewise.
680
8b714eb0 6812007-11-10 Christian Franke <franke@computer.org>
682
683 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
684 (grub_menu_run): Likewise.
685
ce0f1839 6862007-11-10 Robert Millan <rmh@aybabtu.com>
687
688 * include/grub/i386/efi/machine.h: New file.
689 * include/grub/i386/linuxbios/machine.h: Likewise.
690 * include/grub/i386/pc/machine.h: Likewise.
691 * include/grub/powerpc/ieee1275/machine.h: Likewise.
692 * include/grub/sparc64/ieee1275/machine.h: Likewise.
693
694 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
695 (serial_hw_io_addr): New variable.
696 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
697 instead of `(unsigned short *) 0x400'.
698
270c237d 6992007-11-10 Bean <bean123ch@gmail.com>
700
701 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
702
a87783bf 7032007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
704
705 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
706 (vga_mod_SOURCES): Added.
707 (vga_mod_CFLAGS): Likewise.
708 (vga_mod_LDFLAGS): Likewise.
709
710 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
711 grub_outb() calls.
712 (set_map_mask): Likewise.
713 (set_read_map): Likewise.
714 (set_read_address): Likewise.
715 (vga_font): Removed variable.
716 (get_vga_glyph): Removed function.
717 (invalidate_char): Likewise.
718 (write_char): Changed to use grub_font_get_glyph() for font
719 information.
720 (grub_vga_putchar): Likewise.
721 (grub_vga_getcharwidth): Likewise.
722
6433b448 7232007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
724
725 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
726 flags.
727 (pxeboot_img_LDFLAGS): Likewise.
728 (diskboot_img_LDFLAGS): Likewise.
729 (kernel_img_LDFLAGS): Likewise.
730
49178511 7312007-11-06 Robert Millan <rmh@aybabtu.com>
732
733 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
734 in grub_outb() calls.
735 (serial_hw_init): Likewise.
736
53b052de 7372007-11-05 Robert Millan <rmh@aybabtu.com>
738
739 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
740 spaces. Skip non-regular files.
741
5ab33bba 7422007-11-05 Robert Millan <rmh@aybabtu.com>
743
744 * kern/disk.c (grub_disk_firmware_fini)
745 (grub_disk_firmware_is_tainted): New variables.
746
747 * include/grub/disk.h (grub_disk_firmware_fini)
748 (grub_disk_firmware_is_tainted): Likewise.
749
750 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
751 (grub_disk_biosdisk_fini): ... to here.
752 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
753 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
754 is set. Register grub_disk_biosdisk_fini() in
755 `grub_disk_firmware_fini'.
756
757 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
758 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
759 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
760 to finish existing firmware disk interface.
761
762 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
763 (ata_mod_SOURCES): New variable.
764 (ata_mod_CFLAGS): Likewise.
765 (ata_mod_LDFLAGS): Likewise.
766
0149ab7c 7672007-11-05 Robert Millan <rmh@aybabtu.com>
768
769 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
770 (grub_ata_wait): Reimplement using grub_millisleep().
771
772 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
773 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
774
be7ac41e 7752007-11-03 Marco Gerards <marco@gnu.org>
776
777 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
778 (CRTC_ADDR_PORT): New macro.
779 (CRTC_DATA_PORT): Likewise.
780 (CRTC_CURSOR): Likewise.
781 (CRTC_CURSOR_ADDR_HIGH): Likewise.
782 (CRTC_CURSOR_ADDR_LOW): Likewise.
783 (update_cursor): New function.
784 (grub_console_real_putchar): Call `update_cursor'.
785 (grub_console_gotoxy): Likewise.
786 (grub_console_cls): Set the default color when clearing the
787 screen.
788 (grub_console_setcursor): Implemented.
789
bb06ab2e 7902007-11-03 Marco Gerards <marco@gnu.org>
791
792 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
793 become activate.
794 (grub_ata_pio_write): Likewise.
795
796 (grub_atapi_identify): Wait after issuing an ATA command.
797 (grub_atapi_packet): Likewise.
798 (grub_ata_identify): Likewise.
799 (grub_ata_readwrite): Likewise.
800
cf8f780b 8012007-11-03 Marco Gerards <marco@gnu.org>
802
803 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
804 (grub_ata_pio_write): Likewise.
805 (grub_ata_readwrite): Use `grub_error', instead of
806 returning `grub_errno'.
807
ed649e54 8082007-11-03 Marco Gerards <marco@gnu.org>
809
810 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
811 grub_ata_pio_write once for every single sector, instead of for
812 multiple sectors.
813
ca25d8f0 8142007-10-31 Robert Millan <rmh@aybabtu.com>
815
816 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
817
818 * conf/i386-linuxbios.rmk: New file.
819
820 * kern/i386/pc/hardware.c: Likewise.
821 * term/i386/pc/at_keyboard.c: Likewise.
822 * term/i386/pc/vga_text.c: Likewise.
823
824 * include/grub/i386/linuxbios/boot.h: Likewise.
825 * include/grub/i386/linuxbios/console.h: Likewise.
826 * include/grub/i386/linuxbios/init.h: Likewise.
827 * include/grub/i386/linuxbios/kernel.h: Likewise.
828 * include/grub/i386/linuxbios/loader.h: Likewise.
829 * include/grub/i386/linuxbios/memory.h: Likewise.
830 * include/grub/i386/linuxbios/serial.h: Likewise.
831 * include/grub/i386/linuxbios/time.h: Likewise.
832
833 * kern/i386/linuxbios/init.c: Likewise.
834 * kern/i386/linuxbios/startup.S: Likewise.
835 * kern/i386/linuxbios/table.c: Likewise.
836
e911ecc1 8372007-10-31 Marco Gerards <marco@gnu.org>
838
839 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
840 (ata_mod_SOURCES): New variable.
841 (ata_mod_CFLAGS): Likewise.
842 (ata_mod_LDFLAGS): Likewise.
843
844 * disk/ata.c: New file.
845
846 * include/grub/disk.h (grub_disk_dev_id): Add
847 `GRUB_DISK_DEV_ATA_ID'.
848
7f66d0e0 8492007-10-31 Robert Millan <rmh@aybabtu.com>
850
851 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
852 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
853
854 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
855 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
856
857 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
858 `<grub/types.h>'.
859
860 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
861
5cd7dd46 8622007-10-27 Robert Millan <rmh@aybabtu.com>
863
3236ca65 864 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 865
2ebfc90f 8662007-10-22 Robert Millan <rmh@aybabtu.com>
867
868 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
869 `"../realmode.S"'.
870 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
871
73fcb0f3 8722007-10-22 Robert Millan <rmh@aybabtu.com>
873
874 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
875 (pkgdata_MODULES): Add `biosdisk.mod'.
876 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
877 variables.
878
879 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
880 (grub_biosdisk_init): Replace with ...
881 (GRUB_MOD_INIT(biosdisk)): ... this.
882 (grub_biosdisk_fini): Replace with ...
883 (GRUB_MOD_FINI(biosdisk)): ... this.
884
885 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
886 (grub_machine_init): Remove call to grub_biosdisk_init().
887 (grub_machine_fini): Remove call to grub_machine_fini().
888
889 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
890
3381d274 8912007-10-22 Robert Millan <rmh@aybabtu.com>
892
893 * include/grub/time.h: New file.
894 * include/grub/i386/time.h: Likewise.
895 * include/grub/powerpc/time.h: Likewise.
896 * include/grub/sparc64/time.h: Likewise.
897
898 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
899 instances to ...
900 (KERNEL_MACHINE_TIME_HEADER): ... this.
901 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
902 instances to ...
903 (KERNEL_MACHINE_TIME_HEADER): ... this.
904 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
905 instances to ...
906 (KERNEL_MACHINE_TIME_HEADER): ... this.
907
908 * kern/i386/efi/init.c: Include `<grub/time.h>'.
909 (grub_millisleep): New function.
910 * kern/i386/pc/init.c: Include `<grub/time.h>'.
911 (grub_millisleep): New function.
912 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
913 Remove `grub/machine/time.h' include.
914 (grub_millisleep): New function.
915 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
916 Remove `grub/machine/time.h' include.
917 (grub_millisleep): New function.
918
919 * include/grub/misc.h (grub_div_roundup): New function.
920
921 * kern/misc.c: Include `<grub/time.h>'.
922 (grub_millisleep_generic): New function.
923
924 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
925 Add `time.h'.
926 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
927 Add `time.h'.
928 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
929 `machine/time.h'. Add `time.h'.
930 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
931
a39a0312 9322007-10-21 Robert Millan <rmh@aybabtu.com>
933
934 * include/grub/misc.h (grub_max): New function.
935
2aad70e2 9362007-10-21 Robert Millan <rmh@aybabtu.com>
937
938 * util/misc.c (grub_util_info): Call fflush() before returning.
939
54b71c4b 9402007-10-20 Robert Millan <rmh@aybabtu.com>
941
942 * genmk.rb (Image): Copy `extra_flags' from here ...
943 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
944
945 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
946 to `argc' and `args' arguments.
947
a979f513 9482007-10-17 Robert Millan <rmh@aybabtu.com>
949
950 * kern/i386/loader.S: New file.
951
952 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
953 * kern/i386/loader.S (grub_linux_prot_size)... to here.
954 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
955 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
956 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
957 * kern/i386/loader.S (grub_linux_real_addr)... to here.
958 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
959 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
960 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
961 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
962 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
963 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
964 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
965 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
966
967 * kern/i386/realmode.S: New file.
968
969 * kern/i386/pc/startup.S (protstack): Moved from here ...
970 * kern/i386/realmode.S (protstack)... to here.
971 * kern/i386/pc/startup.S (gdt): Moved from here ...
972 * kern/i386/realmode.S (gdt)... to here.
973 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
974 * kern/i386/realmode.S (prot_to_real)... to here.
975
976 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
977 `kern/i386/realmode.S'.
978
825fc8fd 9792007-10-17 Robert Millan <rmh@aybabtu.com>
980
981 * include/grub/i386/loader.h: New file.
982
983 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
984 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
985 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
986 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
987 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
988 * include/grub/i386/loader.h (grub_linux_prot_size)
989 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
990 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
991 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
992 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
993
994 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
995
e179b2f4 9962007-10-15 Robert Millan <rmh@aybabtu.com>
997
998 * normal/misc.c (grub_normal_print_device_info): Do not probe for
999 filesystem when dev->disk is unset.
1000 Do probe for filesystem even when dev->disk->has_partitions is set.
1001 In case a filesystem is found, always report it.
1002 In case it isn't, if dev->disk->has_partitions is set, report that
1003 a partition table was found instead of reporting that no filesystem
1004 could be identified.
1005
5db82af6 10062007-10-12 Robert Millan <rmh@aybabtu.com>
1007
1008 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
1009 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
1010
68f6ac74 1011 * include/grub/types.h (grub_host_to_target16): New macro.
1012 (grub_host_to_target32): Likewise.
1013 (grub_host_to_target64): Likewise.
1014 (grub_target_to_host16): Likewise.
1015 (grub_target_to_host32): Likewise.
1016 (grub_target_to_host64): Likewise.
5db82af6 1017
1018 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
1019 Renamed from to ...
1020 (GRUB_MOD_ALIGN): ...this. Update all users.
1021
68f6ac74 1022 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
1023 grub_host_to_target32.
1024 Replace grub_be_to_cpu32 with grub_target_to_host32.
1025 (load_modules): Likewise.
1026 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
1027 Replace grub_be_to_cpu32 with grub_target_to_host32.
1028 Replace grub_cpu_to_be16 with grub_host_to_target16.
1029 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 1030
3cf497cc 10312007-10-12 Robert Millan <rmh@aybabtu.com>
1032
1033 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
1034 * util/elf/grub-mkimage.c: ... here.
1035
1036 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
1037 `util/powerpc/ieee1275/grub-mkimage.c'.
1038
c8cc3692 10392007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 1040
c8cc3692 1041 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
1042 and make it easier to figure out.
1043 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
1044 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
1045 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
1046 leave us with less than HEAP_MIN_SIZE total heap.
1047 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 1048
5c58b791 10492007-10-03 Robert Millan <rmh@aybabtu.com>
1050
1051 * include/grub/i386/io.h: New file.
1052 * commands/i386/pc/play.c (inb): Removed.
1053 (outb): Removed.
1054 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1055 with grub_outb().
afcd2ef8 1056 * term/i386/pc/serial.c (inb): Removed.
1057 (outb): Removed.
1058 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1059 with grub_outb().
1060 * term/i386/pc/vga.c (inb): Removed.
1061 (outb): Removed.
1062 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1063 with grub_outb().
5c58b791 1064
1a477ed6 10652007-10-02 Robert Millan <rmh@aybabtu.com>
1066
1067 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
1068 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1069 Reported by Marcin Kurek.
1070
6b5d80fa 10712007-09-07 Robert Millan <rmh@aybabtu.com>
1072
1073 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
1074 SmartFirmware version updates (as released by Sven Luther), and avoid
1075 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
1076 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
1077 known broken.
1078
5618afbf 10792007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1080
1081 From Hitoshi Ozeki:
1082 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
1083 when merging two regions.
1084
6139dcd9 10852007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1086
508e39ee 1087 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
1088 * normal/completion.c (grub_normal_do_completion): Likewise.
1089 Reported by Hitoshi Ozeki.
1090
10912007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1092
6139dcd9 1093 Do not use devices at boot in chainloading.
1094
1095 * loader/i386/pc/chainloader.c (boot_drive): New variable.
1096 (boot_part_addr): Likewise.
1097 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
1098 with BOOT_DRIVE and BOOT_PART_ADDR.
1099 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
1100 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
1101
38da6516 11022007-08-29 Robert Millan <rmh@aybabtu.com>
1103
1104 Patch from Simon Peter <dn.tlp@gmx.net>:
1105 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
1106 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
1107 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
1108 util/i386/pc/grub-setup.c_DEPENDENCIES.
1109 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
1110 util/grub-probe.c_DEPENDENCIES.
1111 * conf/powerpc-ieee1275.rmk: Likewise.
1112
29d0928c 11132007-08-28 Robert Millan <rmh@aybabtu.com>
1114
1115 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
1116 to tell grub-mkdevicemap how to name devices.
1117 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
1118 feature).
1119
1120 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
1121 util/i386/get_disk_name.c.
1122 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
1123 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
1124 util/ieee1275/get_disk_name.c.
1125
1126 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
1127
1128 * DISTLIST: Add util/i386/get_disk_name.c and
1129 util/ieee1275/get_disk_name.c.
1130
1131 * util/grub-mkdevicemap.c: Replace device naming logic with
1132 grub_util_get_disk_name() calls.
1133
5a0d3cca 11342007-08-20 Robert Millan <rmh@aybabtu.com>
1135
1136 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
1137 (so that it works for both plural and singular quantities).
1138
8b72db2f 11392007-08-05 Robert Millan <rmh@aybabtu.com>
1140
1141 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
1142 so that [xz] isn't taken into account when determining order.
1143
352466bf 11442007-08-02 Marco Gerards <marco@gnu.org>
1145
1146 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
1147 `include/multiboot2.h', `include/grub/elfload.h',
1148 `include/multiboot.h', `include/grub/multiboot.h',
1149 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
1150 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
1151 `kern/elf.c', `loader/multiboot_loader.c',
1152 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
1153 `loader/i386/pc/multiboot2.c',
1154 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
1155 `util/i386/pc/grub-mkrescue.in'. Remove
1156 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
1157 `include/grub/i386/pc/util/biosdisk.h' and
1158 `include/grub/powerpc/ieee1275/multiboot.h'.
1159
8f096014 11602007-08-02 Bean <bean123ch@gmail.com>
1161
1162 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
1163 (ntfs_mod_SOURCES): New variable.
1164 (ntfs_mod_CFLAGS): Likewise.
1165 (ntfs_mod_LDFLAGS): Likewise.
1166
1167 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
1168 (grub_probe_SOURCES): Likewise.
1169 (grub_emu_SOURCES): Likewise.
1170
1171 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1172 (grub_emu_SOURCES): Likewise.
1173
1174 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1175 (grub_emu_SOURCES): Likewise.
1176
1177 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
1178
1179 * fs/ntfs.c: New file.
1180
9959f7db 11812007-08-02 Bean <bean123ch@gmail.com>
1182
1183 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
1184
1185 * file.h (grub_file): Likewise.
1186
1187 * fshelp.h (grub_fshelp_read_file): Likewise.
1188
1189 * util/i386/pc/grub-setup.c (setup): Likewise.
1190 (save_first_sector): Likewise.
1191 (save_blocklists): Likewise.
1192
1193 * fs/affs.c (grub_affs_read_file): Likewise.
1194
1195 * fs/ext2.c (grub_ext2_read_file): Likewise.
1196
1197 * fs/fat.c (grub_fat_read_data): Likewise.
1198
1199 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
1200
1201 * fs/hfs.c (grub_hfs_read_file): Likewise.
1202
1203 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
1204
1205 * fs/jfs.c (grub_jfs_read_file): Likewise.
1206
1207 * fs/minix.c (grub_minix_read_file): Likewise.
1208
1209 * fs/sfs.c (grub_sfs_read_file): Likewise.
1210
1211 * fs/ufs.c (grub_ufs_read_file): Likewise.
1212
1213 * fs/xfs.c (grub_xfs_read_file): Likewise.
1214
1215 * command/blocklist.c (read_blocklist): Likewise.
1216 (print_blocklist): Likewise.
1217
0a203f83 12182007-08-02 Marco Gerards <marco@gnu.org>
1219
1220 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
1221 `util/hostfs.c'.
1222
1223 * disk/host.c: New file.
1224
1225 * util/hostfs.c: Likewise.
1226
1227 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
1228 return `GRUB_ERR_BAD_FS'.
1229 * fs/sfs.c (grub_sfs_mount): Likewise.
1230 * fs/xfs.c (grub_xfs_mount): Likewise.
1231
1232 * include/grub/disk.h (enum grub_disk_dev_id): Add
1233 `GRUB_DISK_DEVICE_HOST_ID'.
1234
1235 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
1236
e5dfe777 12372007-07-24 Jerone Young <jerone@gmail.com>
1238
1239 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
1240 modules for compilation.
1241 * conf/powerpc-ieee1275.rmk: Likewise.
1242
1243 * include/multiboot.h: Move multiboot definitions to one file. Rename
1244 many definitions to not get grub specific.
1245 * include/multiboot2.h: Create header with multiboot 2 definitions.
1246 * include/grub/multiboot.h: Header for grub specific function
1247 prototypes and definitions.
1248 * include/grub/multiboot2.h: Likewise.
1249 * include/grub/multiboot_loader.h: Likewise.
1250 * include/grub/i386/pc/multiboot.h: Removed.
1251 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
1252
1253 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
1254 and 2 to allow for one multiboot and module commands.
1255 * loader/multiboot2.c: Add multiboot2 functionality.
1256 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
1257 and definition names.
1258 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
1259 2 functions.
1260 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
1261 ieee1275 specific multiboot2 code.
1262
1263 * kern/i386/pc/startup.S: Change headers and definition names for
1264 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
1265
daf0f0ba 12662007-07-22 Robert Millan <rmh@aybabtu.com>
1267
1268 * geninitheader.sh: Process file specified in first parameter rather
1269 than hardcoding grub_modules_init.lst.
1270 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
1271 than hardcoding grub_modules_init.h.
1272
1273 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
1274 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
1275 grub_probe_init.[ch] and grub_setup_init.[ch].
1276
1277 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
1278 grub_modules_init.h with grub_emu_init.h.
1279 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
1280 grub_probe_init.[ch] files.
1281 * conf/i386-efi.rmk: Likewise.
1282 * conf/i386-pc.rmk: Likewise.
1283 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
1284 grub_setup_init.[ch] files.
1285
1286 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
1287 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
1288 to initialize modules rather than a list of hardcoded functions.
1289 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
1290 grub_init_all() to initialize modules rather than a list of hardcoded
1291 functions.
1292
54cdc1cc 12932007-07-22 Robert Millan <rmh@aybabtu.com>
1294
1295 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
1296 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
1297
ad0686cc 12982007-07-22 Robert Millan <rmh@aybabtu.com>
1299
1300 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1301 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
1302 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
1303 flag when running on SmartFirmware.
1304 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
1305 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
1306 was set.
1307
1308 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1309 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
1310 rather than decreasing it.
1311
1312 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
1313 there's not enough space to do it, fail in the same way as when it
1314 can't be done because there are no partitions.
1315
1316 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
1317 when nvsetenv failed.
1318
969c02ec 13192007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1320
1321 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
1322 because this rule is automatically generated.
1323 (grub-mkrescue): Removed for the same reason as above.
1324
5a79f472 13252007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1326
1327 Migrate to GNU General Public License Version 3.
1328
1329 * COPYING: Replaced with the plain text version of GPLv3.
1330
1331 * config.guess: Updated from gnulib.
1332 * config.sub: Likewise.
1333
1334 * geninit.sh: Output a GPLv3 copyright notice.
1335 * geninitheader.sh: Likewise.
1336 * genmodsrc.sh: Likewise.
1337 * gensymlist.sh.in: Likewise.
1338
1339 * boot/i386/pc/boot.S: Upgraded to GPLv3.
1340 * boot/i386/pc/diskboot.S: Likewise.
1341 * boot/i386/pc/pxeboot.S: Likewise.
1342 * commands/blocklist.c: Likewise.
1343 * commands/boot.c: Likewise.
1344 * commands/cat.c: Likewise.
1345 * commands/cmp.c: Likewise.
1346 * commands/configfile.c: Likewise.
1347 * commands/echo.c: Likewise.
1348 * commands/help.c: Likewise.
1349 * commands/ls.c: Likewise.
1350 * commands/search.c: Likewise.
1351 * commands/terminal.c: Likewise.
1352 * commands/test.c: Likewise.
1353 * commands/videotest.c: Likewise.
1354 * commands/i386/cpuid.c: Likewise.
1355 * commands/i386/pc/halt.c: Likewise.
1356 * commands/i386/pc/play.c: Likewise.
1357 * commands/i386/pc/reboot.c: Likewise.
1358 * commands/i386/pc/vbeinfo.c: Likewise.
1359 * commands/i386/pc/vbetest.c: Likewise.
1360 * commands/ieee1275/halt.c: Likewise.
1361 * commands/ieee1275/reboot.c: Likewise.
1362 * commands/ieee1275/suspend.c: Likewise.
1363 * disk/loopback.c: Likewise.
1364 * disk/lvm.c: Likewise.
1365 * disk/raid.c: Likewise.
1366 * disk/efi/efidisk.c: Likewise.
1367 * disk/i386/pc/biosdisk.c: Likewise.
1368 * disk/ieee1275/ofdisk.c: Likewise.
1369 * font/manager.c: Likewise.
1370 * fs/affs.c: Likewise.
1371 * fs/ext2.c: Likewise.
1372 * fs/fat.c: Likewise.
1373 * fs/fshelp.c: Likewise.
1374 * fs/hfs.c: Likewise.
1375 * fs/hfsplus.c: Likewise.
1376 * fs/iso9660.c: Likewise.
1377 * fs/jfs.c: Likewise.
1378 * fs/minix.c: Likewise.
1379 * fs/sfs.c: Likewise.
1380 * fs/ufs.c: Likewise.
1381 * fs/xfs.c: Likewise.
1382 * hello/hello.c: Likewise.
1383 * include/grub/acorn_filecore.h: Likewise.
1384 * include/grub/arg.h: Likewise.
1385 * include/grub/bitmap.h: Likewise.
1386 * include/grub/boot.h: Likewise.
1387 * include/grub/cache.h: Likewise.
1388 * include/grub/device.h: Likewise.
1389 * include/grub/disk.h: Likewise.
1390 * include/grub/dl.h: Likewise.
1391 * include/grub/elfload.h: Likewise.
1392 * include/grub/env.h: Likewise.
1393 * include/grub/err.h: Likewise.
1394 * include/grub/file.h: Likewise.
1395 * include/grub/font.h: Likewise.
1396 * include/grub/fs.h: Likewise.
1397 * include/grub/fshelp.h: Likewise.
1398 * include/grub/gzio.h: Likewise.
1399 * include/grub/hfs.h: Likewise.
1400 * include/grub/kernel.h: Likewise.
1401 * include/grub/loader.h: Likewise.
1402 * include/grub/lvm.h: Likewise.
1403 * include/grub/misc.h: Likewise.
1404 * include/grub/mm.h: Likewise.
1405 * include/grub/net.h: Likewise.
1406 * include/grub/normal.h: Likewise.
1407 * include/grub/parser.h: Likewise.
1408 * include/grub/partition.h: Likewise.
1409 * include/grub/pc_partition.h: Likewise.
1410 * include/grub/raid.h: Likewise.
1411 * include/grub/rescue.h: Likewise.
1412 * include/grub/script.h: Likewise.
1413 * include/grub/setjmp.h: Likewise.
1414 * include/grub/symbol.h: Likewise.
1415 * include/grub/term.h: Likewise.
1416 * include/grub/terminfo.h: Likewise.
1417 * include/grub/tparm.h: Likewise.
1418 * include/grub/types.h: Likewise.
1419 * include/grub/video.h: Likewise.
1420 * include/grub/efi/api.h: Likewise.
1421 * include/grub/efi/chainloader.h: Likewise.
1422 * include/grub/efi/console.h: Likewise.
1423 * include/grub/efi/console_control.h: Likewise.
1424 * include/grub/efi/disk.h: Likewise.
1425 * include/grub/efi/efi.h: Likewise.
1426 * include/grub/efi/pe32.h: Likewise.
1427 * include/grub/efi/time.h: Likewise.
1428 * include/grub/i386/linux.h: Likewise.
1429 * include/grub/i386/setjmp.h: Likewise.
1430 * include/grub/i386/types.h: Likewise.
1431 * include/grub/i386/efi/kernel.h: Likewise.
1432 * include/grub/i386/efi/loader.h: Likewise.
1433 * include/grub/i386/efi/time.h: Likewise.
1434 * include/grub/i386/pc/biosdisk.h: Likewise.
1435 * include/grub/i386/pc/boot.h: Likewise.
1436 * include/grub/i386/pc/chainloader.h: Likewise.
1437 * include/grub/i386/pc/console.h: Likewise.
1438 * include/grub/i386/pc/init.h: Likewise.
1439 * include/grub/i386/pc/kernel.h: Likewise.
1440 * include/grub/i386/pc/loader.h: Likewise.
1441 * include/grub/i386/pc/memory.h: Likewise.
1442 * include/grub/i386/pc/multiboot.h: Likewise.
1443 * include/grub/i386/pc/serial.h: Likewise.
1444 * include/grub/i386/pc/time.h: Likewise.
1445 * include/grub/i386/pc/vbe.h: Likewise.
1446 * include/grub/i386/pc/vbeblit.h: Likewise.
1447 * include/grub/i386/pc/vbefill.h: Likewise.
1448 * include/grub/i386/pc/vbeutil.h: Likewise.
1449 * include/grub/i386/pc/vga.h: Likewise.
1450 * include/grub/ieee1275/ieee1275.h: Likewise.
1451 * include/grub/ieee1275/ofdisk.h: Likewise.
1452 * include/grub/powerpc/libgcc.h: Likewise.
1453 * include/grub/powerpc/setjmp.h: Likewise.
1454 * include/grub/powerpc/types.h: Likewise.
1455 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
1456 * include/grub/powerpc/ieee1275/console.h: Likewise.
1457 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
1458 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
1459 * include/grub/powerpc/ieee1275/loader.h: Likewise.
1460 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
1461 * include/grub/powerpc/ieee1275/time.h: Likewise.
1462 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
1463 * include/grub/sparc64/libgcc.h: Likewise.
1464 * include/grub/sparc64/setjmp.h: Likewise.
1465 * include/grub/sparc64/types.h: Likewise.
1466 * include/grub/sparc64/ieee1275/console.h: Likewise.
1467 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
1468 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
1469 * include/grub/sparc64/ieee1275/time.h: Likewise.
1470 * include/grub/util/biosdisk.h: Likewise.
1471 * include/grub/util/getroot.h: Likewise.
1472 * include/grub/util/lvm.h: Likewise.
1473 * include/grub/util/misc.h: Likewise.
1474 * include/grub/util/raid.h: Likewise.
1475 * include/grub/util/resolve.h: Likewise.
1476 * io/gzio.c: Likewise.
1477 * kern/device.c: Likewise.
1478 * kern/disk.c: Likewise.
1479 * kern/dl.c: Likewise.
1480 * kern/elf.c: Likewise.
1481 * kern/env.c: Likewise.
1482 * kern/err.c: Likewise.
1483 * kern/file.c: Likewise.
1484 * kern/fs.c: Likewise.
1485 * kern/loader.c: Likewise.
1486 * kern/main.c: Likewise.
1487 * kern/misc.c: Likewise.
1488 * kern/mm.c: Likewise.
1489 * kern/parser.c: Likewise.
1490 * kern/partition.c: Likewise.
1491 * kern/rescue.c: Likewise.
1492 * kern/term.c: Likewise.
1493 * kern/efi/efi.c: Likewise.
1494 * kern/efi/init.c: Likewise.
1495 * kern/efi/mm.c: Likewise.
1496 * kern/i386/dl.c: Likewise.
1497 * kern/i386/efi/init.c: Likewise.
1498 * kern/i386/efi/startup.S: Likewise.
1499 * kern/i386/pc/init.c: Likewise.
1500 * kern/i386/pc/lzo1x.S: Likewise.
1501 * kern/i386/pc/startup.S: Likewise.
1502 * kern/ieee1275/ieee1275.c: Likewise.
1503 * kern/powerpc/cache.S: Likewise.
1504 * kern/powerpc/dl.c: Likewise.
1505 * kern/powerpc/ieee1275/cmain.c: Likewise.
1506 * kern/powerpc/ieee1275/crt0.S: Likewise.
1507 * kern/powerpc/ieee1275/init.c: Likewise.
1508 * kern/powerpc/ieee1275/openfw.c: Likewise.
1509 * kern/sparc64/cache.S: Likewise.
1510 * kern/sparc64/dl.c: Likewise.
1511 * kern/sparc64/ieee1275/init.c: Likewise.
1512 * kern/sparc64/ieee1275/openfw.c: Likewise.
1513 * loader/efi/chainloader.c: Likewise.
1514 * loader/efi/chainloader_normal.c: Likewise.
1515 * loader/i386/efi/linux.c: Likewise.
1516 * loader/i386/efi/linux_normal.c: Likewise.
1517 * loader/i386/pc/chainloader.c: Likewise.
1518 * loader/i386/pc/chainloader_normal.c: Likewise.
1519 * loader/i386/pc/linux.c: Likewise.
1520 * loader/i386/pc/linux_normal.c: Likewise.
1521 * loader/i386/pc/multiboot.c: Likewise.
1522 * loader/i386/pc/multiboot_normal.c: Likewise.
1523 * loader/powerpc/ieee1275/linux.c: Likewise.
1524 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1525 * normal/arg.c: Likewise.
1526 * normal/cmdline.c: Likewise.
1527 * normal/command.c: Likewise.
1528 * normal/completion.c: Likewise.
1529 * normal/execute.c: Likewise.
1530 * normal/function.c: Likewise.
1531 * normal/lexer.c: Likewise.
1532 * normal/main.c: Likewise.
1533 * normal/menu.c: Likewise.
1534 * normal/menu_entry.c: Likewise.
1535 * normal/misc.c: Likewise.
1536 * normal/parser.y: Likewise.
1537 * normal/script.c: Likewise.
1538 * normal/i386/setjmp.S: Likewise.
1539 * normal/powerpc/setjmp.S: Likewise.
1540 * normal/sparc64/setjmp.S: Likewise.
1541 * partmap/acorn.c: Likewise.
1542 * partmap/amiga.c: Likewise.
1543 * partmap/apple.c: Likewise.
1544 * partmap/gpt.c: Likewise.
1545 * partmap/pc.c: Likewise.
1546 * partmap/sun.c: Likewise.
1547 * term/gfxterm.c: Likewise.
1548 * term/terminfo.c: Likewise.
1549 * term/efi/console.c: Likewise.
1550 * term/i386/pc/console.c: Likewise.
1551 * term/i386/pc/serial.c: Likewise.
1552 * term/i386/pc/vesafb.c: Likewise.
1553 * term/i386/pc/vga.c: Likewise.
1554 * term/ieee1275/ofconsole.c: Likewise.
1555 * util/biosdisk.c: Likewise.
1556 * util/console.c: Likewise.
1557 * util/genmoddep.c: Likewise.
1558 * util/getroot.c: Likewise.
1559 * util/grub-emu.c: Likewise.
1560 * util/grub-mkdevicemap.c: Likewise.
1561 * util/grub-probe.c: Likewise.
1562 * util/lvm.c: Likewise.
1563 * util/misc.c: Likewise.
1564 * util/raid.c: Likewise.
1565 * util/resolve.c: Likewise.
1566 * util/update-grub.in: Likewise.
1567 * util/update-grub_lib.in: Likewise.
1568 * util/grub.d/00_header.in: Likewise.
1569 * util/grub.d/10_hurd.in: Likewise.
1570 * util/grub.d/10_linux.in: Likewise.
1571 * util/i386/efi/grub-install.in: Likewise.
1572 * util/i386/efi/grub-mkimage.c: Likewise.
1573 * util/i386/pc/grub-install.in: Likewise.
1574 * util/i386/pc/grub-mkimage.c: Likewise.
1575 * util/i386/pc/grub-mkrescue.in: Likewise.
1576 * util/i386/pc/grub-setup.c: Likewise.
1577 * util/i386/pc/misc.c: Likewise.
1578 * util/powerpc/ieee1275/grub-install.in: Likewise.
1579 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
1580 * util/powerpc/ieee1275/misc.c: Likewise.
1581 * video/bitmap.c: Likewise.
1582 * video/video.c: Likewise.
1583 * video/i386/pc/vbe.c: Likewise.
1584 * video/i386/pc/vbeblit.c: Likewise.
1585 * video/i386/pc/vbefill.c: Likewise.
1586 * video/i386/pc/vbeutil.c: Likewise.
1587 * video/readers/tga.c: Likewise.
1588
3572d015 15892007-07-02 Robert Millan <rmh@aybabtu.com>
1590
1591 * conf/i386-efi.rmk: Replace obsolete reference to
1592 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
1593 with util/getroot.c.
1594 * conf/powerpc-ieee1275.rmk: Likewise.
1595 * conf/sparc64-ieee1275.rmk: Likewise.
1596
1597 * util/grub-emu.c (main): Fix unchecked pointer handling.
1598
2c2a681b 15992007-07-02 Robert Millan <rmh@aybabtu.com>
1600
1601 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
1602 invocation to fail, in order to support partition-less media.
1603
1604 * util/i386/pc/grub-install.in: Likewise.
1605
1606 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
1607 which fs or partmap modules are needed (akin to its sister scripts).
1608
1609 Also use grub-probe to get rid of unportable /proc/mounts check.
1610
1611 Print the same informational message that the other scripts do, before
1612 exitting.
1613
6193defe 16142007-06-23 Robert Millan <rmh@aybabtu.com>
1615
1616 * util/update-grub_lib.in (font_path): New function. Determine wether
1617 a font file can be found and, if so, echo the GRUB path to it.
1618
1619 * util/update-grub.in: Handle multiple terminals depending on user
1620 input, platform availability and font file presence. Propagate
1621 variables of our findings to /etc/grub.d/ children.
1622
1623 * util/grub.d/00_header.in: Handle multiple terminals, based on
1624 environment setup by update-grub.
1625
eface1dc 16262007-06-23 Robert Millan <rmh@aybabtu.com>
1627
ba50d28f 1628 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 1629
bf697e28 16302007-06-21 Robert Millan <rmh@aybabtu.com>
1631
1632 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
1633 indicate end of data section in kernel image.
1634 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
1635 GRUB_KERNEL_MACHINE_DATA_END.
1636
1637 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
1638 space for it.
1639 * kern/i386/efi/startup.S: Likewise.
1640
1641 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
1642 during image generation. Implement --prefix option to override this
1643 patch.
1644 * util/i386/efi/grub-mkimage.c: Likewise.
1645
1646 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
1647 code to make path relative to its root into a separate function.
1648
1649 * util/i386/pc/grub-install.in: Use newly provided
1650 make_system_path_relative_to_its_root() to convert ${grubdir}, then
1651 pass the result to grub-install --prefix.
1652
baa574b4 16532007-06-13 Robert Millan <rmh@aybabtu.com>
1654
1655 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
1656 DEFAULT_DEVICE_MAP.
1657 * util/grub-emu.c: Use above definitions from misc.h instead of
1658 defining them.
1659 * util/grub-mkdevicemap.c: Likewise.
1660 * util/i386/pc/grub-setup.c: Likewise.
1661 * util/grub-probe.c: Likewise.
1662 (probe): Abort with grub_util_error() when either
1663 grub_guess_root_device or grub_util_get_grub_dev fails.
1664
0215dcbf 16652007-06-12 Robert Millan <rmh@aybabtu.com>
1666
1667 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
1668 "pager" assignment.
1669 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
1670 "pcdata".
1671 * util/grub-probe.c (probe): Likewise for "drive_name".
1672
8af2ab7b 16732007-06-11 Robert Millan <rmh@aybabtu.com>
1674
1675 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
1676 not just the cdrom one.
1677
59d31694 16782007-06-11 Robert Millan <rmh@aybabtu.com>
1679
1680 * util/i386/pc/grub-mkrescue.in: Add "set -e".
1681 Add --pkglibdir=DIR option to override pkglibdir.
1682 Mention --image-type=TYPE in help output.
1683 Fix --grub-mkimage (it was a no-op).
1684 Abort gracefuly when no parameter is given.
1685
7ee367e4 16862007-06-11 Robert Millan <rmh@aybabtu.com>
1687
1688 * util/i386/pc/grub-mkrescue.in: New file.
1689 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
1690 * Makefile.in: Handle bin_SCRIPTS.
1691
29b0ed46 16922007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
1693
1694 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
1695 list of video modes.
1696
c0f90770 16972007-06-06 Robert Millan <rmh@aybabtu.com>
1698
1699 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
1700 file doesn't exist, or if it is in a filesystem grub can't read.
1701
1702 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
1703 not abort if GRUB_DRIVE could not be defined. Rearrange generated
1704 header comment to fit in 80 columns when the variables are resolved.
1705
1706 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
1707 could be identified by update-grub. Remove redundant check for
1708 unifont.pff existance (since convert_system_path_to_grub_path now
1709 handles that).
1710
fb36dc26 17112007-06-04 Robert Millan <rmh@aybabtu.com>
1712
1713 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
1714
1715 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
1716
1717 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
1718
0c68c93e 17192007-06-04 Robert Millan <rmh@aybabtu.com>
1720
1721 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
1722
1723 * include/grub/partition.h: Declare grub_apple_partition_map_init and
1724 grub_apple_partition_map_fini.
1725
1726 * util/biosdisk.c
1727 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
1728 to access >2 TiB disks).
1729
1730 Print disk->total_sectors with %llu instead of %lu, since this
1731 variable is always 64-bit (prevents wrong disk size from being displayed
1732 on either >2 TiB disk or big-endian CPU).
1733
1734 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
1735 into a generic case that supports all (sane) partition maps.
1736
1737 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
1738 breaks big-endian.
1739
1740 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
1741 and grub_apple_partition_map_fini() after that.
1742
0f23eb74 17432007-06-01 Robert Millan <rmh@aybabtu.com>
1744
1745 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
1746
1747 * util/grub.d/00_header.in: Only enable gfxterm when
1748 convert_system_path_to_grub_path() succeeds.
1749
42c71976 17502007-05-20 Robert Millan <rmh@aybabtu.com>
1751
1752 * util/update-grub_lib.in: New file.
1753 * DISTLIST: Add update-grub_lib.in.
1754 * conf/common.rmk: Generate update-grub_lib and install it in
1755 $(lib_DATA).
1756 * Makefile.in: Add install routine for $(lib_DATA).
1757
1758 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
1759 function provided by update-grub_lib to support arbitrary paths of
1760 unifont.pff.
1761 * util/update-grub.in: Use convert_system_path_to_grub_path() to
1762 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
1763
5beb2291 17642007-05-19 Robert Millan <rmh@aybabtu.com>
1765
1766 * commands/i386/cpuid.c: New module.
1767 * DISTLIST: Add it.
1768 * conf/i386-efi.rmk: Enable cpuid.mod.
1769 * conf/i386-pc.rmk: Likewise.
1770
7262eca1 17712007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1772
1773 * kern/disk.c (grub_disk_read): Check return value of
1774 grub_realloc().
1775
260ba823 17762007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1777
1778 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
1779 arrays.
1780 * disk/raid.c (grub_raid_open): Likewise.
1781
1ecb6cf2 17822007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1783
1784 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
1785 stack instead of on the heap.
1786
1787 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
1788 before doing a read on it.
1789
1790 * configure.ac: Only use -fno-stack-protector for the target
1791 environment.
1792
21c8cbb1 17932007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1794
1795 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
1796 __attribute_ ((unused)) to mode_type argument.
1797
1798 * util/getroot.c (grub_guess_root_device): Fix #endif.
1799
1800 * kern/misc.c (memcmp): Fix prototype.
1801
1802 * include/grub/partition.h [GRUB_UTIL]
1803 (grub_gpt_partition_map_init): Add prototype.
1804 (grub_gpt_partition_map_fini): Likewise.
1805
1806 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
1807 at the right place.
1808
1809 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
1810 (grub_fat_read_data): Likewise.
1811 (grub_fat_find_dir): Likewise.
1812
1813 * font/manager.c (find_glyph): Make table a const.
1814 (grub_font_get_glyph): Remove bitmap from if statement.
1815
849d55d3 18162007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
1817
1818 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
1819 code, first search for device in /dev/mapper, then in /dev.
1820 (grub_util_get_grub_dev): New function.
1821 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
1822 prototype.
1823 * util/grub-probe.c (probe): Remove check for RAID, call
1824 grub_util_get_grub_dev() instead of
1825 grub_util_biosdisk_get_grub_dev().
1826 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
1827 grub_util_biosdisk_get_grub_dev().
1828 * util/i386/pc/grub-setup.c (main): Likewise.
1829
8fff7c2f 18302007-05-16 Robert Millan <rmh@aybabtu.com>
1831
1832 * DISTLIST: Update for the latest changes.
1833 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
1834 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
1835 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
1836 grub/util/biosdisk.h.
1837 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
1838 grub/util/biosdisk.h.
1839
48e12b52 18402007-05-16 Robert Millan <rmh@aybabtu.com>
1841
1842 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
1843
46b9d128 18442007-05-16 Robert Millan <rmh@aybabtu.com>
1845
1846 * util/i386/efi/grub-install.in: New.
1847 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
1848 newly added grub-install.
1849 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
1850 include.
1851 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
1852 grub/util/biosdisk.h.
1853 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
1854 grub/util/biosdisk.h.
1855
2d1a40a9 18562007-05-16 Robert Millan <rmh@aybabtu.com>
1857
1858 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
1859 * include/grub/util/biosdisk.h: ... here.
1860 * util/i386/pc/biosdisk.c: Moved to ...
1861 * util/biosdisk.c: ... here.
1862 * util/i386/pc/getroot.c: Moved to ...
1863 * util/getroot.c: ... here.
1864 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
1865 * util/grub-mkdevicemap.c: ... here.
1866 * util/i386/pc/grub-probe.c: Moved to ...
1867 * util/grub-probe.c: ... here.
1868
9e26e3bc 18692007-05-15 Robert Millan <rmh@aybabtu.com>
1870
1871 * util/update-grub.in: Remove duplicated line in grub.cfg header
1872 message.
1873
57f96397 18742007-05-13 Robert Millan <rmh@aybabtu.com>
1875
1876 * util/update-grub.in: Fix a few assumptions about the devices holding
1877 /, /boot and /boot/grub being the same.
1878 * util/grub.d/00_header.in: Likewise.
1879 * util/grub.d/10_hurd.in: Likewise.
1880 * util/grub.d/10_linux.in: Likewise.
1881
1882 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
1883 patterns. Use that to define the `.old' suffix as older than `'.
1884
1885 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
1886
1887 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
1888 the grub.cfg header message.
1889
2e610d62 18902007-05-11 Robert Millan <rmh@aybabtu.com>
1891
1892 * util/update-grub.in: Create device.map if it doesn't already exist,
1893 before attempting to run grub-probe.
1894 Check for grub-probe and grub-mkdevicemap with the same code
1895 grub-install is using.
1896 Remove test mode.
1897
3f6a10ef 18982007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
1899
1900 * Makefile.in: Add the datarootdir autoconf variable.
1901
02e7b75e 19022007-05-09 Robert Millan <rmh@aybabtu.com>
1903
1904 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
1905 fail gracefuly if dev->disk->partition == NULL.
1906
75f396cc 19072007-05-07 Robert Millan <rmh@aybabtu.com>
1908
1909 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
1910 determine partition map module.
1911 * util/i386/pc/grub-install.in: Use this feature to decide which
1912 partition module to load, instead of hardcoding pc and gpt.
1913
da65cb36 19142007-05-07 Robert Millan <rmh@aybabtu.com>
1915
1916 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
1917 source directory differs from build directory.
1918
b57d6a91 19192007-05-05 Robert Millan <rmh@aybabtu.com>
1920
1921 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
1922 initialisation.
1923
509d00f1 19242007-05-05 Robert Millan <rmh@aybabtu.com>
1925
1926 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
1927
c48f23ef 19282007-05-05 Robert Millan <rmh@aybabtu.com>
1929
1930 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
1931 command-line arguments via ${GRUB_CMDLINE_LINUX}.
1932
20b97658 19332007-05-05 Robert Millan <rmh@aybabtu.com>
1934
1935 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
1936 (grub_probe_SOURCES): Likewise.
1937 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
1938 GPT and initialize dos_part and bsd_part accordingly.
1939 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
1940 install_bsd_part.
1941 (main): Activate gpt module for use during partition identification,
1942 and deactivate it afterwards.
1943 * util/i386/pc/grub-install.in: Add gpt module to core.img.
1944 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
1945 partition identification, and deactivate it afterwards.
1946
99123174 19472007-05-05 Robert Millan <rmh@aybabtu.com>
1948
1949 * term/i386/pc/console.c (grub_console_fini): Call
1950 grub_term_set_current() before grub_term_unregister().
1951
ebd97f6e 19522007-05-04 Robert Millan <rmh@aybabtu.com>
1953
1954 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
1955 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
1956 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
1957 and update-grub_DATA.
1958 * conf/common.rmk: Build and install update-grub components.
1959 * conf/common.mk: Regenerate.
1960 * util/update-grub.in: New. Core of update-grub.
1961 * util/grub.d/00_header.in: New. Generates grub.cfg header.
1962 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
1963 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
1964 * util/grub.d/README: New. Document grub.d directory layout.
1965
b06a264d 19662007-05-01 Robert Millan <rmh@aybabtu.com>
1967
1968 * util/grub-emu.c: Move initialization functions
1969 grub_util_biosdisk_init() and grub_init_all() before
1970 grub_util_biosdisk_get_grub_dev(), which relies on them.
1971
41f0050e 19722007-04-19 Robert Millan <rmh@aybabtu.com>
1973
1974 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
1975 it is used later.
1976
04582bb3 19772007-04-18 Jerone Young <jerone@gmail.com>
1978
1979 * kernel/elf.c: Add missing parenthesis for conditional statement
1980 stanza.
1981
08db4632 19822007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 1983
08db4632 1984 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
1985 continue on and look for device node with real device name.
1986
801b76be 19872007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 1988
1989 * configure.ac: Add argument for autoconf to use tranformation
1990 ability.
1991 * Makefile.in: Add autoconf package transformation code.
1992 * util/i386/pc/grub-install.in: Likewise.
1993 * util/powerpc/ieee1275/grub-install.in: Likewise.
1994
6795c4e1 19952007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1996
1997 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
1998 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
1999 (EXT2_REVISION): Likewise.
2000 (EXT2_INODE_SIZE): Likewise.
2001 (struct grub_ext2_block_group): Added a missing member
2002 "used_dirs".
2003 (grub_ext2_read_inode): Divide by the inode size in a superblock
2004 instead of 128 to obtain INODES_PER_BLOCK.
2005 Use the macro EXT2_INODE_SIZE instead of directly using
2006 SBLOCK->INODE_SIZE.
2007
d70af616 20082007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
2009
2010 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
2011 superblock instead of the structure size to compute an
2012 offset. This fixes the problem that GRUB could not read a
2013 filesystem when inode size is different from 128-byte.
2014
3b801603 20152007-03-05 Marco Gerards <marco@gnu.org>
2016
2017 * normal/main.c (read_config_file): When "menu" is not set, create
2018 an initial context.
2019
4785bfe4 20202007-02-21 Hollis Blanchard <hollis@penguinppc.org>
2021
2022 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
2023 (HEAP_LIMIT): New macro.
2024 (grub_claim_heap): Claim memory up to `heaplimit'.
2025
a0cbb023 20262007-02-21 Hollis Blanchard <hollis@penguinppc.org>
2027
2028 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
2029 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
2030 (_start): Likewise.
2031 (grub_arch_modules_addr): Return address after `_end'.
2032 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
2033 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
2034 (add_segments): Calculate `_end' from phdr size and location.
2035 (ALIGN_UP): Moved to ...
2036 * include/grub/misc.h: here.
2037 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2038 New macro.
2039 (GRUB_IEEE1275_MODULE_BASE): Removed.
2040
fd7d8eba 20412007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2042
2043 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
2044 loop boundary.
2045
9b09e6fc 20462007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2047
2048 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
2049 All users updated.
2050 (grub_elf64_load_hook_t): Likewise.
2051 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
2052 debug output.
2053
3ce27299 20542007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2055
2056 * kern/mm.c: Update copyright.
2057 (grub_mm_debug): Correct syntax error.
2058 (grub_mm_dump_free): New function.
2059 (grub_debug_free): Call `grub_free'.
2060 * include/grub/mm.h: Update copyright.
2061 (grub_mm_dump_free): Add declaration.
2062
077d5fee 20632007-02-12 Hollis Blanchard <hollis@penguinppc.org>
2064
2065 * include/grub/ieee1275/ieee1275.h: Update copyright.
2066 * kern/powerpc/ieee1275/init.c: Likewise.
2067 * kern/powerpc/ieee1275/openfw.c: Likewise.
2068
2069 * loader/powerpc/ieee1275/linux.c: Likewise.
2070 * include/grub/elfload.h: Likewise.
2071 * kern/elf.c: Likewise.
2072 (grub_elf32_load): Pass `base' and `size' parameters. Update all
2073 callers.
2074 (grub_elf64_load): Likewise.
2075 (grub_elf32_load_segment): Move to a nested function.
2076 (grub_elf64_load_segment): Likewise.
2077
dc946850 20782007-02-12 Hollis Blanchard <hollis@penguinppc.org>
2079
2080 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
2081 prototype.
2082 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
2083 (grub_heap_len): Likewise.
2084 (HEAP_SIZE): New macro.
2085 (grub_claim_heap): New function.
2086 (grub_machine_init): Don't claim heap directly. Call
2087 `grub_claim_heap'.
2088 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
2089 (grub_available_iterate): New function.
2090
baa2a121 20912007-02-03 Thomas Schwinge <tschwinge@gnu.org>
2092
2093 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
2094 * configure.ac: Use it for testing the HOST and TARGET compilers.
2095
4fe9862e 20962006-12-13 Thomas Schwinge <tschwinge@gnu.org>
2097
2098 * Makefile.in (enable_grub_emu): New variable.
2099 * configure.ac (--enable-grub-emu): New option.
2100 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
2101 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
2102 * conf/i386-pc.rmk: Likewise.
2103 * conf/powerpc-ieee1275.rmk: Likewise.
2104 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
2105
a8aa5762 21062006-12-12 Marco Gerards <marco@gnu.org>
2107
2108 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
2109
2110 * kern/env.c (grub_env_unset): Don't free the member `value' when
2111 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
2112 pointer.
2113
2114 * normal/main.c (current_menu): Removed.
2115 (free_menu): Unset the `menu' environment variable.
2116 (grub_normal_menu_addentry): Make use of the environment variable
2117 `menu', instead of using the global `current_menu'. Allocate
2118 memory for the sourcecode of this entry.
2119 (read_config_file): New argument `nested', changed all callers.
2120 Only in the case of a new context, initialize a new menu. Set the
2121 `menu' environment variable.
2122 (grub_normal_execute): Don't set and unset the environment
2123 variable `menu' here anymore. Only free the menu when leaving the
2124 context.
2125
2126 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
2127 leak.
2128
957b3a3e 21292006-12-11 Marco Gerards <marco@gnu.org>
2130
2131 * normal/menu_entry.c (run): Fix off by one bug so the last line
2132 is executed. Move the loader check to outside the loop.
2133
ef875714 21342006-12-08 Hollis Blanchard <hollis@penguinppc.org>
2135
2136 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
2137
4e739985 21382006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
2139
2140 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
2141 the number of sectors. Reported by Andrey Shuvikov
2142 <mr_hyro@yahoo.com>.
2143
790707f2 21442006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
2145
2146 * kern/disk.c (grub_disk_read): When there is a read error, always
2147 try to read only the necessary data.
2148
2149 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
2150 disk/raid.c.
2151 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
2152 prototype.
2153 [GRUB_UTIL] (grub_raid_fini): Likewise.
2154 [GRUB_UTIL] (grub_lvm_init): Likewise.
2155 [GRUB_UTIL] (grub_lvm_fini): Likewise.
2156 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
2157 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
2158 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
2159 and grub_raid_fini().
2160
03e58196 21612006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
2162
2163 * include/grub/types.h (__unused): Rename to UNUSED.
2164 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
2165 (grub_elf64_size): Likewise.
2166
ae4f23bf 21672006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2168
2169 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
2170 grub_error_push and grub_error_pop in the error-handling path.
2171 (grub_elf32_load_segment): Only call grub_file_read with non-zero
2172 length.
2173
2166cc83 21742006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2175
2176 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
2177 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2178 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2179 (kernel_elf_SOURCES): Likewise.
2180 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
2181 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
2182 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2183 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2184 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
2185 (elf_mod_SOURCES): New variable.
2186 (elf_mod_CFLAGS): Likewise.
2187 (elf_mod_LDFLAGS): Likewise.
2188 * include/grub/types.h (__unused): New macro.
2189 * include/grub/elfload.h: New file.
2190 * kern/elf.c: Likewise.
2191 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
2192 (ELF32_LOADMASK): New macro.
2193 (ELF64_LOADMASK): Likewise.
2194 (vmlinux): Removed.
2195 (grub_linux_load32): New function.
2196 (grub_linux_load64): Likewise.
2197 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
2198 Use grub_elf_t instead of grub_file_t.
2199
a09d5aa5 22002006-11-02 Hollis Blanchard <hollis@penguinppc.org>
2201
2202 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
2203 `catch_result' to struct set_color_args.
2204
d976fc51 22052006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
2206
2207 * normal/menu.c: Include grub/script.h.
2208 * normal/menu_entry.c: Likewise.
2209 * include/grub/normal.h: Do not include grub/script.h.
2210
67507549 22112006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2212
2213 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
2214
69203a99 22152006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2216
2217 * kern/disk.c (grub_disk_open): Print debug messages when opening a
2218 disk.
2219 (grub_disk_close): Print debug messages when closing a disk.
2220 (grub_disk_read): Print debug messages when disk read fails.
2221 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
2222 filesystem type.
2223 * kern/partition.c: Include misc.h.
2224 (grub_partition_iterate): Print debug messages when detecting
2225 partition type.
2226
e2b8278c 22272006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2228
2229 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
2230 is negative.
2231 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
2232
97b2f2ff 22332006-10-26 Hollis Blanchard <hollis@penguinppc.org>
2234
2235 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2236 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
2237
6555d655 22382006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
2239
2240 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
2241 instead of sizeof(lv). Patch by Michael Guntsche.
2242
4d42b77f 22432006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
2244
2245 * disk/lvm.c: Rename VGS to VG_LIST.
2246 (grub_lvm_iterate): Change VGS->LV to VG-LV.
2247 (grub_lvm_open): Likewise.
2248 Thanks to Michael Guntsche for finding this bug.
2249
5d74d927 22502006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2251
2252 * configure.ac (AC_INIT): Bumped to 1.95.
2253
a1bb27e4 22542006-10-14 Robert Millan <rmh@aybabtu.com>
2255
2256 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
2257 with "/dev/.static/dev/md".
2258
e0994b8b 22592006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2260
2261 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
2262 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
2263 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
2264 DRIVE_NAME are always freed.
2265
2266 * util/i386/pc/biosdisk.c (make_device_name): Add one into
2267 DOS_PART, as a DOS partition is counted from one instead of zero
2268 now. Reported by Robert Millan.
2269
ddd5cee9 22702006-10-14 Robert Millan <rmh@aybabtu.com>
2271
2272 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
2273 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
2274 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
2275 string returned by grub_guess_root_device.
2276 * util/i386/pc/grub-setup.c: Likewise.
2277 * util/i386/pc/grub-probefs.c: Likewise.
2278
2279 * util/i386/pc/grub-probefs.c: Rename to ...
2280 * util/i386/pc/grub-probe.c: ... this.
2281 * DISTLIST: Remove grub-probefs, add grub-probe.
2282 * conf/i386-efi.rmk: Likewise.
2283 * conf/i386-pc.rmk: Likewise.
2284 * util/i386/pc/grub-install.in: Likewise.
2285
2286 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
2287 choose which information we want to print.
2288
2b002173 22892006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2290
2291 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
2292 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
2293 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
2294 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
2295 video/readers/tga.c and video/i386/pc/vbeutil.c.
2296
22972006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
2298
2299 Added support for RAID and LVM.
2300
2301 * disk/lvm.c: New file.
2302 * disk/raid.c: Likewise.
2303 * include/grub/lvm.h: Likewise.
2304 * include/grub/raid.h: Likewise.
2305 * include/grub/util/lvm.h: Likewise.
2306 * include/grub/util/raid.h: Likewise.
2307 * util/lvm.c: Likewise.
2308 * util/raid.c: Likewise.
2309
2310 * include/grub/disk.h (grub_disk_dev_id): Add
2311 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
2312 (grub_disk_get_size): New prototype.
2313 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
2314 returns a partition.
2315 (grub_disk_get_size): New function.
2316
2317 * kern/i386/pc/init.c (make_install_device): Copy the prefix
2318 verbatim if grub_install_dos_part is -2.
2319
2320 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
2321 and LVM devices.
2322
2323 * util/i386/pc/grub-setup.c (setup): New argument
2324 MUST_EMBED. Force embedding of GRUB when the argument is
2325 true. Close FILE before returning.
2326 (main): Add support for RAID and LVM.
2327
2328 * conf/common.rmk: Add RAID and LVM modules.
2329 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
2330 util/lvm.c.
2331 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
2332
2333 * kern/misc.c (grub_strstr): New function.
2334 * include/grub/misc.h (grub_strstr): New prototype.
2335
050548d0 23362006-10-10 Tristan Gingold <tristan.gingold@bull.net>
2337
2338 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
2339
da849d2d 23402006-10-05 Tristan Gingold <tristan.gingold@bull.net>
2341
2342 * kern/misc.c (grub_strtoull): Guess the base only if not
2343 specified.
2344
97b2f2ff 23452006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 2346
2347 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
2348 PowerMac support.
2349
97b2f2ff 23502006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 2351
2352 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
2353
2354 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
2355 Remove `flags' argument. All callers changed.
2356 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
2357 (IEEE1275_IHANDLE_INVALID): New variable.
2358 (IEEE1275_CELL_INVALID): New variable.
2359 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2360 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
2361 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
2362 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
2363 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
2364 codes from Open Firmware. All callers updated.
2365 (grub_ieee1275_next_property): Directly return Open Firmware return
2366 code.
2367 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2368 Standardize error checking from `grub_ieee1275_get_property'.
2369 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
2370 `devalias' to `aliases'. Correct comments. Consolidate error paths.
2371
97b2f2ff 23722006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 2373
2374 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
2375 `instance_to_package_args' to `instance_to_path_args'.
2376
2377 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
2378 `grub_ieee1275_chosen'.
2379
2380 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
2381 `grub_ieee1275_interpret'.
2382
97b2f2ff 23832006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 2384
2385 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
2386
97b2f2ff 23872006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 2388
2389 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
2390 (__cmpdi): Likewise.
2391
2392 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
2393 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
2394 `grub_ssize_t'.
2395
02bb8acc 2396 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 2397
2398 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
2399 to type `grub_ssize_t'.
2400 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
2401
7f9a8531 24022006-09-22 Marco Gerards <marco@gnu.org>
2403
2404 * normal/script.c (grub_script_create_cmdmenu): Skip leading
2405 newlines.
2406
b5ef1102 24072006-09-22 Marco Gerards <marco@gnu.org>
2408
2409 * commands/echo.c: New file.
2410
2411 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
2412
2413 * conf/common.rmk (echo_mod_SOURCES): New variable.
2414 (echo_mod_CFLAGS): Likewise.
2415 (echo_mod_LDFLAGS): Likewise.
2416
2cff3677 24172006-09-22 Marco Gerards <marco@gnu.org>
2418
2419 * normal/main.c (get_line): Malloc memory instead of using
2420 preallocated memory. Removed the arguments `cmdline' and
2421 `max_len'. Updated all callers.
2422
6ba4688b 24232006-09-22 Marco Gerards <marco@gnu.org>
2424
2425 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
2426 (normal_mod_DEPENDENCIES): Likewise.
2427
2428 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
2429 (normal_mod_DEPENDENCIES): Likewise.
2430
2431 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
2432
e02ac02c 24332006-09-22 Johan Rydberg <jrydberg@gnu.org>
2434
2435 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
2436 programs.
2437 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
2438 (normal_mod_DEPENDENCIES): Likewise.
2439 * conf/i386-pc.mk: Regenerate.
2440 * conf/i386-efi.mk: Likewise
2441 * conf/common.mk: Likewise.
2442 * conf/powerpc-ieee1275.mk: Likewise.
2443 * conf/sparc64-ieee1275.mk: Likewise.
2444
8d252e44 24452006-09-22 Robert Millan <rmh@aybabtu.com>
2446
2447 Sync with i386 version.
2448 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
2449 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
2450
209bf7ac 24512006-09-21 Robert Millan <rmh@aybabtu.com>
2452
2453 Import from GRUB Legacy (lib/device.c):
2454 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
2455 (init_device_map) [__linux__]: Add support for I2O devices.
2456
6b146090 24572006-09-14 Marco Gerards <marco@gnu.org>
2458
2459 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
2460 `-melf_i386'.
2461
e38600a8 24622006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 2463
2464 * util/i386/pc/grub-install.in: Skip menu.lst when removing
2465 /boot/grub/*.lst.
78fa1790 2466
2952da5d 2467 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 2468
2952da5d 2469 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
2470 before adding it to device.map.
2471
01b82a64 24722006-08-15 Johan Rydberg <jrydberg@gnu.org>
2473
2474 * genmk.rb: Let GCC generate dependenceies the first time it
2475 compiles a file; using the -MD option.
2476 * conf/common.mk: Regenerate.
2477 * conf/i386-pc.mk: Likewise.
2478 * conf/i386-efi.mk: Likewise.
2479 * conf/powerpc-ieee1275.mk: Likewise.
2480 * conf/sparc64-ieee1275.mk: Likewise.
2481
1064790d 24822006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
2483
2484 Move the prototypes of grub_setjmp and grub_longjmp to
2485 cpu/setjmp.h, so that each architecture may specify different
2486 attributes.
2487
2488 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
2489 (grub_longjmp): Likewise.
2490 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
2491 (grub_longjmp): Likewise.
2492 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
2493 (grub_longjmp): Likewise.
2494
2495 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
2496 [!GRUB_UTIL] (grub_longjmp): Removed.
2497
29dda3ed 24982006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
2499
2500 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
2501 "color!" method does not return any value.
2502
ad2a06ed 25032006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2504
2505 * include/grub/bitmap.h: New file.
2506
2507 * include/grub/i386/pc/vbeutil.h: Likewise.
2508
2509 * video/bitmap.c: Likewise.
2510
2511 * video/readers/tga.c: Likewise.
2512
2513 * video/i386/pc/vbeutil.c: Likewise.
2514
2515 * commands/videotest.c: Code cleanup and updated to reflect to new
2516 video API.
2517
2518 * term/gfxterm.c: Likewise.
2519
2520 * video/video.c: Likewise.
2521
2522 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
2523 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
2524 (bitmap_mod_SOURCES): New entry.
2525 (bitmap_mod_CFLAGS): Likewise.
2526 (bitmap_mod_LDFLAGS): Likewise.
2527 (tga_mod_SOURCES): Likewise.
2528 (tga_mod_CFLAGS): Likewise.
2529 (tga_mod_LDFLAGS): Likewise.
2530
2531 * include/grub/video.h (grub_video_blit_operators): New enum type.
2532 (grub_video_render_target): Changed as forward declaration and moved
2533 actual definition to be video driver specific.
2534 (grub_video_adapter.blit_bitmap): Added blitting operator.
2535 (grub_video_adapter.blit_render_target): Likewise.
2536 (grub_video_blit_bitmap): Likewise.
2537 (grub_video_blit_render_target): Likewise.
2538
2539 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
2540 driver specific render target definition.
2541 (grub_video_vbe_map_rgba): Added driver internal helper.
2542 (grub_video_vbe_unmap_color): Updated to use
2543 grub_video_i386_vbeblit_info.
2544 (grub_video_vbe_get_video_ptr): Likewise.
2545
2546 * include/grub/i386/pc/vbeblit.h
2547 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
2548 grub_video_i386_vbeblit_info.
2549 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2550 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2551 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2552 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2553 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2554 (grub_video_i386_vbeblit_index_index): Likewise.
2555 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
2556 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2557 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2558 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
2559 operator.
2560 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
2561 operator.
2562
2563 * video/i386/pc/vbeblit.c: Updated to reflect changes on
2564 include/grub/i386/pc/vbeblit.h.
2565
2566 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
2567 Updated to use grub_video_i386_vbeblit_info.
2568 (grub_video_i386_vbefill_R8G8B8): Likewise.
2569 (grub_video_i386_vbefill_index): Likewise.
2570 (grub_video_i386_vbefill): Added generic filler.
2571
2572 * video/i386/pc/vbefill.c: Updated to reflect changes on
2573 include/grub/i386/pc/vbefill.h.
2574
2575 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
2576 grub_video_i386_vbeblit_info.
2577 (grub_video_vbe_unmap_color): Likewise.
2578 (grub_video_vbe_blit_glyph): Likewise.
2579 (grub_video_vbe_scroll): Likewise.
2580 (grub_video_vbe_draw_pixel): Removed function.
2581 (grub_video_vbe_get_pixel): Likewise.
2582 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
2583 updated code to use it.
2584 (common_blitter): Added common blitter for render target and bitmap.
2585 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
2586 (grub_video_vbe_blit_render_target): Likewise.
2587
bc8c036d 25882006-07-30 Johan Rydberg <jrydberg@gnu.org>
2589
2590 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
2591 is in text mode if there is no console control protocol instance
2592 available.
2593
684a8eff 25942006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2595
2596 * include/grub/video.h: Code cleanup.
2597
2598 * include/grub/i386/pc/vbe.h: Likewise.
2599
2600 * video/i386/pc/vbe.c: Likewise.
2601
2602 * video/i386/pc/vbeblit.c: Likewise.
2603
2604 * video/i386/pc/vbefill.c: Likewise.
2605
2606 * video/video.c: Likewise. Also added more comments.
2607
5915059b 26082006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2609
2610 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
2611 (struct grub_biosdisk_dap): Likewise.
2612
2613 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
2614 linkage settings for all functions.
2615
90ce5d56 26162006-07-12 Marco Gerards <marco@gnu.org>
2617
2618 * configure.ac (--enable-mm-debug): Fix typo.
2619
2620 * genkernsyms.sh.in: Use proper quoting for `CC'.
2621
43e7f879 26222006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
2623
2624 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
2625 (normal_mod_ASFLAGS): Remove "-m32".
2626
4889bdec 26272006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
2628
2629 * util/misc.c: Include config.h.
2630 [!HAVE_MEMALIGN]: Do not include malloc.h.
2631 (grub_memalign): Use posix_memalign, if present. Then, use
2632 memalign, if present. Otherwise, emit an error.
2633
2634 * util/grub-emu.c: Do not include malloc.h.
2635
2636 * include/grub/util/misc.h: Include unistd.h. This is required for
2637 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
2638 D. Eades III <hde@foobar-qux.org>.
2639
2640 * configure.ac (AC_GNU_SOURCE): Added.
2641 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
2642 type.
2643
fd39d4da 26442006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
2645
2646 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
2647 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
2648
b786f3b5 26492006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
2650
2651 * include/grub/types.h (grub_host_addr_t): Rename to
2652 grub_target_addr_t.
2653 (grub_host_off_t): Rename to grub_target_off_t.
2654 (grub_host_size_t): Rename to grub_target_size_t.
2655 (grub_host_ssize_t): Rename to grub_target_ssize_t.
2656 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
2657
2658 * include/grub/kernel.h (struct grub_module_header): Change type
2659 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
2660 (grub_module_info): Likewise.
2661
051988bb 26622006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2663
2664 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
2665 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
2666 Velazquez <jesus.velazquez@gmail.com>.
2667
deae281b 26682006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2669
2670 Count partitions from 1 instead of 0 in the string representation
2671 of partitions. Still use 0-based internally.
2672
2673 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
2674 (sun_partition_map_iterate): Use grub_partition_t instead of
2675 struct grub_partition *. Cast DESC->START_CYLINDER to
2676 grub_uint64_t after converting the endian.
2677 (sun_partition_map_probe): Subtract 1 for PARTNUM.
2678 (sun_partition_map_get_name): Add 1 to P->INDEX.
2679
2680 * partmap/pc.c (grub_partition_parse): Subtract 1 for
2681 PCDATA->DOS_PART.
2682 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
2683
2684 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
2685 zero instead of one.
2686 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
2687 (gpt_partition_map_get_name): Add 1 into P->INDEX.
2688
2689 * partmap/apple.c (apple_partition_map_iterate): Change the type
2690 of POS to unsigned.
2691 (apple_partition_map_probe): Subtract 1 for PARTNUM.
2692 (apple_partition_map_get_name): Add 1 into P->INDEX.
2693
2694 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
2695 of POS to unsigned.
2696 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
2697 calculate the offset of a partition.
2698 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
2699 (amiga_partition_map_get_name): Add 1 into P->INDEX.
2700
2701 * partmap/acorn.c (acorn_partition_map_find): Change the type of
2702 SECTOR to grub_disk_addr_t.
2703 (acorn_partition_map_iterate): Likewise.
2704 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
2705 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
2706 top.
2707 (acorn_partition_map_get_name): Add 1 into P->INDEX.
2708
2709 * kern/i386/pc/init.c (make_install_device): Add 1 into
2710 GRUB_INSTALL_DOS_PART.
2711
2712 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
2713 conditional.
2714
524a1e6a 27152006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2716
2717 Clean up the code to support 64-bit addressing in disks and
2718 files. This change is not enough for filesystems yet.
2719
2720 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
2721 type of "start" to grub_uint64_t.
2722 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
2723 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
2724 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
2725 convert addresses.
2726
2727 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
2728 to grub_disk_addr_t.
2729
2730 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
2731 string.
2732
2733 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2734
2735 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
2736 to char *.
2737
2738 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
2739
2740 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
2741
2742 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
2743
2744 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
2745 to grub_off_t, to detect an error from grub_file_seek.
2746 (grub_multiboot_load_elf32): Likewise.
2747
2748 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
2749 maximum unsigned long value when an overflow is detected.
2750 (grub_strtoull): New function.
2751 (grub_divmod64): Likewise.
2752 (grub_lltoa): use grub_divmod64.
2753
2754 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
2755 grub_disk_addr_t.
2756 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
2757 the pointer to next character. Use grub_strtoull instead of
2758 grub_strtoul.
2759 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
2760 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
2761 respectively.
2762
2763 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
2764 return value is signed.
2765 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
2766 test if OFFSET is less than zero, as OFFSET is unsigned now.
2767
2768 * kern/disk.c (struct grub_disk_cache): Change the type of
2769 "sector" to grub_disk_addr_t.
2770 (grub_disk_cache_get_index): Change the type of SECTOR to
2771 grub_disk_addr_t. Calculate the hash with SECTOR casted to
2772 unsigned after shifting.
2773 (grub_disk_cache_invalidate): Change the type of SECTOR to
2774 grub_disk_addr_t.
2775 (grub_disk_cache_unlock): Likewise.
2776 (grub_disk_cache_store): Likewise.
2777 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
2778 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
2779 grub_disk_addr_t and grub_uint64_t, respectively.
2780 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
2781 body, as the value of OFFSET is tweaked by
2782 grub_disk_check_range. Change the types of START_SECTOR, LEN and
2783 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
2784 respectively.
2785 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
2786 body, as the value of OFFSET is tweaked by
2787 grub_disk_check_range. Change the types of LEN and N to
2788 grub_size_t.
2789
2790 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
2791 and "saved_offset" to grub_off_t.
2792 (test_header): Cast BUF to char *.
2793 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
2794 to char *.
2795 (grub_gzio_read): Change the types of OFFSET and SIZE to
2796 grub_off_t and grub_size_t, respectively.
2797
2798 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
2799 Removed.
2800 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
2801 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
2802 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
2803 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
2804 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
2805
2806 * include/grub/types.h (grub_off_t): Unconditionally set to
2807 grub_uint64_t.
2808 (grub_disk_addr_t): Changed to grub_uint64_t.
2809
2810 * include/grub/partition.h (struct grub_partition): Change the
2811 types of "start", "len" and "offset" to grub_disk_addr_t,
2812 grub_uint64_t and grub_disk_addr_t, respectively.
2813 (grub_partition_get_start): Return grub_disk_addr_t.
2814 (grub_partition_get_len): Return grub_uint64_t.
2815
2816 * include/grub/misc.h (grub_strtoull): New prototype.
2817 (grub_divmod64): Likewise.
2818
2819 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
2820 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
2821 grub_off_t, respectively.
2822 All callers and references changed.
2823
2824 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
2825 grub_size_t in "read".
2826 All callers and references changed.
2827
2828 * include/grub/file.h (struct grub_file): Change the types of
2829 "offset" and "size" to grub_off_t and grub_off_t,
2830 respectively. Change the type of SECTOR to grub_disk_addr_t in
2831 "read_hook".
2832 (grub_file_read): Change the type of LEN to grub_size_t.
2833 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
2834 grub_off_t.
2835 (grub_file_size): Return grub_off_t.
2836 (grub_file_tell): Likewise.
2837 All callers and references changed.
2838
2839 * include/grub/disk.h (struct grub_disk_dev): Change the types of
2840 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
2841 "write".
2842 (struct grub_disk): Change the type of "total_sectors" to
2843 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
2844 "read_hook".
2845 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
2846 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
2847 (grub_disk_write): Likewise.
2848 All callers and references changed.
2849
2850 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
2851 char * for grub_strncmp to silence gcc.
2852 (grub_iso9660_mount): Likewise.
2853 (grub_iso9660_mount): Likewise.
2854 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
2855 return statement.
2856 (grub_iso9660_iterate_dir): Likewise.
2857 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
2858
2859 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
2860 LEN to grub_disk_addr_t and grub_size_t, respectively.
2861
2862 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2863
2864 * fs/jfs.c (grub_jfs_read_file): Likewise.
2865
2866 * fs/minix.c (grub_jfs_read_file): Likewise.
2867
2868 * fs/sfs.c (grub_jfs_read_file): Likewise.
2869
2870 * fs/ufs.c (grub_jfs_read_file): Likewise.
2871
2872 * fs/xfs.c (grub_jfs_read_file): Likewise.
2873
2874 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
2875 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
2876 respectively.
2877
2878 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
2879 BLKNR to -1 instead of returning GRUB_ERRNO.
2880 (grub_ext2_read_file): Change the types of SECTOR and
2881 LEN to grub_disk_addr_t and grub_size_t, respectively.
2882
2883 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
2884 LEN to grub_disk_addr_t and grub_size_t, respectively.
2885
2886 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
2887 grub_file_read.
2888
2889 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
2890 string. Do not cast SECTOR explicitly.
2891
2892 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
2893 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
2894 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
2895 grub_disk_addr_t and grub_size_t, respectively. If the sector is
2896 over 2TB and LBA mode is not supported, raise an error.
2897 (get_safe_sectors): New function.
2898 (grub_biosdisk_read): Use get_safe_sectors.
2899 (grub_biosdisk_write): Likewise.
2900
2901 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
2902 (grub_efidisk_write): Likewise.
2903
2904 * disk/loopback.c (delete_loopback): Cosmetic changes.
2905 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
2906 correctly.
2907 (grub_loopback_open): Likewise.
2908 (grub_loopback_read): Likewise. Also, change the type of POS to
2909 grub_off_t, and fix the usage of grub_memset.
2910
2911 * commands/i386/pc/play.c: Include grub/machine/time.h.
2912
2913 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
2914 print FILE->SIZE.
2915
2916 * commands/configfile.c: Include grub/env.h.
2917
2918 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
2919 GRUB_ERRNO directly instead. Change the type of POS to
2920 grub_off_t. Follow the coding standard.
2921
2922 * commands/blocklist.c: Include grub/partition.h.
2923 (grub_cmd_blocklist): Return an error if the underlying device is
2924 not a disk. Take the starting sector of a partition into account,
2925 if a partition is used.
2926
2927 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
2928 a length field.
2929 (lba_mode): Support 64-bit addresses.
2930 (chs_mode): Likewise.
2931 (copy_buffer): Adapted to the new offsets of a length field and a
2932 segment field.
2933 (blocklist_default_start): Allocate 64-bit space.
2934
2935 * boot/i386/pc/boot.S (force_lba): Removed.
2936 (boot_drive): Moved to under KERNEL_SECTOR.
2937 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
2938 space.
2939 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
2940 is useless.
2941 (lba_mode): Refactored to support a 64-bit address. More size
2942 optimization.
2943 (setup_sectors): Likewise.
2944
53af98ad 29452006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2946
2947 * DISTLIST: Added include/grub/i386/linux.h. Removed
2948 include/grub/i386/pc/linux.h
2949
2950 * configure.ac (AC_INIT): Bumped to 1.94.
2951
2952 * config.guess: Updated from gnulib.
2953 * config.sub: Likewise.
2954 * install-sh: Likewise.
2955 * mkinstalldirs: Likewise.
2956
b4c1940a 29572006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2958
2959 * conf/common.rmk (grub_modules_init.lst): Depended on
2960 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
2961 MODSRCFILES.
2962
2963 * genmk.rb (PModule::rule): Reverted the previous change.
2964
cfca1cfd 29652006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2966
2967 * conf/common.rmk (grub_modules_init.lst): Depends on
2968 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
2969 that the target does not exist before producing.
2970 (grub_modules_init.h): Remove the target before generating.
2971 (grub_emu_init.c): Likewise.
2972
2973 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
2974
aa6d7826 29752006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
2976
2977 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
2978 for the target-specific tests. Make sure that we also have the
2979 up-to-date target variables for those tests.
2980
26c607b9 29812006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2982
2983 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
2984 (PModule::rule): Likewise.
2985
0162321a 29862006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2987
2988 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
2989 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
2990 target-specific flags should be prefixed.
2991 (PModule::rule): Likewise.
2992
6c826348 29932006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
2994
2995 * configure.ac (CMP): Check if cmp is available explicitly.
2996
b977bf01 29972006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
2998
2999 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
3000 (target_cpu): New variable.
3001 (pkglibdir): Use target_cpu instead of host_cpu.
3002
3003 * util/i386/pc/grub-install.in (host_cpu): Removed.
3004 (target_cpu): New variable.
3005 (pkglibdir): Use target_cpu instead of host_cpu.
3006
3007 * util/genmoddep.c: Removed.
3008
3009 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
3010 instead of GRUB_HOST_SIZEOF_VOID_P.
3011 * kern/dl.c: Likewise.
3012
3013 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
3014 ...
3015 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3016 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3017 (GRUB_TARGET_SIZEOF_LONG): ... this.
3018 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3019 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3020 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
3021 to ...
3022 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3023 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3024 (GRUB_TARGET_SIZEOF_LONG): ... this.
3025 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3026 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3027 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
3028 to ...
3029 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3030 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3031 (GRUB_TARGET_SIZEOF_LONG): ... this.
3032 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3033 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3034
3035 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
3036 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
3037 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
3038 instead of GRUB_HOST_SIZEOF_LONG.
3039 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
3040 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
3041 GRUB_CPU_WORDS_BIGENDIAN.
3042 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
3043 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
3044 grub_host_ssize_t.
3045
3046 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
3047 (genmoddep_SOURCES): Likewise.
3048 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
3049 (genmoddep_SOURCES): Likewise.
3050 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
3051 (genmoddep_SOURCES): Likewise.
3052 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
3053 Likewise.
3054 (genmoddep_SOURCES): Likewise.
3055
3056 * genmoddep.awk: New file.
3057
3058 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
3059 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
3060 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
3061 (PModule::rule): Likewise.
3062 (Program::rule): Likewise.
3063 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
3064 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
3065 respectively.
3066
3067 * configure.ac: Rewritten intensively to use host and target
3068 instead of build and host, respectively.
3069
3070 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
3071 (host_cpu): Removed.
3072 (target_cpu): New variable.
3073 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
3074 (BUILD_CC): Removed.
3075 (BUILD_CFLAGS): Likewise.
3076 (BUILD_CPPFLAGS): Likewise.
3077 (TARGET_CC): New variable.
3078 (TARGET_CFLAGS): Likewise.
3079 (TARGET_CPPFLAGS): Likewise.
3080 (TARGET_LDFLAGS): Likewise.
3081 (AWK): Likewise.
3082 (include): Use target_cpu instead of host_cpu.
3083 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
3084
3085 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
3086
f09771a1 30872006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
3088
3089 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
3090 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
3091 field 'false' to 'exec_on_false'.
3092 (grub_script_create_cmdif): Renamed argument names to reflect above
3093 changes.
3094
3095 * normal/execute.c (grub_script_execute_cmdif): Likewise.
3096
3097 * normal/script.c (grub_script_create_cmdif): Likewise.
3098
118f4fb3 30992006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
3100
3101 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
3102 top.
3103 (grub_hfsplus_btree_recptr): Likewise.
3104 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
3105 FILEBLOCK both to pass a block number and store next block
3106 number.
3107 (grub_hfsplus_read_block): Rewritten heavily to support an extent
3108 overflow file correctly. Specify errors appropriately, because
3109 fshelp expects that GRUB_ERRNO is set when fails. Reuse
3110 grub_hfsplus_btree_recptr to get the pointer to a found key.
3111 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
3112 is found.
3113
3114 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
3115 linux.mod.
3116 (_linux_mod_SOURCES): New variable.
3117 (_linux_mod_CFLAGS): Likewise.
3118 (_linux_mod_LDFLAGS): Likewise.
3119 (linux_mod_SOURCES): Likewise.
3120 (linux_mod_CFLAGS): Likewise.
3121 (linux_mod_LDFLAGS): Likewise.
3122
3123 * DISTLIST: Added loader/i386/efi/linux.c,
3124 loader/i386/efi/linux_normal.c and
3125 include/grub/i386/efi/loader.h.
3126
3127 * loader/i386/efi/linux.c: New file.
3128 * loader/i386/efi/linux_normal.c: Likewise.
3129 * include/grub/i386/efi/loader.h: Likewise.
3130
89a7d726 31312006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
3132
3133 * commands/blocklist.c: New file.
3134
3135 * DISTLIST: Added commands/blocklist.c.
3136
3137 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 3138 color for the background, and a darker color for the foreground.
89a7d726 3139 (grub_console_checkkey): Return READ_KEY.
3140 (grub_console_cls): Set the background to
3141 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
3142
3143 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
3144
3145 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
3146 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
3147
3148 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
3149 prototype.
3150
3151 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
3152 BG. The spec is wrong again.
3153
3154 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
3155 prototype.
3156 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
3157
3158 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3159 commands/blocklist.c.
3160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3161
3162 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
3163 (blocklist_mod_SOURCES): New variable.
3164 (blocklist_mod_CFLAGS): Likewise.
3165 (blocklist_mod_LDFLAGS): Likewise.
3166
75c8f258 31672006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
3168
3169 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
3170 duplication.
3171 (lba_mode): Use %eax more intensively to reduce the code size.
3172
da2eb181 31732006-05-20 Marco Gerards <marco@gnu.org>
3174
3175 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
3176
3177 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
3178 for `menuentry'.
3179 (script): Accept leading newlines.
3180 (newlines): New rule to describe 0 or more newlines.
3181 (commands): Accept `command' with trailing newline. Fixed the
3182 order in which arguments were passed to `grub_script_add_cmd'.
3183 Accept commands separated by newlines.
3184 (function): Changed to accept newlines.
3185 (menuentry) Rewritten.
3186
3187 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
3188 front of the list, instead of to the end.
3189
577b4050 31902006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
3191
3192 * util/i386/pc/grub-install.in (bindir): New variable.
3193 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
3194 Shaver <lbgwjl@gmail.com>.
3195
0d6e1189 31962006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
3197
3198 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
3199 grub/machine/linux.h
3200 * loader/i386/pc/linux.c: Likewise.
3201
3202 * include/grub/i386/pc/linux.h: Moved to ...
3203 * include/grub/i386/linux.h: ... here.
3204
3205 * include/grub/i386/linux.h (struct linux_kernel_params): New
3206 struct.
3207
31b86e9f 32082006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
3209
3210 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
3211 checking.
3212 (grub_video_vbe_blit_glyph): Likewise.
3213 (grub_video_vbe_blit_bitmap): Likewise.
3214 (grub_video_vbe_blit_render_target): Likewise.
3215
83b984de 32162006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
3217
3218 * configure.ac (--with-platform): Properly quote the square
3219 brackets.
3220
5f0413bd 32212006-05-08 Marco Gerards <marco@gnu.org>
3222
3223 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
3224 this...
3225 (kernel_elf_HEADERS): ...to this. Updated all users.
3226 (grubof_symlist.c): Renamed from this...
3227 (kernel_elf_symlist.c): ...to this. Updated all users.
3228 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3229 (grubof_SOURCES): Renamed from this...
3230 (kernel_elf_SOURCES): ...to this.
3231 (grubof_HEADERS): Renamed from this...
3232 (kernel_elf_HEADERS): ...to this.
3233 (grubof_CFLAGS): Renamed from this...
3234 (kernel_elf_CFLAGS): ...to this.
3235 (grubof_ASFLAGS): Renamed from this...
3236 (kernel_elf_ASFLAGS): ...to this.
3237 (grubof_LDFLAGS): Renamed from this...
3238 (kernel_elf_LDFLAGS): ...to this.
3239
3240 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
3241 this...
3242 (kernel_elf_HEADERS): ...to this. Updated all users.
3243 (grubof_symlist.c): Renamed from this...
3244 (kernel_elf_symlist.c): ...to this. Updated all users.
3245 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3246 (grubof_SOURCES): Renamed from this...
3247 (kernel_elf_SOURCES): ...to this.
3248 (grubof_HEADERS): Renamed from this...
3249 (kernel_elf_HEADERS): ...to this.
3250 (grubof_CFLAGS): Renamed from this...
3251 (kernel_elf_CFLAGS): ...to this.
3252 (grubof_ASFLAGS): Renamed from this...
3253 (kernel_elf_ASFLAGS): ...to this.
3254 (grubof_LDFLAGS): Renamed from this...
3255 (kernel_elf_LDFLAGS): ...to this.
3256
3257 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
3258 `kernel.elf' instead of `grubof'.
3259
05568c2e 32602006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
3261
3262 Add --with-platform to configure. Use pkglibdir instead of
3263 pkgdatadir. This is reported by Roger Leigh.
3264
3265 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
3266 (host_vendor): Likewise.
3267 (host_os): Likewise.
3268 (pkgdatadir): Likewise.
3269 (platform): New variable.
3270 (pkglibdir): Likewise.
3271 Use PKGLIBDIR instead of PKGDATADIR.
3272
3273 * util/i386/pc/grub-install.in (datadir): Removed.
3274 (host_vendor): Likewise.
3275 (host_os): Likewise.
3276 (pkgdatadir): Likewise.
3277 (platform): New variable.
3278 (pkglibdir): Likewise.
3279 Use PKGLIBDIR instead of PKGDATADIR.
3280
3281 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
3282 instead of GRUB_DATADIR.
3283 (main): Likewise.
3284 * util/i386/pc/grub-mkimage.c (usage): Likewise.
3285 (main): Likewise.
3286 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3287 (main): Likewise.
3288
3289 * configure.ac (--with-platform): New option.
3290 Use PLATFORM instead of HOST_VENDOR to specify a platform.
3291
3292 * Makefile.in: Include a makefile based on PLATFORM instead of
3293 HOST_VENDOR.
3294 (pkgdatadir): Not appended by the machine type.
3295 (pkglibdir): Appended by the machine type.
3296 (host_vendor): Removed.
3297 (platform): New variable.
3298 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
3299 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
3300 (uninstall): Likewise.
3301
4e93851c 33022006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
3303
3304 Use the environment context in the menu. Remove the commands
3305 "default" and "timeout", and use variables instead.
3306
3307 * normal/menu.c: Include grub/env.h.
3308 (print_entry): Cast TITLE to silence gcc.
3309 (get_timeout): New function.
3310 (set_timeout): Likewise.
3311 (get_entry_number): Likewise.
3312 (run_menu): Use a default entry, a fallback entry and a timeout
3313 in the environment variables "default", "fallback" and
3314 "timeout". Also, tweak the default entry if it is not within the
3315 current menu entries.
3316 (grub_menu_run): Use a fallback entry in the environment variable
3317 "fallback".
3318
3319 * normal/main.c (read_config_file): Do not initialize
3320 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
3321 NEWMENU->TIMEOUT.
3322 (grub_normal_execute): Use a data slot to store the menu.
3323
3324 * include/grub/normal.h (struct grub_menu): Removed default_entry,
3325 fallback_entry and timeout.
3326 (struct grub_menu_list): Removed.
3327 (grub_menu_list_t): Likewise.
3328 (struct grub_context): Likewise.
3329 (grub_context_t): Likewise.
3330 (grub_context_get): Likewise.
3331 (grub_context_get_current_menu): Likewise.
3332 (grub_context_push_menu): Likewise.
3333 (grub_context_pop_menu): Likewise.
3334 (grub_default_init): Likewise.
3335 (grub_default_fini): Likewise.
3336 (grub_timeout_init): Likewise.
3337 (grub_timeout_fini): Likewise.
3338
3339 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
3340 and timeout.mod.
3341 (normal_mod_SOURCES): Removed normal/context.c.
3342
3343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
3344 commands/default.c, commands/timeout.c and normal/context.c.
3345 (normal_mod_SOURCES): Removed normal/context.c.
3346
3347 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
3348 commands/timeout.c and normal/context.c.
3349 (normal_mod_SOURCES): Removed normal/context.c.
3350
3351 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
3352 commands/default.c, commands/timeout.c and normal/context.c.
3353 (normal_mod_SOURCES): Removed normal/context.c.
3354
3355 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
3356 timeout.mod.
3357 (default_mod_SOURCES): Removed.
3358 (default_mod_CFLAGS): Likewise.
3359 (default_mod_LDFLAGS): Likewise.
3360 (timeout_mod_SOURCES): Removed.
3361 (timeout_mod_CFLAGS): Likewise.
3362 (timeout_mod_LDFLAGS): Likewise.
3363
3364 * DISTLIST: Removed commands/default.c, commands/timeout.c and
3365 normal/context.c.
3366
3367 * commands/default.c: Removed.
3368 * commands/timeout.c: Likewise.
3369 * normal/context.c: Likewise.
3370
1eb9cc1d 33712006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
3372
3373 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
3374
385bd9c1 33752006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
3376
3377 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
3378 "next" to "prev" for readability.
3379 (struct grub_env_sorted_var): New struct.
3380 (grub_env_context): Renamed to ...
3381 (initial_context): ... this.
3382 (grub_env_var_context): Renamed to ...
3383 (current_context): ... this.
3384 (grub_env_find): Look only at CURRENT_CONTEXT.
3385 (grub_env_context_open): Rewritten to copy exported variables from
3386 previous context.
3387 (grub_env_context_close): Rewritten according to the new
3388 scheme. Also, add an assertion to prevent the initial context from
3389 removed.
3390 (grub_env_insert): Removed the code for the sorted list.
3391 (grub_env_remove): Likewise.
3392 (grub_env_export): Simply mark the variable with
3393 GRUB_ENV_VAR_GLOBAL.
3394 (grub_env_set): A cosmetic change for naming consistency.
3395 (grub_env_get): Likewise.
3396 (grub_env_unset): Likewise.
3397 (grub_env_iterate): Rewritten to sort variables within this
3398 function.
3399 (grub_register_variable_hook): Fixed for naming consistency. Call
3400 grub_env_find again, only if NAME is not found at the first time.
3401 (mangle_data_slot_name): New function.
3402 (grub_env_set_data_slot): Likewise.
3403 (grub_env_get_data_slot): Likewise.
3404 (grub_env_unset_data_slot): Likewise.
3405
3406 * include/grub/env.h (grub_env_var_type): New enum.
3407 (GRUB_ENV_VAR_LOCAL): New constant.
3408 (GRUB_ENV_VAR_GLOBAL): Likewise.
3409 (GRUB_ENV_VAR_DATA): Likewise.
3410 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
3411 "type".
3412 (grub_env_set): Replace VAR with NAME for consistency.
3413 (grub_register_variable_hook): Likewise.
3414 (grub_env_export): Specify the name of the argument.
3415 (grub_env_set_data_slot): New prototype.
3416 (grub_env_get_data_slot): Likewise.
3417 (grub_env_unset_data_slot): Likewise.
3418
7f362539 34192006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3420
3421 Extend the loader so that GRUB can accept a loader which comes
3422 back to GRUB when a loaded image exits. Also, this change adds
3423 support for a chainloader on EFI.
3424
3425 * term/efi/console.c: Include grub/misc.h.
3426 (grub_console_checkkey): Display a scan code on the top for
3427 debugging. This will be removed once the EFI port gets stable.
3428 Correct the scan code mapping.
3429
3430 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
3431 allocate memory from larger regions, in order to reduce the number
3432 of allocated regions. Otherwise, the MacOSX loader panics.
3433 (filter_memory_map): Avoid less than 1MB for compatibility with
3434 other loaders.
3435 (add_memory_regions): Allocate from the tail of a region, if
3436 possible, to avoid allocating a region near to 1MB, for the MacOSX
3437 loader.
3438
3439 * kern/efi/init.c (grub_efi_set_prefix): Specify
3440 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
3441
3442 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
3443 argument IMAGE_HANDLE and specify it to get a loaded image.
3444 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
3445 grub_efi_get_loaded_image.
3446 (grub_efi_get_filename): Divide the legnth by the size of
3447 grub_efi_char16_t.
3448 (grub_efi_get_device_path): New function.
3449 (grub_efi_print_device_path): Print End Device Path nodes. Divide
3450 the length by the size of grub_efi_char16_t for a file path device
3451 path node.
3452
3453 * kern/loader.c (grub_loader_noreturn): New variable.
3454 (grub_loader_set): Accept a new argument NORETURN. Set
3455 GRUB_LOADER_NORETURN to NORETURN.
3456 All callers changed.
3457 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
3458 grub_machine_fini.
3459
3460 * include/grub/efi/efi.h (grub_efi_get_device_path): New
3461 prototype.
3462 (grub_efi_get_loaded_image): Take an argument to specify an image
3463 handle.
3464
3465 * include/grub/loader.h (grub_loader_set): Added one more argument
3466 NORETURN.
3467
3468 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
3469 instead of grub_efi_open_protocol.
3470 (grub_efidisk_get_device_name): Likewise.
3471 (grub_efidisk_close): Print a newline.
3472 (grub_efidisk_get_device_handle): Fixed to use
3473 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
3474 GRUB_EFI_DEVICE_PATH_TYPE.
3475
3476 * disk/efi/efidisk.c (device_path_guid): Moved to ...
3477 * kern/efi/efi.c (device_path_guid): ... here.
3478
3479 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
3480 chain.mod.
3481 (kernel_mod_HEADERS): Added efi/disk.h.
3482 (_chain_mod_SOURCES): New variable.
3483 (_chain_mod_CFLAGS): Likewise.
3484 (_chain_mod_LDFLAGS): Likewise.
3485 (chain_mod_SOURCES): Likewise.
3486 (chain_mod_CFLAGS): Likewise.
3487 (chain_mod_LDFLAGS): Likewise.
3488
3489 * DISTLIST: Added include/grub/efi/chainloader.h,
3490 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
3491
3492 * include/grub/efi/chainloader.h: New file.
3493 * loader/efi/chainloader.c: Likewise.
3494 * loader/efi/chainloader_normal.c: Likewise.
3495
c0111d6e 34962006-04-30 Marco Gerards <marco@gnu.org>
3497
3498 * commands/configfile.c (grub_cmd_source): New function.
3499 (GRUB_MOD_INIT): Register the commands `source' and `.'.
3500 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
3501
df5341da 35022006-04-30 Marco Gerards <marco@gnu.org>
3503
3504 * normal/execute.c (grub_script_execute_cmd): Change the return
3505 type to `grub_err_t'. Correctly return the error.
3506 (grub_script_execute_cmdline): In case a command line is not a
3507 command or a function, try to interpret it as an assignment.
3508
f85934bd 35092006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3510
3511 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
3512 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
3513 skip a node whose name is obviously invalid as UTF-16,
3514 i.e. contains a NUL character. Stop the iteration when the last
3515 directory entry is found. Instead of using the return value of
3516 grub_hfsplus_btree_iterate_node, store the value in RET and use
3517 it, because the iterator can be stopped by the last directory
3518 entry.
3519
8f8a2cf8 35202006-04-30 Marco Gerards <marco@gnu.org>
3521
3522 * include/grub/env.h (grub_env_export): New prototype. Reported
3523 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
3524
a27e84ce 35252006-04-30 Marco Gerards <marco@gnu.org>
3526
3527 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
3528 size of the extents in a catalog file record.
3529
eaef0553 35302006-04-29 Marco Gerards <marco@gnu.org>
3531
3532 * commands/configfile.c (grub_cmd_configfile): Execute the
3533 configfile within its own context.
3534
3535 * include/grub/env.h (grub_env_context_open): New prototype.
3536 (grub_env_context_close): Likewise.
3537
3538 * kern/env.c (grub_env): Removed.
3539 (grub_env_sorted): Likewise.
3540 (grub_env_context): New variable.
3541 (grub_env_var_context): Likewise.
3542 (grub_env_find): Search both the active context and the global
3543 context.
3544 (grub_env_context_open): New function.
3545 (grub_env_context_close): Likewise.
3546 (grub_env_insert): Likewise.
3547 (grub_env_remove): Likewise.
3548 (grub_env_export): Likewise.
3549 (grub_env_set): Changed to use helper functions to avoid code
3550 duplication.
3551 (grub_env_iterate): Rewritten so both the current context and the
3552 global context are being used.
3553
3554 * normal/command.c (export_command): New function.
3555 (grub_command_init): Register the `export' function.
3556
7b455f4d 35572006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
3558
3559 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
3560 explicitly to suppress gcc's warnings.
3561 * fs/fat.c (grub_fat_find_dir): Likewise.
3562 (grub_fat_label): Likewise.
3563 * fs/xfs.c (grub_xfs_read_inode): Likewise.
3564 (grub_xfs_mount): Likewise.
3565 (grub_xfs_label): Likewise.
3566 * fs/affs.c (grub_affs_mount): Likewise.
3567 (grub_affs_label): Likewise.
3568 (grub_affs_iterate_dir): Likewise.
3569 * fs/sfs.c (grub_sfs_mount): Likewise.
3570 (grub_sfs_iterate_dir): Likewise.
3571 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
3572 * fs/hfs.c (grub_hfs_mount): Likewise.
3573 (grub_hfs_cmp_catkeys): Likewise.
3574 (grub_hfs_find_dir): Likewise.
3575 (grub_hfs_dir): Likewise.
3576 (grub_hfs_label): Likewise.
3577 * fs/jfs.c (grub_jfs_mount): Likewise.
3578 (grub_jfs_opendir): Likewise.
3579 (grub_jfs_getent): Likewise.
3580 (grub_jfs_lookup_symlink): Likewise.
3581 (grub_jfs_label): Likewise.
3582 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
3583 (grub_hfsplus_iterate_dir): Likewise.
3584 (grub_hfsplus_btree_iterate_node): Made static.
3585
3586 * util/grub-emu.c (prefix): New variable.
3587 (grub_machine_set_prefix): New function.
3588 (main): Do not set the environment variable "prefix" here. Only
3589 set PREFIX, which is used later by grub_machine_set_prefix.
3590
3591 * include/grub/video.h: Do not include grub/symbol.h.
3592 (grub_video_register): Not exported. This symbol is not defined in
3593 the kernel.
3594 (grub_video_unregister): Likewise.
3595 (grub_video_iterate): Likewise.
3596 (grub_video_setup): Likewise.
3597 (grub_video_restore): Likewise.
3598 (grub_video_get_info): Likewise.
3599 (grub_video_get_blit_format): Likewise.
3600 (grub_video_set_palette): Likewise.
3601 (grub_video_get_palette): Likewise.
3602 (grub_video_set_viewport): Likewise.
3603 (grub_video_get_viewport): Likewise.
3604 (grub_video_map_color): Likewise.
3605 (grub_video_map_rgb): Likewise.
3606 (grub_video_map_rgba): Likewise.
3607 (grub_video_fill_rect): Likewise.
3608 (grub_video_blit_glyph): Likewise.
3609 (grub_video_blit_bitmap): Likewise.
3610 (grub_video_blit_render_target): Likewise.
3611 (grub_video_scroll): Likewise.
3612 (grub_video_swap_buffers): Likewise.
3613 (grub_video_create_render_target): Likewise.
3614 (grub_video_delete_render_target): Likewise.
3615 (grub_video_set_active_render_target): Likewise.
3616
3617 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
3618 Undefined.
3619 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
3620
3621 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
3622 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3623 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3624 instead of $(srcdir)/genkernsyms.sh.
3625
3626 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
3627 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3628 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3629 instead of $(srcdir)/genkernsyms.sh.
3630
3631 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
3632 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3633 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3634 instead of $(srcdir)/genkernsyms.sh.
3635
3636 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
3637 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3638 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3639 instead of $(srcdir)/genkernsyms.sh.
3640
3641 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
3642 genkernsyms.sh.
3643
3644 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
3645 genkernsyms.sh.
3646 (gensymlist.sh): New target.
3647 (genkernsyms.sh): Likewise.
3648
3649 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
3650 genkernsyms.sh.in and gensymlist.sh.in.
3651
3652 * genkernsyms.sh: Removed.
3653 * gensymlist.sh: Likewise.
3654
3655 * genkernsyms.sh.in: New file.
3656 * gensymlist.sh.in: Likewise.
3657
1885bb27 36582006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3659
3660 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
3661 clobber "prefix", since we may have already set it manually.
3662
71538dff 36632006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3664
3665 * kern/misc.c (abort): New alias for grub_abort.
3666
2965c7cc 36672006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
3668
3669 A new machine-specific function "grub_machine_set_prefix" is
3670 defined. This is called after loading modules, so that a prefix
3671 initialization can use modules. Also, this change adds an
3672 intensive debugging feature for the memory manager via the
3673 configure option "--enable-mm-debug".
3674
3675 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
3676 PART.LEN.
3677
3678 * kern/sparc64/ieee1275/init.c (abort): Removed.
3679 (grub_stop): Likewise.
3680 (grub_exit): New function.
3681 (grub_set_prefix): Renamed to ...
3682 (grub_machine_set_prefix): ... this.
3683 (grub_machine_init): Do not call grub_set_prefix.
3684
3685 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
3686 (grub_machine_set_prefix): ... this.
3687 (grub_machine_init): Do not call grub_set_prefix.
3688
3689 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
3690 (grub_machine_init): Do not set the prefix here.
3691
3692 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
3693
3694 * kern/efi/init.c: Include grub/mm.h.
3695 (grub_efi_set_prefix): New function.
3696
3697 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
3698 (grub_efi_get_filename): New function.
3699 (grub_print_device_path): Renamed to ...
3700 (grub_efi_print_device_path): ... this.
3701
3702 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
3703 [MM_DEBUG] (grub_realloc): Likewise.
3704 [MM_DEBUG] (grub_free): Likewise.
3705 [MM_DEBUG] (grub_memalign): Likewise.
3706 [MM_DEBUG] (grub_mm_debug): New variable.
3707 [MM_DEBUG] (grub_debug_malloc): New function.
3708 [MM_DEBUG] (grub_debug_free): New function.
3709 [MM_DEBUG] (grub_debug_realloc): New function.
3710 [MM_DEBUG] (grub_debug_memalign): New function.
3711
3712 * kern/misc.c (grub_abort): Print a newline to distinguish
3713 the message.
3714
3715 * kern/main.c (grub_main): Call grub_machine_set_prefix and
3716 grub_set_root_dev after loading modules. This is necessary when
3717 setting a prefix depends on modules.
3718
3719 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
3720 (grub_efi_print_device_path): ... this.
3721 (grub_efi_get_filename): New prototype.
3722 (grub_efi_set_prefix): Likewise.
3723
3724 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
3725 and grub/disk.h.
3726 (grub_efidisk_get_device_handle): New prototype.
3727 (grub_efidisk_get_device_name): Likewise.
3728
3729 * include/grub/mm.h: Include config.h.
3730 (MM_DEBUG): Removed.
3731 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
3732 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
3733 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
3734 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
3735 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
3736 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
3737 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
3738 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
3739 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
3740
3741 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
3742
3743 * disk/efi/efidisk.c: Include grub/partition.h.
3744 (iterate_child_devices): New function.
3745 (add_device): First, compare only last device path nodes, so that
3746 devices are sorted by the types.
3747 (grub_efidisk_get_device_handle): New function.
3748 (grub_efidisk_get_device_name): Likewise.
3749
3750 * configure.ac (--enable-mm-debug): New option to enable the
3751 memory manager debugging feature. This makes the binary much
3752 bigger, so is disabled by default.
3753
9cacaa17 37542006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
3755
3756 Use grub_abort instead of grub_stop, and grub_exit must be
3757 define in each architecture now. Also, this change adds support
3758 for EFI disks.
3759
3760 * util/i386/pc/grub-probefs.c: Include grub/term.h.
3761 (grub_getkey): New function.
3762 (grub_term_get_current): Likewise.
3763
3764 * util/i386/pc/grub-setup.c: Include grub/term.h.
3765 (grub_getkey): New function.
3766 (grub_term_get_current): Likewise.
3767
3768 * util/misc.c (grub_stop): Renamed to ...
3769 (grub_exit): ... this.
3770
3771 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
3772 (grub_exit): ... this.
3773 (grub_machine_init): Use grub_abort instead of abort.
3774 (grub_stop): Removed.
3775
3776 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
3777 abort.
3778
3779 * kern/i386/pc/startup.S (grub_exit): New function.
3780 (cold_reboot): New label.
3781
3782 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
3783 (grub_efi_init): Call grub_efidisk_init.
3784 (grub_efi_fini): Call grub_efidisk_fini.
3785
3786 * kern/efi/efi.c: Include grub/mm.h.
3787 (grub_efi_console_control_guid): Renamed to ...
3788 (console_control_guid): ... this.
3789 (grub_efi_loaded_image_guid): Renamed to ...
3790 (loaded_image_guid): ... this.
3791 (grub_efi_locate_handle): New function.
3792 (grub_efi_open_protocol): Likewise.
3793 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
3794 GRUB_EFI_CONSOLE_CONTROL_GUID.
3795 (grub_efi_exit): Removed.
3796 (grub_stop): Likewise.
3797 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
3798 (grub_exit): New function.
3799 (grub_print_device_path): Likewise.
3800
3801 * kern/rescue.c (grub_rescue_cmd_exit): New function.
3802 (grub_enter_rescue_mode): Register "exit".
3803
3804 * kern/misc.c (grub_real_dprintf): A cosmetic change.
3805 (grub_abort): New function.
3806
3807 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
3808
3809 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
3810
3811 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
3812
3813 * include/grub/efi/efi.h (grub_efi_exit): Removed.
3814 (grub_print_device_path): New prototype.
3815 (grub_efi_locate_handle): Likewise.
3816 (grub_efi_open_protocol): Likewise.
3817
3818 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
3819 * disk/efi/efidisk.c: Likewise.
3820
3821 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
3822
3823 * include/grub/efi/console_control.h
3824 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
3825
3826 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
3827 last 8 bytes as an array.
3828 (GRUB_EFI_DISK_IO_GUID): New macro.
3829 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
3830 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
3831 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
3832 grub_uint8_t.
3833 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
3834 (struct grub_efi_device_path): Rename the member "sub_type" to
3835 "subtype".
3836 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
3837 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
3838 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
3839 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
3840 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
3841 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
3842 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
3843 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
3844 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
3845 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
3846 (struct grub_efi_pci_device_path): New structure.
3847 (grub_efi_pci_device_path_t): New type.
3848 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
3849 (struct grub_efi_pccard_device_path): New structure.
3850 (grub_efi_pccard_device_path_t): New type.
3851 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
3852 (struct grub_efi_memory_mapped_device_path): New structure.
3853 (grub_efi_memory_mapped_device_path_t): New type.
3854 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
3855 (struct grub_efi_vendor_device_path): New structure.
3856 (grub_efi_vendor_device_path_t): New type.
3857 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
3858 (struct grub_efi_controller_device_path): New structure.
3859 (grub_efi_controller_device_path_t): New type.
3860 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
3861 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
3862 (struct grub_efi_acpi_device_path): New structure.
3863 (grub_efi_acpi_device_path_t): New type.
3864 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
3865 (struct grub_efi_expanded_acpi_device_path): New structure.
3866 (grub_efi_expanded_acpi_device_path_t): New type.
3867 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
3868 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
3869 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
3870 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
3871 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
3872 (struct grub_efi_atapi_device_path): New structure.
3873 (grub_efi_atapi_device_path_t): New type.
3874 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
3875 (struct grub_efi_fibre_channel_device_path): New structure.
3876 (grub_efi_fibre_channel_device_path_t): New type.
3877 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
3878 (struct grub_efi_1394_device_path): New structure.
3879 (grub_efi_1394_device_path_t): New type.
3880 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
3881 (struct grub_efi_usb_device_path): New structure.
3882 (grub_efi_usb_device_path_t): New type.
3883 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
3884 (struct grub_efi_usb_class_device_path): New structure.
3885 (grub_efi_usb_class_device_path_t): New type.
3886 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
3887 (struct grub_efi_i2o_device_path): New structure.
3888 (grub_efi_i2o_device_path_t): New type.
3889 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
3890 (struct grub_efi_mac_address_device_path): New structure.
3891 (grub_efi_mac_address_device_path_t): New type.
3892 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
3893 (struct grub_efi_ipv4_device_path): New structure.
3894 (grub_efi_ipv4_device_path_t): New type.
3895 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
3896 (struct grub_efi_ipv6_device_path): New structure.
3897 (grub_efi_ipv6_device_path_t): New type.
3898 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
3899 (struct grub_efi_infiniband_device_path): New structure.
3900 (grub_efi_infiniband_device_path_t): New type.
3901 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
3902 (struct grub_efi_uart_device_path): New structure.
3903 (grub_efi_uart_device_path_t): New type.
3904 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
3905 (struct grub_efi_vendor_messaging_device_path): New structure.
3906 (grub_efi_vendor_messaging_device_path_t): New type.
3907 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
3908 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
3909 (struct grub_efi_hard_drive_device_path): New structure.
3910 (grub_efi_hard_drive_device_path_t): New type.
3911 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
3912 (struct grub_efi_cdrom_device_path): New structure.
3913 (grub_efi_cdrom_device_path_t): New type.
3914 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
3915 (struct grub_efi_vendor_media_device_path): New structure.
3916 (grub_efi_vendor_media_device_path_t): New type.
3917 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
3918 (struct grub_efi_file_path_device_path): New structure.
3919 (grub_efi_file_path_device_path_t): New type.
3920 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
3921 (struct grub_efi_protocol_device_path): New structure.
3922 (grub_efi_protocol_device_path_t): New type.
3923 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
3924 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
3925 (struct grub_efi_bios_device_path): New structure.
3926 (grub_efi_bios_device_path_t): New type.
3927 (struct grub_efi_disk_io): New structure.
3928 (grub_efi_disk_io_t): New type.
3929 (struct grub_efi_block_io_media): New structure.
3930 (grub_efi_block_io_media_t): New type.
3931 (struct grub_efi_block_io): New structure.
3932 (grub_efi_block_io_t): New type.
3933
3934 * include/grub/misc.h (grub_stop): Removed.
3935 (grub_exit): New prototype.
3936 (grub_abort): Likewise.
3937
3938 * include/grub/disk.h (enum grub_disk_dev_id): Added
3939 GRUB_DISK_DEVICE_EFIDISK_ID.
3940
3941 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
3942 disk/efi/efidisk.c.
3943 (kernel_syms.lst): Remove the target if an error occurs.
3944
49986a9f 39452006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
3946
3947 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
3948 as it was simply too buggy.
3949
970d3b8a 39502006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
3951
3952 * kern/misc.c (grub_lltoa): New function.
3953 (grub_vsprintf): Added support for the long long suffix,
3954 i.e. "ll".
3955
ff04ec24 39562006-04-20 Hollis Blanchard <hollis@penguinppc.org>
3957
3958 * Makefile.in (LDFLAGS): Add variable.
3959 (LD): Remove variable.
3960 * configure.ac: Add -m32 to LDFLAGS.
3961 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
3962 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
3963 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
3964 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
3965 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
3966 variables.
3967 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
3968 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
3969 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
3970
37e5e1a4 39712006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
3972
3973 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
3974 length for unknown glyph.
3975
c352d8dd 39762006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3977
2eab1c0d 3978 Add support for pre-loaded modules into the EFI port.
3979
3980 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
3981 completely. Accept one more argument DIR. The caller has changed.
3982
3983 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
3984
3985 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
3986 (grub_efi_loaded_image_guid): New variable.
3987 (grub_efi_get_loaded_image): New function.
3988 (grub_arch_modules_addr): Likewise.
3989
3990 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
3991 prototype.
3992
3993 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
3994 (struct grub_efi_loaded_image): New structure.
3995 (grub_efi_loaded_image_t): New type.
3996
39972006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3998
c352d8dd 3999 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
4000 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
4001 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
4002
6d01d6b4 40032006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
4004
4005 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
4006
976a4ea0 40072006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
4008
4009 * DISTLIST: Added include/grub/efi/console.h,
4010 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
4011 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
4012
4013 * include/grub/efi/console.h: New file.
4014 * include/grub/efi/time.h: Likewise.
4015 * include/grub/i386/efi/kernel.h: Likewise.
4016 * kern/efi/init.c: Likewise.
4017 * kern/efi/mm.c: Likewise.
4018 * term/efi/console.c: Likewise.
4019
4020 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
4021 (grub_stop): Removed.
4022 (grub_get_rtc): Likewise.
4023 (grub_machine_init): Simply call grub_efi_init.
4024 (grub_machine_fini): Call grub_efi_fini.
4025
4026 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
4027 (grub_efi_output_string): Removed.
4028 (grub_efi_stall): New function.
4029 (grub_stop): Likewise.
4030 (grub_get_rtc): Likewise.
4031
4032 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
4033 (grub_efi_stall): New prototype.
4034 (grub_efi_allocate_pages): Likewise.
4035 (grub_efi_free_pages): Likewise.
4036 (grub_efi_get_memory_map): Likewise.
4037 (grub_efi_mm_init): Likewise.
4038 (grub_efi_mm_fini): Likewise.
4039 (grub_efi_init): Likewise.
4040 (grub_efi_fini): Likewise.
4041
4042 * include/grub/i386/efi/time.h: Do not include
4043 grub/symbol.h. Include grub/efi/time.h.
4044 (GRUB_TICKS_PER_SECOND): Removed.
4045 (grub_get_rtc): Likewise.
4046
4047 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
4048 Added padding. The EFI spec is buggy.
4049 (GRUB_EFI_BLACK): New macro.
4050 (GRUB_EFI_BLUE): Likewise.
4051 (GRUB_EFI_GREEN): Likewise.
4052 (GRUB_EFI_CYAN): Likewise.
4053 (GRUB_EFI_RED): Likewise.
4054 (GRUB_EFI_MAGENTA): Likewise.
4055 (GRUB_EFI_BROWN): Likewise.
4056 (GRUB_EFI_LIGHTGRAY): Likewise.
4057 (GRUB_EFI_BRIGHT): Likewise.
4058 (GRUB_EFI_DARKGRAY): Likewise.
4059 (GRUB_EFI_LIGHTBLUE): Likewise.
4060 (GRUB_EFI_LIGHTGREEN): Likewise.
4061 (GRUB_EFI_LIGHTCYAN): Likewise.
4062 (GRUB_EFI_LIGHTRED): Likewise.
4063 (GRUB_EFI_LIGHTMAGENTA): Likewise.
4064 (GRUB_EFI_YELLOW): Likewise.
4065 (GRUB_EFI_WHITE): Likewise.
4066 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
4067 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
4068 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
4069 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
4070 (GRUB_EFI_BACKGROUND_RED): Likewise.
4071 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
4072 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
4073 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
4074 (GRUB_EFI_TEXT_ATTR): Likewise.
4075
4076 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
4077 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
4078 (kernel_mod_HEADERS): Added efi/time.h.
4079
83709125 40802006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
4081
4082 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
4083 include/grub/efi/api.h, include/grub/efi/console_control.h,
4084 include/grub/efi/efi.h, include/grub/efi/pe32.h,
4085 include/grub/i386/efi/time.h, kern/efi/efi.c,
4086 kern/i386/efi/init.c, kern/i386/efi/startup.S,
4087 and util/i386/efi/grub-mkimage.c.
4088
4089 * Makefile.in (RMKFILES): Added i386-efi.rmk.
4090
4091 * genmk.rb (PModule#rule): Do not export symbols if
4092 #{prefix}_EXPORTS is set to "no".
4093
4094 * conf/i386-efi.mk: New file.
4095 * conf/i386-efi.rmk: Likewise.
4096 * include/grub/efi/api.h: Likewise.
4097 * include/grub/efi/console_control.h: Likewise.
4098 * include/grub/efi/efi.h: Likewise.
4099 * include/grub/efi/pe32.h: Likewise.
4100 * include/grub/i386/efi/time.h: Likewise.
4101 * kern/efi/efi.c: Likewise.
4102 * kern/i386/efi/init.c: Likewise.
4103 * kern/i386/efi/startup.S: Likewise.
4104 * util/i386/efi/grub-mkimage.c: Likewise.
4105
41062006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 4107
4108 * include/grub/script.h: Include <grub/parser.h> and
4109 "grub_script.tab.h".
4110 (struct grub_lexer_param): New struct.
4111 (struct grub_parser_param): Likewise.
4112 (grub_script_create_arglist): Pass the state in an argument.
4113 (grub_script_add_arglist): Likewise.
4114 (grub_script_create_cmdline): Likewise.
4115 (grub_script_create_cmdblock): Likewise.
4116 (grub_script_create_cmdif): Likewise.
4117 (grub_script_create_cmdmenu): Likewise.
4118 (grub_script_add_cmd): Likewise.
4119 (grub_script_arg_add): Likewise.
4120 (grub_script_lexer_ref): Likewise.
4121 (grub_script_lexer_deref): Likewise.
4122 (grub_script_lexer_record_start): Likewise.
4123 (grub_script_lexer_record_stop): Likewise.
4124 (grub_script_mem_record): Likewise.
4125 (grub_script_mem_record_stop): Likewise.
4126 (grub_script_malloc): Likewise.
4127 (grub_script_yylex): Likewise.
4128 (grub_script_yyparse): Likewise.
4129 (grub_script_yyerror): Likewise.
4130 (grub_script_yylex): Likewise.
4131 (grub_script_lexer_init): Return the state.
4132
4133 * normal/lexer.c (grub_script_lexer_state): Removed variable.
4134 (grub_script_lexer_done): Likewise.
4135 (grub_script_lexer_getline): Likewise.
4136 (grub_script_lexer_refs): Likewise.
4137 (script): Likewise.
4138 (newscript): Likewise.
4139 (record): Likewise.
4140 (recording): Likewise.
4141 (recordpos): Likewise.
4142 (recordlen): Likewise.
4143 (grub_script_lexer_init): Return the state instead of setting
4144 global variables.
4145 (grub_script_lexer_ref): Use the newly added argument for state
4146 instead of globals.
4147 (grub_script_lexer_deref): Likewise.
4148 (grub_script_lexer_record_start): Likewise.
4149 (grub_script_lexer_record_stop): Likewise.
4150 (recordchar): Likewise.
4151 (nextchar): Likewise.
4152 (grub_script_yylex2): Likewise.
4153 (grub_script_yylex): Likewise.
4154 (grub_script_yyerror): Likewise.
4155
4156 * normal/parser.y (func_mem): Removed variable.
4157 (menu_entry): Likewise.
4158 (err): Likewise.
4159 (%lex-param): New parser option.
4160 (%parse-param): Likewise.
4161 (script): Always return the AST.
4162 (argument): Pass the state around.
4163 (arguments): Likewise.
4164 (grubcmd): Likewise.
4165 (commands): Likewise.
4166 (function): Likewise.
4167 (menuentry): Likewise.
4168 (if_statement): Likewise.
4169 (if): Likewise.
4170
4171 * normal/script.c (grub_script_memused): Removed variable.
4172 (grub_script_parsed): Likewise.
4173 (grub_script_malloc): Added a state argument. Use that instead of
4174 global variables.
4175 (grub_script_mem_record): Likewise.
4176 (grub_script_mem_record_stop): Likewise.
4177 (grub_script_arg_add): Likewise.
4178 (grub_script_add_arglist): Likewise.
4179 (grub_script_create_cmdline): Likewise.
4180 (grub_script_create_cmdif): Likewise.
4181 (grub_script_create_cmdmenu): Likewise.
4182 (grub_script_add_cmd): Likewise.
4183 (grub_script_parse): Setup the state before calling the parser.
4184
e2a8c904 41852006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 4186
4187 * normal/command.c (grub_command_init): Remove the title command.
4188
4189 * normal/lexer.c (grub_script_yylex): Renamed from this...
4190 (grub_script_yylex2): ... to this.
4191 (grub_script_yylex): New function. Temporary
4192 introduced to filter some tokens.
4193 (grub_script_yyerror): Print a newline.
4194
4195 * normal/main.c (read_config_file): Output information about the
4196 lines that contain errors. Wait for a key after all lines have
4197 been processed. Don't return an empty menu.
4198
4199 * normal/parser.y (func_mem): Don't initialize.
4200 (menu_entry): Likewise.
4201 (err): New variable.
4202 (script): Don't return anything when an error was encountered.
4203 (ws, returns): Removed rules.
4204 (argument): Disabled concatenated variable support.
4205 (arguments): Remove explicit separators.
4206 (grubcmd): Likewise.
4207 (function): Likewise.
4208 (menuentry): Likewise.
4209 (if): Likewise.
4210 (commands): Likewise. Add error handling.
4211
4212 * normal/script.c (grub_script_create_cmdline): If
4213 `grub_script_parsed' is 0, assume the parser encountered an error.
4214
c9a86192 42152006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
4216
4217 * configure.ac: Add support for EFI. Fix the typo
4218 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
4219
70f3b243 42202006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4221
4222 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
4223 foreign multibyte characters should be shown correctly.
4224
65f201ad 42252006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4226
4227 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
4228 calculation.
4229 (read_config_file): Made it to close file before returning.
4230
b4b93674 42312006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
4232
4233 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
4234 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
4235 video/i386/pc/vbefill.c.
4236
4237 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
4238 video/i386/pc/vbefill.c.
4239
4240 * include/grub/video.h (grub_video_blit_format): New enum.
4241 (grub_video_mode_info): Added new member blit_format.
4242 (grub_video_get_blit_format): New function prototype.
4243
4244 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
4245 function prototype.
4246 (grub_video_vbe_map_rgb): Likewise.
4247 (grub_video_vbe_unmap_color): Likewise.
4248
4249 * include/grub/i386/pc/vbeblit.h: New file.
4250
4251 * include/grub/i386/pc/vbefill.h: New file.
4252
4253 * video/video.c (grub_video_get_blit_format): New function.
4254 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
4255 (grub_video_vbe_map_rgb): Likewise.
4256 (grub_video_vbe_unmap_color): Likewise.
4257
4258 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
4259 optimized fills.
4260 (grub_video_vbe_blit_render_target): Changed to use more optimized
4261 blits.
4262 (grub_video_vbe_setup): Added detection for optimized settings.
4263 (grub_video_vbe_create_render_target): Likewise.
4264
4265 * video/i386/pc/vbeblit.c: New file.
4266
4267 * video/i386/pc/vbefill.c: New file.
4268
c2379b9c 42692006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
4270
4271 * font/manager.c (grub_font_get_glyph): Removed font fixup from
4272 here...
4273
4274 * util/unifont2pff.rb: ... and moved it to here. Improved argument
4275 parsing to support both hex and dec ranges. If filename was missing
4276 show usage information.
4277
bd0d7896 42782006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
4279
4280 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
4281 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
4282
4283 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
4284 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
4285 (video_mod_SOURCES): Added.
4286 (video_mod_CFLAGS): Likewise.
4287 (video_mod_LDFLAGS): Likewise.
4288 (gfxterm_mod_SOURCES): Likewise.
4289 (gfxterm_mod_CFLAGS): Likewise.
4290 (gfxterm_mod_LDFLAGS): Likewise.
4291 (videotest_mod_SOURCES): Likewise.
4292 (videotest_mod_CFLAGS): Likewise.
4293 (videotest_mod_LDFLAGS): Likewise.
4294 (vesafb_mod_SOURCES): Removed.
4295 (vesafb_mod_CFLAGS): Likewise.
4296 (vesafb_mod_LDFLAGS): Likewise.
4297 (vga_mod_SOURCES): Likewise.
4298 (vga_mod_CFLAGS): Likewise.
4299 (vga_mod_LDFLAGS): Likewise.
4300
4301 * commands/videotest.c: New file.
4302
4303 * font/manager.c (fill_with_default_glyph): Modified to use
4304 grub_font_glyph.
4305 (grub_font_get_glyph): Likewise.
4306 (fontmanager): Renamed from this...
4307 (font_manager): ... to this.
4308
4309 * include/grub/font.h (grub_font_glyph): Added new structure.
4310 (grub_font_get_glyph): Modified to use grub_font_glyph.
4311
4312 * include/grub/misc.h (grub_abs): Added as inline function.
4313
4314 * include/grub/video.h: New file.
4315
4316 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
4317 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
4318 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
4319 (grub_vbe_get_controller_info): Renamed from this...
4320 (grub_vbe_bios_get_controller_info): ... to this.
4321 (grub_vbe_get_mode_info): Renamed from this...
4322 (grub_vbe_bios_get_mode_info): ... to this.
4323 (grub_vbe_set_mode): Renamed from this...
4324 (grub_vbe_bios_set_mode): ... to this.
4325 (grub_vbe_get_mode): Renamed from this...
4326 (grub_vbe_bios_get_mode): ... to this.
4327 (grub_vbe_set_memory_window): Renamed from this...
4328 (grub_vbe_bios_set_memory_window): ... to this.
4329 (grub_vbe_get_memory_window): Renamed from this...
4330 (grub_vbe_bios_get_memory_window): ... to this.
4331 (grub_vbe_set_scanline_length): Renamed from this...
4332 (grub_vbe_set_scanline_length): ... to this.
4333 (grub_vbe_get_scanline_length): Renamed from this...
4334 (grub_vbe_bios_get_scanline_length): ... to this.
4335 (grub_vbe_set_display_start): Renamed from this...
4336 (grub_vbe_bios_set_display_start): ... to this.
4337 (grub_vbe_get_display_start): Renamed from this...
4338 (grub_vbe_bios_get_display_start): ... to this.
4339 (grub_vbe_set_palette_data): Renamed from this...
4340 (grub_vbe_bios_set_palette_data): ... to this.
4341 (grub_vbe_set_pixel_rgb): Removed.
4342 (grub_vbe_set_pixel_index): Likewise.
4343
4344 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
4345 from this...
4346 (grub_vbe_bios_get_controller_info): ... to this.
4347 (grub_vbe_get_mode_info): Renamed from this...
4348 (grub_vbe_bios_get_mode_info): ... to this.
4349 (grub_vbe_set_mode): Renamed from this...
4350 (grub_vbe_bios_set_mode): ... to this.
4351 (grub_vbe_get_mode): Renamed from this...
4352 (grub_vbe_bios_get_mode): ... to this.
4353 (grub_vbe_set_memory_window): Renamed from this...
4354 (grub_vbe_bios_set_memory_window): ... to this.
4355 (grub_vbe_get_memory_window): Renamed from this...
4356 (grub_vbe_bios_get_memory_window): ... to this.
4357 (grub_vbe_set_scanline_length): Renamed from this...
4358 (grub_vbe_set_scanline_length): ... to this.
4359 (grub_vbe_get_scanline_length): Renamed from this...
4360 (grub_vbe_bios_get_scanline_length): ... to this.
4361 (grub_vbe_set_display_start): Renamed from this...
4362 (grub_vbe_bios_set_display_start): ... to this.
4363 (grub_vbe_get_display_start): Renamed from this...
4364 (grub_vbe_bios_get_display_start): ... to this.
4365 (grub_vbe_set_palette_data): Renamed from this...
4366 (grub_vbe_bios_set_palette_data): ... to this.
4367 (grub_vbe_bios_get_controller_info): Fixed problem with registers
4368 getting corrupted after calling it. Added more pushes and pops.
4369 (grub_vbe_bios_set_mode): Likewise.
4370 (grub_vbe_bios_get_mode): Likewise.
4371 (grub_vbe_bios_get_memory_window): Likewise.
4372 (grub_vbe_bios_set_scanline_length): Likewise.
4373 (grub_vbe_bios_get_scanline_length): Likewise.
4374 (grub_vbe_bios_get_display_start): Likewise.
4375 (grub_vbe_bios_set_palette_data): Likewise.
4376
4377 * normal/cmdline.c (cl_set_pos): Refresh the screen.
4378 (cl_insert): Likewise.
4379 (cl_delete): Likewise.
4380
4381 * term/gfxterm.c: New file.
4382
4383 * term/i386/pc/vesafb.c: Removed file.
4384
4385 * video/video.c: New file.
4386
4387 * video/i386/pc/vbe.c (real2pm): Added new function.
4388 (grub_video_vbe_draw_pixel): Likewise.
4389 (grub_video_vbe_get_video_ptr): Likewise.
4390 (grub_video_vbe_get_pixel): Likewise
4391 (grub_video_vbe_init): Likewise.
4392 (grub_video_vbe_fini): Likewise.
4393 (grub_video_vbe_setup): Likewise.
4394 (grub_video_vbe_get_info): Likewise.
4395 (grub_video_vbe_set_palette): Likewise.
4396 (grub_video_vbe_get_palette): Likewise.
4397 (grub_video_vbe_set_viewport): Likewise.
4398 (grub_video_vbe_get_viewport): Likewise.
4399 (grub_video_vbe_map_color): Likewise.
4400 (grub_video_vbe_map_rgb): Likewise.
4401 (grub_video_vbe_map_rgba): Likewise.
4402 (grub_video_vbe_unmap_color): Likewise.
4403 (grub_video_vbe_fill_rect): Likewise.
4404 (grub_video_vbe_blit_glyph): Likewise.
4405 (grub_video_vbe_blit_bitmap): Likewise.
4406 (grub_video_vbe_blit_render_target): Likewise.
4407 (grub_video_vbe_scroll): Likewise.
4408 (grub_video_vbe_swap_buffers): Likewise.
4409 (grub_video_vbe_create_render_target): Likewise.
4410 (grub_video_vbe_delete_render_target): Likewise.
4411 (grub_video_vbe_set_active_render_target): Likewise.
4412 (grub_vbe_set_pixel_rgb): Remove function.
4413 (grub_vbe_set_pixel_index): Likewise.
4414 (index_color_mode): Remove static variable.
4415 (active_mode): Likewise.
4416 (framebuffer): Likewise.
4417 (bytes_per_scan_line): Likewise.
4418 (grub_video_vbe_adapter): Added new static variable.
4419 (framebuffer): Likewise.
4420 (render_target): Likewise.
4421 (initial_mode): Likewise.
4422 (mode_in_use): Likewise.
4423 (mode_list): Likewise.
4424
5f97350b 44252006-03-10 Marco Gerards <marco@gnu.org>
4426
4427 * configure.ac (AC_INIT): Bumped to 1.93.
4428
4429 * DISTLIST: Added `include/grub/hfs.h'.
4430
a3c5c6f8 44312006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
4432
4433 * boot/i386/pc/boot.S (general_error): Before looping, try INT
4434 18H, which might help the BIOS falling back to next boot media.
4435
6de53d26 44362006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
4437
4438 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
4439 Poe Chen <poe.poechen@gmail.com>.
4440
77c4a393 44412006-01-17 Marco Gerards <marco@gnu.org>
4442
4443 * include/grub/normal.h: Include <grub/script.h>.
4444 (grub_command_list): Removed struct.
4445 (grub_command_list_t): Removed type.
4446 (grub_menu_entry): Remove members `num' and `command_list'. Add
4447 members `commands' and `sourcecode'.
4448 * include/grub/script.h: Add inclusion guards.
4449 (grub_script_cmd_menuentry): New struct.
4450 (grub_script_execute_menuentry): New prototype.
4451 (grub_script_lexer_record_start): Likewise.
4452 (grub_script_lexer_record_stop): Likewise.
4453 * normal/execute.c (grub_script_execute_menuentry): New function.
4454 * normal/lexer.c (record, recording, recordpos, recordlen): New
4455 variables.
4456 (grub_script_lexer_record_start): New function.
4457 (grub_script_lexer_record_stop): Likewise.
4458 (recordchar): Likewise.
4459 (nextchar): Likewise.
4460 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
4461 2048 as the buffer size. Add the tokens `menuentry' and `@'.
4462 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
4463 (current_menu): New variable.
4464 (free_menu): Mainly rewritten.
4465 (grub_normal_menu_addentry): New function.
4466 (read_config_file): Rewritten.
4467 * normal/menu.c (run_menu_entry): Mainly rewritten.
4468 * normal/menu_entry.c (make_screen): Rewritten te code to insert
4469 the menu entry.
4470 (run): Mainly rewritten.
4471 * normal/parser.y (menu_entry): New variable.
4472 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
4473 (menuentry): New rule.
4474 (command): Add `menuentry'.
4475 (if_statement): Allow additional returns before `fi'.
4476 * normal/script.c (grub_script_create_cmdmenu): New function.
4477
144f1f98 44782006-01-03 Marco Gerards <marco@gnu.org>
4479
4480 * INSTALL: GNU Bison is required.
4481 * configure.ac: Rewritten the test to detect Bison.
4482 * Makefile.in (YACC): New variable. Reported by Xun Sun
4483 <xun.sun.cn@gmail.com>.
4484
af4b2d89 44852006-01-03 Marco Gerards <marco@gnu.org>
4486
4487 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
4488 the HFS+ filesystem to filesystem blocks.
4489 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
4490 GCC warning is silenced.
4491
15643b71 44922006-01-03 Marco Gerards <marco@gnu.org>
4493
4494 * partmap/apple.c (apple_partition_map_iterate): Convert the data
4495 read from disk from big endian to host byte order.
4496
00905879 44972006-01-03 Hollis Blanchard <hollis@penguinppc.org>
4498
4499 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
4500 documentation.
4501 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
4502 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
4503 embedded HFS+ filesystem.
4504 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
4505 (grub_hfs_sblock): Move from here...
4506 * include/grub/hfs.h: To here... New file.
4507 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
4508 documentation.
4509 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
4510 New macros.
4511 (grub_hfsplus_volheader): Change type of member `magic' to
4512 `grub_uint16_t'.
4513 (grub_hfsplus_data): Add new member `embedded_offset'.
4514 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
4515 returned block.
4516 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
4517 Calculate the offset.
4518
8899bc3e 45192005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4520
4521 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
4522 Removed.
4523 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
4524
ae8c0277 45252005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4526
4527 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
4528 ENV->NAME is NULL after allocating ENV->VALUE.
4529
07084456 45302005-12-25 Marco Gerards <marco@gnu.org>
4531
4532 * kern/env.c (grub_env_set): Rewritten the error handling code.
4533
4750f5f1 45342005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4535
4536 * geninit.sh: Made more robust, and more portable.
4537
50214199 45382005-12-25 Marco Gerards <marco@gnu.org>
4539
4540 Add support for Apple HFS+ filesystems.
4541
4542 * fs/hfsplus.c: New file.
4543
4544 * DISTLIST: Added `fs/hfsplus.c'.
4545
4546 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
4547 (hfsplus_mod_SOURCES): New variable.
4548 (hfsplus_mod_CFLAGS): Likewise.
4549 (hfsplus_mod_LDFLAGS): Likewise.
4550 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
4551 (grub_setup_SOURCES): Likewise.
4552 (grub_mkdevicemap_SOURCES): Likewise.
4553 (grub_emu_SOURCES): Likewise.
4554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4555
4556 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
4557
4558 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
4559
befaed6c 45602005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4561
4562 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
4563 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
4564 include/grub/parser.h, include/grub/script.h, kern/parser.c,
4565 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
4566 normal/lexer.c, normal/parser.y, normal/script.c, and
4567 partmap/gpt.c.
4568 Removed kern/sparc64/cache.c.
4569
4570 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
4571 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
4572 grub_emu_init.c.
4573
4574 * configure.ac (AC_INIT): Bumped to 1.92.
4575
6a124103 45762005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
4577
4578 * kern/err.c (grub_error_push): Added new function to support error
4579 stacks.
4580 (grub_error_pop): Likewise.
4581 (grub_error_stack_items): New local variable to support error stacks.
4582 (grub_error_stack_pos): Likewise.
4583 (grub_error_stack_assert): Likewise.
4584 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
4585 stack depth.
4586 (grub_print_error): Added support to print errors from error stack.
4587
4588 * include/grub/err.h (grub_error_push): Added function prototype.
4589 (grub_error_pop): Likewise.
4590
be973c1b 45912005-12-09 Hollis Blanchard <hollis@penguinppc.org>
4592
4593 * configure.ac: Accept `powerpc64' as host_cpu.
4594 (amd64): Rename to `biarch32'.
4595
4596 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
4597 non-cacheline-aligned addresses.
4598
4599 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
4600 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
4601 if `size' is non-zero.
4602
b04216ab 46032005-12-03 Marco Gerards <mgerards@xs4all.nl>
4604
4605 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
4606 and `cd' to make sure the filename is not prefixed with a
4607 directory name.
4608 (pkgdata_MODULES): Add `gpt.mod'.
4609 (gpt_mod_SOURCES): New variable.
4610 (gpt_mod_CFLAGS): Likewise.
4611 (gpt_mod_LDFLAGS): Likewise.
4612
4613 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
4614
4615 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
4616 New macro.
4617
4618 * partmap/gpt.c: New file.
4619
4620 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
4621 GPT partition map is detected.
4622
41730ed9 46232005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
4624
4625 * commands/i386/pc/play.c: New file.
4626 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
4627 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
4628 macros.
4629
95dc3643 46302005-11-27 Marco Gerards <mgerards@xs4all.nl>
4631
4632 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
4633 ((unused))' to silence gcc warning.
4634
1569ec51 46352005-11-26 Hollis Blanchard <hollis@penguinppc.org>
4636
4637 * configure.ac: Correct `AC_PROG_YACC' test.
4638
9abde152 46392005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4640
4641 * util/powerpc/ieee1275/grub-install.in: Run the mount point
4642 check before installing files.
4643
44b83271 46442005-11-22 Mike Small <smallm@panix.com>
4645
4646 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
4647 number regex so multidigit numbers are recognized correctly.
4648
46492005-11-22 Mike Small <smallm@panix.com>
4650
4651 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
4652 debugging message before attempting to claim memory.
4653 (grub_rescue_cmd_initrd): Add a claim debugging message and try
4654 multiple addresses in case of failure.
4655
9c12956b 46562005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4657
4658 * term/tparm.c (get_space): Remove empty `if' statement.
4659
4660 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
4661
4662 * kern/parser.c (check_varstate): Rename `state' to 's'.
4663
aeaf81d9 46642005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4665
4666 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
4667 variable definitions to the beginning of each function. Sort stack
4668 variables by size.
4669 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
4670 `buf' argument to `char *'.
4671
79bbb63f 46722005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4673
4674 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
4675 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4676 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4677 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4678 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4679 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4680 configfile.mod, search.mod, gzio.mod and test.mod.
4681 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4682 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4683 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4684 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4685 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4686 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4687 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4688 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4689 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4690 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4691 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4692 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4693 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4694 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4695 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4696 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4697 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4698 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4699 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4700 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4701 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4702 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4703 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
4704
4705 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
4706 `grep --include'.
4707 (pkgdata_MODULES): Add test.mod.
4708
233b1628 47092005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4710
4711 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
4712 appending to variables with "+=".
4713 (PModule): Use full pathname to generate *.lst filenames.
4714
4715 * Makefile.in: Fixed list rules moved from genmk.rb.
4716 (.DELETE_ON_ERROR): New special target.
4717 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
4718
4719 * conf/i386-pc.rmk: Include conf/common.mk.
4720 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4721 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4722 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4723 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4724 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4725 configfile.mod, search.mod, gzio.mod and test.mod.
4726 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4727 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4728 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4729 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4730 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4731 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4732 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4733 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4734 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4735 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4736 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4737 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4738 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4739 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4740 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4741 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4742 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4743 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4744 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4745 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4746 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4747 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4748 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
4749 here...
4750 * conf/common.rmk: ... to here. New file.
4751
4752 * conf/common.mk: New file.
4753
16f820c8 47542005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
4755
4756 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
4757 (grub_script.tab.c): ... here.
4758
4759 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
4760 (grub_script.tab.c): ... here.
4761
4762 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
4763 (grub_script.tab.c): ... here.
4764
4765 * normal/command.c (grub_command_find): Fixed a memory leak of
4766 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
4767
63ba1554 47682005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4769
4770 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
4771 "@" which marks the start of a comment on ARM.
4772 (VARIABLE): Likewise.
4773
7f67dc13 47742005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4775
79bbb63f 4776 Add support for Linux/ADFS partition tables.
7f67dc13 4777
4778 * partmap/acorn.c: New file.
4779
4780 * include/grub/acorn_filecore.h: Likewise.
4781
4782 * DISTLIST: Added `partmap/acorn.c' and
4783 `include/grub/acorn_filecore.h'.
4784
4785 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4786 `partmap/acorn.c'.
4787 (pkgdata_MODULES): Add `acorn.mod'.
4788 (acorn_mod_SOURCES): New variable.
4789 (acorn_mod_CFLAGS): Likewise.
4790
4791 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4792 `partmap/acorn.c'.
4793 (pkgdata_MODULES): Add `acorn.mod'.
4794 (acorn_mod_SOURCES): New variable.
4795 (acorn_mod_CFLAGS): Likewise.
4796
4797 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
4798 (pkgdata_MODULES): Add `acorn.mod'.
4799 (acorn_mod_SOURCES): New variable.
4800 (acorn_mod_CFLAGS): Likewise.
4801 (acorn_mod_LDFLAGS): Likewise.
4802
4803 * include/types.h (grub_disk_addr_t): New typedef.
4804
6d099807 48052005-11-13 Marco Gerards <mgerards@xs4all.nl>
4806
4807 * geninit.sh: New file.
4808
4809 * geninitheader.sh: Likewise.
4810
4811 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
4812 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
4813 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
4814 * commands/configfile.c (grub_configfile_init)
4815 (grub_configfile_fini): Likewise.
4816 * commands/default.c (grub_default_init, grub_default_fini):
4817 Likewise.
4818 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
4819 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
4820 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
4821 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
4822 Likewise.
4823 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
4824 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
4825 Likewise.
4826 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
4827 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
4828 Likewise.
4829 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
4830 Likewise.
4831 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
4832 Likewise.
4833 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
4834 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
4835 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
4836 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
4837 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
4838 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
4839 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
4840 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
4841 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
4842 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
4843 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
4844 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
4845 * partmap/amiga.c (grub_amiga_partition_map_init)
4846 (grub_amiga_partition_map_fini): Likewise.
4847 * partmap/apple.c (grub_apple_partition_map_init)
4848 (grub_apple_partition_map_fini): Likewise.
4849 * partmap/pc.c (grub_pc_partition_map_init)
4850 (grub_pc_partition_map_fini): Likewise.
4851 * partmap/sun.c (grub_sun_partition_map_init,
4852 grub_sun_partition_map_fini): Likewise.
4853 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
4854 Likewise.
4855
4856 * util/grub-emu.c: Include <grub_modules_init.h>.
4857 (main): Don't initialize and de-initialize any modules directly,
4858 use `grub_init_all' and `grub_fini_all' instead.
4859
4860 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
4861 `grub_vesafb_mod_init'.
4862 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
4863 all users.
4864 * term/i386/pc/vga.c (grub_vga_init): Renamed to
4865 `grub_vga_mod_init'. Updated all users.
4866 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
4867
4868 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
4869 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
4870 rules.
4871
4872 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
4873 Generate a function to initialize the module in utilities.
4874 Updated all callers.
4875 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
4876 initialize the module in utilities. Updated all callers.
4877
9046bcf0 48782005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4879
4880 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
4881 escape sequence and a literal ^L to clear the screen.
4882
4883 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
4884 when returning from Open Firmware.
4885
d13ea639 48862005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4887
4888 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
4889 (grub_ofconsole_height): Likewise.
4890 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
4891 manually insert a '\n'.
4892 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
4893 `grub_ofconsole_height'. Return early if these are already set.
4894
a8fcf206 48952005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
4896
4897 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4898 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
4899 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
4900 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
4901 and `normal/script.c'.
4902 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4903 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4904 (test_mod_SOURCES): New variable.
4905 (test_mod_CFLAGS): Likewise.
4906 (test_mod_LDFLAGS): Likewise.
4907 (pkgdata_MODULES): Add `test.mod'.
4908 (grub_script.tab.c): New rule.
4909 (grub_script.tab.h): Likewise.
4910
b6b32745 49112005-11-07 Marco Gerards <mgerards@xs4all.nl>
4912
4913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4914 `commands/test.c', `normal/execute.c', `normal/lexer.c',
4915 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4916 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4917 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4918 (test_mod_SOURCES): New variable.
4919 (test_mod_CFLAGS): Likewise.
4920 (pkgdata_MODULES): Add `test.mod'.
4921 (grub_script.tab.c): New rule.
4922 (grub_script.tab.h): Likewise.
4923
daac212a 49242005-11-06 Marco Gerards <mgerards@xs4all.nl>
4925
4926 Add initial scripting support.
4927
4928 * commands/test.c: New file.
4929 * include/grub/script.h: Likewise.
4930 * normal/execute.c: Likewise.
4931 * normal/function.c: Likewise.
4932 * normal/lexer.c: Likewise.
4933 * normal/parser.y: Likewise.
4934 * normal/script.c: Likewise.
4935
4936 * configure.ac: Add `AC_PROG_YACC' test.
4937
4938 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
4939 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
4940 `normal/function.c' and `normal/script.c'.
4941 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4942 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 4943 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
4944 variables.
daac212a 4945 (pkgdata_MODULES): Add `test.mod'.
4946 (grub_script.tab.c): New rule.
4947 (grub_script.tab.h): Likewise.
4948
4949 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
4950
4951 * include/grub/normal.h (grub_test_init): New prototype.
4952 (grub_test_fini): Likewise.
4953
4954 * normal/command.c: Include <grub/script.h>.
4955 (grub_command_execute): Rewritten.
4956
4957 * util/grub-emu.c (main): Call `grub_test_init' and
4958 `grub_test_fini'.
4959
77500b2b 49602005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4961
4962 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
4963 to 0.
4964 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
4965 there are no pending characters.
4966
e45deb9e 49672005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4968
4969 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
4970 `grub_strndup' to drop device arguments. Replace unnecessary
4971 `grub_strndup' with `grub_strdup'.
4972
4ce32619 49732005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4974
4975 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
4976 `debug' environment variable has been set.
4977
49782005-11-02 Hollis Blanchard <hollis@penguinppc.org>
4979
4980 * Makefile.in (install-local): Use $(DATA).
4981 (uninstall): Likewise.
4982 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
4983 (sbin_UTILITIES): ... to here.
4984 (sbin_SCRIPTS): New variable.
4985 (grub_install_SOURCES): New variable.
4986 * util/powerpc/ieee1275/grub-install.in: New file.
4987 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
4988 variable.
4989 (add_segments): Call `grub_util_get_path'.
4990
25fe6f03 49912005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4992
4993 From Timothy Baldwin:
4994 * commands/ls.c (grub_ls_list_files): Close FILE with
4995 grub_file_close.
4996 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
4997
04ccf3ec 49982005-10-24 Marco Gerards <mgerards@xs4all.nl>
4999
5000 * include/grub/parser.h: New file.
5001
5002 * kern/parser.c: Likewise.
5003
5004 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
5005 (grub_setup_SOURCES): Likewise.
5006 (grub_probefs_SOURCES): Likewise.
5007 (grub_emu_SOURCES): Likewise.
5008 (kernel_img_HEADERS): Add `parser.h'.
5009
5010 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
5011 (grub_emu_SOURCES): Add `kern/parser.c'.
5012 (grubof_SOURCES): Likewise.
5013
5014 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
5015 (grubof_SOURCES): Add `kern/parser.c'.
5016
5017 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
5018
5019 * kern/misc.c (grub_split_cmdline): Removed function.
5020
5021 * kern/rescue.c: Include <grub/parser.h>.
5022 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
5023 of `grub_split_cmdline'.
5024
5025 * normal/command.c: Include <grub/parser.h>.
5026 (grub_command_execute): Use `grub_parser_split_cmdline' instead
5027 of `grub_split_cmdline'.
5028
5029 * normal/completion.c: Include <grub/parser.h>.
5030 (cmdline_state): New variable.
5031 (iterate_dir): End the filename with a quote depending on the
5032 command line state.
5033 (get_state): new function.
5034 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
5035 split the arguments and determine the current argument. When the
5036 argument string is not quoted, escape all spaces.
5037
6d8f4b0e 50382005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5039
5040 * normal/sparc64/setjmp.S: New file.
5041
15cf03ed 50422005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5043
5044 * include/grub/sparc64/libgcc.h: New file.
5045 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
5046 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
5047 normal/sparc64/setjmp.c.
5048
03e8661a 50492005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5050
5051 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
5052 * kern/sparc64/cache.S: New file.
5053 * kern/sparc64/cache.c: Removed.
5054 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
5055 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
5056 -mtune=ultrasparc.
5057 (COMMON_LDFLAGS): Add -melf64_sparc.
5058 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
5059 (grubof_SOURCES): Use cache.S instead of cache.c.
5060 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
5061 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
5062 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
5063 commented though.
5064 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
5065 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
5066 (linux_mod_CFLAGS): Commented out.
5067 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
5068 out because module isn't built.
5069 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
5070 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
5071 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
5072 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
5073 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
5074 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
5075 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
5076 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
5077 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
5078 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
5079 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5080 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5081 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
5082 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
5083
34eeec8a 50842005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
5085
5086 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
5087 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
5088 longer, because HFS should not be used on PC.
5089
708367a3 50902005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5091
5092 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
5093 consistently within the loop.
5094
6fa1251a 50952005-10-15 Marco Gerards <mgerards@xs4all.nl>
5096
5097 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
5098 directory can not be read.
5099
4801580b 51002005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5101
5102 * configure.ac (AC_INIT): Increase the version number to 1.91.
5103
5104 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
5105 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
5106 term/i386/pc/serial.c.
5107
219ad426 51082005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5109
5110 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
5111 file size must be permitted.
5112
5113 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
5114 between %ah and %al.
5115
688e5699 51162005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5117
5118 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
5119 grub_uint64_t.
5120 Call the hook with a NUL-terminated filename.
5121 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
5122 grub_cpu_to_be32.
5123
5124 * kern/term.c (cursor_state): New variable.
5125 (grub_term_set_current): Reset the cursor state on a new
5126 terminal.
5127 (grub_setcursor): Rewritten to use CURSOR_STATE.
5128 (grub_getcursor): New function.
5129
5130 * include/grub/term.h (grub_getcursor): New prototype.
5131
5132 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
5133 integers on ARM. Reported by Timothy Baldwin
5134 <T.E.Baldwin99@members.leeds.ac.uk>.
5135
bb34586c 51362005-10-11 Marco Gerards <mgerards@xs4all.nl>
5137
5138 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
5139 allocated.
5140 (grub_sfs_dir): Likewise.
5141
9a909877 51422005-10-09 Marco Gerards <mgerards@xs4all.nl>
5143
5144 Add support for the SFS filesystem.
5145
5146 * fs/sfs.c: New file.
5147
5148 * DISTLIST: Added `fs/sfs.c'.
5149
5150 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
5151 (grub_probefs_SOURCES): Likewise.
5152 (grub_emu_SOURCES): Likewise.
5153 (pkgdata_MODULES): Add `sfs.mod'.
5154 (sfs_mod_SOURCES): New variable.
5155 (sfs_mod_CFLAGS): Likewise.
5156 (sfs_mod_LDFLAGS): Likewise.
5157
5158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
5159 (pkgdata_MODULES): Add `sfs.mod'.
5160 (sfs_mod_SOURCES): New variable.
5161 (sfs_mod_CFLAGS): Likewise.
5162
5163 * util/grub-emu.c (main): Call `grub_sfs_init' and
5164 `grub_sfs_fini'.
5165
5166 * include/grub/fs.h (grub_sfs_init): New prototype.
5167 (grub_sfs_fini): Likewise.
5168
57bdbde3 51692005-10-07 Marco Gerards <mgerards@xs4all.nl>
5170
5171 Add support for the AFFS filesystem.
5172
5173 * fs/affs.c: New file.
5174
5175 * DISTLIST: Added `fs/affs.c'.
5176
5177 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
5178 (grub_probefs_SOURCES): Likewise.
5179 (grub_emu_SOURCES): Likewise.
5180 (pkgdata_MODULES): Add `affs.mod'.
5181 (affs_mod_SOURCES): New variable.
5182 (affs_mod_CFLAGS): Likewise.
5183 (affs_mod_LDFLAGS): Likewise.
5184
5185 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
5186 (pkgdata_MODULES): Add `affs.mod'.
5187 (affs_mod_SOURCES): New variable.
5188 (affs_mod_CFLAGS): Likewise.
5189
5190 * util/grub-emu.c (main): Call `grub_affs_init' and
5191 `grub_affs_fini'.
5192
5193 * include/grub/fs.h (grub_affs_init): New prototype.
5194 (grub_affs_fini): Likewise.
5195
047b67e0 51962005-10-01 Marco Gerards <mgerards@xs4all.nl>
5197
5198 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
5199
59b8208a 52002005-10-01 Marco Gerards <mgerards@xs4all.nl>
5201
5202 * configure.ac: Accept `x86_64' as host_cpu. In that case add
5203 `-m32' to CFLAGS.
5204
5205 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
5206 linking.
5207
5208 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
5209 (COMMON_LDFLAGS): New variable.
5210 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
5211 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
5212 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
5213 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
5214 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
5215 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
5216 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
5217 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
5218 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
5219 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
5220 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
5221 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
5222 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
5223 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
5224 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
5225 variables.
5226 (normal_mod_ASFLAGS): Add `-m32'.
5227
5228 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
5229 (grub_host_size_t, grub_host_ssize_t): New types.
5230 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
5231 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
5232 `GRUB_HOST_SIZEOF_VOID_P'.
5233
5234 * include/grub/kernel.h (struct grub_module_header): Type of
5235 member offset changed to `grub_host_off_t'. Type of member size
5236 changed to `grub_host_size_t'.
5237 (struct grub_module_info): Type of member offset changed to
5238 `grub_host_off_t'. Type of member size changed to
5239 `grub_host_size_t'.
5240
b4093103 52412005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
5242
5243 Make GRUB's kernel compliant to Multiboot Specification.
5244
5245 * kern/i386/pc/startup.S (multiboot_header): New label.
5246 (multiboot_entry): Likewise.
5247 (multiboot_trampoline): Likewise.
5248
5249 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5250 Increased to 0x4A0.
5251
5252 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
5253 put parentheses after a question mark.
5254 [!GRUB_UTIL] (my_mod): New variable.
5255
5256 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
5257
b2499b29 52582005-09-28 Marco Gerards <mgerards@xs4all.nl>
5259
5260 Adds support for the XFS filesystem. Btrees are not supported
5261 yet.
5262
5263 * fs/xfs.c: New file.
5264
5265 * DISTLIST: Added `fs/xfs.c'.
5266
5267 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
5268 (grub_probefs_SOURCES): Likewise.
5269 (grub_emu_SOURCES): Likewise.
5270 (pkgdata_MODULES): Add `xfs.mod'.
5271 (xfs_mod_SOURCES): New variable.
5272 (xfs_mod_CFLAGS): Likewise.
5273
5274 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
5275 (pkgdata_MODULES): Add `xfs.mod'.
5276 (xfs_mod_SOURCES): New variable.
5277 (xfs_mod_CFLAGS): Likewise.
5278
5279 * util/grub-emu.c (main): Call `grub_xfs_init' and
5280 `grub_xfs_fini'.
5281
5282 * include/grub/fs.h (grub_xfs_init): New prototype.
5283 (grub_xfs_fini): Likewise.
5284
5285
83d37a62 52862005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
5287
5288 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
5289 color modes, allow greater than 16 colors to be configured as
5290 a default palette.
5291
47d2d65e 52922005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5293
5294 * normal/completion.c (complete_arguments): Add the qualifier
5295 const into OPTIONS.
5296
5297 From Omniflux <omniflux+lists@omniflux.com>:
5298 * include/grub/terminfo.h: New file.
5299 * include/grub/tparm.h: Likewise.
5300 * include/grub/i386/pc/serial.h: Likewise.
5301 * term/terminfo.c: Likewise.
5302 * term/tparm.c: Likewise.
5303 * term/i386/pc/serial.c: Likewise.
5304 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
5305 serial.mod.
5306 (terminfo_mod_SOURCES): New variable.
5307 (terminfo_mod_CFLAGS): Likewise.
5308 (serial_mod_SOURCES): Likewise.
5309 (serial_mod_CFLAGS): Likewise.
5310
48b671ff 53112005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
5312
5313 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
5314 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
5315 and kern/powerpc/ieee1275/cmain.c, respectively.
5316
5317 * boot/powerpc/ieee1275/crt0.S: Moved to ...
5318 * kern/powerpc/ieee1275/crt0.S: ... here.
5319
5320 * boot/powerpc/ieee1275/cmain.c: Moved to ...
5321 * kern/powerpc/ieee1275/cmain.c: ... here.
5322
5323 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
5324 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
5325 instead of boot/powerpc/ieee1275/crt0.S and
5326 boot/powerpc/ieee1275/cmain.c, respectively.
5327
5328 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
5329 sectors. It was not used anyway.
5330
09fc77a7 53312005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5332
5333 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
5334 `unused parameter' warning.
5335
003789c7 53362005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5337
5338 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
5339 function.
5340 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
5341 getcharwidth.
5342
67f44c86 53432005-08-28 Marco Gerards <metgerards@student.han.nl>
5344
5345 * include/grub/normal.h (enum grub_completion_type): Added
5346 `GRUB_COMPLETION_TYPE_ARGUMENT'.
5347
5348 * normal/cmdline.c (print_completion): Handle
5349 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
5350 * normal/menu_entry.c (store_completion): Likewise.
5351
5352 * normal/completion.c (complete_arguments): New function.
5353 (grub_normal_do_completion): Call `complete_arguments' when the
5354 current words start with a dash.
5355
0b5abe02 53562005-08-27 Marco Gerards <metgerards@student.han.nl>
5357
5358 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
5359 `gzio.mod' instead of `io.mod').
5360
d9864ee1 53612005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
5362
5363 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
5364 (DISTDIRS): Added io and video.
5365 Rewrite the search routine to make an output consistently.
5366
5367 * DISTLIST: Added conf/sparc64-ieee1275.mk,
5368 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
5369 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
5370 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
5371 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
5372 util/powerpc/ieee1275/misc.c.
5373
5374 * include/grub/gzio.h: New file.
5375 * io/gzio.c: Likewise.
5376
5377 * kern/file.c (grub_file_close): Call grub_device_close only if
5378 FILE->DEVICE is not NULL.
5379
5380 * include/grub/mm.h [!NULL] (NULL): New macro.
5381
5382 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
5383
5384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
5385 (pkgdata_MODULES): Added gzio.mod.
5386 (gzio_mod_SOURCES): New variable.
5387 (gzio_mod_CFLAGS): Likewise.
5388
5389 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
5390 (pkgdata_MODULES): Added gzio.mod.
5391 (gzio_mod_SOURCES): New variable.
5392 (gzio_mod_CFLAGS): Likewise.
5393
5394 * commands/cat.c: Include grub/gzio.h.
5395 (grub_cmd_cat): Use grub_gzfile_open instead of
5396 grub_file_open.
5397
5398 * commands/cmp.c: Include grub/gzio.h.
5399 (grub_cmd_cmp): Use grub_gzfile_open instead of
5400 grub_file_open.
5401
5402 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
5403 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
5404 grub_file_open.
5405 (grub_rescue_cmd_module): Likewise.
5406
fa46f4b5 54072005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5408
5409 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
5410 kern/sparc64/ieee1275/init.c because it contains _start.
5411 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
5412
e9211b5d 54132005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5414
5415 * configure.ac: Add support for sparc64 host with ieee1275
5416 firmware.
5417 * configure: Generated from configure.ac.
5418 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
5419 instead of int.
5420 (grub_ofdisk_read): Likewise.
5421 (grub_ofdisk_open): Use %p to print pointer values, and cast the
5422 pointers as (void *) to remove a warning.
5423 (grub_ofdisk_close): Likewise.
5424 (grub_ofdisk_read): Likewise.
5425 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
5426 returns, so make it return void to remove a warning.
5427 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
5428 Corresponding prototype change.
5429 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
5430 values, and cast the pointers as (void *) to remove a warning.
5431 (grub_mm_dump): Likewise.
5432 * conf/sparc64-ieee1275.mk: New file.
5433 * conf/sparc64-ieee1275.rmk: Likewise.
5434 * include/grub/sparc64/setjmp.h: Likewise.
5435 * include/grub/sparc64/types.h: Likewise.
5436 * include/grub/sparc64/ieee1275/console.h: Likewise.
5437 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5438 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5439 * include/grub/sparc64/ieee1275/time.h: Likewise.
5440 * kern/sparc64/cache.c: Likewise.
5441 * kern/sparc64/dl.c: Likewise.
5442 * kern/sparc64/ieee1275/init.c: Likewise.
5443 * kern/sparc64/ieee1275/openfw.c: Likewise.
5444
385c6a92 54452005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
5446
5447 * util/console.c (grub_ncurses_putchar): If C is greater than
5448 0x7f, set C to a question mark.
5449 (grub_ncurses_getcharwidth): New function.
5450 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
5451 getcharwidth.
5452
5453 * normal/menu.c (print_entry): Made aware of Unicode. First,
5454 convert TITLE to UCS-4, and predict the cursor position by
5455 grub_getcharwidth.
5456
5457 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
5458 const to SRC.
5459 * kern/misc.c (grub_utf16_to_utf8): Likewise.
5460
16ccb8b1 54612005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5462
5463 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
5464 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5465 grub_strcat.
5466
5467 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
5468 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5469 grub_strcpy and grub_strlen. Take it into account that a space
5470 character is inserted as a delimiter.
5471
6a85ce79 54722005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5473
5474 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
5475 invalid magic in thre error.
5476
5477 * commands/search.c: New file.
5478
5479 * util/grub-emu.c (main): Call grub_search_init and
5480 grub_search_fini.
5481
5482 * kern/rescue.c (grub_rescue_print_disks): Removed.
5483 (grub_rescue_print_devices): New function.
5484 (grub_rescue_cmd_ls): Use grub_device_iterate with
5485 grub_rescue_print_devices instead of grub_disk_dev_iterate with
5486 grub_rescue_print_disks.
5487
5488 * kern/partition.c (grub_partition_iterate): Return the result of
5489 PARTMAP->ITERATE instead of GRUB_ERRNO.
5490
5491 * kern/device.c: Include grub/partition.h.
5492 (grub_device_iterate): New function.
5493
5494 * include/grub/partition.h (grub_partition_iterate): Return int
5495 instead of grub_err_t.
5496
5497 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
5498 prototype.
5499 [GRUB_UTIL] (grub_search_fini): Likewise.
5500
5501 * include/grub/device.h (grub_device_iterate): New prototype.
5502
5503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5504 commands/search.c.
5505 (pkgdata_MODULES): Added search.mod.
5506 (search_mod_SOURCES): New variable.
5507 (search_mod_CFLAGS): Likewise.
5508
5509 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
5510 (pkgdata_MODULES): Added search.mod.
5511 (search_mod_SOURCES): New variable.
5512 (search_mod_CFLAGS): Likewise.
5513
5514 * commands/ls.c (grub_ls_list_disks): Renamed to ...
5515 (grub_ls_list_devices): ... this, and use grub_device_iterate.
5516 All callers changed.
5517
5518 * DISTLIST: Added commands/search.c.
5519
ef095434 55202005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5521
5522 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
5523 conversion.
5524 (grub_getcharwidth): New function.
5525
5526 * kern/misc.c (grub_utf8_to_ucs4): New function.
5527
5528 * include/grub/term.h (struct grub_term): Added a new member
5529 "getcharwidth".
5530 (grub_getcharwidth): New prototype.
5531
5532 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
5533
5534 * term/i386/pc/console.c (map_char): New function. Segregated from
5535 grub_console_putchar.
5536 (grub_console_putchar): Use map_char.
5537 (grub_console_getcharwidth): New function.
5538 (grub_console_term): Specified grub_console_getcharwidth as
5539 getcharwidth.
5540
5541 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
5542 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
5543
5544 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
5545 GRUB_ERRNO.
5546 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
5547 on grub_strtoul completely.
5548 (write_char): Declare local variables in the beginning of the
5549 function.
5550 (grub_vesafb_getcharwidth): New function.
5551 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
5552 getcharwidth.
5553
1f0a95e4 55542005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
5555
5556 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
5557 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
5558 commands/i386/pc/vbetest.c.
5559
5560 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
5561 call grub_vbe_get_controller_info again, because the returned
5562 information is volatile.
5563 (grub_vbe_set_video_mode): Mostly rewritten.
5564 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
5565 grub_vbe_status_t correctly.
5566 (grub_vbe_get_video_mode_info): Likewise.
5567 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
5568 several if statements.
5569
5570 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
5571 * commands/i386/pc/vbeinfo.c: ... this.
5572
5573 * commands/i386/pc/vbe_test.c: Renamed to ...
5574 * commands/i386/pc/vbetest.c: ... this.
5575
5576 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
5577 ...
5578 (grub_cmd_vbeinfo): ... this. Save video modes before
5579 iterating. Skip a video mode, if it is not available, not enough
5580 information is given or it is monochrome. Show the memory
5581 model. Leave the interpretation of MODEVAR to grub_strtoul
5582 completely.
5583 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
5584 (GRUB_MOD_FINI): Likewise.
5585
5586 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
5587 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
5588 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
5589 duplicated grub_env_get. Leave the interpretation of MODEVAR to
5590 grub_strtoul completely.
5591 (real2pm): Removed.
5592 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
5593 (GRUB_MOD_FINI): Likewise.
5594
5595 * normal/misc.c: Include grub/mm.h.
5596
5597 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
5598 vbe_list_modes with vbetest.mod and vbeinfo.mod.
5599 (vbe_list_modes_mod_SOURCES): Removed.
5600 (vbe_list_modes_mod_CFLAGS): Likewise.
5601 (vbe_test_mod_SOURCES): Likewise.
5602 (vbe_test_mod_CFLAGS): Likewise.
5603 (vbeinfo_mod_SOURCES): New variable.
5604 (vbeinfo_mod_CFLAGS): Likewise.
5605 (vbetest_mod_SOURCES): Likewise.
5606 (vbetest_mod_CFLAGS): Likewise.
5607
992ffbbe 56082005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
5609
5610 * normal/misc.c: New file.
5611
5612 * DISTLIST: Added normal/misc.c.
5613
5614 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
5615 DISK to HOOK. Call HOOK with DISK.
5616 * partmap/apple.c (apple_partition_map_iterate): Likewise.
5617 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5618 * partmap/sun.c (sun_partition_map_iterate): Likewise.
5619
5620 * normal/menu_entry.c (struct screen): Added a new member
5621 "completion_shown".
5622 (completion_buffer): New global variable.
5623 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
5624 (store_completion): New function.
5625 (complete): Likewise.
5626 (clear_completions): Likewise.
5627 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
5628 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
5629 a tab, call complete.
5630
5631 * normal/completion.c (disk_dev): Removed.
5632 (print_simple_completion): Likewise.
5633 (print_partition_completion): Likewise.
5634 (print_func): New global variable.
5635 (add_completion): Do not take the arguments WHAT or PRINT any
5636 longer. Added a new argument TYPE. Instead of printing directly,
5637 call PRINT_FUNC if not NULL.
5638 All callers changed.
5639 (complete_device): Use a local variable DEV instead of
5640 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
5641 (grub_normal_do_completion): Take a new argument HOOK. Do not
5642 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
5643 empty string, return NULL instead.
5644 All callers changed.
5645
5646 * normal/cmdline.c (print_completion): New function.
5647
5648 * kern/partition.c (grub_partition_iterate): Add an argument DISK
5649 to HOOK.
5650 All callers changed.
5651
5652 * kern/disk.c (grub_print_partinfo): Removed.
5653
5654 * include/grub/partition.h (struct grub_partition_map): Add a new
5655 argument DISK into HOOK of ITERATE.
5656 (grub_partition_iterate): Add a new argument DISK to HOOK.
5657
5658 * include/grub/normal.h (enum grub_completion_type): New enum.
5659 (grub_completion_type_t): New type.
5660 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
5661 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
5662 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
5663 (GRUB_COMPLETION_TYPE_FILE): Likewise.
5664 (grub_normal_do_completion): Added a new argument HOOK.
5665 (grub_normal_print_device_info): New prototype.
5666
5667 * include/grub/disk.h (grub_print_partinfo): Removed.
5668
5669 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
5670 (normal_mod_SOURCES): Likewise.
5671 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5672 (normal_mod_SOURCES): Likewise.
5673
5674 * commands/ls.c (grub_ls_list_disks): Use
5675 grub_normal_print_device_info instead of grub_print_partinfo. Free
5676 PNAME.
5677 (grub_ls_list_files): Use grub_normal_print_device_info instead of
5678 duplicating the code.
5679
0bd41162 56802005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5681
5682 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
5683 follow GCS more precisely.
5684 * commands/i386/pc/vbe_test.c: Likewise.
5685 * include/grub/i386/pc/vbe.h: Likewise.
5686 * term/i386/pc/vesafb.c: Likewise.
5687 * video/i386/pc/vbe.c: Likewise.
5688
6323696a 56892005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5690
5691 * DISTLIST: Added term/i386/pc/vesafb.c
5692 DISTLIST: Added video/i386/pc/vbe.c
5693 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
5694 DISTLIST: Added commands/i386/pc/vbe_test.c.
5695 * commands/i386/pc/vbe_list_modes.c: New file.
5696 * commands/i386/pc/vbe_test.c: Likewise.
5697 * term/i386/pc/vesafb.c: Likewise.
5698 * video/i386/pc/vbe.c: Likewise.
5699 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
5700 (grub_vbe_probe) Added prototype.
5701 (grub_vbe_set_video_mode) Likewise.
5702 (grub_vbe_get_video_mode) Likewise.
5703 (grub_vbe_get_video_mode_info) Likewise.
5704 (grub_vbe_set_pixel_rgb) Likewise.
5705 (grub_vbe_set_pixel_index) Likewise.
5706 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
5707 (pkgdata_MODULES): Added vesafb.mod.
5708 (pkgdata_MODULES): Added vbe_list_modes.mod.
5709 (pkgdata_MODULES): Added vbe_test.mod.
5710 (vbe_mod_SOURCES): Added.
5711 (vbe_mod_CFLAGS): Likewise.
5712 (vesafb_mod_SOURCES): Likewise.
5713 (vesafb_mod_CFLAGS): Likewise.
5714 (vbe_list_modes_mod_SOURCES): Likewise.
5715 (vbe_list_modes_mod_CFLAGS): Likewise.
5716 (vbe_test_mod_SOURCES): Likewise.
5717 (vbe_test_mod_CFLAGS): Likewise.
5718
0a74e62f 57192005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
5720
0a74e62f 5721 * normal/command.c (grub_command_execute): If INTERACTIVE is
5722 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
5723 CMDLINE. Disable the pager if INTERACTIVE is true.
5724 All callers are changed.
5725
5726 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
5727 before reading a config file.
5728 * normal/main.c (read_config_file): Even if a command is not
5729 found, register it if it is within an entry.
5730
5731 * util/grub-emu.c: Include sys/types.h and unistd.h.
5732 (options): Added --hold.
5733 (struct arguments): Added a new member "hold".
5734 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
5735 missing.
5736 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
5737 cleared by a debugger, if it is not zero.
5738
5739 * include/grub/normal.h (grub_command_execute): Add an argument
5740 INTERACTIVE.
5741
e51f85ae 57422005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
5743
5744 * DISTLIST: Added include/grub/i386/pc/vbe.h.
5745
e9c6f39b 57462005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
5747
5748 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
5749 program with another one, because the old one didn't detect a bug
5750 in gcc-3.4. Always use regparm 2, because the new test is still
5751 not enough for gcc-4.0. Someone must investigate a simple test
5752 case which detects a bug in gcc-4.0.
5753
8de3495c 57542005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
5755
5756 * DISTLIST: Added normal/completion.c.
5757
5758 * normal/completion.c: New file.
5759
5760 * term/i386/pc/console.c (grub_console_getwh): New function.
5761 (grub_console_term): Assign grub_console_getwh to getwh.
5762
5763 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
5764 function is defined in normal/completion.c as
5765 grub_normal_do_completion.
5766 (grub_cmdline_get): Use grub_normal_do_completion instead of
5767 grub_tab_complete.
5768
5769 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
5770 returns non-zero, otherwise return 0.
5771 (grub_partition_iterate): First, probe the partition map. Then,
5772 call ITERATE only for this partition map.
5773
5774 * kern/misc.c (grub_strncmp): Rewritten.
5775
5776 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
5777 returns non-zero. Otherwise return 0.
5778
5779 * include/grub/partition.h (grub_partition_map_iterate): Return
5780 int instead of void.
5781
5782 * include/grub/normal.h (grub_normal_do_completion): New prototype.
5783
5784 * include/grub/misc.h (grub_strncmp): Change the type of N to
5785 grub_size_t.
5786
5787 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
5788 of void.
5789
5790 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
5791 unsigned explictly before comparing it with I.
5792
5793 * kern/main.c (grub_env_write_root): Add the attribute unused into
5794 VAR.
5795
5796 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5797 normal/completion.c.
5798 (normal_mod_SOURCES): Likewise.
5799 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5800 (normal_mod_SOURCES): Likewise.
5801
5802 * normal/command.c (grub_iterate_commands): If ITERATE returns
5803 non-zero, return one immediately.
5804
e85e144b 58052005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
5806
5807 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
5808 * kern/i386/pc/startup.S: Updated Global Descriptor table's
5809 descriptions.
5810 (grub_vbe_get_controller_info): New function.
5811 (grub_vbe_get_mode_info): Likewise.
5812 (grub_vbe_set_mode): Likewise.
5813 (grub_vbe_get_mode): Likewise.
5814 (grub_vbe_set_memory_window): Likewise.
5815 (grub_vbe_get_memory_window): Likewise.
5816 (grub_vbe_set_scanline_length): Likewise.
5817 (grub_vbe_get_scanline_length): Likewise.
5818 (grub_vbe_set_display_start): Likewise.
5819 (grub_vbe_get_display_start): Likewise.
5820 (grub_vbe_set_palette_data): Likewise.
5821 * include/grub/i386/pc/vbe.h: New file.
5822
c46153d2 58232005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5824
5825 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5826 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
5827 * DISTLIST: Likewise.
5828 * kern/ieee1275/of.c: Moved to ...
5829 * kern/ieee1275/ieee1275.c: ... here.
5830
0cb90c45 58312005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5832
5833 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
5834 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
5835 Pass 0 as `end' parameter to grub_strtoul().
5836
a19fb360 58372005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5838
5839 * include/grub/powerpc/ieee1275/console.h: Do not include
5840 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
5841 ifdef.
5842 (grub_console_cur_color): Remove i386-specific prototype.
5843 (grub_console_real_putchar): Likewise.
5844 (grub_console_checkkey): Likewise.
5845 (grub_console_getkey): Likewise.
5846 (grub_console_getxy): Likewise.
5847 (grub_console_gotoxy): Likewise.
5848 (grub_console_cls): Likewise.
5849 (grub_console_setcursor): Likewise.
5850 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
5851 Include <grub/machine/console.h>.
5852 * term/ieee1275/ofconsole.c: Likewise.
5853
4ac9bd04 58542005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
5855
5856 * Makefile.in (LIBLZO): New variable.
5857
5858 * configure.ac: Check for LZO version 2.
5859
5860 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
5861 lzo/lzo1x.h instead of lzo1x.h.
5862
5863 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
5864 of -llzo.
5865
5866 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
5867 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
5868
5869 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
5870 copying the data from PARTITION to P.
5871
f4917dfd 58722005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5873
5874 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
5875 negative, unload the module.
5876
5877 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
5878 map is "pc_partition_map" but not "pc".
5879 (usage): Fix the description. The options are --boot-image and
5880 --core-image but not --boot-file or --core-file.
5881 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
5882 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
5883 DEFAULT_DIRECTORY.
5884
5885 * util/i386/pc/grub-install.in: Do not specify --boot-file or
5886 --core-file. Specify INSTALL_DEVICE as an argument.
5887
5888 * util/console.c: Include config.h.
5889 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
5890 [HAVE_NCURSES_H]: Include ncurses.h.
5891 [HAVE_CURSES_H]: Include curses.h.
5892 [!A_NORMAL] (A_NORMAL): Defined as zero.
5893 [!A_STANDOUT] (A_STANDOUT): Likewise.
5894
5895 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
5896 -lncurses.
5897 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
5898
5899 * configure.ac: Check for curses libraries and headers.
5900
5901 * Makefile.in (LIBCURSES): New variable.
5902
5903 * genmk.rb (Script::rule): Set the executable bits.
5904
5905 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
5906 name of the PC partition map is "pc_partition_map" but not "pc".
5907
0e143073 59082005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5909
5910 * util/i386/pc/grub-install.in (grub_probefs): New variable.
5911 (modules): Likewise.
5912 (usage): Added descriptions for --modules and --grub-probefs.
5913 Handle --modules and --grub-probefs. Save the arguments in MODULES
5914 and GRUB_PROBEFS, respectively.
5915 Auto-detect a filesystem module against GRUBDIR. If the result is
5916 empty and modules are not specified explicitly, abort the
5917 installation. Add the result to MODULES.
5918
5919 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
5920 disk/powerpc/ieee1275/ofdisk.c,
5921 include/grub/powerpc/ieee1275/init.h and
5922 term/powerpc/ieee1275/ofconsole.c.
5923 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
5924 term/ieee1275/ofconsole.c.
5925
5926 * include/grub/powerpc/ieee1275/console.h: Resurrected.
5927
5928 * COPYING: Upgraded to the latest version. Only the address of the
5929 FSF office has changed.
5930
efd6e6d5 59312005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5932
5933 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5934 kern/ieee1275.c with kern/ieee1275/of.c.
5935
5936 * kern/ieee1275.c: Moved to ...
5937 * kern/ieee1275/of.c: ... here.
5938
8ceafda2 59392005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
5940
5941 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
5942 readablity.
5943
5944 * config.guess: Updated to the latest version from gnulib.
5945 * config.sub: Likewise.
5946 * install.sh: Likewise.
5947 * mkinstalldirs: Likewise.
5948
5949 * include/grub/console.h: Removed. This file is arch-specific. Do
5950 not put this in include/grub.
5951
5952 * include/grub/i386/pc/console.h: Resurrected.
5953
5954 * util/console.c: Include grub/machine/console.h instead of
5955 grub/console.h.
5956 * util/grub-emu.c: Likewise.
5957
267f6cd9 59582005-08-04 Marco Gerards <metgerards@student.han.nl>
5959
5960 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
5961 hardcoded value.
5962
5963 From Vincent Pelletier <subdino2004@yahoo.fr>
5964 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
5965 Redefined to use grub_getwh.
5966 (grub_term): New member named getwh.
5967 (grub_getwh): New prototype.
5968 * kern/term.c (grub_getwh): New function.
5969 * term/i386/pc/console.c (grub_console_getwh): New function.
5970 (grub_console_term): New member `getwh'.
5971 * term/i386/pc/vga.c (grub_vga_getwh): New function.
5972 (grub_vga_term): New member `getwh'.
0b5abe02 5973 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 5974 grub_ssize_t.
5975 (grub_ofconsole_getw): New function.
5976 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
5977 (grub_ofconsole_term): New field named getwh and new initial
5978 value.
5979
3be7266d 59802005-08-03 Hollis Blanchard <hollis@penguinppc.org>
5981
5982 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
5983 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
5984 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
5985 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
5986 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
5987 of <grub/machine/ieee1275.h>.
5988 * commands/ieee1275/reboot.c: Likewise.
5989 * boot/powerpc/ieee1275/ieee1275.c: Move ...
5990 * kern/ieee1275.c: ... to here. All users updated. Change all
5991 parameter structs to use new type `grub_ieee1275_cell_t'.
5992 * term/powerpc/ieee1275/ofconsole.c: Move ...
5993 * term/ieee1275/ofconsole.c: ... to here. All users updated.
5994 * disk/powerpc/ieee1275/ofdisk.c: Move ...
5995 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
5996 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
5997 to return int.
5998 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
5999 Remove unused prototypes. All users updated.
6000 * include/grub/powerpc/ieee1275/console.h: Removed.
6001 * include/grub/powerpc/ieee1275/ieee1275.h: Define
6002 `grub_ieee1275_cell_t'.
6003 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
6004 Cast comparisons with -1 to the correct type.
6005 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
6006 type to match `grub_ieee1275_entry_fn'.
6007
8b5f3938 60082005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
6009
6010 * DISTLIST: Added util/i386/pc/grub-probefs.c.
6011
6012 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
6013 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
6014 partmap/sun.c.
6015 (grub_probefs_SOURCES): New variable.
6016
6017 * util/i386/pc/grub-probefs.c: New file.
6018
6019 * util/i386/pc/grub-setup.c (main): Call
6020 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
6021 grub_hfs_init and grub_jfs_init to initialize the system. Call
6022 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
6023 grub_pc_partition_map_fini to finish the system.
6024
ea409713 60252005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
6026
6027 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
6028 function.
6029 (grub_multiboot_load_elf32): Likewise.
6030 (grub_multiboot_is_elf64): Likewise.
6031 (grub_multiboot_load_elf64): Likewise.
6032 (grub_multiboot_load_elf): Likewise.
6033 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
6034 an ELF32 or ELF64 file.
6035 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
6036
6037 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
6038 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
6039 NULL before calling FS->LABEL.
6040 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
6041 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
6042 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
6043 before calling FS->LABEL.
6044
141a288b 60452005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
6046
6047 * util/i386/pc/grub-install.in (datadir): New variable.
6048 (libdir): Removed.
6049 (pkgdatadir): New variable.
6050 (pkglibdir): Removed.
6051
0d5f8a54 60522005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
6053
6054 * DISTLIST: Added util/i386/pc/grub-install.in.
6055
6056 * util/i386/pc/grub-install.in: New file.
6057
6058 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
6059 (grub_install_SOURCES): Likewise.
6060
6061 * genmk.rb: Added support for scripts.
6062 (Script): New class.
6063 (scripts): New variable.
6064
6065 * Makefile.in (install-local): Install sbin_SCRIPTS by
6066 INSTALL_SCRIPT.
6067 (uninstall): Remove sbin_SCRIPTS.
6068
6069 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
6070 device, try to get a GRUB device by
6071 grub_util_biosdisk_get_grub_dev.
6072 Free DEST_DEV.
6073
6074 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
6075 description for --device-map.
6076
5f968e1e 60772005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
6078
6079 Change the semantics of variable hooks. They now return strings
6080 instead of error values.
6081
6082 * util/i386/pc/grub-setup.c: Include grub/env.h.
6083 (setup): Use grub_device_set_root instead of grub_env_set.
6084
6085 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
6086 grub_env_get instead of grub_device_set_root and
6087 grub_device_get_root, respectively.
6088
6089 * kern/main.c (grub_env_write_root): New function.
6090 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
6091 grub_env_set instead of grub_device_set_root.
6092
6093 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
6094 many variables.
6095 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
6096 rather than calling ENV->WRITE_HOOK afterwards.
6097 (grub_env_get): Return the result of ENV->READ_HOOK rather than
6098 passing a pointer of a pointer.
6099 (grub_register_variable_hook): Change the types of "read_hook" and
6100 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
6101 respectively.
6102 Allocate the default empty string on the heap, because this string
6103 may be freed later.
6104
6105 * kern/device.c: Include grub/env.h.
6106 (grub_device_set_root): Removed.
6107 (grub_device_get_root): Likewise.
6108 (grub_device_open): Use grub_env_get instead of
6109 grub_device_get_root.
6110
6111 * include/grub/env.h (grub_env_read_hook_t): New type.
6112 (grub_env_write_hook_t): Likewise.
6113 (grub_env_var): Change the types of "read_hook" and "write_hook"
6114 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
6115 (grub_register_variable_hook): Likewise.
6116
6117 * include/grub/device.h (grub_device_set_root): Removed.
6118 (grub_device_set_root): Likewise.
6119
6120 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
6121 make sure that DIRNAME terminates with '/', so that
6122 grub_fat_find_dir will fail if PATH is not a directory.
6123
6124 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
6125 from DIRNAME.
6126 Use the qualifier auto for print_files and print_files_long.
6127 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
6128 as a regular file.
6129 Put a newline only if there is no error.
6130 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
6131 used.
6132
896f0afd 61332005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
6134
6135 * kern/partition.c (grub_partition_probe): Initialize PART to
6136 NULL. Otherwise, when no partition map is registered, this returns
6137 a garbage.
6138
b28b81b2 61392005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
6140
6141 * partmap/apple.c (apple_partition_map_iterate): Check if POS
6142 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
6143 valid.
6144
5f3607e0 61452005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
6146
6147 * commands/ls.c (grub_ls_list_disks): Print the filesystem
6148 information on each device, if it does not have partitions. Print
6149 "Device" instead of "Disk", because this function is not specific
6150 to disk devices.
6151
6152 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
6153 static to ensure that it is put on the memory rather than a
6154 register.
6155
502c87e8 61562005-07-17 Yoshinori Okuji <okuji@enbug.org>
6157
6158 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
6159 (grub_cat_init): Likewise.
6160 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
6161 (options): Likewise.
6162 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
6163 (grub_configfile_init): Likewise.
6164 * font/manager.c (GRUB_MOD_INIT): Likewise.
6165 * commands/help.c (GRUB_MOD_INIT): Likewise.
6166 (grub_help_init): Likewise.
6167 * normal/command.c (grub_command_init): Likewise.
6168 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
6169 * disk/loopback.c (grub_loop_init): Likewise.
6170 (GRUB_MOD_INIT): Likewise.
6171 * commands/ls.c (grub_ls_init): Likewise.
6172 (GRUB_MOD_INIT): Likewise.
6173 (options): Likewise.
6174 * commands/boot.c (grub_boot_init): Likewise.
6175 (GRUB_MOD_INIT): Likewise.
6176 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
6177 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
6178 (GRUB_MOD_INIT): Likewise.
6179 * commands/cmp.c (grub_cmp_init): Likewise.
6180 (GRUB_MOD_INIT): Likewise.
6181
6182 * normal/arg.c: Use <> instead of "" to include header files.
6183 (SHORT_ARG_HELP): New macro.
6184 (SHORT_ARG_USAGE): Likewise.
6185 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
6186 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
6187 descriptions.
6188 (find_short): Check if C is 'h' or 'u' explicitly.
6189 (grub_arg_show_help): Use space characters instead of tabs. Treat
6190 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
6191 are shown with --help and --usage only if they are not used for
6192 the command itself.
6193 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
6194 'h' and 'u'.
6195
6196 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
6197 const into "longarg". Change the type of "shortarg" to int.
6198
f806d18e 61992005-07-17 Yoshinori Okuji <okuji@enbug.org>
6200
6201 * boot/i386/pc/boot.S (boot_drive_check): New label.
6202
6203 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
6204 macro.
6205
6206 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
6207 which do not pass a boot drive correctly. Copied from GRUB Legacy.
6208
e293232b 62092005-07-17 Yoshinori Okuji <okuji@enbug.org>
6210
6211 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
6212 When turning off Gate A20, skip the check and return immediately,
6213 because this is not fatal usually.
6214
ebedfd00 62152005-07-17 Yoshinori Okuji <okuji@enbug.org>
6216
6217 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
6218 be 0x7C00 instead of 0x8000.
6219
6220 * boot/i386/pc/pxeboot.S: Rewritten.
6221
6222 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
6223 EXT_C.
6224 (gate_a20_check_state): Read a byte from 0x108000. Invert the
6225 result.
6226
654fc59f 62272005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
6228
6229 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
6230 robustness. This routine now supports a BIOS call and System
6231 Control Port A to modify the gate A20.
6232
6233 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6234 Increased to 0x440.
6235
09f9923f 62362005-07-12 Hollis Blanchard <hollis@penguinppc.org>
6237
6238 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
6239 device path and resulting ihandle.
6240 (grub_ofdisk_close): dprintf the ihandle being closed.
6241 (grub_ofdisk_read): dprintf function parameters.
6242 * kern/mm.c (grub_mm_init_region): Likewise.
6243 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
6244 (grub_linux_boot): dprintf the Linux entry point, initrd address and
6245 size, and boot arguments.
6246 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
6247 before loading into memory.
6248 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
6249 before loading into memory.
6250
7ef504d8 62512005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
6252
6253 * kern/mm.c: Added much documentation.
6254 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
6255 8, set to 5 instead of 8.
6256
e0f050c2 62572005-07-10 Yoshinori Okuji <okuji@enbug.org>
6258
6259 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
6260
6261 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
6262 (grub_mkdevicemap_SOURCES): New variable.
6263
6264 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
6265 lib/device.c of GRUB Legacy.
6266
7224189a 62672005-07-10 Yoshinori Okuji <okuji@enbug.org>
6268
6269 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
6270 instead of PATH is NULL.
6271
68c864eb 62722005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
6273
6274 * commands/cmp.c (BUFFER_SIZE): New macro.
6275 (grub_cmd_cmp): Close the right file at the right time. Compare
6276 only data just read. Don't report files of different size as
6277 identical. Dynamically allocate buffers. Move variable
6278 declarations at the beginning of function.
6279
e6f3e614 62802005-07-09 Yoshinori Okuji <okuji@enbug.org>
6281
6282 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
6283 reverse.
6284
f8f1559a 62852004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
6286
6287 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
6288 when backspace is pressed at beginning of line.
6289
39c9d41d 62902005-07-03 Yoshinori Okuji <okuji@enbug.org>
6291
6292 * DISTLIST: Added genfslist.sh.
6293
6294 * normal/main.c (fs_module_list): New variable.
6295 (autoload_fs_module): New function.
6296 (read_fs_list): Likewise.
6297 (grub_normal_execute): Call read_fs_list.
6298
6299 * kern/fs.c (grub_fs_autoload_hook): New variable.
6300 (grub_fs_probe): Added support for auto-loading.
6301
6302 * include/grub/normal.h (struct grub_fs_module_list): New struct.
6303 (grub_fs_module_list_t): New type.
6304
6305 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
6306 (grub_fs_autoload_hook): New prototype.
6307
6308 * genfslist.sh: New file.
6309
6310 * genmk.rb: Added a rule to generate a filesystem list.
6311
121c1d83 63122005-06-30 Marco Gerards <metgerards@student.han.nl>
6313
6314 * configure.ac: Fix the test for cross-compiling.
6315
6316 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
6317 define GRUB_UTIL anymore.
6318
6319 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
6320 so this function works on other systems than just big endian.
6321 (load_modules): Likewise.
6322 (add_segments): Likewise.
6323
e75d76e1 63242005-06-23 Hollis Blanchard <hollis@penguinppc.org>
6325
6326 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
6327 contains `l' modifier, get a long from va_arg().
6328
50b5a0a7 63292005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
6330
6331 * kern/mm.c (grub_free): If the next free block which is being
6332 merged is the first free block, set the first block to the block
6333 being freed.
6334 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
6335
89371b20 63362005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6337
6338 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
6339 `grub_ieee1275_chosen'.
6340
168d6e58 63412005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6342
6343 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
6344 (grub_ieee1275_chosen): New variable.
6345 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
6346 `chosen'.
6347 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
6348 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6349 Rename first argument to `phandle' for consistency.
6350 (grub_ieee1275_get_property_length): Likewise.
6351 (grub_ieee1275_next_property): Likewise. Change type of first argument
6352 to grub_ieee1275_phandle_t.
6353 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
6354 Move export next to declaration.
6355 (grub_ieee1275_chosen): New variable.
6356 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
6357 Correct cosmetic typo.
6358 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
6359 `grub_ieee1275_chosen'.
6360 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
6361 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
6362 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
6363 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
6364 `grub_ieee1275_chosen'.
6365
ca5baa3f 63662005-05-10 Hollis Blanchard <hollis@penguinppc.org>
6367
6368 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
6369 /chosen/bootargs.
6370 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
6371 /chosen/bootargs as "variable=value" pairs.
6372
708b345f 63732005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
6374
6375 * include/grub/misc.h (grub_dprintf): New macro.
6376 (grub_real_dprintf): New prototype.
6377 (grub_strword): Likewise.
6378 (grub_iswordseparator): Likewise.
6379 * kern/misc.c (grub_real_dprintf): New function.
6380 (grub_strword): Likewise.
6381 (grub_iswordseparator): Likewise.
6382
f4c5e67c 63832005-04-30 Hollis Blanchard <hollis@penguinppc.org>
6384
6385 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
6386 (roundup): Remove macro.
6387 (grub_ieee1275_flags): Make static.
6388 (grub_ieee1275_realmode): Remove.
6389 (grub_ieee1275_test_flag): New function.
6390 (grub_ieee1275_set_flag): Likewise.
6391 (find_options): Rename to `grub_ieee1275_find_options'; update
6392 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
6393 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
6394 (cmain): New prototype.
6395 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
6396 `grub_ieee1275_flags' directly.
6397 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
6398 machine/biosdisk.h.
6399 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
6400 Don't include grub/machine/init.h.
6401 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
6402 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
6403 Remove prototype.
6404 (grub_ieee1275_realmode): Likewise.
6405 (grub_ieee1275_flag): New enum.
6406 (grub_ieee1275_test_flag): New prototype.
6407 (grub_ieee1275_set_flag): New prototype.
6408 * include/grub/powerpc/ieee1275/init.h: Remove file.
6409 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
6410 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
6411 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
6412 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
6413 comment.
6414 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
6415 `grub_ieee1275_test_flag'.
6416 (grub_ieee1275_encode_devname): Likewise.
6417
ed16607e 64182005-04-21 Hollis Blanchard <hollis@penguinppc.org>
6419
6420 * include/grub/powerpc/ieee1275/ieee1275.h
6421 (grub_ieee1275_encode_devname): New prototype.
6422 (grub_ieee1275_get_filename): Likewise.
6423 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
6424 function.
6425 (grub_set_prefix): Likewise.
6426 (grub_machine_init): Call grub_set_prefix.
6427 * kern/powerpc/ieee1275/openfw.c: Fix typos.
6428 (grub_parse_type): New enum.
6429 (grub_ieee1275_get_devargs): New function.
6430 (grub_ieee1275_get_devname): Likewise.
6431 (grub_ieee1275_parse_args): Likewise.
6432 (grub_ieee1275_get_filename): Likewise.
6433 (grub_ieee1275_encode_devname): Likewise.
6434
be369920 64352005-03-30 Marco Gerards <metgerards@student.han.nl>
6436
6437 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
6438 `grub_loader_unset'.
6439
a5ce3a4a 64402005-03-26 Hollis Blanchard <hollis@penguinppc.org>
6441
6442 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
6443 instead of grub_ieee1275_interpret.
6444 (grub_halt_init): New function.
6445 (grub_halt_fini): Likewise.
6446 (GRUB_MOD_INIT): Correct message grammar.
6447 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
6448 instead of grub_ieee1275_interpret.
6449 (grub_reboot_init): New function.
6450 (grub_reboot_fini): Likewise.
6451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
6452 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
6453 util/i386/pc/misc.c with commands/ieee1275/halt.c,
6454 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
6455 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
6456 function.
6457 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
6458 Add prototype.
6459 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
6460 prototype.
6461 (grub_halt): Likewise.
6462 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
6463 (cmain): Remove __attribute__((unused)).
6464 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
6465 (grub_heap_len): Likewise.
6466 (grub_machine_fini): New function.
6467 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
6468 (grub_halt): Likewise.
6469 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
6470 function.
6471 * util/powerpc/ieee1275/misc.c: New file.
6472
0058f771 64732005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6474
6475 * DISTLIST: New file.
6476 * gendistlist.sh: Likewise.
6477
6478 * Makefile.in (COMMON_DISTFILES): Removed.
6479 (BOOT_DISTFILES): Likewise.
6480 (CONF_DISTFILES): Likewise.
6481 (DISK_DISTFILES): Likewise.
6482 (FS_DISTFILES): Likewise.
6483 (INCLUDE_DISTFILES): Likewise.
6484 (KERN_DISTFILES): Likewise.
6485 (LOADER_DISTFILES): Likewise.
6486 (TERM_DISTFILES): Likewise.
6487 (UTIL_DISTFILES): Likewise.
6488 (DISTFILES): Likewise.
6489 (uninstall): Uninstall files in $(pkgdata_DATA).
6490 (DISTLIST): New target.
6491 (distdir): Use the contents of the file DISTLIST to get a list of
6492 distributed files.
6493
46b3b8a5 64942005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6495
6496 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
6497 descriptor. This is ported from GRUB Legacy.
6498
6499 * gencmdlist.sh: Added an extra semicolon to make it work with
6500 old sed versions. Reported by Robert Bihlmeyer
6501 <robbe@orcus.priv.at>.
6502
5822ff87 65032005-03-08 Yoshinori Okuji <okuji@enbug.org>
6504
6505 Automatic loading of commands is supported.
6506
6507 * normal/main.c (read_command_list): New function.
6508 (grub_normal_execute): Call read_command_list.
6509
6510 * normal/command.c (grub_register_command): Return zero or CMD.
6511 Allocate CMD->NAME from the heap.
6512 Initialize CMD->MODULE_NAME to zero.
6513 Find the same name as well. If the same command is found and it is
6514 a dummy command, overwrite members. If it is not a dummy command,
6515 return zero.
6516 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
6517 (grub_command_find): If a dummy command is found, load a module
6518 and retry to find a command only once.
6519
6520 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
6521 make sure that each command is loaded.
6522
6523 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
6524 macro.
6525 (struct grub_command): Remove const from the member `name'.
6526 Add a new member `module_name'.
6527 (grub_register_command): Return grub_command_t.
6528
6529 * commands/help.c (grub_cmd_help): Call grub_command_find to make
6530 sure that each command is loaded.
6531
6532 * genmk.rb (PModule::rule): Specify a module name without the
6533 suffix ".mod" to gencmdlist.sh.
6534
7b1f4b57 65352005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6536
6537 * gencmdlist.sh: New file.
6538
6539 * genmk.rb (PModule::rule): Generate a rule for a command list.
6540 Clean command.lst.
6541 Generate command.lst from $(COMMANDFILES).
6542
6543 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
6544 (DATA): Added $(pkgdata_DATA).
6545 (install-local): Install files in $(pkgdata_DATA).
6546
062aaf39 65472005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6548
6549 * term/i386/pc/vga.c (debug_command): Removed.
6550 (GRUB_MOD_INIT): Do not register the command "debug".
6551
6552 From Hollis Blanchard:
6553 * commands/configfile.c: New file.
6554 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6555 commands/configfile.c.
6556 (pkgdata_MODULES): Added configfile.mod.
6557 (configfile_mod_SOURCES): New variable.
6558 (configfile_mod_CFLAGS): Likewise.
6559 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6560 commands/configfile.c.
6561 (pkgdata_MODULES): Added configfile.mod.
6562 (configfile_mod_SOURCES): New variable.
6563 (configfile_mod_CFLAGS): Likewise.
6564 * util/grub-emu.c (main): Call grub_configfile_init and
6565 grub_configfile_fini.
6566 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
6567 prototype.
6568 [GRUB_UTIL] (grub_configfile_fini): Likewise.
6569
cee01aa6 65702005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6571
6572 * normal/arg.c (grub_arg_show_help): Do not show the bug report
6573 address.
6574
6575 * commands/help.c (grub_cmd_help): Do not print newlines after
6576 the last command in print_command_help.
6577
93f3a1d8 65782005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6579
6580 * commands/default.h: New file.
6581 * commands/timeout.h: Likewise.
6582 * normal/context.c: Likewise.
6583
6584 * util/misc.c: Do not include sys/times.h.
6585 Include sys/time.h and grub/machine/time.h.
6586 (grub_get_rtc): Rewritten with gettimeofday.
6587
6588 * util/grub-emu.c (main): Call grub_default_init and
6589 grub_timeout_init before grub_normal_init, and call
6590 grub_timeout_fini and grub_default_fini after grub_main.
6591
6592 * util/console.c (grub_ncurses_checkkey): Return the read
6593 character or -1.
6594
6595 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
6596 timeouts.
6597
6598 * normal/main.c (read_config_file): Push MENU. If this fails,
6599 print an error and wait for a user input.
6600 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
6601 If a menu is empty or an error occurs, pop MENU.
6602 (grub_normal_execute): Pop and free MENU after grub_menu_run
6603 returns.
6604
6605 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
6606
6607 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
6608 include time.h.
6609 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6610 without GRUB_UTIL.
6611 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
6612 time.h.
6613 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6614 without GRUB_UTIL.
6615
6616 * include/grub/normal.h (struct grub_menu_list): New struct.
6617 (grub_menu_list_t): New type.
6618 (struct grub_context): New struct.
6619 (grub_context_t): New type.
6620 (grub_register_command): Got rid of EXPORT_FUNC.
6621 (grub_unregister_command): Likewise.
6622 (grub_context_get): New prototype.
6623 (grub_context_get_current_menu): Likewise.
6624 (grub_context_push_menu): Likewise.
6625 (grub_context_pop_menu): Likewise.
6626 [GRUB_UTIL] (grub_default_init): Likewise.
6627 [GRUB_UTIL] (grub_default_fini): Likewise.
6628 [GRUB_UTIL] (grub_timeout_init): Likewise.
6629 [GRUB_UTIL] (grub_timeout_fini): Likewise.
6630
6631 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
6632 commands/timeout.c and normal/context.c.
6633 (pkgdata_MODULES): Added default.mod and timeout.mod.
6634 (normal_mod_SOURCES): Added normal/context.c.
6635 (default_mod_SOURCES): New variable.
6636 (default_mod_CFLAGS): Likewise.
6637 (timeout_mod_SOURCES): Likewise.
6638 (timeout_mod_CFLAGS): Likewise.
6639 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
6640 conf/i386-pc.rmk.
6641 (pkgdata_MODULES): Added default.mod and timeout.mod.
6642 (normal_mod_SOURCES): Added normal/context.c.
6643 (default_mod_SOURCES): New variable.
6644 (default_mod_CFLAGS): Likewise.
6645 (timeout_mod_SOURCES): Likewise.
6646 (timeout_mod_CFLAGS): Likewise.
6647
6648 * Makefile.in (all-local): Added $(MKFILES).
6649
4ed2e1dd 66502005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
6651
6652 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
6653 (grub_emu_SOURCES): Likewise.
6654 (pkgdata_MODULES): Add `sun.mod'.
6655 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6656 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6657 `partmap/sun.c'.
6658 (pkgdata_MODULES): Add `sun.mod'.
6659 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6660 * include/grub/partition.h (grub_sun_partition_map_init): New
6661 prototype.
6662 (grub_sun_partition_map_fini): Likewise.
6663 * partmap/sun.c: New file.
6664 * util/grub-emu.c (main): Initialize and de-initialize the sun
6665 partitionmap support.
6666
4d4e372e 66672005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
6668
6669 This implements an Emacs-like menu entry editor.
6670
6671 * normal/menu_entry.c: New file.
6672
6673 * util/console.c (grub_ncurses_putchar): Translate some Unicode
6674 characters to ASCII.
6675 (saved_char): New variable.
6676 (grub_ncurses_checkkey): Rewritten completely.
6677 (grub_ncurses_getkey): Likewise.
6678 (grub_ncurses_init): Call raw instead of cbreak.
6679
6680 * normal/menu.c (print_entry): Do not put a space.
6681 (init_page): Renamed to ...
6682 (grub_menu_init_page): ... this. All callers changed.
6683 (edit_menu_entry): Removed.
6684 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
6685
6686 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
6687
6688 * kern/misc.c (grub_vprintf): Call grub_refresh.
6689
6690 * normal/menu.c (DISP_LEFT): Renamed to ...
6691 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
6692 * normal/menu.c (DISP_UP): Renamed to ...
6693 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
6694 * normal/menu.c (DISP_RIGHT): Renamed to ...
6695 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
6696 * normal/menu.c (DISP_DOWN): Renamed to ...
6697 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
6698 * normal/menu.c (DISP_HLINE): Renamed to ...
6699 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
6700 * normal/menu.c (DISP_VLINE): Renamed to ...
6701 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
6702 * normal/menu.c (DISP_UL): Renamed to ...
6703 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
6704 * normal/menu.c (DISP_UR): Renamed to ...
6705 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
6706 * normal/menu.c (DISP_LL): Renamed to ...
6707 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
6708 * normal/menu.c (DISP_LR): Renamed to ...
6709 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
6710 * normal/menu.c (TERM_WIDTH): Renamed to ...
6711 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
6712 * normal/menu.c (TERM_HEIGHT): Renamed to ...
6713 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
6714 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
6715 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
6716 * normal/menu.c (TERM_MARGIN): Renamed to ...
6717 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
6718 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
6719 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
6720 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
6721 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
6722 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
6723 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
6724 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
6725 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
6726 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
6727 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
6728 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
6729 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
6730 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
6731 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
6732 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
6733 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
6734 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
6735 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
6736 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
6737 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
6738 All callers changed.
6739
6740 * include/grub/normal.h: New prototype.
6741
6742 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6743 normal/menu_entry.c.
6744 (normal_mod_SOURCES): Likewise.
6745 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6746 (normal_mod_SOURCES): Likewise.
6747
e6b92c8a 67482005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
6749
6750 * include/grub/normal.h (grub_halt_init): New prototype.
6751 (grub_halt_fini): Likewise.
6752 (grub_reboot_init): Likewise.
6753 (grub_reboot_fini): Likewise.
6754
6755 * util/grub-emu.c: Include signal.h.
6756 (main_env): New global variable.
6757 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
6758 catch C-c.
6759 (grub_machine_fini): New function.
6760 (main): Call grub_halt_init and grub_reboot_init before
6761 grub_main, and grub_reboot_fini and grub_halt_fini after it.
6762 Call setjmp with MAIN_ENV to go back afterwards.
6763 Call grub_machine_fini right before return.
6764
6765 * include/grub/util/misc.h: Include setjmp.h.
6766 (main_env): New prototype.
6767
6768 * include/grub/kernel.h (grub_machine_fini): New prototype.
6769 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
6770 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
6771
6772 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
6773 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
6774 * term/i386/pc/console.c (grub_console_fini): Likewise.
6775
6776 * util/i386/pc/misc.c: New file.
6777
6778 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6779 util/i386/pc/misc.c, commands/i386/pc/halt.c and
6780 commands/i386/pc/reboot.c.
6781
c642636f 67822005-02-14 Guillem Jover <guillem@hadrons.org>
6783
6784 * include/grub/dl.h (grub_dl_check_header): New prototype.
6785 (grub_arch_dl_check_header): Change return type to grub_err_t,
6786 remove size parameter and export function. Update all callers.
6787 * kern/dl.c (grub_dl_check_header): New function.
6788 (grub_dl_load_core): Use `grub_dl_check_header' instead of
6789 `grub_arch_dl_check_header'. Check ELF type. Check if sections
6790 are inside the core.
6791 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
6792 independent ELF header checks.
6793 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6794 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
6795 `grub_dl_check_header' instead of explicit checks. Check for the
6796 ELF type.
6797 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
6798 `grub_dl_check_header' instead of explicit checks. Remove arch
6799 specific ELF header checks.
6800
e6b92c8a 6801 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
6802 argument SIZE.
6803
5eabe94b 68042005-02-13 Hollis Blanchard <hollis@penguinppc.org>
6805
6806 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
6807 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
6808
1b14a681 68092005-02-12 Hollis Blanchard <hollis@penguinppc.org>
6810
6811 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
6812 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
6813 (part_map_iterate): Clear `grub_errno' and return 0 if
6814 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
6815 * partmap/amiga.c (amiga_partition_map_iterate): Return
6816 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
6817 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6818
aca108aa 68192005-02-01 Guillem Jover <guillem@hadrons.org>
6820
6821 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
6822 help info.
6823
c9f9c556 68242005-01-31 Marco Gerards <metgerards@student.han.nl>
6825
6826 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
6827 Removed prototype.
6828 (grub_rescue_cmd_linux): New prototype.
6829 (grub_rescue_cmd_initrd): Likewise.
6830 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
6831 `bi_rec'.
6832 (grub_linux_release_mem): Release the memory for the initrd.
6833 (grub_load_linux): Renamed from this...
6834 (grub_rescue_cmd_linux): ...To this. Changed all callers.
6835 Changed `entry' not to be static. Loop over memory regions to
6836 find another one when the default fails.
6837 (grub_rescue_cmd_initrd): New function.
6838 (grub_linux_init): Remove function.
6839 (grub_linux_fini): Likewise.
6840 (GRUB_MOD_INIT): Register `initrd'.
6841 (GRUB_MOD_FINI): Unregister `initrd'.
6842 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
6843 Function removed.
6844 (grub_linux_normal_fini): Likewise.
6845 (GRUB_MOD_INIT): Register `initrd'.
6846 (GRUB_MOD_FINI): Unregister `initrd'.
6847
990cf3aa 68482005-01-31 Marco Gerards <metgerards@student.han.nl>
6849
6850 * commands/help.c: New file.
6851 * normal/arg.c (show_help): Renamed to...
6852 (grub_arg_show_help): ... this.
6853 * commands/i386/pc/halt.c: New file.
6854 * commands/i386/pc/reboot.c: Likewise.
6855 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
6856 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
6857 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
6858 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
6859 variables.
6860 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6861 `commands/help.c'.
6862 (pkgdata_MODULES): Add `help.mod'.
6863 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
6864 * grub/i386/pc/init.h (grub_reboot): New prototype.
6865 (grub_halt): Likewise.
6866 * include/grub/normal.h (grub_arg_show_help): New prototype.
6867 (grub_help_init): Likewise.
6868 (grub_help_fini): Likewise.
6869 * util/grub-emu.c (main): Initialize and deinitialize the help
6870 command.
6871
6872 * normal/cmdline.c (grub_cmdline_get): Doc fix.
6873
6874 * normal/command.c (grub_command_init): Fixed the description of
6875 the `set' and `unset' commands.
6876
68772005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 6878
6879 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
6880 function.
6881 * commands/ieee1275/halt.c: New file.
6882 * commands/ieee1275/reboot.c: Likewise.
6883 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
6884 `__attribute__ ((unused))'. Some GCS related fixed.
6885 (grub_suspend_init) [GRUB_UTIL]: Function removed.
6886 (grub_suspend_fini): Likewise.
6887 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
6888 and `halt.mod'.
6889 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
6890 (halt_mod_CFLAGS): New variables.
6891 * include/grub/powerpc/ieee1275/ieee1275.h
6892 (grub_ieee1275_interpret): New prototype.
6893
1ab09cc7 68942005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
6895
6896 * include/grub/misc.h (memmove): New prototype.
6897 (memcpy): Likewise.
6898
8b8cbdb2 68992005-01-22 Hollis Blanchard <hollis@penguinppc.org>
6900
6901 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
6902 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
6903
e3741a27 69042005-01-22 Marco Gerards <metgerards@student.han.nl>
6905
6906 * kern/misc.c (grub_strndup): Function rewritten.
6907
776bd780 69082005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
6909
6910 * normal/menu.c (TERM_WIDTH): Macro redefined.
6911 (TERM_TOP_BORDER_Y): Likewise.
6912 (draw_border): Replaced while-loop by a for-loop. Make the number
6913 of lines consistent with the number of lines displayed in
6914 print_entries. Added a margin below the rectangle.
6915 (print_entry): Make the entry fit in the rectangle.
6916 (print_entries): Display the scroll arrows next to the right
6917 border.
6918
78026bce 69192005-01-21 Marco Gerards <metgerards@student.han.nl>
6920
6921 * fs/minix.c (grub_minix_find_file): Reserve more space for
6922 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
6923 `grub_strncpy' to copy `path' into it.
6924
67bbaf0f 69252005-01-21 Marco Gerards <metgerards@student.han.nl>
6926
6927 Add the loopback device, a device via which files can be accessed
6928 as devices.
6929
6930 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
6931 (pkgdata_MODULES): Add loopback.mod.
6932 (loopback_mod_SOURCES): New variable.
6933 (loopback_mod_CFLAGS): Likewise.
6934 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6935 `disk/loopback.c'.
6936 (pkgdata_MODULES): Add loopback.mod.
6937 (loopback_mod_SOURCES): New variable.
6938 (loopback_mod_CFLAGS): Likewise.
6939 * disk/loopback.c: new file.
6940 * include/grub/normal.h (grub_loop_init): New prototype.
6941 (grub_loop_fini): New prototype.
6942 * util/grub-emu.c (main): Initialize and de-initialize loopback
6943 support.
6944 * include/grub/disk.h (grub_disk_dev_id): Add
6945 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
6946
6f1c18bd 69472005-01-20 Hollis Blanchard <hollis@penguinppc.org>
6948
6949 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
6950 function.
6951 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
6952 (suspend_mod_SOURCES): New variable.
6953 (suspend_mod_CFLAGS): Likewise.
6954 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
6955 New prototype.
6956 * commands/ieee1275/suspend.c: New file.
6957
b38551da 69582005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6959
6960 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
6961 ((unused))' to `__attribute__ ((used))'.
6962 (GRUB_MOD_FINI): Likewise.
6963 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
6964 * genmk.rb (PModule): Assign space to common symbols when linking
6965 modules.
6966
777aff39 69672005-01-20 Marco Gerards <metgerards@student.han.nl>
6968
6969 * include/grub/mm.h (grub_mm_init_region): Change the type of the
6970 `unsigned' arguments to `grub_size_t'.
6971 (grub_malloc): Likewise.
6972 (grub_realloc): Likewise.
6973 (grub_memalign): Likewise.
6974 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
6975 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6976 * util/misc.c (grub_malloc): Likewise.
6977 (grub_realloc): Likewise.
6978 * kern/mm.c (get_header_from_pointer): Change the casts to
6979 `unsigned' into a cast to `grub_size_t'.
6980
6981 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
6982 point to `currnode' when `currnode' is changed.
6983
6984 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
6985 Schottelius <nico-linux@schottelius.org>.
6986
d0ff18e1 69872005-01-09 Hollis Blanchard <hollis@penguinppc.org>
6988
6989 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
6990 (note_path): Remove variable.
6991 (GRUB_IEEE1275_NOTE_NAME): New macro.
6992 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
6993 (grub_ieee1275_note_hdr): New structure.
6994 (grub_ieee1275_note_desc): Likewise.
6995 (grub_ieee1275_note): Likewise.
6996 (load_note): Remove `dir' argument. All callers updated. Remove
6997 `note_img' and `path'. Do not load a file from `note_path'.
6998 Initialize a struct grub_ieee1275_note and write that to `out'.
6999 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
7000
4ca7004c 70012005-01-05 Marco Gerards <metgerards@student.han.nl>
7002
7003 * util/misc.c (grub_util_read_image): Revert last change. It
7004 called `grub_util_read_at', which seeks from the beginning of the
7005 file.
7006
0b412211 70072005-01-04 Hollis Blanchard <hollis@penguinppc.org>
7008
7009 * TODO: Add note about endianness in grub-mkimage.
7010 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
7011 section.
7012 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
7013 (grub_mkimage_SOURCES): New target.
7014 * include/grub/kernel.h (grub_start_addr): Remove variable.
7015 (grub_end_addr): Likewise.
7016 (grub_total_module_size): Likewise.
7017 (grub_kernel_image_size): Likewise.
7018 (GRUB_MODULE_MAGIC): New constant.
7019 (grub_module_info): New structure.
7020 (grub_arch_modules_addr): New prototype.
7021 (grub_get_end_addr): Remove prototype.
7022 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
7023 * include/grub/powerpc/ieee1275/kernel.h: New file.
7024 * include/grub/util/misc.h (grub_util_get_fp_size): New
7025 prototype.
7026 (grub_util_read_at): Likewise.
7027 (grub_util_write_image_at): Likewise.
7028 * kern/main.c (grub_get_end_addr): Remove function.
7029 (grub_load_modules): Call grub_arch_modules_addr instead of using
7030 grub_end_addr. Look for a grub_module_info struct in memory. Use
7031 the grub_module_info fields instead of calling grub_get_end_addr
7032 as loop conditions. Move grub_add_unused_region code here.
7033 (grub_add_unused_region): Remove function.
7034 * kern/i386/pc/init.c: Include grub/cache.h.
7035 (grub_machine_init): Remove call to grub_get_end_addr. Remove
7036 one call to add_mem_region.
7037 (grub_arch_modules_addr): New function.
7038 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
7039 (grub_total_module_size): Likewise.
7040 Include grub/machine/kernel.h.
7041 (grub_arch_modules_addr): New function.
7042 * util/grub-emu.c (grub_end_addr): Remove variable.
7043 (grub_total_module_size): Likewise.
7044 (grub_arch_modules_addr): New function.
7045 * util/misc.c: Include unistd.h.
7046 (grub_util_get_fp_size): New function.
7047 (grub_util_read_at): Likewise.
7048 (grub_util_write_image_at): Likewise.
7049 (grub_util_read_image): Call grub_util_read_at.
7050 (grub_util_write_image): Call grub_util_write_image_at.
7051 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
7052 additional memory in kernel_img for a struct grub_module_info.
7053 Fill in that grub_module_info.
7054 * util/powerpc/ieee1275/grub-mkimage.c: New file.
7055
458786f8 70562005-01-03 Hollis Blanchard <hollis@penguinppc.org>
7057
7058 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
7059 New function.
7060 * include/grub/powerpc/ieee1275/ieee1275.h
7061 (grub_ieee1275_milliseconds): New prototype.
7062 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
7063 Change to 1000.
7064 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
7065 grub_ieee1275_milliseconds.
7066
ac507d1b 70672005-01-03 Hollis Blanchard <hollis@penguinppc.org>
7068
7069 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
7070 variable.
7071 (find_options): New function.
7072 (cmain): Call find_options.
7073 * include/grub/powerpc/ieee1275/ieee1275.h
7074 (grub_ieee1275_realmode): New extern variable.
7075 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
7076 grub_map if grub_ieee1275_realmode is false.
7077
6b8fd1c4 70782004-12-29 Marco Gerards <metgerards@student.han.nl>
7079
7080 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
7081 lines are inserted and make it work like readline. Reported by
7082 Vincent Pelletier <subdino2004@yahoo.fr>.
7083
8514a1e0 70842004-12-28 Marco Gerards <metgerards@student.han.nl>
7085
7086 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
7087
7088 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
7089 `kern/powerpc/cache.S'.
7090
924b6140 70912004-12-27 Marco Gerards <metgerards@student.han.nl>
7092
7093 * genmk.rb: Handle the `Program' class in the main loop. Written
7094 by Johan Rydberg <jrydberg@gnu.org>.
7095 (Program): New class.
7096 (programs): New variable.
7097 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
7098 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
7099 instead of "grub/kernel.h". Include <grub/machine/init.h>.
7100 (help_arch): Function removed.
7101 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
7102 `powerpc/libgcc.h' and `loader.h'.
7103 (pkgdata_PROGRAMS): New variable.
7104 (sbin_UTILITIES): Variable removed.
7105 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
7106 (grubof_SOURCES): Variable re-defined so it only includes the
7107 core functionality.
7108 (grubof_CFLAGS): Remove `-DGRUBOF'.
7109 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
7110 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
7111 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
7112 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
7113 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
7114 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
7115 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
7116 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
7117 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
7118 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
7119 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7120 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
7121 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
7122 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
7123 (pc_mod_CFLAGS): New variables.
7124 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
7125 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
7126 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
7127 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
7128 Moved from here...
7129 * include/grub/i386/pc/init.h (grub_os_area_addr)
7130 (rub_os_area_size): ... to here.
7131 * include/grub/powerpc/ieee1275/ieee1275.h
7132 (grub_ieee1275_entry_fn): Export symbol.
7133 * include/grub/powerpc/ieee1275/init.h: New file.
7134 * include/grub/powerpc/libgcc.h: Likewise.
7135 * include/grub/cache.h: Likewise.
7136 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
7137 <hollis@penguinppc.org>.
7138 * kern/dl.c: Include <grub/cache.h>.
7139 (grub_dl_flush_cache): New function.
7140 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
7141 for this module.
7142 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
7143 (grub_console_init): Removed prototypes.
7144 (grub_machine_init): Don't initialize the modules anymore.
7145 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
7146 static.
7147 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
7148 Macro undef removed.
7149 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
7150 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
7151 relocation `R_PPC_REL32'. Return an error when the relocation is
7152 unknown.
7153 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
7154 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
7155 * util/misc.c (grub_arch_sync_caches): Likewise.
7156
e4b47e0c 71572004-12-19 Marco Gerards <metgerards@student.han.nl>
7158
7159 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
7160 `symlist.c', add `grubof_symlist.c'.
7161 (symlist.c): Variable removed.
7162 (grubof_HEADERS): Variable added.
7163 (grubof_symlist.c): New target.
7164 (kernel_syms.lst): Use `grubof_HEADERS' instead of
7165 `kernel_img_HEADERS'.
7166 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
7167 * kern/powerpc/dl.c: New file.
7168 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
7169 Function removed.
7170 (grub_arch_dl_relocate_symbols): Likewise.
7171 (grub_register_exported_symbols): Likewise.
7172
4ceb3636 71732004-12-13 Marco Gerards <metgerards@student.han.nl>
7174
7175 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
7176 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
7177 to fail instead. Reported by Vincent Pelletier
7178 <subdino2004@yahoo.fr>.
7179
7180 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
7181 it is not allocated. Reported by Vincent Pelletier
7182 <subdino2004@yahoo.fr>.
7183
7184 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
7185 output so the output looks better.
7186
3f1578fe 71872004-12-04 Marco Gerards <metgerards@student.han.nl>
7188
7189 Modulize the partition map support and add support for the amiga
7190 partition map.
7191
7192 * commands/ls.c: Include <grub/partition.h> instead of
7193 <grub/machine/partition.h>.
7194 * kern/disk.c: Likewise.
7195 * kern/rescue.c: Likewise.
7196 * loader/i386/pc/chainloader.c: Likewise.
7197 * normal/cmdline.c: Likewise.
7198 * kern/powerpc/ieee1275/init.c: Likewise.
7199 (grub_machine_init): Call `grub_pc_partition_map_init',
7200 `grub_amiga_partition_map_init' and
7201 `grub_apple_partition_map_init'.
7202 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
7203 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
7204 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
7205 `partition.h' and `pc_partition.h'.
7206 (grub_setup_SOURCES): Remove
7207 `disk/i386/pc/partition.c'. Add `kern/partition.c',
7208 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7209 (grub_emu_SOURCES): Likewise.
7210 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
7211 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
7212 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
7213 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7214 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
7215 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7216 (grubof_SOURCES): Likewise.
7217 * disk/i386/pc/partition.c: File removed.
7218 * disk/powerpc/ieee1275/partition.c: Likewise.
7219 * include/grub/powerpc/ieee1275/partition.h: Likewise.
7220 * include/grub/i386/pc/partition.h: Likewise.
7221 * kern/partition.c: New file.
7222 * partmap/amiga.c: Likewise.
7223 * partmap/apple.c: Likewise.
7224 * partmap/pc.c: Likewise.
7225 * include/grub/partition.h: Likewise..
7226 * include/grub/pc_partition.h: Likewise.
7227 * util/grub-emu.c: Include <grub/partition.h> instead of
7228 <grub/machine/partition.h>.
7229 (main): Call `grub_pc_partition_map_init',
7230 `grub_amiga_partition_map_init' and
7231 `grub_apple_partition_map_init' and deinitialize afterwards.
7232 * util/i386/pc/biosdisk.c: Include `#include
7233 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7234 `<grub/machine/partition.h>'.
7235 * util/i386/pc/grub-setup.c: Likewise.
7236 * util/i386/pc/biosdisk.c: Likewise.
7237 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
7238 partition information in case of a PC partition.
7239 * util/i386/pc/grub-setup.c: Include `#include
7240 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7241 `<grub/machine/partition.h>'.
7242 (setup): Only access the PC specific partition information in case
7243 of a PC partition.
7244
0ef4ced9 72452004-11-17 Hollis Blanchard <hollis@penguinppc.org>
7246
7247 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
7248 (grub_longjmp): Likewise.
7249 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
7250 20.
7251 * normal/powerpc/setjmp.S: New file.
7252 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7253 `normal/powerpc/setjmp.S'.
7254 (grubof_CFLAGS): Add `-DGRUBOF'.
7255 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
7256 [GRUB_UTIL && !GRUBOF].
7257
19950e29 72582004-11-16 Marco Gerards <metgerards@student.han.nl>
7259
7260 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
7261 property named `name'. Correctly handle the error returned by
7262 `grub_ieee1275_finddevice' if a device can not be opened.
7263
a2fea427 72642004-11-02 Hollis Blanchard <hollis@penguinppc.org>
7265
7266 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
7267 `actual' for negativity.
7268 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7269 kern/fshelp.c.
7270
41ea0ea3 72712004-11-01 Marco Gerards <metgerards@student.han.nl>
7272
7273 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
7274 (PAGE_OFFSET): New macro.
7275 (CRTC_ADDR_PORT): Likewise.
7276 (CRTC_DATA_PORT): Likewise.
7277 (START_ADDR_HIGH_REGISTER): Likewise.
7278 (START_ADDR_LOW_REGISTER): Likewise.
7279 (GRAPHICS_ADDR_PORT): Likewise.
7280 (GRAPHICS_DATA_PORT): Likewise.
7281 (READ_MAP_REGISTER): Likewise.
7282 (INPUT_STATUS1_REGISTER): Likewise.
7283 (INPUT_STATUS1_VERTR_BIT): Likewise.
7284 (page): New variable.
7285 (wait_vretrace): New function.
7286 (set_read_map): Likewise.
7287 (set_start_address): Likewise.
7288 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
7289 the right page.
7290 (check_vga_mem): Take the page into account.
7291 (write_char): Likewise.
7292 (write_cursor): Likewise.
7293 (scroll_up): Likewise. Copy the page to the page that is not
7294 shown and switch between both pages.
7295 (grub_vga_putchar): Fix off by one error.
7296 (grub_vga_cls): Wait for the vertical retrace. Take the page into
7297 account.
7298
ad0bd20b 72992004-11-01 Marco Gerards <metgerards@student.han.nl>
7300
7301 Add support for iso9660 (including rockridge).
7302
7303 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7304 (iso9660_mod_SOURCES): New variable.
7305 (iso9660_mod_CFLAGS): Likewise.
7306 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7307 * include/grub/fs.h (grub_iso9660_init): New prototype.
7308 * util/grub-emu.c (main): Call `grub_iso9660_init'.
7309 * fs/iso9660.c: New file.
7310
7311 * include/grub/misc.h (grub_strncat): New prototype.
7312 * kern/misc.c (grub_strncat): New function.
7313
7314 * fs/hfs.c (grub_hfs_mount): Translate the error
7315 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
7316 * fs/jfs.c (grub_jfs_mount): Likewise.
7317 * fs/ufs.c (grub_ufs_mount): Likewise.
7318
a5477a59 73192004-10-28 Hollis Blanchard <hollis@penguinppc.org>
7320
7321 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
7322 which initialized BAT registers.
7323 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
7324 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7325 Move from here...
7326 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
7327 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7328 ... to here.
7329 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
7330 (grub_mapclaim): Likewise.
7331 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
7332 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
7333 hand.
7334
9304c1f8 73352004-10-19 Hollis Blanchard <hollis@penguinppc.org>
7336
7337 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
7338 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
7339 -ffreestanding and -msoft-float.
7340
86f4ae25 73412004-10-15 Hollis Blanchard <hollis@penguinppc.org>
7342
7343 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
7344 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
7345 set in grub_ieee1275_flags.
7346
38912228 73472004-10-14 Hollis Blanchard <hollis@penguinppc.org>
7348
7349 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
7350 prototype.
7351 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
7352 grub_console_init first.
7353 Change the memory range used for grub_ieee1275_claim and
7354 grub_mm_init_region.
7355 Print an error message if the claim fails.
7356 Include <grub/misc.h>.
7357
d1923dc8 73582004-10-13 Hollis Blanchard <hollis@penguinppc.org>
7359
7360 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
7361 Call grub_children_iterate for device nodes of type `scsi',
7362 `ide', or `ata'.
7363 (grub_ofdisk_open): Remove manual device alias resolution.
7364 Fix memory leak when device cannot be opened.
7365 * include/grub/powerpc/ieee1275/ieee1275.h
7366 (grub_children_iterate): New prototype.
7367 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
7368 New function.
7369 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7370 Return -1 if args.size was -1.
7371
4512e4f3 73722004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7373
7374 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
7375 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
7376 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
7377 Open Firmware's memory for it; claim memory from _start to _end.
7378 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
7379 (_end): New extern.
7380 (_start): Zero BSS from __bss_start to _end.
7381 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7382 New extern.
7383 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
7384
4d61feb0 73852004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7386
ad0bd20b 7387 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
7388 -1 if args.base was -1.
4d61feb0 7389
026fa2f9 73902004-10-08 Hollis Blanchard <hollis@penguinppc.org>
7391
7392 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
7393 escape sequence instead of a literal ^L. Also call
7394 grub_ofconsole_gotoxy.
7395
9f2220ef 73962004-10-03 Hollis Blanchard <hollis@penguinppc.org>
7397
7398 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
7399 void * arguments to grub_addr_t. All callers updated. Also make
7400 the `result' argument optional.
7401 (grub_ieee1275_release): change void * arguments to grub_addr_t.
7402 All callers updated.
7403
8a572cd7 74042004-09-22 Hollis Blanchard <hollis@penguinppc.org>
7405
7406 * commands/ls.c (grub_ls_list_files): Use the string following the
7407 initial ')', if present, as the filesystem path.
7408 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
7409
7410 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
7411
18aa81f2 74122004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
7413
7414 Make the source code of the menu interface more readable.
7415
7416 * normal/menu.c: Include grub/mm.h.
7417 (TERM_WIDTH): New macro.
7418 (TERM_HEIGHT): Likewise.
7419 (TERM_INFO_HEIGHT): Likewise.
7420 (TERM_MARGIN): Likewise.
7421 (TERM_SCROLL_WIDTH): Likewise.
7422 (TERM_TOP_BORDER_Y): Likewise.
7423 (TERM_LEFT_BORDER_X): Likewise.
7424 (TERM_BORDER_WIDTH): Likewise.
7425 (TERM_MESSAGE_HEIGHT): Likewise.
7426 (TERM_BORDER_HEIGHT): Likewise.
7427 (TERM_NUM_ENTRIES): Likewise.
7428 (TERM_FIRST_ENTRY_Y): Likewise.
7429 (TERM_ENTRY_WIDTH): Likewise.
7430 (TERM_CURSOR_X): Likewise.
7431 (draw_border): Use macros instead of magic numbers.
7432 (print_entry): Likewise.
7433 (print_entries): Likewise.
7434 (run_menu): Likewise. Also, handle the key 'e'.
7435 (run_menu_entry): Ignore empty command lines.
7436 (print_message): Added a new argument EDIT. If EDIT is true,
7437 print a different message.
7438 (init_page): Likewise.
7439 (edit_menu_entry): New function. Not implemented yet.
7440
b47efe30 74412004-09-17 Marco Gerards <metgerards@student.han.nl>
7442
7443 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
7444 can be loaded from normal mode.
7445
7446 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
7447 `multiboot.mod'.
7448 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
7449 (multiboot_mod_CFLAGS): New variables.
7450 * loader/i386/pc/linux_normal.c: New file.
7451 * loader/i386/pc/multiboot_normal.c: Likewise.
7452
7453 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
7454 attribute `unused'.
7455
7456 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
7457 `fdiro' to read the mode information from instead of `diro'.
7458
7459 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
7460 looking up a symlink.
7461
7462 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
7463 macro.
7464 * normal/command.c (grub_command_execute): Don't parse the
7465 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
7466 flags of the command.
7467
7468 * normal/menu.c (grub_menu_run): Fix typo.
7469
da75ac71 74702004-09-14 Hollis Blanchard <hollis@penguinppc.org>
7471
7472 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
7473
7474 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
7475 `y + 1' instead of `y - 1'.
7476
7477 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
7478
062b24c2 74792004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
7480
7481 From Hollis Blanchard <hollis@penguinppc.org>:
7482 * kern/misc.c (memmove): New alias for grub_memmove.
7483 (memcmp): New alias for grub_memcmp.
7484 (memset): New alias for grub_memset.
7485 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7486 Change "int handle" to "grub_ieee1275_phandle_t handle".
7487 * include/grub/powerpc/ieee1275/ieee1275.h
7488 (grub_ieee1275_get_property): Likewise.
7489
8ddad845 74902004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
7491
7492 Added normal mode command `chainloader' as module chain.mod, which
7493 depends on normal.mod and _chain.mod.
7494
7495 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
7496 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
7497 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
7498 Deleted prototype.
7499 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
7500 but arguments parsing moved to ...
7501 (grub_chainloader_cmd): ... here. New function.
7502 * include/grub/i386/pc/chainloader.h: New file.
7503 * loader/i386/pc/chainloader_normal.c: Likewise.
7504
2c1f4ce3 75052004-09-11 Marco Gerards <metgerards@student.han.nl>
7506
7507 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
7508 (grub_mkimage_LDFLAGS): Likewise.
7509 (grub_emu_SOURCES): Likewise.
7510 (kernel_img_HEADERS): Added fshelp.h.
7511 * fs/ext2.c: Include <grub/fshelp.h>.
7512 (FILETYPE_REG): New macro.
7513 (FILETYPE_INO_REG): Likewise.
7514 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
7515 Changed all users.
7516 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
7517 all users.
7518 (grub_fshelp_node): New struct.
7519 (grub_ext2_data): Added member `diropen'. Changed member `inode'
7520 to a pointer.
7521 (grub_ext2_get_file_block): Removed function.
7522 (grub_ext2_read_block): New function.
7523 (grub_ext2_read_file): Replaced parameter `data' by `node'.
7524 This function was written.
7525 (grub_ext2_mount): Read the root inode. Create a diropen struct.
7526 (grub_ext2_find_file): Removed function.
7527 (grub_ext2_read_symlink): New function.
7528 (grub_ext2_iterate_dir): Likewise.
7529 (grub_ext2_open): Rewritten.
7530 (grub_ext2_dir): Rewritten.
7531 * include/grub/fshelp.h: New file.
7532 * fs/fshelp.c: Likewise.
7533
3c52136a 75342004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
7535
7536 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
7537 (print_message): Add a missing newline.
7538 (run_menu): Added timeout support.
7539 (run_menu_entry): New local function.
7540 (grub_menu_run): Added support for booting.
7541
7542 * kern/loader.c (grub_loader_is_loaded): New function.
7543
7544 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
7545 (grub_get_rtc): Exported.
7546
7547 * include/grub/i386/pc/time.h: Include grub/symbol.h.
7548 (grub_get_rtc): Exported.
7549
7550 * include/grub/normal.h (struct grub_command_list): Remove
7551 constant from the member `command'.
7552
7553 * include/grub/loader.h (grub_loader_is_loaded): Declared.
7554
7555 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
7556
7557 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
7558
aa033560 75592004-08-28 Marco Gerards <metgerards@student.han.nl>
7560
7561 Add support for the JFS filesystem.
7562
7563 * fs/jfs.c: New file.
7564 * include/grub/fs.h (grub_jfs_init): New prototype.
7565 (grub_jfs_fini): New prototype.
7566 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
7567 (grub_emu_SOURCES): Likewise.
7568 (pkgdata_MODULES): Add jfs.mod.
7569 (jfs_mod_SOURCES): New variable.
7570 (jfs_mod_CFLAGS): Likewise.
7571 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
7572 (grubof_SOURCES): Likewise.
7573 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
7574
7575 * fs/fat.c (grub_fat_find_dir): Convert the filename little
7576 endian to the host endian.
7577 (grub_fat_utf16_to_utf8): Move function from there...
7578 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
7579 the endianess of the source string anymore.
7580 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
7581
94bc45af 75822004-08-24 Marco Gerards <metgerards@student.han.nl>
7583
7584 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
7585 (grub_boot_fini) [GRUB_UTIL]: Likewise.
7586 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
7587 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
7588
7589 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
7590 (grub_hfs_iterate_dir): Make the function static. Add prototypes
7591 for `node_found' and `it_dir'.
7592 (grub_hfs_dir): Add prototype for `dir_hook'.
7593
7594 * fs/minix.c (grub_minix_get_file_block): Add prototype for
7595 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
7596 and `indir32' to silence a gcc warning.
7597
7598 * include/grub/fs.h (grub_hfs_init): New prototype.
7599 (grub_hfs_fini): Likewise.
7600
7601
97543f08 76022004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7603
7604 Each disk device has its own id now. This is useful to make use
7605 of multiple disk devices.
7606
7607 * include/grub/disk.h (grub_disk_dev_id): New enum.
7608 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
7609 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
7610
7611 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
7612 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7613
7614 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
7615 GRUB_DISK_DEVICE_OFDISK_ID as an id.
7616
7617 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
7618 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7619
7620 * include/grub/disk.h (struct grub_disk_dev): Added a new member
7621 "id" which is used by the cache manager.
7622
7623 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
7624 of just "GRUB".
7625
64372eb4 76262004-08-18 Marco Gerards <metgerards@student.han.nl>
7627
7628 * fs/hfs.c: New file.
7629 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
7630 (grub_emu_SOURCES): Likewise.
7631 (pkgdata_MODULES): Add hfs.mod.
7632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
7633 (grubof_SOURCES): Likewise.
7634 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
7635
7636 * include/grub/misc.h (grub_strncasecmp): Add prototype.
7637 * kern/misc.c (grub_strncasecmp): Add function.
7638
cc61b58f 76392004-08-14 Marco Gerards <metgerards@student.han.nl>
7640
7641 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
7642 with parentheses.
7643
7644 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
7645 (grub_ext2_dir): In case the directory entry type is unknown, read
7646 it from the inode.
7647
0ef123f6 76482004-08-02 Peter Bruin <pjbruin@dds.nl>
7649
7650 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
7651 grub_load_linux instead of grub_rescue_cmd_linux as second
7652 argument of grub_rescue_register_command.
7653
7654 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
7655
a447c5df 76562004-07-27 Marco Gerards <metgerards@student.han.nl>
7657
7658 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
7659 function.
7660 * commands/boot.c: Remove the check for `GRUB_UTIL'.
7661 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7662 `loader/powerpc/ieee1275/linux.c',
7663 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
7664 * include/grub/powerpc/ieee1275/ieee1275.h
7665 (grub_ieee1275_release): New prototype.
7666 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
7667 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
7668 normal, boot, linux and linux_normal.
7669 * loader/powerpc/ieee1275/linux.c: New file.
7670 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7671
5a9e3546 76722004-07-12 Marco Gerards <metgerards@student.han.nl>
7673
7674 * normal/arg.c (grub_arg_parse): Correct error handling after
7675 reallocating the argumentlist (check if `argl' is not null instead
7676 of checking if `args' is not null).
7677 * kern/mm.c (grub_realloc): Return the same pointer when using the
7678 same region, instead of returning the header address.
7679
e15199cb 76802004-07-11 Marco Gerards <metgerards@student.han.nl>
7681
7682 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
7683 one block instead of two when looking for the initial partition.
7684 (grub_partition_probe): Initialize the local variable `p' with 0.
7685 Use base 10 for the grub_strtoul call.
7686 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
7687 need for one local variable.
7688 (grub_strtoul): Don't add the new value to `num', instead of that
7689 just assign it.
7690
020616c2 76912004-07-11 Marco Gerards <metgerards@student.han.nl>
7692
7693 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
7694 (pxeboot_img_SOURCES): New variable.
7695 (pxeboot_img_ASFLAGS): Likewise.
7696 (pxeboot_img_LDFLAGS): Likewise.
7697 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
7698 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
7699 <lode_leroy@hotmail.com>.
7700
6c51eb64 77012004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7702
7703 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
7704 there was no input.
7705
cfb12aff 77062004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7707
7708 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
7709 the history buffer logic.
7710
6eabba74 77112004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7712
7713 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
7714 (FILETYPE_INO_SYMLINK): New macros.
7715 (grub_ext2_find_file): Check if the node is a directory using the
7716 inode stat information instead of using the filetype in the
7717 dirent. Exclude the first character of an absolute symlink.
7718 (grub_ext2_dir): Mask out the filetype part of the mode member of
7719 the inode.
7720
66e19ef8 77212004-05-24 Marco Gerards <metgerards@student.han.nl>
7722
7723 Add support for UFS version 1 and 2. Add support for the minix
7724 filesystem version 1 and 2, both the variants with 14 and 30 long
7725 filenames.
7726
7727 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
7728 fs/minix.c.
7729 (grub_emu_SOURCES): Likewise.
7730 (pkgdata_MODULES): Add ufs.mod and minix.mod.
7731 (ufs_mod_SOURCES): New variable.
7732 (ufs_mod_CFLAGS): Likewise.
7733 (minix_mod_SOURCES): Likewise.
7734 (minix_mod_CFLAGS): Likewise.
7735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
7736 fs/minix.c.
7737 (grubof_SOURCES): Likewise.
7738 * fs/ufs.c: New file.
7739 * fs/minix.c: New file.
7740 * include/grub/fs.h (grub_ufs_init): New prototype.
7741 (grub_ufs_fini): Likewise.
7742 (grub_minix_init): Likewise.
7743 (grub_minix_fini): Likewise.
7744 * util/grub-emu.c (main): Initialize and deinitialize UFS and
7745 minix fs.
7746
cc2e748a 77472004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
7748
7749 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
7750 commands/ls.c, commands/terminal.c, commands/boot.c,
7751 commands/cmp.c and commands/cat.c.
7752 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
7753
7754 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
7755 "env.h"
7756
4b13b216 77572004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7758
7759 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
7760 and grub_, respectively. Because the conversion is trivial and
7761 mechanical, I omit the details here. Please refer to the CVS
7762 if you need more information.
7763
6a142551 77642004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7765
7766 * include/pupa: Renamed to ...
7767 * include/grub: ... this.
7768 * util/i386/pc/pupa-mkimage.c: Renamed to ...
7769 * util/i386/pc/grub-mkimage.c: ... this.
7770 * util/i386/pc/pupa-setup.c: Renamed to ...
7771 * util/i386/pc/grub-setup.c: ... this.
7772 * util/pupa-emu.c: Renamed to ...
7773 * util/grub-emu.c: ... this.
7774
e56cdf21 77752004-03-29 Marco Gerards <metgerards@student.han.nl>
7776
7777 Add support for the newworld apple macintosh (PPC). This has been
7778 tested on the powerbook 2000 only. It only adds support for
7779 generic ieee1275 functions, console and disk support. This should
7780 be easy to port to other architectures with support for Open
7781 Firmware.
7782
7783 * configure.ac: Accept the powerpc as host_cpu. In the case of
7784 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
7785 specific tests are only executed while building for the i386.
7786 Inverse test for crosscompile.
7787 * genmk.rb (Utility): Allow assembler files.
7788 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
7789 * conf/powerpc-ieee1275.rmk: New file.
7790 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
7791 * disk/powerpc/ieee1275/partition.c: Likewise.
7792 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
7793 * include/pupa/powerpc/ieee1275/console.h: Likewise.
7794 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
7795 * include/pupa/powerpc/ieee1275/time.h: Likewise.
7796 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
7797 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
7798 * include/pupa/powerpc/ieee1275/loader.h
7799 * include/pupa/powerpc/setjmp.h: Likewise.
7800 * include/pupa/powerpc/types.h: Likewise.
7801 * kern/powerpc/ieee1275/init.c: Likewise.
7802 * kern/powerpc/ieee1275/openfw.c: Likewise.
7803 * term/powerpc/ieee1275/ofconsole.c: Likewise.
7804
7805 These files were written by Johan Rydberg
7806 (jrydberg@night.trouble.net) and I only modified them slightly.
7807
7808 * boot/powerpc/ieee1275/cmain.c: New file.
7809 * boot/powerpc/ieee1275/crt0.S: Likewise.
7810 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
7811 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
7812
8c8cc205 78132004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
7814
7815 * Makefile.in: Update copyright.
7816 * genmodsrc.sh: Likewise.
7817 * gensymlist.sh: Likewise.
7818 * term/i386/pc/vga.c: Indent correctly.
7819
7820 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
7821 bugreporting address.
7822 * util/i386/pc/pupa-setup.c (usage): Likewise,
7823 (main): Call pupa_ext2_init and pupa_ext2_fini.
7824
7825 * fs/fat.c (log2): Renamed to ...
7826 (fat_log2): ... this.
7827 All callers changed.
7828 * kern/misc.c (memcpy): Alias to pupa_memmove.
7829 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
7830 lvalue cast.
7831 * util/console.c (pupa_ncurses_fini): Return 0.
7832
7833 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
7834 Move fail label here.
7835 [__GNU__]: Don't warn when using stat.
7836 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
7837 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
7838 long int. Use strtol instead of strtoul.
7839
db1771cf 78402004-03-14 Marco Gerards <metgerards@student.han.nl>
7841
7842 * commands/boot.c: New file.
7843 * commands/cat.c: Likewise.
7844 * commands/cmp.c: Likewise.
7845 * commands/ls.c: Likewise.
7846 * commands/terminal.c: Likewise.
7847 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
7848 (pupa_register_command): Changed interface to match the new
7849 argument parser.
7850 (pupa_command_execute): Changed (almost rewritten) so it uses
7851 pupa_split_command. Added support for setting variables using the
7852 syntax `foo=bar'.
7853 (rescue_command): Changed to work with the new argument parser.
7854 (terminal_command): Moved from here to commands/terminal.c.
7855 (set_command): New function.
7856 (unset_command): New function.
7857 (insmod_command): New function.
7858 (rmmod_command): New function.
7859 (lsmod_command): New function.
7860 (pupa_command_init): Don't initialize the command terminal
7861 anymore. Initialize the commands set, unset, insmod, rmmod and
7862 lsmod.
7863 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
7864 (kernel_img_HEADERS): Add arg.h and env.h.
7865 (pupa_mkimage_LDFLAGS): Add kern/env.c.
7866 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
7867 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
7868 normal/arg.c.
7869 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
7870 terminal.mod.
7871 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
7872 (boot_mod_SOURCES): New variable.
7873 (terminal_mod_SOURCES): Likewise.
7874 (ls_mod_SOURCES): Likewise.
7875 (cmp_mod_SOURCES): Likewise.
7876 (cat_mod_SOURCES): Likewise.
7877
7878 * normal/arg.c: New file.
7879 * kern/env.c: Likewise.
7880 * include/pupa/arg.h: Likewise.
7881 * include/pupa/env.h: Likewise.
7882 * font/manager.c (font_command): Changed to match argument parsing
7883 interface changes.
7884 (PUPA_MOD_INIT): Likewise.
7885 * hello/hello.c (pupa_cmd_hello): Likewise.
7886 (PUPA_MOD_INIT): Likewise.
7887 * include/pupa/disk.h: Include <pupa/device.h>.
7888 (pupa_print_partinfo): New prototype.
7889 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
7890 (pupa_dl_get_prefix): Likewise.
7891 * include/pupa/misc.h: Include <pupa/err.h>.
7892 (pupa_isgraph): New prototype.
7893 (pupa_isdigit): Likewise.
7894 (pupa_split_cmdline): Likewise.
7895 * include/pupa/normal.h: Include <pupa/arg.h>.
7896 (pupa_command): Changed the prototype of the member `func' to
7897 match the argument parsing interface. Added member `options'.
7898 (pupa_register_command): Updated to match function.
7899 (pupa_arg_parse): New prototype.
7900 (pupa_hello_init) [PUPA_UTIL]: New prototype.
7901 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
7902 (pupa_ls_init) [PUPA_UTIL]: Likewise.
7903 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
7904 (pupa_cat_init) [PUPA_UTIL]: Likewise.
7905 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
7906 (pupa_boot_init) [PUPA_UTIL]: Likewise.
7907 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
7908 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
7909 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
7910 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
7911 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
7912 * kern/disk.c: Include <pupa/file.h>.
7913 (pupa_print_partinfo): New function.
7914 * kern/dl.c: Include <pupa/env.h>.
7915 (pupa_dl_dir): Variable removed.
7916 (pupa_dl_load): Use the environment variable `prefix' instead of
7917 the variable pupa_dl_dir.
7918 (pupa_dl_set_prefix): Function removed.
7919 (pupa_dl_get_prefix): Likewise.
7920 * kern/i386/pc/init.c: Include <pupa/env.h>.
7921 (pupa_machine_init): Use the environment variable `prefix' instead of
7922 using pupa_dl_set_prefix to set the prefix.
7923 * kern/main.c: Include <pupa/env.h>.
7924 (pupa_set_root_dev): Use the environment variable `prefix' instead of
7925 using pupa_dl_get_prefix to get the prefix.
7926 * kern/misc.c: Include <pupa/env.h>.
7927 (pupa_isdigit): New function.
7928 (pupa_isgraph): Likewise.
7929 (pupa_ftoa): Likewise.
7930 (pupa_vsprintf): Added support for printing values of the type
7931 `double'. Make it possible to format variable output when using
7932 formatting like `%1.2%f'.
7933 (pupa_split_cmdline): New function.
7934 * kern/rescue.c: Include <pupa/env.h>.
7935 (next_word): Removed function.
7936 (pupa_rescue_cmd_prefix): Likewise.
7937 (pupa_rescue_cmd_set): New function.
7938 (pupa_rescue_cmd_unset): New function.
7939 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
7940 split the command line instead of splitting it here. Added
7941 support for setting variables using the syntax `foo=bar'. Don't
7942 initialize the prefix command anymore. Initialized the set and
7943 unset commands.
7944 * normal/cmdline.c: Include <pupa/env.h>.
7945 (pupa_tab_complete): Added prototypes for print_simple_completion,
7946 print_partition_completion, add_completion, iterate_commands,
7947 iterate_dev, iterate_part and iterate_dir. Moved code to print
7948 partition information from here to kern/disk.c.
7949 (pupa_cmdline_run): Don't check if the funtion exists anymore.
7950 * normal/main.c: Include <pupa/env.h>.
7951 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
7952 instead of using pupa_dl_get_prefix to get the prefix.
7953 * term/i386/pc/vga.c: Include <pupa/arg.h>.
7954 (check_vga_mem): Cast pointers to `void *' to silence a gcc
7955 warning.
7956 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
7957 (pupa_vga_setcolor): Declare unused variables with `__attribute__
7958 ((unused))' to silence a gcc warning.
7959 (pupa_vga_setcolor): Likewise.
7960 (debug_command): Changed to match argument parsing
7961 interface changes.
7962 * util/pupa-emu.c: Include <pupa/env.h>.
7963 (options): Added 0's for unused fields to silence a gcc warning.
7964 (argp): Likewise.
7965 (main): Use the environment variable `prefix' instead of using
7966 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
7967 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
7968 and terminal.
7969
7970 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
7971 * util/misc.c: Include <malloc.h>.
7972 (pupa_malloc): Rewritten so errors are correctly reported.
7973 (pupa_realloc): Likewise.
7974 (pupa_memalign): Likewise.
7975 (pupa_mm_init_region): Declare unused variables with
7976 `__attribute__ ((unused))' to silence a gcc warning.
7977 * normal/i386/setjmp.S: Remove tab at the end of the file to
7978 silence a gcc warning.
7979 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
7980 variables with `__attribute__ ((unused))' to silence a gcc
7981 warning.
7982 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
7983 local variable i unsigned to silence a gcc warning.
7984
7985 * kern/term.c: Include <pupa/misc.h>.
7986 (pupa_more_lines): New variable.
7987 (pupa_more): Likewise.
7988 (pupa_putcode): When the pager is active pause at the end of every
7989 screen.
7990 (pupa_set_more): New function.
7991 * include/pupa/term.h (pupa_set_more): New prototype.
7992
7993
3b1139cb 79942004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
7995
7996 Now this project is GRUB 2 rather than PUPA. The location of
7997 the CVS repository was moved to GRUB's.
7998
7999 * configure.ac: Use bug-grub as the reporting address.
8000 Use GRUB instead of PUPA.
8001 Change the version number to 1.90.
8002
8367695c 80032004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
8004
8005 * genkernsyms.sh: Updated copyright information.
8006 * genmk.rb: Likewise.
8007 * genmodsrc.sh: Likewise.
8008 * gensymlist.sh: Likewise.
8009 * boot/i386/pc/boot.S: Likewise.
8010 * boot/i386/pc/diskboot.S: Likewise.
8011 * disk/i386/pc/biosdisk.c: Likewise.
8012 * disk/i386/pc/partition.c: Likewise.
8013 * font/manager.c: Likewise.
8014 * fs/ext2.c: Likewise.
8015 * fs/fat.c: Likewise.
8016 * include/pupa/boot.h: Likewise.
8017 * include/pupa/device.h: Likewise.
8018 * include/pupa/disk.h: Likewise.
8019 * include/pupa/dl.h: Likewise.
8020 * include/pupa/elf.h: Likewise.
8021 * include/pupa/err.h: Likewise.
8022 * include/pupa/file.h: Likewise.
8023 * include/pupa/font.h: Likewise.
8024 * include/pupa/fs.h: Likewise.
8025 * include/pupa/kernel.h: Likewise.
8026 * include/pupa/loader.h: Likewise.
8027 * include/pupa/misc.h: Likewise.
8028 * include/pupa/mm.h: Likewise.
8029 * include/pupa/net.h: Likewise.
8030 * include/pupa/normal.h: Likewise.
8031 * include/pupa/rescue.h: Likewise.
8032 * include/pupa/setjmp.h: Likewise.
8033 * include/pupa/symbol.h: Likewise.
8034 * include/pupa/term.h: Likewise.
8035 * include/pupa/types.h: Likewise.
8036 * include/pupa/i386/setjmp.h: Likewise.
8037 * include/pupa/i386/types.h: Likewise.
8038 * include/pupa/i386/pc/biosdisk.h: Likewise.
8039 * include/pupa/i386/pc/boot.h: Likewise.
8040 * include/pupa/i386/pc/console.h: Likewise.
8041 * include/pupa/i386/pc/init.h: Likewise.
8042 * include/pupa/i386/pc/kernel.h: Likewise.
8043 * include/pupa/i386/pc/linux.h: Likewise.
8044 * include/pupa/i386/pc/loader.h: Likewise.
8045 * include/pupa/i386/pc/memory.h: Likewise.
8046 * include/pupa/i386/pc/multiboot.h: Likewise.
8047 * include/pupa/i386/pc/partition.h: Likewise.
8048 * include/pupa/i386/pc/time.h: Likewise.
8049 * include/pupa/i386/pc/vga.h: Likewise.
8050 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
8051 * include/pupa/util/getroot.h: Likewise.
8052 * include/pupa/util/misc.h: Likewise.
8053 * include/pupa/util/resolve.h: Likewise.
8054 * kern/device.c: Likewise.
8055 * kern/disk.c: Likewise.
8056 * kern/dl.c: Likewise.
8057 * kern/err.c: Likewise.
8058 * kern/file.c: Likewise.
8059 * kern/fs.c: Likewise.
8060 * kern/loader.c: Likewise.
8061 * kern/main.c: Likewise.
8062 * kern/misc.c: Likewise.
8063 * kern/mm.c: Likewise.
8064 * kern/rescue.c: Likewise.
8065 * kern/term.c: Likewise.
8066 * kern/i386/dl.c: Likewise.
8067 * kern/i386/pc/init.c: Likewise.
8068 * kern/i386/pc/lzo1x.S: Likewise.
8069 * kern/i386/pc/startup.S: Likewise.
8070 * loader/i386/pc/chainloader.c: Likewise.
8071 * loader/i386/pc/linux.c: Likewise.
8072 * loader/i386/pc/multiboot.c: Likewise.
8073 * normal/cmdline.c: Likewise.
8074 * normal/command.c: Likewise.
8075 * normal/main.c: Likewise.
8076 * normal/menu.c: Likewise.
8077 * normal/i386/setjmp.S: Likewise.
8078 * term/i386/pc/console.c: Likewise.
8079 * term/i386/pc/vga.c: Likewise.
8080 * util/console.c: Likewise.
8081 * util/genmoddep.c: Likewise.
8082 * util/misc.c: Likewise.
8083 * util/pupa-emu.c: Likewise.
8084 * util/resolve.c: Likewise.
8085 * util/unifont2pff.rb: Likewise.
8086 * util/i386/pc/biosdisk.c: Likewise.
8087 * util/i386/pc/getroot.c: Likewise.
8088 * util/i386/pc/pupa-mkimage.c: Likewise.
8089 * util/i386/pc/pupa-setup.c: Likewise.
8090
e6eced71 80912004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
8092
8093 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
8094 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
8095 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
8096 reading and reset it after reading.
8097 (pupa_ext2_close): Return PUPA_ERR_NONE.
8098
8099 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
8100 Correct value.
8101 (struct linux_kernel_header): Add kernel_version and
8102 initrd_addr_max.
8103 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
8104 pupa_file_read succeeds.
8105 (pupa_rescue_cmd_initrd): Implement.
8106
5aded270 81072003-12-03 Marco Gerards <metgerards@student.han.nl>
8108
8109 * fs/ext2.c (pupa_ext2_label): New function.
8110 (pupa_ext2_fs): Added label.
8111 * fs/fat.c (pupa_fat_label): New function.
8112 (pupa_fat_fs): Added label.
8113 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
8114
8115 * kern/misc.c (pupa_strndup): New function.
8116 * include/pupa/misc.h (pupa_strndup): New prototype.
8117
8118 * include/pupa/normal.h: Include <pupa/err.h>.
8119 (pupa_set_history): New prototype.
8120 (pupa_iterate_commands): New prototype.
8121 * normal/cmdline.c: Include <pupa/machine/partition.h>,
8122 <pupa/disk.h>, <pupa/file.h>.
8123 (hist_size): New variable.
8124 (hist_lines): Likewise.
8125 (hist_end): Likewise.
8126 (hist_used): Likewise.
8127 (pupa_set_history): New function.
8128 (pupa_history_get): Likewise.
8129 (pupa_history_add): Likewise.
8130 (pupa_history_replace): Likewise.
8131 (pupa_tab_complete): Likewise.
8132 (pupa_cmdline_run): Added tab completion and history buffer. Tab
8133 completion shows partitionnames while completing partitions, this
8134 feature was suggested by Jeff Bailey.
8135 * normal/command.c (pupa_iterate_commands): New function.
8136 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
8137 (pupa_normal_init): Initialize history buffer.
8138 (PUPA_MOD_INIT): Likewise.
8139 (pupa_normal_fini): Free the history buffer.
8140 (PUPA_MOD_FINI): Likewise.
8141
8142 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
8143 key.
8144
8145 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
8146 * configure.ac [i386]: Check for regparam bug.
8147 (NESTED_FUNC_ATTR) [! i386]: Defined.
8148
1f7315a3 81492003-11-17 Marco Gerards <metgerards@student.han.nl>
8150
8151 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
8152 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
8153 (pupa_emu_SOURCES): New variable.
8154 (pupa_emu_LDFLAGS): Likewise.
8155 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
8156 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
8157 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
8158 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8159 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
8160 (pupa_jmp_buf): New typedef.
8161 (pupa_setjmp) [PUPA_UTIL]: New macro.
8162 (pupa_longjmp) [PUPA_UTIL]: Likewise.
8163 * include/pupa/term.h (struct pupa_term): New member `refresh'.
8164 (pupa_refresh): New prototype.
8165 * include/pupa/util/getroot.h: New file.
8166 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
8167 it.
8168 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
8169 (pupa_rescue_cmd_cat): Likewise.
8170 (pupa_rescue_cmd_ls): Likewise.
8171 (pupa_rescue_cmd_testload): Likewise.
8172 (pupa_rescue_cmd_lsmod): Likewise.
8173 * normal/cmdline.c (pupa_cmdline_get): Likewise.
8174 * normal/menu.c (run_menu): Likewise.
8175 * kern/term.c (pupa_cls): Likewise.
8176 (pupa_refresh): New function.
8177 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
8178 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8179 * util/console.c: New file.
8180
8181 * util/i386/pc/getroot.c: New file.
8182 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
8183 (pupa_putchar): New function.
8184 (pupa_refresh): Likewise.
8185 (xgetcwd): Function moved to ...
8186 (strip_extra_slashes): Likewise.
8187 (get_prefix): Likewise.
8188 * util/i386/pc/getroot.c: ... here.
8189 (find_root_device): Function moved and renamed to...
8190 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
8191 Changed all callers.
8192 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
8193 and renamed to...
8194 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
8195 Changed all callers.
8196 * util/misc.c (pupa_memalign): New function.
8197 (pupa_mm_init_region): Likewise.
8198 (pupa_register_exported_symbols): Likewise.
8199 (pupa_putchar): Function removed.
8200 * util/pupa-emu.c: New file.
8201
9a5c1ade 82022003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
8203
8204 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
8205 (_multiboot_mod_SOURCES): New variable.
8206 (_multiboot_mod_CFLAGS): Likewise.
8207 * loader/i386/pc/multiboot.c: New file.
8208 * include/pupa/i386/pc/multiboot.h: Likewise.
8209 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
8210 (pupa_multiboot_real_boot): New function.
8211 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
8212 (pupa_multiboot_real_boot): New prototype.
8213 (pupa_rescue_cmd_multiboot): Likewise
8214 (pupa_rescue_cmd_module): Likewise.
8215
8216 * kern/loader.c (pupa_loader_set): Continue when
8217 pupa_loader_unload_func() fails.
8218 (pupa_loader_unset): New function.
8219 * include/pupa/loader.h (pupa_loader_unset): New prototype.
8220
8221 * kern/misc.c (pupa_stpcpy): New function.
8222 * include/pupa/misc.h (pupa_stpcpy): New prototype.
8223
8e72a9c0 82242003-11-12 Marco Gerards <metgerards@student.han.nl>
8225
8226 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
8227 for available extensions.
8228
8229 * include/pupa/i386/pc/time.h: New file.
8230 * kern/disk.c: Include <pupa/machine/time.h>.
8231 (PUPA_CACHE_TIMEOUT): New macro.
8232 (pupa_last_time): New variable.
8233 (pupa_disk_open): Flush the cache when there was a timeout.
8234 (pupa_disk_close): Reset the timer.
8235 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
8236 pupa_currticks.
8237 * util/misc.c: Include <sys/times.h>
8238 (pupa_get_rtc): New function.
8239
c4adbd32 82402003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8241
8242 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
8243 as blocks.
8244 (pupa_ext2_get_file_block): Use blocks member.
8245
8246 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
8247 first block. Return -1 instead of pupa_errno on error.
8248
bfd30f06 82492003-10-27 Marco Gerards <metgerards@student.han.nl>
8250
8251 * README: In the pupa-mkimage example use _chain instead of chain
8252 and ext2 instead of fat.
8253 * TODO: Replace ext2fs with jfs as an example. Add an item for
8254 adding journal playback for ext2fs.
8255 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
8256 (pkgdata_MODULES): Added ext2.mod.
8257 (ext2_mod_SOURCES): New variable.
8258 (ext2_mod_CFLAGS): Likewise.
8259 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
8260 * include/pupa/misc.h (pupa_strncpy): New prototype.
8261 (pupa_strcat): Likewise.
8262 (pupa_strncmp): Likewise.
8263 * kern/misc.c (pupa_strcat): Enable function.
8264 (pupa_strncpy): New function.
8265 (pupa_strncmp): Likewise.
8266 * fs/ext2.c: New file.
8267
8268 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
8269 when the read failed before retrying.
8270 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
8271 (_FILE_OFFSET_BITS): Likewise.
8272 * configure.ac: Added AC_SYS_LARGEFILE.
8273
98d15063 82742003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8275
8276 * genmk.rb (PModule#rule): Make sure to get only symbol names
8277 from the output of nm.
8278 Reported by Robert Millan <zeratul2@wanadoo.es>.
8279
18d9c7cd 82802003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8281
8282 I forgot to check in these changes for a long time. This adds
8283 incomplete support for VGA console, and this is still very
8284 buggy. Also, a lot of consideration is required for I18N,
8285 UNICODE, and VGA font issues. Therefore, assume that this is
8286 such that "better than nothing".
8287
8288 * font/manager.c: New file.
8289 * include/pupa/font.h: Likewise.
8290 * include/pupa/i386/pc/vga.h: Likewise.
8291 * term/i386/pc/vga.c: Likewise.
8292 * util/unifont2pff.rb: Likewise.
8293
8294 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
8295 (pkgdata_MODULES): Added vga.mod and font.mod.
8296 (vga_mod_SOURCES): New variables.
8297 (vga_mod_CFLAGS): Likewise.
8298 (font_mod_SOURCES): Likewise.
8299 (font_mod_CFLAGS): Likewise.
8300
8301 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
8302
8303 * include/pupa/term.h: Include pupa/err.h.
8304 (struct pupa_term): Added init and fini.
8305 Changed the argument of putchar to pupa_uint32_t.
8306
8307 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
8308 (pupa_console_real_putchar): New prototype.
8309 (pupa_console_putchar): Removed.
8310 (pupa_console_checkkey): Exported.
8311 (pupa_console_getkey): Likewise.
8312
8313 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
8314 characters.
8315
8316 * kern/term.c (pupa_term_set_current): Rewritten.
8317 (pupa_putchar): Likewise.
8318 (pupa_putcode): New function.
8319
8320 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
8321 (pupa_console_real_putchar): ... this.
8322 (pupa_vga_set_mode): New function.
8323 (pupa_vga_get_font): Likewise.
8324
8325 * normal/command.c: Include pupa/term.h.
8326 (terminal_command): New function.
8327 (pupa_command_init): Register the command "terminal".
8328
8329 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
8330 (DISP_UP): Likewise.
8331 (DISP_RIGHT): Likewise.
8332 (DISP_DOWN): Likewise.
8333 (DISP_HLINE): Likewise.
8334 (DISP_VLINE): Likewise.
8335 (DISP_UL): Likewise.
8336 (DISP_UR): Likewise.
8337 (DISP_LL): Likewise.
8338 (DISP_LR): Likewise.
8339
8340 * term/i386/pc/console.c (pupa_console_putchar): New function.
8341
977329f5 83422003-02-08 NIIBE Yutaka <gniibe@m17n.org>
8343
8344 * util/resolve.c (pupa_util_resolve_dependencies): BUG
8345 FIX. Reverse the path_list.
8346
8347 * include/pupa/normal.h: Export pupa_register_command and
8348 pupa_unregister_command.
8349
8350 * hello/hello.c (pupa_cmd_hello): New module.
8351 * conf/i386-pc.rmk: Added hello.mod.
8352
1f5ab428 83532003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
8354
8355 * kern/i386/pc/lzo1x.S: New file.
8356
8357 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
8358 (compress_kernel): New variable.
8359 (generate_image): Heavily modified to support compressing a
8360 large part of the core image.
8361
8362 * util/misc.c (pupa_util_read_image): Fix a file descriptor
8363 leak.
8364 (pupa_util_load_image): New function.
8365
8366 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
8367 (pupa_compressed_size): New variable.
8368 (codestart): Enable Gate A20 here.
8369 Decompress the compressed part of the core image.
8370 Rearrange the code to put functions and variables which are
8371 required for initialization in the non-compressed part.
8372 Include lzo1x.S.
8373
8374 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
8375 here.
8376
8377 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
8378
8379 * include/pupa/i386/pc/kernel.h
8380 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
8381 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
8382 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8383 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8384 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
8385
8386 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
8387
8388 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
8389 (Utility#rule): Likewise.
8390
8391 * configure.ac: Check if LZO is available.
8392
ce5bf700 83932003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
8394
8395 * include/pupa/normal.h: New file.
8396 * include/pupa/setjmp.h: Likewise.
8397 * include/pupa/i386/setjmp.h: Likewise.
8398 * normal/cmdline.c: Likewise.
8399 * normal/command.c: Likewise.
8400 * normal/main.c: Likewise.
8401 * normal/menu.c: Likewise.
8402 * normal/i386/setjmp.S: Likewise.
8403
8404 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
8405 (pupa_rescue_cmd_initrd): Likewise.
8406
8407 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
8408 Likewise.
8409
8410 * kern/i386/pc/startup.S (translation_table): New variable.
8411 (translate_keycode): New function.
8412 (pupa_console_getkey): Call translate_keycode.
8413
8414 * kern/rescue.c (attempt_normal_mode): New function.
8415 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
8416 it failed, print a message.
8417
8418 * kern/mm.c (pupa_real_malloc): Print more information when a
8419 free magic is broken.
8420 (pupa_free): If the first free header is not free actually, set
8421 it to P.
8422
8423 * kern/main.c (pupa_load_normal_mode): Just load the module
8424 "normal".
8425 (pupa_main): Don't print the message
8426 "Entering into rescue mode..." here.
8427
8428 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
8429 Declared.
8430 (pupa_rescue_cmd_initrd): Likewise.
8431 (pupa_rescue_cmd_initrd): Likewise.
8432
8433 * include/pupa/symbol.h (FUNCTION): Specify the type.
8434 (VARIABLE): Likewise.
8435
8436 * include/pupa/err.h (pupa_err_t): Added
8437 PUPA_ERR_UNKNOWN_COMMAND.
8438
8439 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
8440 (pupa_dl_get_prefix): Likewise.
8441
8442 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
8443 Added _chain.mod and _linux.mod instead of chain.mod and
8444 linux.mod.
8445 (chain_mod_SOURCES): Renamed to ...
8446 (_chain_mod_SOURCES): ... this.
8447 (chain_mod_CFLAGS): Renamed to ...
8448 (_chain_mod_CFLAGS): ... this.
8449 (linux_mod_SOURCES): Renamed to ...
8450 (_linux_mod_SOURCES): ... this.
8451 (linux_mod_CFLAGS): Renamed to ...
8452 (_linux_mod_CFLAGS): ... this.
8453 (normal_mod_SOURCES): New variable.
8454 (normal_mod_CFLAGS): Likewise.
8455 (normal_mod_ASFLAGS): Likewise.
8456
84572003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
8458
8459 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
8460 possible.
8461
8462 * kern/dl.c (pupa_dl_ref): Refer dependending modules
8463 recursively.
8464 (pupa_dl_unref): Unrefer depending modules recursively.
8465 Don't call pupa_dl_unload implicitly, because PUPA can crash if
8466 a module is unloaded before one depending on that module is
8467 unloaded.
8468 (pupa_dl_unload): Unload depending modules explicitly,
8469 if possible.
8470
c04da074 84712003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
8472
8473 * include/pupa/i386/pc/linux.h: New file.
8474 * loader/i386/pc/linux.c: Likewise.
8475
8476 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
8477 Removed.
8478 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
8479 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
8480 of PUPA_CHAINLOADER_BOOT_SECTOR.
8481
8482 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
8483 (pupa_linux_prot_size): New variable.
8484 (pupa_linux_tmp_addr): Likewise.
8485 (pupa_linux_real_addr): Likewise.
8486 (pupa_linux_boot_zimage): New function.
8487 (pupa_linux_boot_bzimage): Likewise.
8488
8489 * kern/i386/pc/init.c (struct mem_region): New structure.
8490 (MAX_REGIONS): New macro.
8491 (mem_regions): New variable.
8492 (num_regions): Likewise.
8493 (pupa_os_area_addr): Likewise.
8494 (pupa_os_area_size): Likewise.
8495 (pupa_lower_mem): Likewise.
8496 (pupa_upper_mem): Likewise.
8497 (add_mem_region): New function.
8498 (compact_mem_regions): Likewise.
8499 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
8500 the size of the conventional memory and that of so-called upper
8501 memory (before the first memory hole).
8502 Instead of adding each found region to free memory, use
8503 add_mem_region and add them after removing overlaps.
8504 Also, add only 1/4 of the upper memory to free memory. The rest
8505 is used for loading OS images. Maybe this is ad hoc, but this
8506 makes it much easier to relocate OS images when booting.
8507
8508 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
8509 (pupa_enter_rescue_mode): Don't register initrd and module.
8510
8511 * kern/mm.c: Include pupa/dl.h.
8512
8513 * kern/main.c: Include pupa/file.h and pupa/device.h.
8514
8515 * kern/loader.c (pupa_loader_load_module_func): Removed.
8516 (pupa_loader_load_module): Likewise.
8517
8518 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
8519 ``.o''.
8520
8521 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
8522 (pupa_linux_tmp_addr): Likewise.
8523 (pupa_linux_real_addr): Likewise.
8524 (pupa_linux_boot_zimage): Likewise.
8525 (pupa_linux_boot_bzimage): Likewise.
8526
8527 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
8528 (pupa_upper_mem): Likewise.
8529 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
8530 module is too dangerous.
8531
8532 * include/pupa/loader.h (pupa_os_area_addr): Declared.
8533 (pupa_os_area_size): Likewise.
8534 (pupa_loader_set): Remove the first argument. Loader doesn't
8535 manage modules or initrd any longer.
8536 (pupa_loader_load_module): Removed.
8537
8538 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
8539 (linux_mod_SOURCES): New variable.
8540 (linux_mod_CFLAGS): Likewise.
8541
a13f9237 85422003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
8543
8544 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
8545 the length of a blocklist correctly.
8546
8547 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
8548 Use ioctl only if the OS file is a block device.
8549 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
8550 not very useful for normal files.
8551
8552 * kern/main.c (pupa_set_root_dev): New function.
8553 (pupa_load_normal_mode): Likewise.
8554 (pupa_main): Call those above.
8555
8556 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
8557 pupa_uint16_t.
8558
8559 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
8560
a5ffe966 85612003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8562
8563 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
8564 (setup): Configure the installed partition information and the
8565 dl prefix.
8566
8567 * loader/i386/pc/chainloader.c (my_mod): New variable.
8568 (pupa_chainloader_unload): New function.
8569 (pupa_rescue_cmd_chainloader): Refer itself.
8570 (PUPA_MOD_INIT): Save its own module in MY_MOD.
8571
8572 * kern/i386/pc/startup.S (install_partition): Removed.
8573 (version_string): Likewise.
8574 (config_file): Likewise.
8575 (pupa_install_dos_part): New variable.
8576 (pupa_install_bsd_part): Likewise.
8577 (pupa_prefix): Likewise.
8578 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
8579
8580 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
8581 and pupa/misc.h.
8582 (make_install_device): New function.
8583 (pupa_machine_init): Set the dl prefix.
8584
8585 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
8586 (buf): Renamed to ...
8587 (linebuf): ... this.
8588 (pupa_rescue_cmd_prefix): New function.
8589 (pupa_rescue_cmd_insmod): Likewise.
8590 (pupa_rescue_cmd_rmmod): Likewise.
8591 (pupa_rescue_cmd_lsmod): Likewise.
8592 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
8593 rmmod and lsmod.
8594
8595 * kern/mm.c (pupa_memalign): If failed even after invalidating
8596 disk caches, unload unneeded modules and retry.
8597
8598 * kern/misc.c (pupa_memmove): New function.
8599 (pupa_memcpy): Removed.
8600 (pupa_strcpy): New function.
8601 (pupa_itoa): Made static.
8602
8603 * kern/dl.c (pupa_dl_iterate): New function.
8604 (pupa_dl_ref): Likewise.
8605 (pupa_dl_unref): Likewise.
8606 (pupa_dl_unload): Return if succeeded or not.
8607 (pupa_dl_unload_unneeded): New function.
8608 (pupa_dl_unload_all): Likewise.
8609 (pupa_dl_init): Renamed to ...
8610 (pupa_dl_set_prefix): ... this.
8611 (pupa_dl_get_prefix): New function.
8612
8613 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
8614 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
8615 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8616 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8617 (pupa_install_dos_part): Declared.
8618 (pupa_install_bsd_part): Likewise.
8619 (pupa_prefix): Likewise.
8620 (pupa_boot_drive): Likewise.
8621
8622 * include/pupa/types.h: Fix a typo.
8623
8624 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
8625 pupa_memmove.
8626 (pupa_memmove): Declared.
8627 (pupa_strcpy): Likewise.
8628
8629 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
8630 pupa_mod_init takes one argument, its own module.
8631 (pupa_dl_unload_unneeded): Declared.
8632 (pupa_dl_unload_all): Likewise.
8633 (pupa_dl_ref): Likewise.
8634 (pupa_dl_unref): Likewise.
8635 (pupa_dl_iterate): Likewise.
8636 (pupa_dl_init): Renamed to ...
8637 (pupa_dl_set_prefix): ... this.
8638 (pupa_dl_get_prefix): Declared.
8639
8640 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
8641 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
8642 unloaded.
8643 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
8644 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
8645
8646 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
8647 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
8648
012d7999 86492003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8650
8651 * util/i386/pc/pupa-setup.c (setup): Define the internal
8652 function find_first_partition_start at the top level, because GCC
8653 3.0.x cannot compile internal functions in deeper scopes
8654 correctly.
8655 (find_root_device): Use lstat instead of stat.
8656 Don't follow symbolic links.
8657 Fix the path-constructing code.
8658
8659 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
8660 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
8661 by a BLKGETSIZE ioctl first, because block devices don't fill
8662 the member st_mode of the structure stat on Linux.
8663 [__linux__] (linux_find_partition): Use a temporary buffer
8664 REAL_DEV for the working space. Copy it to DEV before returning.
8665 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
8666 buffer cache consistent.
8667 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
8668 strncmp. The previous value was merely wrong.
8669 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
8670
8671 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
8672 FAT size is 12. The previous value was merely wrong.
8673
8674 * kern/main.c (pupa_main): Don't split the starting message from
8675 newlines.
8676
8677 * kern/term.c (pupa_putchar): Put CR after LF instead of before
8678 LF, because BIOS goes crazy about character attributes in this
8679 case.
8680
1cc73a62 86812003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8682
8683 * include/i386/pc/util/biosdisk.h: New file.
8684 * util/i386/pc/biosdisk.c: Likewise.
8685 * util/i386/pc/pupa-setup.c: Likewise.
8686
8687 * Makefile.in (INCLUDE_DISTFILES): Added
8688 include/pupa/i386/pc/util/biosdisk.h.
8689 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
8690 directory util/i386/pc.
8691 (install-local): Added a rule for sbin_UTILITIES.
8692 (uninstall): Likewise.
8693
8694 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
8695
8696 * util/misc.c (xrealloc): New function.
8697 (pupa_malloc): Likewise.
8698 (pupa_free): Likewise.
8699 (pupa_realloc): Likewise.
8700 (pupa_stop): Likewise.
8701 (pupa_putchar): Likewise.
8702
8703 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
8704
8705 * include/pupa/util/misc.h (xrealloc): Declared.
8706
8707 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
8708 macro.
8709 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
8710 (PUPA_BOOT_MACHINE_BPB_END): ... this.
8711
8712 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
8713 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8714
8715 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
8716 way should be implemented.
8717 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8718
8719 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
8720 the size of NAME for safety.
8721 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
8722 0x88.
8723
8724 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
8725 (pupa_setup_SOURCES): Likewise.
8726
8727 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
8728
08b70fe8 87292002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8730
8731 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
8732 bunch of pushl's from pusha, because this destroys the return
8733 value.
8734
62ddcc8f 87352002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8736
8737 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
8738 This means that any missing prototypes could be fatal. Also, you
8739 must take care when writing assembly code. See the comments at
8740 the beginning of startup.S, for more details.
8741
8742 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
8743 compilation mechanism.
8744 (pupa_chainloader_real_boot): Likewise.
8745 (pupa_biosdisk_rw_int13_extensions): Likewise.
8746 (pupa_biosdisk_rw_standard): Likewise.
8747 (pupa_biosdisk_check_int13_extensions): Likewise.
8748 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
8749 (pupa_biosdisk_get_diskinfo_standard): Likewise.
8750 (pupa_get_memsize): Likewise.
8751 (pupa_get_mmap_entry): Likewise.
8752 (pupa_console_putchar): Likewise.
8753 (pupa_console_setcursor): Likewise.
8754 (pupa_getrtsecs): Use pushl instead of push.
8755
8756 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
8757 memory instead of the stack for a mmap entry, because some
8758 BIOSes may ignore the maximum size and overflow.
8759
8760 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
8761
8762 * genmk.rb (PModule#rule): Compile automatically generated
8763 sources with module-specific CFLAGS as well as other sources.
8764
9962ed99 87652002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8766
8767 * configure.ac: Check ld.
8768 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
8769 respectively, before checking endianness and sizes.
8770
8771 * Makefile.in (LD): New variable.
8772
abdfc3c5 87732002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8774
8775 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
8776
6a161fa9 87772002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8778
8779 * Changelog: New file.
8780