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