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