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