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