]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / ChangeLog
CommitLineData
42a5b3fc 12009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2
3 * kern/env.c (grub_env_context_open): Added an argument to specify
4 whether a new context inherits exported variables from current
5 one. This is useful when making a sandbox to interpret a config
6 file.
7 All callers updated.
8
9 * include/grub/env.h (grub_env_context_open): Updated the prototype.
10
b28bbc4e 112009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
12
13 * kern/env.c (grub_env_context_close): Fix memory leaks.
14
f04f02e4 152009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
16
17 * normal/main.c (grub_normal_execute): Added an argument
18 BATCH to specify if an interactive interface should be provided
19 after reading a config file.
20 All callers updated.
21 (read_command_list): Prevent being executed twice.
22 (read_fs_list): Likewise.
23
42a5b3fc 24 * include/grub/normal.h (grub_normal_execute): Updated the
25 prototype.
f04f02e4 26
41473ac2 272009-03-22 Pavel Roskin <proski@gno.org>
28
fbc00b0c 29 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
30 _start.
31 * kern/i386/pc/startup.S: Likewise.
32 * kern/i386/efi/startup.S: Likewise.
33 * kern/i386/ieee1275/startup.S: Likewise.
34 * kern/i386/coreboot/startup.S: Likewise.
35 * kern/x86_64/efi/startup.S: Likewise.
36
41473ac2 37 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
38 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
39 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
40
2274cc8f 412009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
42
43 Bugfixes in multiboot for bugs uncovered by solaris kernel.
44
45 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
46 limit detection.
47 Use vaddr of correct segment for entry_point.
48
b1b797cb 492009-03-21 Bean <bean123ch@gmail.com>
50
51 * commands/blocklist.c: Add include file <grub/command.h>, remove
52 <grub/normal.h> and <grub/arg.h>.
53 (grub_cmd_blocklist): Use the new command interface.
54 (GRUB_MOD_INIT): Likewise.
55 (GRUB_MOD_FINI): Likewise.
56 * commands/boot.c: Likewise.
57 * commands/cat.c: Likewise.
58 * commands/cmp.c: Likewise.
59 * commands/configfile.c: Likewise.
60 * commands/crc.c: Likewise.
61 * commands/echo.c: Likewise.
62 * commands/halt.c: Likewise.
63 * commands/handler.c: Likewise.
64 * commands/hdparm.c: Likewise.
65 * commands/help.c: Likewise.
66 * commands/hexdump.c: Likewise.
67 * commands/loadenv.c: Likewise.
68 * commands/ls.c: Likewise.
69 * commands/lsmmap.c: Likewise.
70 * commands/lspci.c: Likewise.
71 * commands/loadenv.c: Likewise.
72 * commands/read.c: Likewise.
73 * commands/reboot.c: Likewise.
74 * commands/search.c: Likewise.
75 * commands/sleep.c: Likewise.
76 * commands/test.c: Likewise.
77 * commands/usbtest.c: Likewise.
78 * commands/videotest.c: Likewise.
79 * commands/i386/cpuid.c: Likewise.
80 * commands/i386/pc/halt.c: Likewise.
81 * commands/i386/pc/play.c: Likewise.
82 * commands/i386/pc/pxecmd.c: Likewise.
83 * commands/i386/pc/vbeinfo.c: Likewise.
84 * commands/i386/pc/vbetest.c: Likewise.
85 * commands/ieee1275/suspend.c: Likewise.
86 * disk/loopback.c: Likewise.
87 * font/font_cmd.c: Likewise.
88 * hello/hello.c: Likewise.
89 * loader/efi/appleloader.c: Likewise.
90 * loader/efi/chainloader.c: Likewise.
91 * loader/i386/bsd.c: Likewise.
92 * loader/i386/efi/linux.c: Likewise.
93 * loader/i386/ieee1275/linux.c: Likewise.
94 * loader/i386/linux.c: Likewise.
95 * loader/i386/pc/chainloader.c: Likewise.
96 * loader/i386/pc/linux.c: Likewise.
97 * loader/powerpc/ieee1275/linux.c: Likewise.
98 * loader/multiboot_loader.c: Likewise.
99 * term/gfxterm.c: Likewise.
100 * term/i386/pc/serial.c: Likewise.
101 * term/terminfo.c: Likewise.
102
103 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
104 * term/i386/pc/vga.c: Likewise.
105 * video/readers/jpeg.c: Likewise.
106 * video/readers/png.c: Likewise.
107 * video/readers/tga.c: Likewise.
108
109 * util/grub-fstest (cmd_loopback): Removed.
110 (cmd_blocklist): Likewise.
111 (cmd_ls): Likewise.
112 (grub_register_command): Likewise.
113 (grub_unregister_command): Likewise.
114 (execute_command): Use grub_command_find to locate command and execute
115 it.
116
117 * include/grub/efi/chainloader.h: Removed.
118 * loader/efi/chainloader_normal.c: Likewise.
119 * loader/i386/bsd_normal.c: Likewise.
120 * loader/i386/pc/chainloader_normal.c: Likewise.
121 * loader/i386/pc/multiboot_normal.c: Likewise.
122 * loader/linux_normal.c: Likewise.
123 * loader/multiboot_loader_normal.c: Likewise.
124 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
125
126 * gencmdlist.sh: Scan new registration command grub_register_extcmd
127 and grub_register_command_p1.
128
129 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
130 kern/command.c, lib/arg.c and commands/extcmd.c.
131 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
132 (minicmd_mod_SOURCES): New variable.
133 (minicmd_mod_CFLAGS): Likewise.
134 (minicmd_mod_LDFLAGS): Likewise.
135 (extcmd_mod_SOURCES): Likewise.
136 (extcmd_mod_CFLAGS): Likewise.
137 (extcmd_mod_LDFLAGS): Likewise.
138 (boot_mod_SOURCES): Removed.
139 (boot_mod_CFLAGS): Likewise.
140 (boot_mod_LDFLAGS): Likewise.
141
142 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
143 kern/corecmd.c.
144 (kernel_img_HEADERS): Add command.h.
145 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
146 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
147 and lib/arg.c.
148 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
149 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
150 remove the corresponding normal mode command.
151 (normal_mod_SOURCES): Remove normal/arg.c.
152 * conf/i386-coreboot.rmk: Likewise.
153 * conf/i386-efi.rmk: Likewise.
154 * conf/i386-ieee1275.rmk: Likewise.
155 * conf/powerpc-ieee1275.rmk: Likewise.
156 * conf/x86_64-efi.rmk: Likewise.
157
158 * include/grub/arg.h: Move from here ...
159 * include/grub/lib/arg.h: ... to here.
160
161 * normal/arg.c: Move from here ...
162 * lib/arg.c: ... to here.
163
164 * commands/extcmd.c: New file.
165 * commands/minicmd.c: Likewise.
166 * include/grub/command.h: Likewise.
167 * include/grub/extcmd.h: Likewise.
168 * kern/command.c: Likewise.
169 * kern/corecmd.c: Likewise.
170
171 * kern/list.c (grub_list_iterate): Return int instead of void.
172 (grub_list_insert): New function.
173 (grub_prio_list_insert): Likewise.
174
175 * kern/rescue.c (grub_rescue_command): Removed.
176 (grub_rescue_command_list): Likewise.
177 (grub_rescue_register_command): Likewise.
178 (grub_rescue_unregister_command): Likewise.
179 (grub_rescue_cmd_boot): Move to minicmd.c
180 (grub_rescue_cmd_help): Likewise.
181 (grub_rescue_cmd_info): Likewise.
182 (grub_rescue_cmd_boot): Likewise.
183 (grub_rescue_cmd_testload): Likewise.
184 (grub_rescue_cmd_dump): Likewise.
185 (grub_rescue_cmd_rmmod): Likewise.
186 (grub_rescue_cmd_lsmod): Likewise.
187 (grub_rescue_cmd_exit): Likewise.
188 (grub_rescue_print_devices): Moved to corecmd.c.
189 (grub_rescue_print_files): Likewise.
190 (grub_rescue_cmd_ls): Likewise.
191 (grub_rescue_cmd_insmod): Likewise.
192 (grub_rescue_cmd_set): Likewise.
193 (grub_rescue_cmd_unset): Likewise.
194 (attemp_normal_mode): Use grub_command_find to get normal module.
195 (grub_enter_rescue_mode): Use grub_register_core_commands to register
196 commands, remove grub_rescue_regiter_command calls.
197
198 * normal/command.c (grub_regiser_command): Removed.
199 (grub_unregister_command): Likewise.
200 (grub_command_find): Likewise.
201 (grub_iterate_commands): Likewise.
202 (rescue_command): Likewise.
203 (export_command): Moved to corecmd.c.
204 (set_command): Removed.
205 (unset_command): Likewise.
206 (insmod_command): Likewise.
207 (rmmod_command): Likewise.
208 (lsmod_command): Likewise.
209 (grub_command_init): Likewise.
210
211 * normal/completion.c (iterate_command): Use cmd->prio to check for
212 active command.
213 (complete_arguments): Use grub_extcmd_t structure to find options.
214 (grub_normal_do_completion): Change function grub_iterate_commands to
215 grub_command_iterate.
216
217 * normal/execute.c (grub_script_execute_cmd): No need to parse
218 argument here.
219
220 * normal/main.c (grub_dyncmd_dispatcher): New function.
221 (read_command_list): Register unload commands as dyncmd.
222 (grub_cmd_normal): Use new command interface, register rescue,
223 unregister normal at entry, register normal, unregister rescue at exit.
224
225 * include/grub/list.h (grub_list_test_t): New type.
226 (grub_list_iterate): Return int instead of void.
227 (grub_list_insert): New function.
228 (GRUB_AS_NAMED_LIST_P): New macro.
229 (GRUB_AS_PRIO_LIST): Likewise.
230 (GRUB_AS_PRIO_LIST_P): Likewise.
231 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
232 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
233 (grub_prio_list): New structure.
234 (grub_prio_list_insert): New function.
235 (grub_prio_list_remove): New inline function.
236
237 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
238 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
239 (GRUB_COMMAND_FLAG_MENU): Likewise.
240 (GRUB_COMMAND_FLAG_BOTH): Likewise.
241 (GRUB_COMMAND_FLAG_TITLE): Likewise.
242 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
243 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
244 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
245 (grub_command): Likewise.
246 (grub_register_command): Likewise.
247 (grub_command_find): Likewise.
248 (grub_iterate_commands): Likewise.
249 (grub_command_init): Likewise.
250 (grub_arg_parse): Likewise.
251 (grub_arg_show_help): Likewise.
252
253 * include/grub/rescue.h (grub_rescue_register_command): Removed.
254 (grub_rescue_unregister_command): Likewise.
255
256 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
257 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
258 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
259
260 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
261 grub_rescue_cmd_initrd.
262 * include/grub/i386/loader.h: Likewise.
263 * include/grub/x86_64/loader.h: Likewise.
264
265 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
266
1f4147aa 2672009-03-21 Bean <bean123ch@gmail.com>
268
269 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
270 instead of stat in mingw environment.
271
272 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
273
274 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
275
276 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
277 AC_CONFIG_LINKS.
278
2156d5ba 2792009-03-21 Bean <bean123ch@gmail.com>
280
281 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
282 out of range error.
283
177b82ca 2842009-03-18 Michel Dänzer <michel@daenzer.net>
285
286 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
287 checking inode flags for EXT4_EXTENTS_FLAG.
288
14aad807 2892009-03-18 Robert Millan <rmh@aybabtu.com>
290
291 * loader/i386/linux.c: Include `<grub/video.h>' and
292 `<grub/i386/pc/vbe.h>'..
293 (grub_linux_setup_video): New function. Loosely based on the EFI one.
294 (grub_linux32_boot): Attempt to configure video settings with
295 grub_linux_setup_video().
296 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
297 to avoid grub_console_fini() which would step out of graphical mode
298 unconditionally.
299
8cf83a27 3002009-03-14 Robert Millan <rmh@aybabtu.com>
301
302 Fix build on powerpc.
303 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
304
40164e75 3052009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
306
307 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
308 background image command.
309
c58bc32a 3102009-03-12 Colin D Bennett <colin@gibibit.com>
311
312 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
313 (grub_gfxterm_putchar): Extract pairs of identical calls to
314 draw_cursor out of conditional blocks.
315
5415144a 3162009-03-11 Pavel Roskin <proski@gnu.org>
317
318 * fs/hfs.c (grub_hfs_strncasecmp): New function.
319 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
320
6394042e 3212009-03-11 Robert Millan <rmh@aybabtu.com>
322
323 * loader/i386/multiboot_elfxx.c
324 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
325
b7b50e5f 3262009-03-11 Felix Zielcke <fzielcke@z-51.de>
327
328 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
329 `kern/handler.c'.
330
1ca7fc96 3312009-03-11 Robert Millan <rmh@aybabtu.com>
332
333 * loader/i386/multiboot.c (code_size): New variable.
334 (grub_multiboot): Define offsets by adding to `code_size' rather
335 than substracting from `grub_multiboot_payload_size'. Provide
336 4-byte alignment to MBI and others by increasing
337 `boot_loader_name_length' appropiately.
338
339 * loader/i386/multiboot_elfxx.c
340 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
341
a83ea1d2 3422009-03-09 Felix Zielcke <fzielcke@z-51.de>
343
344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
345 `fs/ext2.c'.
346
aa9f3bff 3472009-03-08 Robert Millan <rmh@aybabtu.com>
348
349 Make loader/i386/linux.c usable on i386-pc again.
350
351 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
352 memory to heap.
353 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
354 `#error' stanza.
355
d8b3b60e 3562009-03-07 Bean <bean123ch@gmail.com>
357
358 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
359 allocation.
360
b362c9e9 3612009-03-06 Robert Millan <rmh@aybabtu.com>
362
363 Fix display issue on terminals with screen size other than 80x25
364 (e.g. gfxterm with resolution higher than 640x480).
365
366 * normal/main.c (grub_normal_init_page): Display title text in a
367 position relative to the center of the terminal instead of reliing
368 on a hardcoded offset.
369
9304eef1 3702009-03-04 Robert Millan <rmh@aybabtu.com>
371
372 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
373 installed.
374
375 * Makefile.in (host_kernel): New variable.
376 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
377 scripts instead of just the windows one.
378 * configure.ac: Initialize and AC_SUBST `host_kernel'.
379
eabc95fb 3802009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 381
382 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
383 `kern/handler.c'.
384 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
385 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
386 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
387 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
388 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
389 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
390
ceb1223c 3912009-03-04 Felix Zielcke <fzielcke@z-51.de>
392
393 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
394 or if there's no space for the disk label and print the partition number on a
395 invalid magic.
396
4910684a 3972009-03-04 Felix Zielcke <fzielcke@z-51.de>
398
399 * util/misc.c: Include <time.h>.
400 (grub_millisleep): New function.
401
7e9ca17a 4022009-03-04 Bean <bean123ch@gmail.com>
403
404 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
405 another option -mno-red-zone.
406
407 * commands/handler.c: Change module description.
408
409 * kern/handler.c: Add missing space at the end of description line.
410
411 * kern/list.c: Likewise.
412
f501677c 4132009-03-03 Robert Millan <rmh@aybabtu.com>
414
415 Move more components to the relocation area, and fix mbi pointer
416 handling to use the destination rather than the origin (thanks to
417 Vladimir Serbinenko for spotting).
418
419 * loader/i386/multiboot.c (mbi_dest): New variable.
420 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
421 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
422 relocation area.
423
9902d047 4242009-03-01 Bean <bean123ch@gmail.com>
425
50fb7002 426 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 427 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
428 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
429 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
430
431 * loader/i386/efi/linux.c (acpi_guid): New variable.
432 (acpi_guid): Likewise.
433 (EBDA_SEG_ADDR): New constant.
434 (LOW_MEM_ADDR): Likewise.
435 (FAKE_EBDA_SEG): Likewise.
436 (fake_bios_data): New function.
437 (grub_linux_boot): Call fake_bios_data.
438
71b9f361 4392009-03-01 Bean <bean123ch@gmail.com>
440
441 * commands/terminal.c: Removed.
442
443 * commands/handler.c: New file.
444
445 * include/grub/list.h: Likewise.
446
447 * include/grub/handler.h: Likewise.
448
449 * kern/list.c: Likewise.
450
451 * kern/handler.c: Likewise.
452
453 * kern/term.h: Include header file <grub/handler.h>.
454 (grub_term_input): Move next field to the beginning.
455 (grub_term_output): Likewise.
456 (grub_term_input_class): New variable.
457 (grub_term_output_class): Likewise.
458 (grub_term_register_input): Changed to inline function.
459 (grub_term_register_output): Likewise.
460 (grub_term_unregister_input): Likewise.
461 (grub_term_unregister_output): Likewise.
462 (grub_term_set_current_input): Likewise.
463 (grub_term_set_current_output): Likewise.
464 (grub_term_get_current_input): Likewise.
465 (grub_term_get_current_output): Likewise.
466 (grub_term_iterate_input): Removed.
467 (grub_term_iterate_output): Likewise.
468
469 * kern/term.c (grub_term_list_input): Removed.
470 (grub_term_list_output): Likewise.
471 (grub_term_input_class): New variable.
472 (grub_term_output_class): Likewise.
50fb7002 473 (grub_cur_term_input): Change variable as macro.
71b9f361 474 (grub_cur_term_output): Likewise.
475 (grub_term_register_input): Removed.
476 (grub_term_register_output): Likewise.
477 (grub_term_unregister_input): Likewise.
478 (grub_term_unregister_output): Likewise.
479 (grub_term_set_current_input): Likewise.
480 (grub_term_set_current_output): Likewise.
481 (grub_term_iterate_input): Likewise.
482 (grub_term_iterate_output): Likewise.
483 (grub_term_get_current_input): Likewise.
484 (grub_term_get_current_output): Likewise.
485
486 * util/grub-editenv.c: Include header file <grub/handler.h>.
487 (grub_term_get_current_input): Removed.
488 (grub_term_get_current_output): Likewise.
489 (grub_term_input_class): New variable.
50fb7002 490 (grub_term_output_class): Likewise.
71b9f361 491
492 * util/grub-fstest.c (grub_term_get_current_input): Removed.
493 (grub_term_get_current_output): Likewise.
494 (grub_term_input_class): New variable.
50fb7002 495 (grub_term_output_class): Likewise.
71b9f361 496
497 * util/grub-probe.c (grub_term_get_current_input): Removed.
498 (grub_term_get_current_output): Likewise.
499 (grub_term_input_class): New variable.
50fb7002 500 (grub_term_output_class): Likewise.
71b9f361 501
502 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
503 (grub_term_get_current_output): Likewise.
504 (grub_term_input_class): New variable.
50fb7002 505 (grub_term_output_class): Likewise.
71b9f361 506
507 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
508 (terminal_mod_SOURCES): Likewise.
509 (terminal_mod_CFLAGS): Likewise.
510 (terminal_mod_LDFLAGS): Likewise.
511
512 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
513 handler.c.
514 (kernel_img_SOURCES): Add list.c and handler.c.
515 (kernel_img_HEADERS): Add list.h and handler.h.
516
517 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
518 handler.c.
519 (kernel_mod_SOURCES): Add list.c and handler.c.
520 (kernel_mod_HEADERS): Add list.h and handler.h.
521
522 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
523 handler.c.
524 (kernel_elf_SOURCES): Add list.c and handler.c.
525 (kernel_elf_HEADERS): Add list.h and handler.h.
526
527 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
528 handler.c.
529 (kernel_elf_SOURCES): Add list.c and handler.c.
530 (kernel_elf_HEADERS): Add list.h and handler.h.
531
532 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
533 handler.c.
534 (kernel_mod_SOURCES): Add list.c and handler.c.
535 (kernel_mod_HEADERS): Add list.h and handler.h.
536
537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
538 handler.c.
539 (kernel_elf_SOURCES): Add list.c and handler.c.
540 (kernel_elf_HEADERS): Add list.h and handler.h.
541
8a31787f 5422009-02-27 Robert Millan <rmh@aybabtu.com>
543
544 Factorize elf32 / elf64 code in Multiboot loader. This will
545 prevent it from getting out of sync again.
546
547 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
548 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
549 grub_multiboot_load_elf64): Move from here ...
550 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
551 grub_multiboot_load_elf): ... to here (new file).
552
51cd3dfc 5532009-02-27 Robert Millan <rmh@aybabtu.com>
554
555 * util/grub.d/10_linux.in: Rename "single-user mode" to
556 "recovery mode".
557
6e8c9c3a 5582009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
559
560 Don't leak in SCSI code.
561 * disk/scsi.c (grub_scsi_close): free `scsi'.
562
4b6bf4f9 5632009-02-27 Robert Millan <rmh@aybabtu.com>
564
565 * loader/i386/pc/multiboot.c: Move from here ...
566 * loader/i386/multiboot.c: ... to here. Update all users.
567
b9413424 5682009-02-27 Robert Millan <rmh@aybabtu.com>
569
570 Patch from Alexandre Bique <bique.alexandre@gmail.com>
571 * util/i386/pc/grub-setup.c (setup): Fix directory path.
572
50fb7002 5732009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 574
575 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
576 b-tree.
577
8cc50345 5782009-02-27 Robert Millan <rmh@aybabtu.com>
579
580 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
581 `0x' qualifier as 0 when base is specified as parameter).
582
6e09b8b7 5832009-02-24 Bean <bean123ch@gmail.com>
584
585 * configure.ac: Check for -mcmodel=large in x86_64 target.
586
587 * include/grub/efi/api.h (efi_call_10): New macro.
588 (efi_wrap_10): New function.
589
590 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
591 (GRUB_PE32_REL_BASED_HIGH): Likewise.
592 (GRUB_PE32_REL_BASED_LOW): Likewise.
593 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
594 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
595 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
596 (GRUB_PE32_REL_BASED_SECTION): Likewise.
597 (GRUB_PE32_REL_BASED_REL): Likewise.
598 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
599 (GRUB_PE32_REL_BASED_DIR64): Likewise.
600 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
601
602 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
603 issue.
604
605 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
606 (efi_wrap_10): New function.
607
608 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
609
610 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
611 MB/MBP model (NV chipset).
612 (devdata_devs): Add devpath_5 to the list.
613
614 * load/i386/efi/linux.c (video_base): Remove variable.
615 (RGB_MASK): New macro.
616 (RGB_MAGIC): Likewise.
617 (LINE_MIN): Likewise.
618 (LINE_MAX): Likewise.
619 (FBTEST_STEP): Likewise.
620 (FBTEST_COUNT): Likewise.
621 (fb_list): New variable.
622 (grub_find_video_card): Remove function.
623 (find_framebuf): New function.
624 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
625 line length.
626
627 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
628 problem for x86_64.
629
74b21bee 6302009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
631
632 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
633
634 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
635 coding tool name.
636
a455f472 6372009-02-22 Robert Millan <rmh@aybabtu.com>
638
639 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
640 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
641 in our relocation, instead of using it directly from heap. Also
642 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
643
6374daf3 6442009-02-21 Robert Millan <rmh@aybabtu.com>
645
646 Implement USB keyboard support (based on patch by Marco Gerards)
647
648 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
649 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
650 (usb_keyboard_mod_LDFLAGS): New variables.
651
652 * term/usb_keyboard.c: New file.
653
8fa4ea70 6542009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
655
656 Corrected wrong declaration
657
658 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
659
353976ac 6602009-02-14 Christian Franke <franke@computer.org>
661
662 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
663 (grub_lspci_iter): Print class code and programming interface byte.
664
6aa1169b 6652009-02-14 Christian Franke <franke@computer.org>
666
667 * gendistlist.sh: Ignore `.svn' directories.
668
265372ca 6692009-02-14 Felix Zielcke <fzielcke@z-51.de>
670
671 * fs/fat.c: Add 2009 to Copyright line.
672
9ff516f3 6732009-02-14 Christian Franke <franke@computer.org>
674
675 * commands/hdparm.c: New file. Provides `hdparm' command
676 which sends ATA commands via grub_disk_ata_pass_through ().
677
678 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
679
680 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
681 and <grub/cpu/io.h> to include/grub/ata.h.
682 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
683 (GRUB_CDROM_SECTOR_SIZE): Remove.
684 (GRUB_ATA_*): Move to include/grub/ata.h.
685 (GRUB_ATAPI_*): Likewise.
686 (enum grub_ata_commands): Likewise.
687 (enum grub_ata_timeout_milliseconds): Likewise.
688 (struct grub_ata_device): Likewise.
689 (grub_ata_regset): Likewise.
690 (grub_ata_regget): Likewise.
691 (grub_ata_regset2): Likewise.
692 (grub_ata_regget2): Likewise.
693 (grub_ata_check_ready): Likewise.
694 (grub_ata_wait_not_busy): Remove static, exported in
695 include/grub/ata.h.
696 (grub_ata_wait_drq): Likewise.
697 (grub_ata_pio_read): Likewise.
698
699 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
700 function for hdparm.mod.
701
702 * include/grub/ata.h: New file, contains declarations from
703 disk/ata.c.
704 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
705
706 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
707 (grub_disk_ata_pass_through): New exported variable.
708
709 * kern/disk.c (grub_disk_ata_pass_through): New variable.
710
772e23da 7112009-02-13 Colin D Bennett <colin@gibibit.com>
712
713 Support multiple fallback entries, and provide an API to support
714 executing default+fallback menu entries. Renamed the `terminal' menu
715 viewer to `text'.
716
717 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
718 variable declaration.
719 (grub_menu_execute_callback): New structure declaration.
720 (grub_menu_execute_callback_t): New typedef.
721 (grub_menu_execute_with_fallback): New function declaration.
722 (grub_menu_get_entry): Likewise.
723 (grub_menu_get_timeout): Likewise.
724 (grub_menu_set_timeout): Likewise.
725
726 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
727
728 * normal/menu.c (grub_wait_after_message): Moved to
729 `normal/menu_text.c'.
730 (draw_border): Likewise.
731 (print_message): Likewise.
732 (print_entry): Likewise.
733 (print_entries): Likewise.
734 (grub_menu_init_page): Likewise.
735 (get_entry_number): Likewise.
736 (print_timeout): Likewise.
737 (run_menu): Likewise.
738 (grub_menu_execute_entry): Likewise.
739 (show_text_menu): Likewise.
740 (get_and_remove_first_entry_number): New function.
741 (grub_menu_execute_with_fallback): Likewise.
742 (get_entry): Renamed to ...
743 (grub_menu_get_entry): .. this and made it global.
744 (get_timeout): Renamed to ...
745 (grub_menu_get_timeout): ... this and made it global.
746 (set_timeout): Renamed to ...
747 (grub_menu_set_timeout): ... this and made it global.
748 (grub_normal_terminal_menu_viewer): Renamed to ...
749 (grub_normal_text_menu_viewer): ... this.
750
751 * normal/menu_text.c: New file. Extracted text-menu-specific code
752 from normal/menu.c.
753
754 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
755 (normal_mod_SOURCES): Likewise.
756
757 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
758 (normal_mod_SOURCES): Likewise.
759
760 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
761 (normal_mod_SOURCES): Likewise.
762
763 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
764 (normal_mod_SOURCES): Likewise.
765
766 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
767 (normal_mod_SOURCES): Likewise.
768
769 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
770 (normal_mod_SOURCES): Likewise.
771
772 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
773 (normal_mod_SOURCES): Likewise.
774
16ac430e 7752009-02-11 Robert Millan <rmh@aybabtu.com>
776
777 * util/grub.d/00_header.in: Update old reference to `font' command.
778
06ff20fc 7792009-02-10 Felix Zielcke <fzielcke@z-51.de>
780
781 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
782
783 Based on patch from Javier Martín.
784
96da9407 7852009-02-09 Felix Zielcke <fzielcke@z-51.de>
786
787 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 788 to avoid false positives with FAT.
96da9407 789 (grub_fstest_SOURCES): Likewise.
790 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
791 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
792 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
793 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
794 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
795 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
796
6dca6fe4 7972009-02-09 Felix Zielcke <fzielcke@z-51.de>
798
06ff20fc 799 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 800 bpb.version_specific.fat12_or_fat16.fstype and
801 bpb.version_specific.fat32.fstype.
802
2550c62f 8032009-02-08 Robert Millan <rmh@aybabtu.com>
804
be110b30 805 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 806
56978920 8072009-02-08 Robert Millan <rmh@aybabtu.com>
808
809 * Makefile.in (host_os, host_cpu): New variables.
810 (target_os): Remove. Update all users.
811
d64399b5 8122009-02-08 Marco Gerards <marco@gnu.org>
813
814 * Makefile.in (enable_grub_emu_usb): New variable.
815 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
816 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
817 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
818 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
819 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
820 `usbtest.mod' and `usbms.mod'.
821 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
822 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
823 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
824 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
825 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
826 variables.
827
828 * disk/usbms.c: New file.
829
830 * include/grub/usb.h: Likewise.
831
832 * include/grub/usbtrans.h: Likewise.
833
834 * include/grub/usbdesc.h: Likewise.
835
836 * bus/usb/usbtrans.c: Likewise.
837
838 * bus/usb/ohci.c: Likewise.
839
840 * bus/usb/uhci.c: Likewise.
841
842 * bus/usb/usbhub.c: Likewise.
843
844 * bus/usb/usb.c: Likewise.
845
846 * commands/usbtest.c: Likewise.
847
848 * util/usb.c: Likewise.
50fb7002 849
d64399b5 850 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
851
852 * configure.ac: Test for libusb presence.
50fb7002 853
d64399b5 854 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
855
2b40d6bb 8562009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
857
858 * kern/mm.c: Add more comments.
859
73a4ce81 8602009-02-08 Robert Millan <rmh@aybabtu.com>
861
862 Patch from Javier Martín.
863 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
864 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
865
f821ce59 8662009-02-08 Robert Millan <rmh@aybabtu.com>
867
868 * fs/cpio.c: Split tar functionality to ...
869 * fs/tar.c: ... here (new file). Update all users.
870
aebfc4b0 8712009-02-07 Robert Millan <rmh@aybabtu.com>
872
873 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
874 backward-incompatible features.
875
876 Based on patch from Javier Martín, with some adjustments.
877
50fb7002 8782009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 879
880 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
881
0bb5115e 8822009-02-07 Robert Millan <rmh@aybabtu.com>
883
884 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
885 position of `disk/lvm.c' to ensure grub_init_all() always picks it
886 after the RAID stuff.
887
38a0f8e7 8882009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
889
50fb7002 890 Fixes problem when running vbetest command as reported by
38a0f8e7 891 Vladimir Serbinenko <phcoder@gmail.com>.
892
893 * (grub_vbe_set_video_mode): Fixed problem with text modes.
894
3143cc1c 8952009-02-04 Felix Zielcke <fzielcke@z-51.de>
896
897 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
898 /dev/md/NpN style mdraid devices.
899
9cba6fce 9002009-02-03 Felix Zielcke <fzielcke@z-51.de>
901
902 * util/unifont2pff.rb: Remove.
903
e507a2c1 9042009-02-03 Felix Zielcke <fzielcke@z-51.de>
905
906 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
907 `#'.
908
d2c2b4cd 9092009-02-03 Felix Zielcke <fzielcke@z-51.de>
910
911 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
912 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
913 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
914 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
916 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
917 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
918
b4315fb0 9192009-02-02 Christian Franke <franke@computer.org>
920
921 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
922
de3aa260 9232009-02-01 Felix Zielcke <fzielcke@z-51.de>
924
7c3ff286 925 * INSTALL: Note that we now require at least autoconf 2.59 and
926 that LZO is optional.
de3aa260 927
825a182b 9282009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
929
930 Base on patch on bug #24154 created by Tomas Tintera
931 <trosos@seznam.cz>.
932
933 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
934
a69ef770 9352009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
936
7c3ff286 937 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 938 <bero@arklinux.org>.
939
940 * normal/parser.y (script_init): Add missing semicolon.
941
6fa42fa6 9422009-01-31 Colin D Bennett <colin@gibibit.com>
943
7c3ff286 944 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 945 (free_menu_entry_classes): Added.
946 (grub_normal_menu_addentry): Added class property handling.
947 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
948 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
949
950 * normal/menu_viewer.c: New file.
951
952 * normal/menu.c (run_menu_entry): Renamed to ...
953 (grub_menu_execute_entry): ... this and made it as global.
954 (grub_menu_run): Renamed to ...
955 (show_text_menu): ... this and made it local.
956 (show_text_menu): Adapt to new function names.
957 (grub_normal_terminal_menu_viewer): New global variable.
958
959 * include/grub/menu.h: New file.
960
961 * include/grub/menu_viewer.h: New file.
962
963 * include/grub/normal.h: Added include to grub/menu.h.
964 (grub_menu_entry): Moved to include/grub/menu.h.
965 (grub_menu_entry_t): Likewise.
966 (grub_menu): Likewise.
967 (grub_menu_t): Likewise.
968 (grub_normal_terminal_menu_viewer): Added.
969 (grub_menu_execute_entry): Likewise.
970 (grub_menu_run): Removed.
971
972 * DISTLIST: Added include/grub/menu.h.
973 Added include/grub/menu_viewer.h.
974 Added normal/menu_viewer.c.
975
9762009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
977
978 * normal/execute.c (grub_script_execute_menuentry): Changed to use
979 arglist for menutitle arguments.
980
981 * normal/main.c (grub_normal_menu_addentry): Likewise.
982
983 * normal/parser.y (menuentry): Likewise.
984
985 * normal/script.c (grub_script_create_cmdmenu): Likewise.
986
987 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
988 (grub_script_create_cmdmenu): Likewise.
989
990 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
991
992 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
993 changes.
994
995 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
996
997 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
998
999 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1000
1001 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1002
1003 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1004
1005 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1006
56192c23 10072009-01-30 Christian Franke <franke@computer.org>
1008
1009 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1010 in option help text.
1011
d72521b3 10122009-01-27 Pavel Roskin <proski@gnu.org>
1013
1014 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1015
994b5e84 10162009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1017
1018 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1019
1020 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1021
1022 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1023 unregister function.
1024
6a7eab2c 10252009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1026
1027 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1028
1029 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1030
1031 * util/grub-mkfont.c (usage): Fix typo.
1032
1033 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1034
1806b56e 10352009-01-26 Daniel Mierswa <impulze@impulze.org>
1036
3fb18f09 1037 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1038
336e1fb9 1039 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1040
1806b56e 1041 * kern/misc.c (grub_strcasecmp): New function.
1042 (grub_strcasecmp): Use grub_size_t instead of int for length.
1043 Fix return value.
1044 * include/grub/misc.h: Update function prototypes.
1045
580b2a0f 10462009-01-26 Robert Millan <rmh@aybabtu.com>
1047
1048 * configure.ac: Fix cross-compilation check.
ef257b36 1049
d31c24f1 10502009-01-22 Christian Franke <franke@computer.org>
1051
1052 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1053 (precision) digit string. Allow `.format2' without `format1' (width).
1054 Limit input chars for `%s' output to `format2' if specified. This is
1055 compatible with standard printf ().
1056
3138b44c 10572009-01-22 Christian Franke <franke@computer.org>
1058
1059 * disk/ata.c (grub_ata_wait_status): Replace by ...
1060 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1061 other status bits may be invalid while BSY is asserted.
1062 (grub_ata_check_ready): New function.
1063 (grub_ata_cmd): Removed.
1064 (grub_ata_wait_drq): New function.
1065 (grub_ata_strncpy): Remove inline.
1066 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1067 and error check now done by grub_ata_wait_drq ().
1068 (grub_ata_pio_write): Likewise.
1069 (grub_atapi_identify): Set DEV before check for !BSY. Use
1070 grub_ata_wait_drq () to wait for data.
1071 (grub_ata_device_initialize): Add status register check to
1072 detect missing SATA slave devices. Add debug messages.
1073 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1074 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1075 transfer loop by grub_ata_pio_write ().
1076 (grub_ata_identify): Set DEV before check for !BSY. Use
1077 grub_ata_wait_drq () to wait for data.
ef257b36 1078 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 1079 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1080 read/write in one loop. Fix invalid command on write. Fix incomplete
1081 command on (size % batch) == 0. Add missing error check after write of
1082 last block. Add debug messages.
1083 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1084
59a64ef6 10852009-01-19 Christian Franke <franke@computer.org>
1086
1087 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1088 (GRUB_ATAPI_IREASON_*): Likewise.
1089 (grub_ata_pio_write): Fix timeout error return.
1090 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1091 (grub_atapi_wait_drq): New function.
1092 (grub_atapi_packet): New parameter `size'.
1093 Use grub_atapi_wait_drq () and direct write instead of
1094 grub_ata_pio_write ().
1095 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1096 reads the number of bytes requested by the device for each DRQ
1097 assertion.
1098 (grub_atapi_write): Remove old implementation, return not
1099 implemented instead.
1100
1cfe20b3 11012009-01-19 Christian Franke <franke@computer.org>
1102
1103 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1104 of 512 to calculate data size.
1105 (grub_scsi_read12): Likewise.
1106 (grub_scsi_write10): Likewise.
1107 (grub_scsi_write12): Likewise.
1108 (grub_scsi_read): Adjust size according to blocksize.
1109 Add checks for invalid blocksize and unaligned transfer.
1110
bee5fe5d 11112009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1112
1113 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1114
ef257b36 1115 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 1116 width glyphs.
1117
3e643f8c 11182009-01-19 Robert Millan <rmh@aybabtu.com>
1119
1120 * config.guess: Update to latest version from config git.
1121 * config.sub: Likewise.
1122
4fa80998 11232009-01-17 Felix Zielcke <fzielcke@z-51.de>
1124
1125 * Makefile.in: Change font compilation to use new grub-mkfont instead
1126 of java version.
1127
1128 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1129 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1130 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1131 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1132 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1133 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1134 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1135 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1136 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1137
7086085b 11382009-01-16 Christian Franke <franke@computer.org>
1139
1140 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1141 (enum grub_ata_timeout_milliseconds): New enum.
1142 (grub_ata_wait_status): Add parameter milliseconds.
1143 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1144 recovery from timed-out commands.
1145 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1146 return grub_errno instead of REG_ERROR.
1147 (grub_ata_pio_write): Add parameter milliseconds.
1148 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1149 Pass milliseconds to grub_ata_wait_status () and
1150 grub_ata_pio_read ().
1151 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1152 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1153 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1154 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1155 It is not suitable for device detection, because DEV bit is ignored,
1156 the command may run too long, and not all devices set the signature
1157 properly.
1158 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1159 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1160 Fix device selection, DEV bit must be set first to address the registers
1161 of the correct device.
1162 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1163 grub_ata_pio_read/write ().
1164 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1165 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1166
4a412913 11672009-01-13 Carles Pina i Estany <carles@pina.cat>
1168
1169 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1170
7795c55e 11712009-01-13 Bean <bean123ch@gmail.com>
d913988c 1172
1173 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1174
7795c55e 11752009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 1176
1177 * Makefile.in: (enable_grub_mkfont): New variable.
1178 (freetype_cflags): Likewise.
1179 (freetype_libs): Likewise.
1180
1181 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1182 (grub_mkfont_SOURCES): New variable.
1183 (grub_mkfont_CFLAGS): Likewise.
1184 (grub_mkfont_LDFLAGS): Likewise.
1185
1186 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1187 library if `--enable-grub-mkfont' is requested.
1188 (enable_grub_mkfont): New variable.
1189 (freetype_cflags): Likewise.
1190 (freetype_libs): Likewise.
1191
1192 * util/grub-mkfont.c: New file.
1193
093af1fe 11942009-01-12 Christian Franke <franke@computer.org>
1195
1196 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1197 mode check. Fix setting of compat_use[].
1198
f36cc108 11992009-01-10 Robert Millan <rmh@aybabtu.com>
1200
1201 Update a few copyright years which we forgot to do in 2008 (only for
1202 files whose changes made in 2008 were copyright-significant)
1203
1204 * Makefile.in: Add 2008 to Copyright line.
1205 * disk/ieee1275/ofdisk.c: Likewise.
1206 * disk/efi/efidisk.c: Likewise.
1207 * kern/dl.c: Likewise.
1208 * kern/sparc64/ieee1275/init.c: Likewise.
1209 * kern/mm.c: Likewise.
1210 * kern/efi/mm.c: Likewise.
1211 * boot/i386/pc/boot.S: Likewise.
1212 * genfslist.sh: Likewise.
1213 * fs/iso9660.c: Likewise.
1214 * fs/hfs.c: Likewise.
1215 * fs/jfs.c: Likewise.
1216 * fs/minix.c: Likewise.
1217 * fs/ufs.c: Likewise.
1218 * gensymlist.sh.in: Likewise.
1219 * genkernsyms.sh.in: Likewise.
1220 * include/grub/misc.h: Likewise.
1221 * include/grub/types.h: Likewise.
1222 * include/grub/symbol.h: Likewise.
1223 * include/grub/elf.h: Likewise.
1224 * include/grub/kernel.h: Likewise.
1225 * include/grub/disk.h: Likewise.
1226 * include/grub/dl.h: Likewise.
1227 * include/grub/i386/linux.h: Likewise.
1228 * include/grub/i386/pc/biosdisk.h: Likewise.
1229 * include/grub/efi/api.h: Likewise.
1230 * include/grub/efi/pe32.h: Likewise.
1231 * include/grub/util/misc.h: Likewise.
1232 * normal/execute.c: Likewise.
1233 * normal/arg.c: Likewise.
1234 * normal/completion.c: Likewise.
1235 * normal/lexer.c: Likewise.
1236 * normal/parser.y: Likewise.
1237 * normal/misc.c: Likewise.
1238 * commands/i386/pc/vbeinfo.c: Likewise.
1239 * commands/hexdump.c: Likewise.
1240 * commands/terminal.c: Likewise.
1241 * commands/ls.c: Likewise.
1242 * commands/help.c: Likewise.
1243 * partmap/pc.c: Likewise.
1244 * loader/efi/chainloader.c: Likewise.
1245 * loader/multiboot_loader.c: Likewise.
1246 * loader/i386/pc/multiboot2.c: Likewise.
1247 * term/efi/console.c: Likewise.
1248 * term/i386/pc/serial.c: Likewise.
1249 * util/lvm.c: Likewise.
1250 * util/console.c: Likewise.
1251 * util/i386/efi/grub-mkimage.c: Likewise.
1252 * util/raid.c: Likewise.
1253
7f02114b 12542009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1255
1256 * commands/videotest.c: Removed include to grub/machine/memory.h.
1257
1258 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1259 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1260 (video_mod_SOURCES): Removed.
1261 (video_mod_CFLAGS): Likewise.
1262 (video_mod_LDFLAGS): Likewise.
1263 (gfxterm_mod_SOURCES): Likewise.
1264 (gfxterm_mod_CFLAGS): Likewise.
1265 (gfxterm_mod_LDFLAGS): Likewise.
1266 (videotest_mod_SOURCES): Likewise.
1267 (videotest_mod_CFLAGS): Likewise.
1268 (videotest_mod_LDFLAGS): Likewise.
1269 (bitmap_mod_SOURCES): Likewise.
1270 (bitmap_mod_CFLAGS): Likewise.
1271 (bitmap_mod_LDFLAGS): Likewise.
1272 (tga_mod_SOURCES): Likewise.
1273 (tga_mod_CFLAGS): Likewise.
1274 (tga_mod_LDFLAGS): Likewise.
1275 (jpeg_mod_SOURCES): Likewise.
1276 (jpeg_mod_CFLAGS): Likewise.
1277 (jpeg_mod_LDFLAGS): Likewise.
1278 (png_mod_SOURCES): Likewise.
1279 (png_mod_CFLAGS): Likewise.
1280 (png_mod_LDFLAGS): Likewise.
1281
1282 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1283 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1284 (video_mod_SOURCES): Added.
1285 (video_mod_CFLAGS): Likewise.
1286 (video_mod_LDFLAGS): Likewise.
1287 (videotest_mod_SOURCES): Likewise.
1288 (videotest_mod_CFLAGS): Likewise.
1289 (videotest_mod_LDFLAGS): Likewise.
1290 (bitmap_mod_SOURCES): Likewise.
1291 (bitmap_mod_CFLAGS): Likewise.
1292 (bitmap_mod_LDFLAGS): Likewise.
1293 (tga_mod_SOURCES): Likewise.
1294 (tga_mod_CFLAGS): Likewise.
1295 (tga_mod_LDFLAGS): Likewise.
1296 (jpeg_mod_SOURCES): Likewise.
1297 (jpeg_mod_CFLAGS): Likewise.
1298 (jpeg_mod_LDFLAGS): Likewise.
1299 (png_mod_SOURCES): Likewise.
1300 (png_mod_CFLAGS): Likewise.
1301 (png_mod_LDFLAGS): Likewise.
1302 (gfxterm_mod_SOURCES): Likewise.
1303 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 1304 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 1305
1306 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1307 grub/machine/console.h.
1308
644fff97 13092009-01-04 Jerone Young <jerone@gmail.com>
1310
1311 Make on screen instructions clearer
1312
1313 Based on patch created by Jidanni <jidanni@jidanni.org>
1314
1315 * normal/menu.c: print clearer instructions on the screen
1316
1e901a75 13172009-01-02 Colin D Bennett <colin@gibibit.com>
1318
1319 New font engine.
34c44600 1320
1e901a75 1321 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1322 build system and fixed gfxterm.c to work with different sized fonts.
1323
1324 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 1325
1e901a75 1326 * configure: Re-generated.
34c44600 1327
1e901a75 1328 * DISTLIST: Removed font/manager.c.
1329 Added font/font.c.
1330 Added font/font_cmd.c.
34c44600 1331
1e901a75 1332 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1333 compilation.
34c44600 1334
1e901a75 1335 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 1336
1337 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 1338
1339 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 1340
1e901a75 1341 * normal/menu.c: Likewise.
34c44600 1342
1e901a75 1343 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1344 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 1345
1e901a75 1346 * include/grub/font.h: Replaced with new file.
34c44600 1347
1e901a75 1348 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1349 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1350 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1351 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1352 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 1353 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 1354 fg_red, fg_green, fg_blue, fg_alpha.
1355 (grub_video_adapter): Removed blit_glyph.
34c44600 1356 (grub_video_blit_glyph): Removed.
1357
1e901a75 1358 * font/manager.c: Removed file.
34c44600 1359
1360 * font/font.c: New file.
1361
1e901a75 1362 * font/font_cmd.c: Likewise.
34c44600 1363
1e901a75 1364 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 1365
1e901a75 1366 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1367 (grub_video_vbe_map_rgba): Likewise.
1368 (grub_video_vbe_unmap_color_int): Likewise.
1369 (grub_video_vbe_blit_glyph): Removed.
1370 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 1371
1e901a75 1372 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1373 (get_pixel): Likewise.
34c44600 1374 (set_pixel): Likewise.
1375
1e901a75 1376 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 1377
1e901a75 1378 * term/gfxterm.c: Adapted to new font engine.
34c44600 1379
1e901a75 1380 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 1381
1e901a75 1382 * term/i386/pc/vga.c: Likewise.
34c44600 1383
1e901a75 1384 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 1385
1e901a75 1386 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 1387
1e901a75 1388 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1389
1e901a75 1390 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1391
1e901a75 1392 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 1393
1e901a75 1394 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 1395
1e901a75 1396 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 1397
1e901a75 1398 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 1399
1e901a75 1400 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1401
1402 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 1403
1e901a75 1404 * util/grub-mkconfig_lib.in: Changed font extension.
1405
278922e8 14062008-12-28 Felix Zielcke <fzielcke@z-51.de>
1407
1408 * util/getroot.c (grub_util_get_grub_dev): Add support for
1409 /dev/md/dNNpNN style partitionable mdraid devices.
1410
3ced05cf 14112008-12-12 Alex Smith <alex@alex-smith.me.uk>
1412
1413 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1414 at a time limit of the PXE TFTP API correctly.
1415 (grub_pxefs_close): Likewise.
1416
7fd0ee30 14172008-11-29 Robert Millan <rmh@aybabtu.com>
1418
34c44600 1419 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 1420 grub_ata_device_initialize() calls.
1421
34c44600 14222008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 1423
1424 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1425 iteration failed.
1426 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1427
89313780 14282008-11-28 Robert Millan <rmh@aybabtu.com>
1429
1430 Fix build on powerpc-ieee1275. Based on patch created by
1431 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1432 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1433 `kern/ieee1275/mmap.c'.
1434 * include/grub/powerpc/ieee1275/memory.h: New file.
1435
15257703 1436 Provide grub-install on coreboot.
1437 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1438 (grub_install_SOURCES): New variable.
1439 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1440 usable on coreboot.
1441
9fc5388a 14422008-11-25 Felix Zielcke <fzielcke@z-51.de>
1443
1444 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1445 to `grub_term_input_t'.
1446 (grub_term_get_current_output): Change return type to
1447 `grub_term_output_t'.
1448
bc3a2f31 14492008-11-22 Robert Millan <rmh@aybabtu.com>
1450
34c44600 1451 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 1452 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1453 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1454 grub_vga_text_cls().
1455
80fc88f2 1456 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 1457 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 1458
cbf36fd3 1459 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1460 to 0x200000 (avoids trouble with some OFW implementations, and matches
1461 with the one in Yaboot).
1462 Reported by Manoel Abranches
1463
73e8e268 14642008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 1465
1466 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1467 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1468
73e8e268 1469 * util/grub-mkconfig_lib.in (grub_warn): New function.
1470 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1471 warnings, to obtain consistent formatting.
1472 * util/grub.d/00_header.in: Likewise.
1473 * util/update-grub_lib.in: Likewise.
1474
e94045a1 1475 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 1476 Move comment text to `#error' stanza.
e94045a1 1477
79d29fd7 1478 Harmonize ieee1275's grub_available_iterate() with the generic
1479 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1480 build problem on i386-ieee1275):
1481 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1482 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1483 parameter `type'. Update all users of this function.
1484 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1485 `kern/ieee1275/mmap.c'.
1486 * kern/ieee1275/init.c
1487 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1488 with ...
1489 (grub_machine_mmap_iterate): ... this.
1490 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1491 return type to `grub_err_t'. Update all implementations of this
1492 function prototype.
1493 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1494 Likewise.
1495
60d6b16e 1496 Add `lsmmap' command (lists firmware-provided memory map):
1497 * commands/lsmmap.c: New file.
1498 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1499 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1500 variables.
1501 * conf/powerpc-ieee1275.rmk: Likewise.
1502 * conf/i386-coreboot.rmk: Likewise.
1503 * conf/i386-ieee1275.rmk: Likewise.
1504
ebaaf49b 15052008-11-19 Robert Millan <rmh@aybabtu.com>
1506
1507 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 1508 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1509 constraints to initrd allocation (based on code from
1510 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1511 for Linux to find it.
ebaaf49b 1512
dfab719f 15132008-11-14 Robert Millan <rmh@aybabtu.com>
1514
1515 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1516 order to cope with duplicate slashes.
1517
10fc3eb9 15182008-11-14 Robert Millan <rmh@aybabtu.com>
1519
1520 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1521 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1522 don't want to mess with lower memory, because it is used in the Linux
1523 loader.
1524
1525 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 1526 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 1527 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1528 is in our heap (probably as a result of it being corrupted during
2f2a3442 1529 decompression). Add #error instance with comment to explain why this
1530 loader isn't currently usable on PC/BIOS.
10fc3eb9 1531
e2e07847 15322008-11-14 Robert Millan <rmh@aybabtu.com>
1533
1534 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 1535 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 1536
fe8e8d69 15372008-11-12 Robert Millan <rmh@aybabtu.com>
1538
1539 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1540
1541 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1542 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1543 from here ...
1544 * include/grub/i386/pc/memory.h: ... to here.
1545
976b07d0 15462008-11-12 Robert Millan <rmh@aybabtu.com>
1547
1548 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1549 split).
1550
1551 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1552 (grub_console_cur_color, grub_console_real_putchar)
1553 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1554 (grub_console_setcolorstate, grub_console_setcolor)
1555 (grub_console_getcolor): Move from here ...
1556 * include/grub/i386/vga_common.h: ... to here (new file).
1557
1558 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1559 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1560 `<grub/i386/io.h>'.
1561 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1562 `<grub/i386/vga_common.h>'.
1563
76679cd3 15642008-11-12 Robert Millan <rmh@aybabtu.com>
1565
1566 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1567 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1568 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1569 variables.
1570 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1571 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1572
1573 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1574 grub_console_init() with call to grub_vga_text_init().
1575 (grub_machine_fini): Replace call to
1576 grub_console_fini() with call to grub_vga_text_fini() and
1577 grub_at_keyboard_fini().
1578
1579 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1580 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1581 (grub_console_setcolorstate, grub_console_setcolor)
1582 (grub_console_getcolor): New function prototypes.
1583
1584 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1585 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1586 (grub_vga_text_setcursor): Static-ize.
1587 (grub_vga_text_term): New structure.
1588 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1589
1590 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1591 (grub_console_cur_color, grub_console_standard_color)
1592 (grub_console_normal_color, grub_console_highlight_color)
1593 (map_char, grub_console_putchar, grub_console_getcharwidth)
1594 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1595 (grub_console_getcolor): Move from here ...
1596 * term/i386/vga_common.c: ... to here (same function names).
1597
95b841d3 15982008-11-12 Robert Millan <rmh@aybabtu.com>
1599
1600 Use newly-added Multiboot support in coreboot.
1601
1602 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1603 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1604
1605 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1606 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1607 (codestart): Store the MBI in `startup_multiboot_info' when we're
1608 being loaded using Multiboot.
1609
1610 * kern/i386/coreboot/init.c (grub_machine_init): Move
1611 grub_at_keyboard_init() call to beginning of function (useful for
1612 debugging). Call grub_machine_mmap_init() before attempting to use
1613 grub_machine_mmap_iterate().
1614 (grub_lower_mem, grub_upper_mem): Move from here ...
1615 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1616 here (new file).
1617
1618 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1619 function prototype.
1620
761ca975 16212008-11-12 Robert Millan <rmh@aybabtu.com>
1622
1623 Fix a regression introduced by the at_keyboard.mod split. Because
1624 some terminals are default on some platforms and non-default on
1625 others, the first terminal being registered determines which is
1626 going to be default.
1627
1628 * kern/term.c (grub_term_register_input): If this is the first
1629 terminal being registered, set it as the current one.
1630 (grub_term_register_output): Likewise.
1631
1632 * term/efi/console.c (grub_console_init): Do not call
1633 grub_term_set_current_output() or grub_term_set_current_input().
1634 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1635 * term/i386/pc/console.c (grub_console_init): Likewise.
1636 (grub_console_fini): Do not call grub_term_set_current_input()
1637 (but leave grub_term_set_current_output() to restore text mode).
1638
6c529df7 16392008-11-10 Robert Millan <rmh@aybabtu.com>
1640
1641 * util/grub.d/00_header.in: Add backward compatibility check for
1642 versions of terminal.mod that don't understand `terminal_input' or
1643 `terminal_output'.
1644
132e4113 16452008-11-09 Robert Millan <rmh@aybabtu.com>
1646
1647 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1648 `terminal_input' / `terminal_output', not `terminal'.
1649
ac293d50 16502008-11-08 Robert Millan <rmh@aybabtu.com>
1651
1652 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 1653 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 1654
0025933a 16552008-11-08 Robert Millan <rmh@aybabtu.com>
1656
1657 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 1658 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 1659 members. Update all users.
1660 * util/console.c (grub_ncurses_term): Split in ...
1661 (grub_ncurses_term_input): ... this, and ...
1662 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 1663 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 1664
37c86336 16652008-11-08 Robert Millan <rmh@aybabtu.com>
1666
1667 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1668 (PKGDATA): Add $(pkgdata_SRCDIR).
1669 (pkglib_BUILDDIR): New variable.
1670 (pkgdata_SRCDIR): New variable.
1671 (build_env.mk): New target.
1672 (include_DATA): New variable.
1673 (install-local): Install $(include_DATA) files in $(includedir).
1674
b6c15a2d 16752008-11-07 Pavel Roskin <proski@gnu.org>
1676
d99d46f1 1677 * gendistlist.sh: Use C locale for sorting to ensure consistent
1678 output on all systems.
1679
b6c15a2d 1680 * util/grub.d/00_header.in: Remove incorrect space before
1681 "serial".
1682
c32ee8c9 16832008-11-07 Robert Millan <rmh@aybabtu.com>
1684
1685 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1686 per specification.
1687 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1688 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1689 (based on find_multi_boot1_header).
1690 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1691 using find_multi_boot2_header(), and abort if neither Multiboot or
1692 Multiboot headers were found.
1693
651c29b7 16942008-11-07 Robert Millan <rmh@aybabtu.com>
1695
1696 Modularize at_keyboard.mod:
1697
1698 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1699 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1700 (at_keyboard_mod_LDFLAGS): New variables.
1701
1702 Actual terminal split:
1703
1704 * include/grub/term.h (struct grub_term): Split in ...
1705 (struct grub_term_input): ... this, and ...
1706 (struct grub_term_output): ... this. Update all users.
1707 (grub_term_set_current): Split in ...
1708 (grub_term_set_current_input): ... this, and ...
1709 (grub_term_set_current_output): ... this.
1710 (grub_term_get_current): Split in ...
1711 (grub_term_get_current_input): ... this, and ...
1712 (grub_term_get_current_output): ... this.
1713 (grub_term_register): Split in ...
1714 (grub_term_register_input): ... this, and ...
1715 (grub_term_register_output): ... this.
1716 (grub_term_unregister): Split in ...
1717 (grub_term_unregister_input): ... this, and ...
1718 (grub_term_unregister_output): ... this.
1719 (grub_term_iterate): Split in ...
1720 (grub_term_iterate_input): ... this, and ...
1721 (grub_term_iterate_output): ... this.
1722
1723 * kern/term.c (grub_term_list): Split in ...
1724 (grub_term_list_input): ... this, and ...
1725 (grub_term_list_output): ... this. Update all users.
1726 (grub_cur_term): Split in ...
1727 (grub_cur_term_input): ... this, and ...
1728 (grub_cur_term_output): ... this. Update all users.
1729 (grub_term_set_current): Split in ...
1730 (grub_term_set_current_input): ... this, and ...
1731 (grub_term_set_current_output): ... this.
1732 (grub_term_get_current): Split in ...
1733 (grub_term_get_current_input): ... this, and ...
1734 (grub_term_get_current_output): ... this.
1735 (grub_term_register): Split in ...
1736 (grub_term_register_input): ... this, and ...
1737 (grub_term_register_output): ... this.
1738 (grub_term_unregister): Split in ...
1739 (grub_term_unregister_input): ... this, and ...
1740 (grub_term_unregister_output): ... this.
1741 (grub_term_iterate): Split in ...
1742 (grub_term_iterate_input): ... this, and ...
1743 (grub_term_iterate_output): ... this.
1744
1745 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1746 a check for input and one for output (and only attempt to get keys
1747 from user when input works).
1748
1749 * util/grub-probe.c (grub_term_get_current): Split in ...
1750 (grub_term_get_current_input): ... this, and ...
1751 (grub_term_get_current_output): ... this.
1752 * util/grub-fstest.c: Likewise.
1753 * util/i386/pc/grub-setup.c: Likewise.
1754 * util/grub-editenv.c: Likewise.
1755
1756 Portability adjustments:
1757
1758 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1759 `term/i386/pc/at_keyboard.c'.
1760 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1761 grub_keyboard_controller_init() (now handled by terminal .init).
1762 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1763 grub_at_keyboard_init().
1764 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1765 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1766 at_keyboard.mod via input terminal interface).
1767 * include/grub/i386/coreboot/console.h: Convert into a stub for
1768 `<grub/i386/pc/console.h>'.
1769
1770 Migrate full terminals to new API:
1771
1772 * term/efi/console.c (grub_console_term): Split into ...
1773 (grub_console_term_input): ... this, and ...
1774 (grub_console_term_output): ... this. Update all users.
1775 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1776 (grub_ofconsole_init): Split into ...
1777 (grub_ofconsole_init_input): ... this, and ...
1778 (grub_ofconsole_init_output): ... this.
1779 (grub_ofconsole_term): Split into ...
1780 (grub_ofconsole_term_input): ... this, and ...
1781 (grub_ofconsole_term_output): ... this. Update all users.
1782 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1783 (grub_serial_term_input): ... this, and ...
1784 (grub_serial_term_output): ... this. Update all users.
1785 * term/i386/pc/console.c (grub_console_term): Split into ...
1786 (grub_console_term_input): ... this, and ...
1787 (grub_console_term_output): ... this. Update all users.
1788 (grub_console_term_input): Only enable it on PC/BIOS platform.
1789 (grub_console_init): Remove grub_keyboard_controller_init() call.
1790
1791 Migrate input terminals to new API:
1792
1793 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1794 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1795 i386-specific anyway).
1796 (grub_console_checkkey): Rename to ...
1797 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1798 users.
1799 (grub_keyboard_controller_orig): New variable.
1800 (grub_console_getkey): Rename to ...
1801 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1802 users.
1803 (grub_keyboard_controller_init): Static-ize. Save original
1804 controller value so that it can be restored ...
1805 (grub_keyboard_controller_fini): ... here (new function).
1806 (grub_at_keyboard_term): New structure.
1807 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1808 functions.
1809
1810 Migrate output terminals to new API:
1811
1812 * term/i386/pc/vga.c (grub_vga_term): Change type to
1813 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1814 members. Update all users.
1815 * term/gfxterm.c (grub_video_term): Change type to
1816 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1817 members. Update all users.
1818 * include/grub/i386/pc/console.h (grub_console_checkkey)
1819 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1820 etc).
1821
1822 Migrate `terminal' command and userland tools to new API:
1823
1824 * commands/terminal.c (grub_cmd_terminal): Split into ...
1825 (grub_cmd_terminal_input): ... this, and ...
1826 (grub_cmd_terminal_output): ... this.
1827 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1828 `terminal_input' and `terminal_output'.
1829 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1830 `terminal_input' / `terminal_output' API.
1831 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1832 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1833 provided ${GRUB_TERMINAL}, convert it).
1834
96e5d876 18352008-11-04 Robert Millan <rmh@aybabtu.com>
1836
1837 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1838 for FreeBSD.
1839 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1840
556f3775 18412008-11-03 Bean <bean123ch@gmail.com>
1842
1843 * kern/elf.c (grub_elf32_load): Revert to previous code.
1844 (grub_elf64_load): Likewise.
1845
1846 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1847
926b9823 18482008-11-01 Robert Millan <rmh@aybabtu.com>
1849
1850 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1851 (TARGET_CPPFLAGS): Likewise.
1852 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1853
1432e958 18542008-11-01 Carles Pina i Estany <carles@pina.cat>
1855
1856 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1857
dba3f844 18582008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 1859
1860 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1861 addition of objects until the code is not going to be able to fail.
1862
dba3f844 18632008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 1864
1865 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1866 (add a missing NULL check, and correct them by moving the pointer
1867 operations after the actual check).
1868
7ab28c21 18692008-10-29 Robert Millan <rmh@aybabtu.com>
1870
1871 * util/i386/pc/grub-install.in: Handle empty string as output from
1872 make_system_path_relative_to_its_root().
1873
1b7748eb 18742008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1875
1876 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1877 circular metadata worst case scenario. If the metadata is circular
1878 then copy the wrap in place.
1879 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1880 project lib/format_text/layout.h
1881 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1882
c9618ab2 18832008-10-03 Felix Zielcke <fzielcke@z-51.de>
1884
7a36edca 1885 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 1886
bf981c62 18872008-10-03 Felix Zielcke <fzielcke@z-51.de>
1888
1889 * util/update-grub_lib.in: Mention filename in warning message.
1890
6d994591 18912008-09-29 Felix Zielcke <fzielcke@z-51.de>
1892
1893 * NEWS: Update for rename of update-grub to grub-mkconfig.
1894
18ade780 18952008-09-29 Felix Zielcke <fzielcke@z-51.de>
1896
1897 * util/update-grub_lib.in: Copy to ...
1898 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 1899 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 1900 * util/update-grub.in: Rename to ...
1901 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1902 option. Add `--output' option to allow users to specify the generated
1903 configuration file. Default to stdout.
1904 (update_grub_dir): Rename to ...
1905 (grub_mkconfig_dir): ... this.
1906 (grub_cfg): Default to an empty string.
1907 * conf/common.rmk (update-grub): Rename to ...
1908 (grub-mkconfig): ... this.
1909 (update-grub_lib): Copy to ...
1910 (grub-mkconfig_lib): ... this.
1911 (update-grub_SCRIPTS): Copy to ...
1912 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1913 (update-grub_DATA): Rename to ...
1914 (grub-mkconfig_DATA): ... this.
1915
556ce6ac 19162008-09-28 Robert Millan <rmh@aybabtu.com>
1917
1918 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1919 to `modified'. Add the real `created' field.
1920 (grub_iso9660_uuid): Use `modified' rather than `created' for
1921 constructing the UUID.
1922
19232008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 1924
1925 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1926 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1927
92274e85 19282008-09-28 Bean <bean123ch@gmail.com>
1929
1930 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1931 Thanks to Christian Franke for finding this bug.
1932
add6f17a 19332008-09-25 Robert Millan <rmh@aybabtu.com>
1934
1935 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1936 instances of grub_util_get_disk_name() (see previous commit).
1937
d2a367b8 19382008-09-25 Robert Millan <rmh@aybabtu.com>
1939
1940 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1941 `util/i386/get_disk_name.c'.
1942 * conf/i386-efi.rmk: Likewise.
1943 * conf/x86_64-efi.rmk: Likewise.
1944 * conf/i386-coreboot.rmk: Likewise.
1945 * conf/i386-ieee1275.rmk: Likewise.
1946 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1947 `util/ieee1275/get_disk_name.c'.
1948 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1949 * util/ieee1275/get_disk_name.c: Remove file.
1950 * util/i386/get_disk_name.c: Remove file.
1951 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1952 "hd%d" for device.map entries, rather than using
1953 grub_util_get_disk_name().
1954
81a06771 19552008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 1956
1957 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1958 warning.
1959 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1960
5a004279 19612008-09-24 Carles Pina i Estany <carles@pina.cat>
1962
1963 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1964 Changed to 0x5100.
1965 (GRUB_TERM_PPAGE): Changed to 0x4900.
1966
397093d3 19672008-09-24 Robert Millan <rmh@aybabtu.com>
1968
1969 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1970 macros (they were i386-pc specific).
1971 * include/grub/sparc64/ieee1275/console.h: Likewise.
1972 * include/grub/efi/console.h: Likewise.
1973
a91b6c7c 19742008-09-22 Bean <bean123ch@gmail.com>
1975
1976 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1977 resident and in attribute list.
1978
1979 * include/grub/ntfs.h (BMP_LEN): Removed.
1980
c40fd116 19812008-09-22 Bean <bean123ch@gmail.com>
1982
81a06771 1983 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 1984 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1985
1986 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1987 error occurs, as grub_disk_open will call grub_disk_close, which will
1988 call p->close (scsi).
1989
81a06771 19902008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 1991
1992 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1993 (AC_PREREQ): Bumped to 2.59.
1994 (AC_TRY_COMPILE): Replace obsolete macro with ...
1995 (AC_COMPILE_IFELSE): ... this.
1996 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1997 (AC_LINK_IFELSE): ... this.
1998
5dc43410 19992008-09-21 Felix Zielcke <fzielcke@z-51.de>
2000
2001 * autogen.sh: Add a call to `gendistlist.sh'.
2002
9035dce4 20032008-09-19 Christian Franke <franke@computer.org>
2004
2005 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2006 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2007 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2008 Export __enable_execute_stack() to modules.
2009 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2010 New function.
2011
7fd75377 20122008-09-09 Felix Zielcke <fzielcke@z-51.de>
2013
040030b3 2014 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2015 Sort the list.
2016
20172008-09-09 Felix Zielcke <fzielcke@z-51.de>
2018
2019 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 2020 #include <grub/util/hostdisk.h>.
2021
89d5ffcf 20222008-09-08 Robert Millan <rmh@aybabtu.com>
2023
2024 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2025 segments when their filesz is zero (grub_file_read() interprets
81a06771 2026 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 2027 Use `lowest_segment' rather than 0 for calculating the current
2028 segment load address.
2029
40da438f 20302008-09-08 Robert Millan <rmh@aybabtu.com>
2031
2032 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2033 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2034 clobbered useful information.
2035
ddbf5556 20362008-09-08 Robert Millan <rmh@aybabtu.com>
2037
2038 * include/grub/util/biosdisk.h: Move to ...
2039 * include/grub/util/hostdisk.h: ... here. Update all users.
2040 * util/biosdisk.c: Move to ...
2041 * util/hostdisk.c: ... here. Update all users.
2042
783d0f48 20432008-09-07 Robert Millan <rmh@aybabtu.com>
2044
2045 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2046 variables.
2047 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2048 and length can be stored directly in the `mbi->mmap_addr' and
2049 `mbi->mmap_length' struct fields.
2050
548e2ea5 20512008-09-07 Robert Millan <rmh@aybabtu.com>
2052
2053 * conf/i386.rmk: New file. Provides declaration for building
2054 `cpuid.mod'.
2055 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2056 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2057 variables.
2058 Include `conf/i386.mk'.
2059 * conf/i386-efi.rmk: Likewise.
2060 * conf/x86_64-efi.rmk: Likewise.
2061 * conf/i386-coreboot.rmk: Likewise.
2062 * conf/i386-ieee1275.rmk: Likewise.
2063
0ea85a37 20642008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2065
2066 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2067 Adds optimization support for BGR based modes.
2068
2069 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2070 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2071 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2072 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2073 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2074 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2075 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2076 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2077 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2078 (grub_video_i386_vbeblit_index_index): Likewise.
2079 (grub_video_i386_vbeblit_replace_directN): Added.
2080 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2081 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2082 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2083 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2084 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2085 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 2086 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 2087 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2088 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2089 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2090 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2091 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2092 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2093
2094 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2095 (grub_video_i386_vbefill_R8G8B8): Likewise.
2096 (grub_video_i386_vbefill_index): Likewise.
2097 (grub_video_i386_vbefill_direct32): Added.
2098 (grub_video_i386_vbefill_direct24): Likewise.
2099 (grub_video_i386_vbefill_direct16): Likewise.
2100 (grub_video_i386_vbefill_direct8): Likewise.
2101
81a06771 2102 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 2103 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2104 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2105 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2106 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2107 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 2108
0ea85a37 2109 * video/video.c (grub_video_get_blit_format): Updated to use new
2110 blit formats. Added handling for 16 bit color modes.
81a06771 2111
2112 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 2113 fillers.
2114 (common_blitter): Updated to use new blitters.
2115
2116 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2117 Removed.
2118 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2119 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2120 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2121 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2122 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2123 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2124 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2125 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2126 (grub_video_i386_vbeblit_index_index): Likewise.
2127 (grub_video_i386_vbeblit_replace_directN): Added.
2128 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2129 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2130 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2131 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2132 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2133 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2134 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2135 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2136 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2137 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2138 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2139 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2140 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 2141
0ea85a37 2142 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2143 (grub_video_i386_vbefill_R8G8B8): Likewise.
2144 (grub_video_i386_vbefill_index): Likewise.
2145 (grub_video_i386_vbefill_direct32): Added.
2146 (grub_video_i386_vbefill_direct24): Likewise.
2147 (grub_video_i386_vbefill_direct16): Likewise.
2148 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 2149
0ea85a37 2150 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2151 types.
81a06771 2152
0ea85a37 2153 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2154 types.
81a06771 2155
0ea85a37 2156 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2157 blitter types.
81a06771 2158
0ea85a37 2159 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2160 types.
2161
e8a83df6 21622008-09-06 Felix Zielcke <fzielcke@z-51.de>
2163
2164 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2165 RAID level 1.
2166
6bcd8ee5 21672008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 2168
6bcd8ee5 2169 * fs/iso9660.c (grub_iso9660_date): New structure.
2170 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2171 (grub_iso9660_uuid): New function.
c375ae58 2172
59261157 21732008-09-05 Bean <bean123ch@gmail.com>
2174
2175 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2176
2177 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2178 insensitive bit for names in Win32 and Win32 & DOS namespace.
2179
2180 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2181
2182 * include/grub/types.h (LONG_MAX): Likewise.
2183
58b6645a 21842008-09-04 Felix Zielcke <fzielcke@z-51.de>
2185
4ee55921 2186 * util/getroot.c: Include <config.h>.
2187 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2188 add support for /dev/md/N devices and handle LVM double dash escaping.
2189
21902008-09-04 Felix Zielcke <fzielcke@z-51.de>
2191
2192 * config.guess: Update to latest version from config git.
2193 * config.sub: Likewise.
58b6645a 2194
9124f65d 21952008-09-03 Robert Millan <rmh@aybabtu.com>
2196
2197 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2198 `disk->total_sectors'.
2199
81a06771 22002008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 2201
2202 * include/grub/normal.h: Fixed incorrect comment for
2203 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2204
81a06771 22052008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 2206
2207 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2208 values with defines.
2209
2210 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2211 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2212 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2213 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2214 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2215 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2216 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2217 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2218 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2219 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2220 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2221 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2222 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2223 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2224 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2225 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2226 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2227 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2228 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2229
93d5cbf8 22302008-08-31 Robert Millan <rmh@aybabtu.com>
2231
2232 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2233 declaration.
2234 (grub_multiboot): Fix a few warnings.
2235
21751d50 22362008-08-31 Robert Millan <rmh@aybabtu.com>
2237
2238 * loader/i386/pc/multiboot.c: Update comment not to say that
2239 boot_device support is unimplemented.
2240
e27a75c5 22412008-08-31 Robert Millan <rmh@aybabtu.com>
2242
2243 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2244 or memory map support are unimplemented.
2245
81a06771 22462008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 2247
2248 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2249
81a06771 22502008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 2251
2252 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2253 total video memory in 'vbeinfo' output; show color format details for
2254 each video mode.
2255
7c5d8d95 22562008-08-30 Pavel Roskin <proski@gnu.org>
2257
2258 * util/genmoddep.c: Remove for real this time.
2259 * DISTLIST: Remove util/genmoddep.c.
2260
4cebd25a 22612008-08-30 Robert Millan <rmh@aybabtu.com>
2262
2263 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2264 as required by Multiboot spec (it was already 4-byte aligned, but
2265 only by chance).
2266
b497a269 22672008-08-29 Pavel Roskin <proski@gnu.org>
2268
e3925185 2269 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2270 * kern/powerpc/ieee1275/startup.S: ... this.
2271 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2272 * DISTLIST: Likewise.
2273
b497a269 2274 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2275 grub/cpu/kernel.h. Add start label for consistency with other
2276 platforms. Add grub_prefix immediately after start. Add jump
2277 to the code after grub_prefix.
2278 * include/grub/powerpc/kernel.h: Provide valid values for
2279 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2280
6e5a42fe 22812008-08-29 Bean <bean123ch@gmail.com>
2282
2283 * configure.ac: Change host_os to cygwin for mingw.
2284 (asprintf): New check for function.
2285
2286 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2287 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2288
2289 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 2290 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 2291 sync, sleep and grub_util_get_disk_size for mingw.
2292
2293 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2294 to get size in mingw.
2295 (open_device): Use flag O_BINARY if it's defined.
2296 (find_root_device): Add dummy code for mingw.
2297
2298 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2299 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2300 (get_scsi_disk_name): Return 0 for mingw.
2301
2302 * util/hostfs.c: #include <grub/util/misc.h>.
2303 (grub_hostfs_open): Use "rb" flag to open file, use
2304 grub_util_get_disk_size to get disk size for mingw.
2305
2306 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2307 (asprintf): New function if HAVE_ASPRINTF is not set.
2308 (sync): New function for mingw.
2309 (sleep): Likewise.
2310 (grub_util_get_disk_size): Likewise.
2311
ab3f2673 23122008-08-28 Pavel Roskin <proski@gnu.org>
2313
2314 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2315 kern/time.c.
2316
1c282483 23172008-08-28 Robert Millan <rmh@aybabtu.com>
2318
2319 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2320
678e849c 23212008-08-28 Robert Millan <rmh@aybabtu.com>
2322
2323 Change find_grub_drive() syntax so it doesn't prevent it from
2324 detecting NULL names as errors.
2325
2326 * util/biosdisk.c (find_grub_drive): Move free slot search code
2327 from here ...
2328 (find_free_slot): ... to here.
2329 (read_device_map): Use find_free_slot() to search for free slots.
2330
965c75ca 23312008-08-27 Marco Gerards <marco@gnu.org>
2332
2333 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2334 (scsi_mod_SOURCES): New variable.
2335 (scsi_mod_CFLAGS): Likewise
2336 (scsi_mod_LDFLAGS): Likewise.
2337
2338 * disk/scsi.c: New file.
2339
2340 * include/grub/scsi.h: Likewise.
2341
2342 * include/grub/scsicmd.h: Likewise.
2343
2344 * disk/ata.c: Include <grub/scsi.h>.
2345 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2346 instead.
2347 (grub_ata_iterate): Skip ATAPI devices.
2348 (grub_ata_open): Only handle ATAPI devices.
2349 (struct grub_atapi_read): Removed.
2350 (grub_atapi_readsector): Likewise.
2351 (grub_ata_read): No longer handle ATAPI devices.
2352 (grub_ata_write): Likewise.
2353 (grub_atapi_iterate): New function.
2354 (grub_atapi_read): Likewise.
2355 (grub_atapi_write): Likewise.
2356 (grub_atapi_open): Likewise.
2357 (grub_atapi_close): Likewise.
2358 (grub_atapi_dev): New variable.
2359 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2360 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2361
2362 * include/grub/disk.h (enum grub_disk_dev_id): Add
2363 `GRUB_DISK_DEVICE_SCSI_ID'.
2364
c07ae501 23652008-08-26 Robert Millan <rmh@aybabtu.com>
2366
2367 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2368 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2369 descriptive.
2370
5ed20adc 23712008-08-23 Bean <bean123ch@gmail.com>
2372
2373 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2374 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2375 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2376 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2377 dm_nv.mod.
2378 (raid5rec_mod_SOURCES): New macro.
2379 (raid5rec_mod_CFLAGS): Likewise.
2380 (raid5rec_mod_LDFLAGS): Likewise.
2381 (raid6rec_mod_SOURCES): Likewise.
2382 (raid6rec_mod_CFLAGS): Likewise.
2383 (raid6rec_mod_LDFLAGS): Likewise.
2384 (mdraid_mod_SOURCES): Likewise.
2385 (mdraid_mod_CFLAGS): Likewise.
2386 (mdraid_mod_LDFLAGS): Likewise.
2387 (dm_nv_mod_SOURCES): Likewise.
2388 (dm_nv_mod_CFLAGS): Likewise.
2389 (dm_nv_mod_LDFLAGS): Likewise.
2390
2391 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2392 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2393 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2394
2395 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2396 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2397
2398 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2399
2400 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2401
2402 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2403
2404 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2405
2406 * disk/raid5_recover.c: New file.
2407
2408 * disk/raid6_recover.c: Likewise.
2409
2410 * disk/mdraid_linux.c: Likewise.
2411
2412 * disk/dmraid_nvidia.c: Likewise.
2413
2414 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2415 ULONG_MAX.
2416
2417 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2418 calculate the size of raid device.
2419 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2420 different layout of raid5.
2421 (grub_raid_scan_device): Remove code specific to mdraid.
2422 (grub_raid_list): New variable.
2423 (free_array): New function.
2424 (grub_raid_register): Likewise.
2425 (grub_raid_unregister): Likewise.
2426 (grub_raid_rescan): Likewise.
2427 (GRUB_MOD_INIT): Don't iterate device here.
2428 (GRUB_MOD_FINI): Use free_array to release resource.
2429
2430 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2431 (grub_raid5_recover_func_t): New function variable type.
2432 (grub_raid6_recover_func_t): Likewise.
2433 (grub_raid5_recover_func): New variable.
2434 (grub_raid6_recover_func): Likewise.
2435 (grub_raid_register): New function.
2436 (grub_raid_unregister): Likewise.
2437 (grub_raid_rescan): Likewise.
2438 (grub_raid_block_xor): Likewise.
2439
2440 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2441 (CMD_CRC): New macro.
2442 (part): Removed.
2443 (read_file): Handle device as well as file.
2444 (cmd_crc): New function.
2445 (fstest): Handle multiple disks.
2446 (options): Remove part, raw and long, add root and diskcount.
2447 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 2448 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 2449 add handling for the new options, support multiple disks.
2450
2451 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2452
29c18915 24532008-08-23 Bean <bean123ch@gmail.com>
2454
2455 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2456
2457 * genfslist.sh: Ignore kernel.mod.
2458
2459 * genpartmaplist.sh: Likewise.
2460
8415f261 24612008-08-23 Robert Millan <rmh@aybabtu.com>
2462
2463 * util/getroot.c (find_root_device): Skip anything that starts with
2464 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2465
d5a7dc5b 24662008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 2467
d5a7dc5b 2468 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2469 * util/grub.d/00_header.in: Allow the administrator to change default
2470 gfxmode via ${GRUB_GFXMODE}.
2471
380cfbb4 24722008-08-21 Felix Zielcke <fzielcke@z-51.de>
2473
2474 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2475
c9baafe7 24762008-08-21 Robert Millan <rmh@aybabtu.com>
2477
2478 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2479 loader.
2480 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2481 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2482
e290bef2 24832008-08-20 Carles Pina i Estany <carles@pina.cat>
2484
2485 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2486 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2487
f9dbfc96 24882008-08-19 Robert Millan <rmh@aybabtu.com>
2489
2490 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2491 (struct grub_virtual_screen): Remove `cursor_color'.
2492 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2493 initialization.
2494 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2495
dd6bd6ab 24962008-08-18 Robert Millan <rmh@aybabtu.com>
2497
2498 Unify (identical) linux_normal.c files.
2499 * loader/i386/efi/linux_normal.c: Move from here ...
2500 * loader/linux_normal.c: ... to here. Update all users.
2501 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2502 * loader/i386/ieee1275/linux_normal.c: Likewise.
2503
7f42f83e 25042008-08-18 Robert Millan <rmh@aybabtu.com>
2505
2506 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2507 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2508 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2509 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2510 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2511 New macros.
2512 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2513 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2514 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2515 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2516 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2517 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2518 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2519 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2520 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2521 portably using grub_getxy().
2522 Replace `-EFI' with `-bzImage' in boot message.
2523
38487ddb 25242008-08-17 Robert Millan <rmh@aybabtu.com>
2525
2526 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2527
deceb3ec 25282008-08-17 Robert Millan <rmh@aybabtu.com>
2529
2530 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2531
2532 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2533 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2534 (grub_machine_mmap_iterate): New function declaration.
2535 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2536 structure.
2537 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2538 macros.
2539
2540 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2541 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2542 Move e820 parsing from here ...
2543 * kern/i386/pc/mmap.c: New file.
2544 (grub_machine_mmap_iterate): ... to here.
2545
2546 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2547 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2548 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2549 (grub_available_iterate): Redeclare to return `void', and redeclare
2550 its hook to use grub_uint64_t as addr and size parameters, and rename
2551 to ...
2552 (grub_machine_mmap_iterate): ... this. Update all users.
2553
2554 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2555 to make it more readable. Rename to ...
2556 (grub_machine_mmap_iterate): ... this.
2557
2558 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2559 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2560 (grub_multiboot): Allocate an extra region after the payload, and fill
2561 it with a Multiboot memory map. Adjust a.out loader to calculate size
2562 with the extra space.
2563 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2564 with the extra space.
2565
f8aa0f43 25662008-08-17 Carles Pina i Estany <carles@pina.cat>
2567
9807deb9 2568 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 2569
605f5bb6 25702008-08-17 Felix Zielcke <fzielcke@z-51.de>
2571
2572 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2573 mdate-sh to the list `find' searches for.
2574 * DISTLIST: Regenerated.
2575
210db6c6 25762008-08-16 Felix Zielcke <fzielcke@z-51.de>
2577
2578 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2579 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 2580 genmoddep.awk, gensymlist.sh.in.
2581 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 2582 * DISTLIST: Regenerated.
48cdbfd4 2583 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 2584
1082b929 25852008-08-16 Robert Millan <rmh@aybabtu.com>
2586
2587 * disk/raid.c (grub_raid_init): Handle/report errors set by
2588 grub_device_iterate().
2589 * disk/lvm.c (grub_lvm_init): Likewise.
2590
42ce5170 25912008-08-15 Bean <bean123ch@gmail.com>
2592
2593 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2594 and datehook.mod.
2595 (datetime_mod_SOURCES): New macro.
2596 (datetime_mod_CFLAGS): Likewise.
2597 (datetime_mod_LDFLAGS): Likewise.
2598 (date_mod_SOURCES): Likewise.
2599 (date_mod_CFLAGS): Likewise.
2600 (date_mod_LDFLAGS): Likewise.
2601 (datehook_mod_SOURCES): Likewise.
2602 (datehook_mod_CFLAGS): Likewise.
2603 (datehook_mod_LDFLAGS): Likewise.
2604
2605 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2606 and datehook.mod.
2607 (datetime_mod_SOURCES): New macro.
2608 (datetime_mod_CFLAGS): Likewise.
2609 (datetime_mod_LDFLAGS): Likewise.
2610 (date_mod_SOURCES): Likewise.
2611 (date_mod_CFLAGS): Likewise.
2612 (date_mod_LDFLAGS): Likewise.
2613 (datehook_mod_SOURCES): Likewise.
2614 (datehook_mod_CFLAGS): Likewise.
2615 (datehook_mod_LDFLAGS): Likewise.
2616
2617 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2618 and datehook.mod.
2619 (datetime_mod_SOURCES): New macro.
2620 (datetime_mod_CFLAGS): Likewise.
2621 (datetime_mod_LDFLAGS): Likewise.
2622 (date_mod_SOURCES): Likewise.
2623 (date_mod_CFLAGS): Likewise.
2624 (date_mod_LDFLAGS): Likewise.
2625 (datehook_mod_SOURCES): Likewise.
2626 (datehook_mod_CFLAGS): Likewise.
2627 (datehook_mod_LDFLAGS): Likewise.
2628
2629 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2630 and datehook.mod.
2631 (datetime_mod_SOURCES): New macro.
2632 (datetime_mod_CFLAGS): Likewise.
2633 (datetime_mod_LDFLAGS): Likewise.
2634 (date_mod_SOURCES): Likewise.
2635 (date_mod_CFLAGS): Likewise.
2636 (date_mod_LDFLAGS): Likewise.
2637 (datehook_mod_SOURCES): Likewise.
2638 (datehook_mod_CFLAGS): Likewise.
2639 (datehook_mod_LDFLAGS): Likewise.
2640
2641 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2642 and datehook.mod.
2643 (datetime_mod_SOURCES): New macro.
2644 (datetime_mod_CFLAGS): Likewise.
2645 (datetime_mod_LDFLAGS): Likewise.
2646 (date_mod_SOURCES): Likewise.
2647 (date_mod_CFLAGS): Likewise.
2648 (date_mod_LDFLAGS): Likewise.
2649 (datehook_mod_SOURCES): Likewise.
2650 (datehook_mod_CFLAGS): Likewise.
2651 (datehook_mod_LDFLAGS): Likewise.
2652
2653 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2654
2655 * commands/date.c: New file.
2656
2657 * hook/datehook.c: Likewise.
2658
2659 * include/grub/lib/datetime.h: Likewise.
2660
2661 * include/grub/i386/cmos.h: Likewise.
2662
2663 * lib/datetime.c: Likewise.
2664
2665 * lib/i386/datetime.c: Likewise.
2666
2667 * lib/efi/datetime.c: Likewise.
2668
0e9242da 26692008-08-14 Robert Millan <rmh@aybabtu.com>
2670
2671 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2672 (grub_mkelfimage_SOURCES): New variable.
2673 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2674
2675 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2676 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2677 * conf/powerpc-ieee1275.rmk: Likewise.
2678 * conf/i386-ieee1275.rmk: Likewise.
2679
2680 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2681 * kern/i386/coreboot/init.c: Likewise.
2682
2683 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2684 with `<grub/cpu/kernel.h>'.
2685 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2686 to ...
2687 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2688 * kern/i386/coreboot/startup.S: Likewise.
2689
2690 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2691 (GRUB_MOD_GAP): Remove.
2692 * include/grub/powerpc/kernel.h: New file.
2693 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2694 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2695 * include/grub/i386/kernel.h: New file.
2696 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2697 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2698 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2699
2700 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2701 `grub-mkelfimage'.
2702 Use --directory when invoking grub_mkimage.
2703
2704 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2705 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2706 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2707 and GRUB_KERNEL_CPU_PREFIX.
2708
b86408f8 27092008-08-14 Felix Zielcke <fzielcke@z-51.de>
2710
d5e619ca 2711 * include/grub/err.h (grub_err_printf): New function prototype.
2712 * util/misc.c (grub_err_printf): New function.
2713 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2714 grub_printf.
2715 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 2716
7161f0e0 27172008-08-13 Robert Millan <rmh@aybabtu.com>
2718
2719 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2720
a1967522 27212008-08-13 Robert Millan <rmh@aybabtu.com>
2722
2723 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2724 boot entry.
2725
371458b5 27262008-08-12 Robert Millan <rmh@aybabtu.com>
2727
2728 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2729 of the relocation code from here ...
2730 (grub_multiboot): ... to here.
2731 (forward_relocator, backward_relocator): Move from here ...
2732 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2733 (grub_multiboot_backward_relocator): ... to here.
2734 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2735 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2736 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2737 (grub_multiboot_forward_relocator_end)
2738 (grub_multiboot_backward_relocator)
2739 (grub_multiboot_backward_relocator_end): New variables.
2740
05f9452b 27412008-08-12 Bean <bean123ch@gmail.com>
2742
2743 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2744
20024ab0 27452008-08-11 Robert Millan <rmh@aybabtu.com>
2746
2747 * kern/i386/linuxbios/startup.S: Move from here ...
2748 * kern/i386/coreboot/startup.S: ... to here.
2749
2750 * kern/i386/linuxbios/init.c: Move from here ...
2751 * kern/i386/coreboot/init.c: ... to here.
2752
2753 * kern/i386/linuxbios/table.c: Move from here ...
2754 * kern/i386/coreboot/mmap.c: ... to here.
2755
2756 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2757
e352e9cd 27582008-08-11 Robert Millan <rmh@aybabtu.com>
2759
2760 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2761 errors. Leave it to the upper layer to handle them.
2762
2d05bc6a 27632008-08-09 Christian Franke <franke@computer.org>
2764
2765 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2766 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2767 Install `grub.d/10_windows' only on Cygwin.
2768 * configure.ac: Add subst of `target_os'.
2769 Check `target_os' also before setting TARGET_OBJ2ELF.
2770 Add `--enable-grub-pe2elf'.
2771
042bd419 27722008-08-08 Robert Millan <rmh@aybabtu.com>
2773
2774 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2775 (grub_last_time): Change type to grub_uint64_t.
2776 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2777 (grub_disk_close): Likewise.
2778
2779 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2780 (run_menu): Migrate code from to using grub_get_time_ms().
2781
2782 * util/misc.c (grub_get_time_ms): New function.
2783
7f280db5 27842008-08-08 Marco Gerards <marco@gnu.org>
2785
2786 * disk/ata.c (grub_ata_regget): Change return type to
2787 `grub_uint8_t'.
2788 (grub_ata_regget2): Likewise.
2789 (grub_ata_wait_status): New function.
2790 (grub_ata_wait_busy): Removed function, updated all users to use
2791 `grub_ata_wait_status'.
2792 (grub_ata_wait_drq): Likewise.
2793 (grub_ata_cmd): New function.
2794 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2795 error handling.
2796 (grub_ata_pio_write): Add error handling.
2797 (grub_atapi_identify): Likewise.
2798 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2799 handling.
2800 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2801 handling. Actually use the detected registers. Reorder the
2802 detection logic such that it is easier to read.
2803 (grub_ata_pciinit): Do not assign the same ID to each controller.
2804 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2805 handling.
2806 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2807
2808 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2809
1fbc5e66 28102008-08-08 Marco Gerards <marco@gnu.org>
2811
2812 * NEWS: Update.
2813
819ce6c0 28142008-08-07 Bean <bean123ch@gmail.com>
2815
2816 * include/grub/x86_64/pci.h: New file.
2817
5c41d44d 28182008-08-07 Christian Franke <franke@computer.org>
2819
2820 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2821 (TIMER2_GATE): Likewise.
2822 (grub_pit_wait): Add enable/disable of the timer2 gate
2823 bit of port 0x61. This fixes a possible infinite loop.
2824
5ebc275d 28252008-08-07 Bean <bean123ch@gmail.com>
2826
2827 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2828 kern/i386/tsc.c and kern/i386/pit.c.
2829
2830 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2831 x86_64 platform.
2832
2833 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2834 <grub/i386/tsc.h>.
2835
2836 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2837
e383b3d0 28382008-08-07 Bean <bean123ch@gmail.com>
2839
2840 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2841
2842 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2843
2844 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2845 multiple inclusion. Add #include <grub/types.h>.
2846
1cbb58ac 28472008-08-06 Christian Franke <franke@computer.org>
2848
2849 * conf/common.rmk: Build and install `10_windows'.
2850 * util/grub.d/10_windows.in: New script.
2851
337f5a1e 28522008-08-06 Pavel Roskin <proski@gnu.org>
2853
2854 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2855
057bc4ac 28562008-08-06 Robert Millan <rmh@aybabtu.com>
2857
2858 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2859 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2860
2b99f123 28612008-08-06 Bean <bean123ch@gmail.com>
2862
2863 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2864 (grub_pxefs_fs_int): Remove dummy definition.
2865 (grub_pxefs_open): Use data->block_size to store the current block
2866 size setting.
2867 (grub_pxefs_read): Use block size stored in data->block_size. As the
2868 value of grub_pxe_blksize can be changed after the file is opened.
2869
9f0234cb 28702008-08-06 Bean <bean123ch@gmail.com>
2871
2872 * fs/i386/pc/pxe.c (curr_file): new variable.
2873 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2874 require the dummy internal file system anymore.
2875 (grub_pxefs_read): Removed.
2876 (grub_pxefs_close): Likewise.
2877 (grub_pxefs_fs_int): Likewise.
2878 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2879 connection when we switch file.
2880 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2881
a55d42e0 28822008-08-06 Robert Millan <rmh@aybabtu.com>
2883
2884 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2885 `halt.mod'.
2886 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2887 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2888
2889 * kern/i386/halt.c: New file.
2890 * kern/i386/reboot.c: Likewise.
2891 * include/grub/i386/reboot.h: Likewise.
2892 * include/grub/i386/halt.h: Likewise.
2893
2894 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2895 Include `<grub/cpu/halt.h>'.
2896 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2897 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2898
2899 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2900 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2901 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2902 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2903 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2904 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2905 from here ...
2906 * include/grub/i386/at_keyboard.h: ... to here.
2907
24371d26 29082008-08-05 Robert Millan <rmh@aybabtu.com>
2909
2910 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2911 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2912 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2913 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2914 `kern/generic/millisleep.c'.
2915
2916 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2917 instead of grub_get_rtc().
2918 (grub_tsc_init): Initialize `tsc_boot_time'.
2919
2920 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2921 (grub_machine_init): Use grub_tsc_init() rather than
2922 installing an RTC-based handler via grub_install_get_time_ms().
2923
2924 * kern/i386/pit.c: New file.
2925 * include/grub/i386/pit.h: Likewise.
2926
9e7007b3 29272008-08-05 Bean <bean123ch@gmail.com>
2928
2929 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2930
2931 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2932 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2933 (pxe_mod_SOURCES): New macro.
2934 (pxe_mod_CFLAGS): Likewise.
2935 (pxe_mod_LDFLAGS): Likewise.
2936 (pxecmd_mod_SOURCES): Likewise.
2937 (pxecmd_mod_CFLAGS): Likewise.
2938 (pxecmd_mod_LDFLAGS): Likewise.
2939
2940 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2941 (grub_pxe_call): Likewise.
2942
2943 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2944
2945 * commands/i386/pc/pxecmd.c: New file.
2946
9f0234cb 2947 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 2948
2949 * include/grub/i386/pc/pxe.h: Likewise.
2950
6977d49f 29512008-08-05 Bean <bean123ch@gmail.com>
2952
2953 * util/console.c (grub_console_cur_color): New variable.
2954 (grub_console_standard_color): Likewise.
2955 (grub_console_normal_color): Likewise.
2956 (grub_console_highlight_color): Likewise.
2957 (color_map): Likewise.
2958 (use_color): Likewise.
2959 (NUM_COLORS): New macro.
2960 (grub_ncurses_setcolorstate): Handle color properly.
2961 (grub_ncurses_setcolor): Don't change color here, just remember the
2962 settings, color will be set in grub_ncurses_setcolorstate.
2963 (grub_ncurses_getcolor): New function.
2964 (grub_ncurses_init): Initialize color pairs.
2965 (grub_ncurses_term): New member grub_ncurses_getcolor.
2966
9c2ff3ee 29672008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 2968
9c2ff3ee 2969 High resolution timer support. Implemented for x86 CPUs using TSC.
2970 Extracted generic grub_millisleep() so it's linked in only as needed.
2971 This requires a Pentium compatible CPU; if the RDTSC instruction is
2972 not supported, then it falls back on the generic grub_get_time_ms()
2973 implementation that uses the machine's RTC.
2974
2975 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2976 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2977 `kern/generic/millisleep.c'.
2978
2979 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2980 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2981
2982 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2983 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2984
2985 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2986
2987 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2988 `kern/generic/millisleep.c'.
2989
2990 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2991
2992 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2993
2994 * kern/generic/rtc_get_time_ms.c: New file.
2995
2996 * kern/generic/millisleep.c: New file.
337f5a1e 2997
9c2ff3ee 2998 * kern/misc.c: Don't include
2999 <kern/time.h> anymore.
3000 (grub_millisleep_generic): Removed.
3001
3002 * commands/sleep.c (grub_interruptible_millisleep): Uses
3003 grub_get_time_ms() instead of grub_get_rtc().
3004
3005 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3006 function.
3007 (grub_cpu_is_cpuid_supported): New inline function.
3008 (grub_cpu_is_tsc_supported): New inline function.
3009 (grub_tsc_init): New function prototype.
3010 (grub_tsc_get_time_ms): New function prototype.
3011
3012 * kern/i386/tsc.c (grub_get_time_ms): New file.
3013
3014 * include/grub/time.h: Include <grub/types.h.
3015 (grub_millisleep_generic): Removed.
3016 (grub_get_time_ms): New prototype.
3017 (grub_install_get_time_ms): New prototype.
3018 (grub_rtc_get_time_ms): New prototype.
3019
3020 * kern/time.c (grub_get_time_ms): New function.
3021 (grub_install_get_time_ms): New function.
3022
3023 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3024 <grub/time.h> anymore.
3025 (grub_millisleep): Removed.
3026 (grub_machine_init): Call grub_tsc_init.
3027
3028 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3029 get_time_ms() implementation.
3030
3031 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3032 (ieee1275_get_time_ms): New function.
3033 (grub_machine_init): Install get_time_ms() implementation.
3034
3035 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3036 (grub_machine_init): Call grub_tsc_init().
3037 (grub_millisleep): Removed.
bf06a93f 3038
9c2ff3ee 3039 * kern/ieee1275/init.c (grub_millisleep): Removed.
3040 (grub_machine_init): Install ieee1275_get_time_ms()
3041 implementation.
3042 (ieee1275_get_time_ms): New function.
3043 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3044 real work.
3045
9ec92aaf 30462008-08-05 Marco Gerards <marco@gnu.org>
3047
3048 * disk/ata.c: Include <grub/pci.h>.
3049 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3050 (grub_ata_initialize): Rewritten.
3051 (grub_ata_device_initialize): New function.
3052
8d23f507 30532008-08-04 Pavel Roskin <proski@gnu.org>
3054
3055 * kern/main.c: Include grub/mm.h.
3056
5e15ee3d 30572008-08-04 Robert Millan <rmh@aybabtu.com>
3058
3059 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3060 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3061 corruption problem).
3062
a9053f8f 30632008-08-04 Robert Millan <rmh@aybabtu.com>
3064
3065 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3066 warnings introduced in my last commit.
3067
dd19c7d7 30682008-08-03 Robert Millan <rmh@aybabtu.com>
3069
3070 Make PCI available on all i386 architectures.
3071
3072 * include/grub/i386/pc/pci.h: Move from here ...
3073 * include/grub/i386/pci.h: ... to here.
3074
3075 * include/grub/i386/pc/pci.h: Remove.
3076 * include/grub/i386/efi/pci.h: Remove.
3077 * include/grub/x86_64/efi/pci.h: Remove.
3078
3079 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3080 `<grub/cpu/pci.h>'.
3081
3082 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3083 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3084 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3085
3086 * conf/i386-ieee1275.rmk: Likewise.
3087
e14a6184 30882008-08-03 Robert Millan <rmh@aybabtu.com>
3089
3090 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3091 (grub_console_setcursor): Make it possible to set cursor off.
3092
52768e37 30932008-08-03 Robert Millan <rmh@aybabtu.com>
3094
3095 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3096 of modules instead of assuming which platform provides what.
3097 * util/update-grub.in: Likewise.
3098
2d52f57f 30992008-08-03 Robert Millan <rmh@aybabtu.com>
3100
3101 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3102 instead of `grub_install_dos_part' to determine whether a drive needs
3103 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 3104 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 3105
2a5cd121 31062008-08-02 Robert Millan <rmh@aybabtu.com>
3107
3108 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3109
93808428 31102008-08-02 Robert Millan <rmh@aybabtu.com>
3111
3112 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3113 of informational grub_dprintf() calls.
3114
3bd0a12a 31152008-08-02 Robert Millan <rmh@aybabtu.com>
3116
3117 * disk/memdisk.c (memdisk_size): Don't initialize.
3118 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3119
3120 * include/grub/i386/pc/kernel.h
3121 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3122 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3123 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3124 (grub_arch_memdisk_size): Remove.
3125
3126 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3127 field (was only used to transfer a constant). Add `type' field to
3128 support multiple module types.
3129 (grub_module_iterate): New function.
3130
3131 * kern/device.c (grub_device_open): Do not hide error messages
3132 when grub_disk_open() fails. Use grub_print_error() instead.
3133
3134 * kern/i386/pc/init.c (grub_arch_modules_addr)
3135 (grub_arch_memdisk_size): Remove functions.
3136 (grub_arch_modules_addr): Return the module address in high memory
3137 (now that it isn't copied anymore).
3138
3139 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3140 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3141 decompression routine (grub_total_module_size already includes that
3142 now). Don't copy modules back to low memory.
3143
3144 * kern/main.c: Include `<grub/mm.h>'.
3145 (grub_load_modules): Split out (and use) ...
3146 (grub_module_iterate): ... this function, which iterates through
3147 module objects and runs a hook.
3148 Comment out grub_mm_init_region() call, as it would cause non-ELF
3149 modules to be overwritten.
3150
3151 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3152 the memdisk image in its own region, make it part of the module list.
3153 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3154 (main): Parse --memdisk|-m option, and pass user-provided path as
3155 parameter to generate_image().
3156 (add_segments): Pass `memdisk_path' down to load_modules().
3157 (load_modules): Embed memdisk image in module section when requested.
3158 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3159 `header.type' instead of `header.offset'.
3160
3161 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3162 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3163 (memdisk_mod_LDFLAGS): New variables.
3164 * conf/i386-coreboot.rmk: Likewise.
3165 * conf/i386-ieee1275.rmk: Likewise.
3166
a927cc73 31672008-08-02 Robert Millan <rmh@aybabtu.com>
3168
3169 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3170 (backward_relocator): New variables. Used to allocate and relocate
3171 the payload, respectively.
3172 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 3173 address, install the appropriate relocator code in each bound of
a927cc73 3174 the payload, and set the entry point such that
3175 grub_multiboot_real_boot() will jump to one of them.
3176
3177 * kern/i386/loader.S (grub_multiboot_payload_size)
3178 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3179 (grub_multiboot_payload_entry_offset): New variables.
3180 (grub_multiboot_real_boot): Set cpu context to what the relocator
3181 expects, and jump to the relocator instead of the payload.
3182
3183 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3184 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3185 (grub_multiboot_payload_entry_offset): Export.
3186
b15d8a0c 31872008-08-01 Bean <bean123ch@gmail.com>
3188
3189 * normal/menu_entry.c (editor_getline): Don't return the original
3190 string as result, as it will be released by lexer once it has done
3191 using it.
3192
cdfb3d22 31932008-08-01 Robert Millan <rmh@aybabtu.com>
3194
3195 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3196 within menuentries, not before them.
3197 util/grub.d/10_hurd.in: Likewise.
3198
9175e93d 31992008-08-01 Bean <bean123ch@gmail.com>
3200
3201 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3202 (bufio_mod_SOURCES): New macro.
3203 (bufio_mod_CFLAGS): Likewise.
3204 (bufio_mod_LDFLAGS): Likewise.
3205
3206 * include/grub/bufio.h: New file.
3207
3208 * io/bufio.c: Likewise.
3209
3210 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3211 (grub_video_reader_png): Use grub_buffile_open to open file.
3212
3213 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3214 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3215
3216 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3217 (grub_video_reader_tga): Use grub_buffile_open to open file.
3218
3219 * font/manager.c: Include <grub/bufio.h>.
3220 (add_font): Use grub_buffile_open to open file.
3221
3d8383e7 32222008-07-31 Robert Millan <rmh@aybabtu.com>
3223
3224 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3225 ELF segments, use a macro for arbitrarily accessing any of them instead
3226 of preparing a pointer that allows access to one at a time.
3227 (grub_multiboot_load_elf64): Likewise.
3228
16e641b6 32292008-07-31 Bean <bean123ch@gmail.com>
3230
3231 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3232 GRUB_KERNEL_MACHINE_DATA_END.
3233
59198b72 32342008-07-30 Robert Millan <rmh@aybabtu.com>
3235
3236 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3237 Increase from 0x50 to 0x60.
3238 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3239 use UUIDs to identify the root drive for them. If that's not
3240 possible, abort.
3241 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3242 check, for cross-disk installs.
3243
ae88bca3 32442008-07-30 Robert Millan <rmh@aybabtu.com>
3245
3246 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3247 is non-empty, use it to set the `prefix' environment variable instead
3248 of the usual approach.
3249 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3250 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3251 environment variable instead of dummy make_install_device().
3252
3253 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3254 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 3255 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 3256
3257 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3258 New variable reference.
3259 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3260 New macro. Defines offset of `grub_prefix' within startup.S (relative
3261 to `start').
3262 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3263 section within startup.S (relative to `start').
3264 * include/grub/i386/coreboot/kernel.h: Likewise.
3265
3266 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3267 Overwrite grub_prefix with its contents, at the beginning of the
3268 first segment.
3269 (main): Understand -p|--prefix.
3270
14f41dd1 32712008-07-30 Robert Millan <rmh@aybabtu.com>
3272
3273 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3274
4ca049a3 32752008-07-30 Robert Millan <rmh@aybabtu.com>
3276
3277 * term/i386/pc/vga_text.c (grub_console_cls): Use
3278 grub_console_gotoxy() to go back to beginning of the screen.
3279 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3280
2921d337 32812008-07-29 Christian Franke <franke@computer.org>
3282
3283 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3284 Add conversion of emulated mount points on Cygwin.
3285
b609876d 32862008-07-29 Christian Franke <franke@computer.org>
3287
3288 * util/update-grub.in: Add a check for admin
3289 group on Cygwin.
3290 Remove old `grub.cfg.new' before creation.
3291 Add `-f' to `mv' to handle the different filesystem
3292 semantics of Windows.
3293
e93e4679 32942008-07-29 Bean <bean123ch@gmail.com>
3295
3296 * normal/main.c (get_line): Fix buffer overflow bug.
3297
41694fd0 32982008-07-28 Robert Millan <rmh@aybabtu.com>
3299
3300 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3301 (struct grub_apple_header): New struct. Describes the layout of
3302 the partmap header.
3303 (apple_partition_map_iterate): Check the header magic as well as the
3304 partition magic (which was already being checked).
3305
cfd0b4e6 33062008-07-28 Pavel Roskin <proski@gnu.org>
3307
3308 * genmk.rb: Add a warning to the beginning of the output that
3309 it's a generated file and should not be edited.
3310
93cce016 33112008-07-28 Robert Millan <rmh@aybabtu.com>
3312
3313 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3314 with the same number are found, just use issue a warning with
3315 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 3316
cd1df915 33172008-07-27 Robert Millan <rmh@aybabtu.com>
3318
3319 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3320 information.
3321
b70a8427 33222008-07-27 Bean <bean123ch@gmail.com>
3323
3324 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3325 (grub_fat_find_dir): Ignore case when comparing filename.
3326
8f5e379f 33272008-07-27 Bean <bean123ch@gmail.com>
3328
3329 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3330 smallino, as it's more descriptive, and i8count can be confused with
3331 the other field count.
3332 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3333 inode type.
3334
a85cd5a0 33352008-07-27 Bean <bean123ch@gmail.com>
3336
3337 * commands/crc.c: New file.
3338
3339 * lib/crc.c: Likewise.
3340
3341 * include/grub/lib/crc.h: Likewise.
3342
3343 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3344
3345 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3346 (hexdump): Move this function to ...
3347
3348 * lib/hexdump.c: ... here.
3349
3350 * include/grub/hexdump.h: Renamed to ...
3351
3352 * include/grub/lib/hexdump.h: ... this.
3353
3354 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3355
3356 * util/grub-editenv.c: Likewise.
3357
3358 * include/envblk.h: Renamed to ...
3359
3360 * include/lib/envblk.h: ... this.
3361
3362 * util/envblk.c: Renamed to ...
3363
3364 * lib/envblk.c: ... this.
3365
3366 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3367 lib/hexdump.c.
3368 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3369 (pkglib_MODULES): Add crc.mod.
3370 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3371 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3372 (crc_mod_SOURCES): New macro.
3373 (crc_mod_CFLAGS): Likewise.
3374 (crc_mod_LDFLAGS): Likewise.
3375
3376 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3377
3378 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3379
3380 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3381
3382 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3383
3384 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3385
c298def0 33862008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 3387
3388 * commands/help.c: Include <grub/term.h>.
3389 (TERM_WIDTH): Removed. Updated all users.
3390
cc349fb3 33912008-07-27 Pavel Roskin <proski@gnu.org>
3392
3393 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3394 spurious warnings about a comment within a comment.
3395
9051607e 33962008-07-25 Robert Millan <rmh@aybabtu.com>
3397
3398 * util/getroot.c (find_root_device): Skip devices that match
3399 /dev/dm-[0-9]. This lets the real device be found for any type of
3400 abstraction (LVM, EVMS, RAID..).
3401 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3402 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3403 device is found first, find_root_device() will now skip it.
3404
01453bfc 34052008-07-24 Pavel Roskin <proski@gnu.org>
3406
3407 * include/grub/types.h: Use __builtin_bswap32() and
3408 __builtin_bswap64() with gcc 4.3 and newer.
3409
6af9849f 34102008-07-24 Christian Franke <franke@computer.org>
3411
3a0fa256 3412 * util/i386/pc/grub-install.in: If `--debug' is specified,
3413 pass `--verbose' to grub-setup.
3414 Abort script if make_system_path_relative_to_its_root() fails.
3415
7810e747 34162008-07-24 Bean <bean123ch@gmail.com>
3417
3418 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3419 variable `target_platform' should be `platform'.
3420
42290e17 34212008-07-24 Bean <bean123ch@gmail.com>
3422
51cc5193 3423 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 3424 (grub_png_init_fixed_block): New function.
3425 (grub_png_decode_image_data): Handle fixed huffman code compression.
3426
2a8a80e4 34272008-07-24 Bean <bean123ch@gmail.com>
3428
3429 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3430 (grub_pe2elf_SOURCES): New macro.
3431 (CLEANFILES): Add grub-pe2elf.
3432
3433 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3434 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3435 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3436 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3437 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3438 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3439 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3440 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3441 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3442 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3443 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3444 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3445 (GRUB_PE32_DT_FUNCTION): Likewise.
3446 (GRUB_PE32_REL_I386_DIR32): Likewise.
3447 (GRUB_PE32_REL_I386_REL32): Likewise.
3448 (grub_pe32_symbol): New structure.
3449 (grub_pe32_reloc): Likewise.
3450
3451 * util/grub-pe2elf.c: New file.
3452
3453 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3454 start symbol in non pc platform.
3455
3456 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3457
3458 The following patches are from Christian Franke.
3459
3460 * include/grub/dl.h: Remove .previous, gas supports this only
3461 for ELF format.
3462
3463 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3464 Remove .type, gas supports this only for ELF format.
3465
3466 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3467 nullbytes in symbol table. This fixes an infinite loop if table is
3468 zero filled.
3469
3470 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3471 TARGET_IMG_LDFLAGS and EXEEXT.
3472
3473 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3474 TARGET_IMG_LDFLAGS_AC.
3475 (grub_CHECK_STACK_ARG_PROBE): New function.
3476
3477 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3478
3479 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3480
3481 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3482 to set TARGET_IMG_LD* accordingly.
3483 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3484 Add call to grub_CHECK_STACK_ARG_PROBE.
3485 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3486
3487 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3488
3489 * genmk.rb: Add EXEEXT to CLEANFILES.
3490
12ccdb75 34912008-07-23 Robert Millan <rmh@aybabtu.com>
3492
3493 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3494 define the codes for arrows and lines used for the menu).
3495 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3496 as well.
3497
3498 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3499 fonts, because the latter are too slow.
3500
18eeaf04 35012008-07-21 Bean <bean123ch@gmail.com>
3502
3503 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3504 a20. Run keyboard test last, as it will cause macbook to halt.
3505
b095e2ad 35062008-07-18 Pavel Roskin <proski@gnu.org>
3507
3508 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3509 load foreign architecture modules correctly anyway. Keep
3510 support for loading host architecture modules, whether we
3511 compile them or not.
3512
737feb35 35132008-07-17 Pavel Roskin <proski@gnu.org>
3514
3f4ce737 3515 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3516 change target_cpu. The compiler default can mismatch target_cpu
3517 in any case.
3518
4ad2d049 3519 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3520 * kern/efi/efi.c: Likewise.
3521
f6130a12 3522 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3523 target compiler is functional.
3524 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3525 are set up.
3526
58393a2d 3527 * configure.ac: Default to efi platform for x86_64-apple. Allow
3528 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3529 adjustments from the rest, only do them if target is not
3530 explicitly given. Merge other adjustments with the final sanity
3531 check. Remove an extraneous check for supported CPU. Be
3532 specific which CPU and which platform is not supported.
3533
737feb35 3534 * configure.ac: Default to pc platform for x86_64.
3535
546f966a 35362008-07-17 Robert Millan <rmh@aybabtu.com>
3537
3538 Partial LinuxBIOS -> Coreboot rename.
3539
3540 * conf/i386-linuxbios.rmk: Renamed to ...
3541 * conf/i386-coreboot.rmk: ... this.
3542 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3543 * configure.ac: Accept "coreboot" as input platform (but maintain
3544 compatibility with "linuxbios").
3545 * include/grub/i386/linuxbios: Renamed to ...
3546 * include/grub/i386/coreboot: ... this.
3547
20011694 35482008-07-17 Bean <bean123ch@gmail.com>
3549
3550 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 3551 (appleldr_mod_SOURCE): New variable.
20011694 3552 (appleldr_mod_CFLAGS): Likewise.
3553 (appleldr_mod_LDFLAGS): Likewise.
3554 (pci_mod_SOURCES): Likewise.
3555 (pci_mod_CFLAGS): Likewise.
3556 (pci_mod_LDFLAGS): Likewise.
3557 (lspci_mod_SOURCES): Likewise.
3558 (lspci_mod_CFLAGS): Likewise.
3559 (lspci_mod_LDFLAGS): Likewise.
3560
3561 * conf/x86_64-efi.rmk: New file.
3562
3563 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3564 macro.
3565 (grub_efidisk_write): Likewise.
3566
3567 * include/efi/api.h (efi_call_0): New macro.
3568 (efi_call_1): Likewise.
3569 (efi_call_2): Likewise.
3570 (efi_call_3): Likewise.
3571 (efi_call_4): Likewise.
3572 (efi_call_5): Likewise.
3573 (efi_call_6): Likewise.
3574
3575 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3576 grub_rescue_cmd_chainloader.
3577
3578 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3579 (grub_pe32_optional_header): Change some fields based on i386 or
3580 x86_64 platform.
3581 (GRUB_PE32_PE32_MAGIC): Likewise.
3582
3583 * include/grub/efi/uga_draw.h: New file.
3584
3585 * include/grub/elf.h (STN_ABS): New constant.
3586 (R_X86_64_NONE): Relocation constant for x86_64.
3587 (R_X86_64_64): Likewise.
3588 (R_X86_64_PC32): Likewise.
3589 (R_X86_64_GOT32): Likewise.
3590 (R_X86_64_PLT32): Likewise.
3591 (R_X86_64_COPY): Likewise.
3592 (R_X86_64_GLOB_DAT): Likewise.
3593 (R_X86_64_JUMP_SLOT): Likewise.
3594 (R_X86_64_RELATIVE): Likewise.
3595 (R_X86_64_GOTPCREL): Likewise.
3596 (R_X86_64_32): Likewise.
3597 (R_X86_64_32S): Likewise.
3598 (R_X86_64_16): Likewise.
3599 (R_X86_64_PC16): Likewise.
3600 (R_X86_64_8): Likewise.
3601 (R_X86_64_PC8): Likewise.
3602
3603 * include/grub/i386/efi/pci.h: New file.
3604
3605 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3606 Change it value based on platform.
3607 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3608 (GRUB_E820_RAM): Likewise.
3609 (GRUB_E820_RESERVED): Likewise.
3610 (GRUB_E820_ACPI): Likewise.
3611 (GRUB_E820_NVS): Likewise.
3612 (GRUB_E820_EXEC_CODE): Likewise.
3613 (GRUB_E820_MAX_ENTRY): Likewise.
3614 (grub_e820_mmap): New structure.
3615 (linux_kernel_header): Change the efi field according to different
3616 kernel version, also field from linux_kernel_header.
3617
3618 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3619
3620 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3621 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3622 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3623 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3624 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3625 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3626 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3627 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3628 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3629 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3630
3631 * include/grub/x86_64/efi/kernel.h: New file.
3632
3633 * include/grub/x86_64/efi/loader.h: Likewise.
3634
3635 * include/grub/x86_64/efi/machine.h: Likewise.
3636
3637 * include/grub/x86_64/efi/pci.h: Likewise.
3638
3639 * include/grub/x86_64/efi/time.h: Likewise.
3640
3641 * include/grub/x86_64/linux.h: Likewise.
3642
3643 * include/grub/x86_64/setjmp.h: Likewise.
3644
3645 * include/grub/x86_64/time.h: Likewise.
3646
3647 * include/grub/x86_64/types.h: Likewise.
3648
3649 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3650 GRUB_TARGET_SIZEOF_VOID_P.
3651
3652 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3653 (grub_efi_locate_handle): Likewise.
3654 (grub_efi_open_protocol): Likewise.
3655 (grub_efi_set_text_mode): Likewise.
3656 (grub_efi_stall): Likewise.
3657 (grub_exit): Likewise.
3658 (grub_reboot): Likewise.
3659 (grub_halt): Likewise.
3660 (grub_efi_exit_boot_services): Likewise.
3661 (grub_get_rtc): Likewise.
3662
3663 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3664 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3665 (grub_efi_allocate_pages): Wrap efi calls.
3666 (grub_efi_free_pages): Wrap efi calls.
3667 (grub_efi_get_memory_map): Wrap efi calls.
3668
3669 * kern/x86_64/dl.c: New file.
3670
3671 * kern/x86_64/efi/callwrap.S: Likewise.
3672
3673 * kern/x86_64/efi/startup.S: Likewise.
3674
3675 * loader/efi/appleloader.c: Likewise.
3676
3677 * loader/efi/chainloader.c (cmdline): New variable.
3678 (grub_chainloader_unload): Wrap efi calls.
3679 (grub_chainloader_boot): Likewise.
3680 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3681 command line.
3682
3683 * loader/efi/chainloader_normal.c (chainloader_command):
3684 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3685 command line.
3686
3687 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3688 method.
3689 (grub_e820_add_region): New function.
3690 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3691 booting.
3692 (grub_find_video_card): New function.
3693 (grub_linux_setup_video): New function.
3694 (grub_rescue_cmd_linux): Probe for video information.
3695
3696 * normal/x86_64/setjmp.S: New file.
3697
3698 * term/efi/console.c (map_char): New function.
3699 (grub_console_putchar): Map unicode char.
3700 (grub_console_checkkey): Wrap efi calls.
3701 (grub_console_getkey): Likewise.
3702 (grub_console_getwh): Likewise.
3703 (grub_console_gotoxy): Likewise.
3704 (grub_console_cls): Likewise.
3705 (grub_console_setcolorstate): Likewise.
3706 (grub_console_setcursor): Likewise.
3707
3708 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3709
59652a20 37102008-07-16 Pavel Roskin <proski@gnu.org>
3711
ef294055 3712 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3713 format strings.
3714
59652a20 3715 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3716 pointer, not an integer. This fixes a warning and prevents
3717 precision loss on 64-bit systems.
3718 (relocate_addresses): Remove unneeded cast.
3719
afc3b5d7 37202008-07-15 Pavel Roskin <proski@gnu.org>
3721
506b2b3e 3722 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3723
62ead89c 3724 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3725
c4cd51d7 3726 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3727 Fix comparison between signed and unsigned.
3728
0d3d8f28 3729 * include/grub/i386/ieee1275/console.h: Declare
3730 grub_console_init() and grub_console_fini().
3731
8804b286 3732 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3733 It's empty and unused.
3734
ee01cf35 3735 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3736 beginning to avoid warnings with some compilers.
3737
afc3b5d7 3738 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3739 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3740
e4e8eaa5 37412008-07-14 Pavel Roskin <proski@gnu.org>
3742
407aceb4 3743 * kern/env.c (grub_register_variable_hook): Don't copy empty
3744 string, it leaks memory. Pass "" to grub_env_set(), it should
3745 handle constant strings.
3746
e4e8eaa5 3747 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3748 * commands/cmp.c (grub_cmd_cmp): Likewise.
3749 * kern/dl.c (grub_dl_flush_cache): Likewise.
3750 (grub_dl_load_core): Likewise.
3751 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3752 (grub_elf64_load_phdrs): Likewise.
3753
d4e2dad3 37542008-07-13 Pavel Roskin <proski@gnu.org>
3755
3756 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3757 between signed and unsigned.
3758 (LzmaEnc_Finish): Fix warning about an unused parameter.
3759
aa24b516 37602008-07-13 Bean <bean123ch@gmail.com>
3761
3762 * Makefile.in (enable_lzo): New rule.
3763
3764 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3765
3766 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3767
3768 * boot/i386/pc/lnxboot.S: #include <config.h>.
3769
3770 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 3771 its value according to the compression algorithm used, lzo or lzma.
aa24b516 3772
3773 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3774 compression algorithm according to configure macro.
3775
3776 * kern/i386/pc/startup.S (codestart): Likewise.
3777
3778 * kern/i386/pc/lzma_decode.S: New file.
3779
3780 * include/grub/lib/LzFind.h: Likewise.
3781
3782 * include/grub/lib/LzHash.h: Likewise.
3783
3784 * include/grub/lib/LzmaDec.h: Likewise.
3785
3786 * include/grub/lib/LzmaEnc.h: Likewise.
3787
3788 * include/grub/lib/LzmaTypes.h: Likewise.
3789
3790 * lib/LzFind.c: Likewise.
3791
3792 * lib/LzmaDec.c: Likewise.
3793
3794 * lib/LzmaEnc.c: Likewise.
3795
4ae821ac 37962008-07-13 Bean <bean123ch@gmail.com>
3797
3798 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3799 (grub_ext4_extent_header): New structure.
3800 (grub_ext4_extent): Likewise.
3801 (grub_ext4_extent_idx): Likewise.
3802 (grub_ext4_find_leaf): New function.
3803 (grub_ext2_read_block): Handle extents.
3804
9a745147 38052008-07-12 Robert Millan <rmh@aybabtu.com>
3806
3807 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3808
d49a4cf6 38092008-07-11 Robert Millan <rmh@aybabtu.com>
3810
3811 * util/grub.d/40_custom.in: New file. Example on how to add custom
3812 entries to /etc/grub.d.
3813 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3814 40_custom (implicitly, by merging all the grub.d rules).
3815
947414b4 38162008-07-11 Pavel Roskin <proski@gnu.org>
3817
0059cf6f 3818 * commands/read.c (grub_getline): Fix invalid memory access.
3819 Don't add newline to the variable value.
3820
947414b4 3821 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3822 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3823 (serial_hw_get_port): Check validity of the port number.
3824 (grub_cmd_serial): Check return value of serial_hw_get_port().
3825
62a02d00 38262008-07-07 Pavel Roskin <proski@gnu.org>
3827
3828 * boot/i386/pc/diskboot.S (notification_string): Replace
3829 "Loading kernel" with just "loading". This is shorter, less
3830 confusing and saves a few bytes for possible future changes.
3831
3e5581b0 38322008-07-05 Pavel Roskin <proski@gnu.org>
3833
ea387a48 3834 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3835 size for ATAPI devices, they are undefined. Output sector
3836 number in decimal form.
3837
3e5581b0 3838 * disk/ata.c: Use named constants for status bits.
3839
fdecb8fd 38402008-07-04 Pavel Roskin <proski@gnu.org>
3841
bcd35b90 3842 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3843 grub_addr_t before casting it to the void pointer to fix a
3844 warning. Non-addressable regions are discarded earlier.
3845 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3846 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3847 (check_signature): Don't shadow table_header.
3848 (grub_linuxbios_table_iterate): Cast numeric constants to
3849 grub_linuxbios_table_header_t.
3850 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3851 grub_stop().
3852
af58ab3d 3853 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3854 prevent warnings.
3855
1759aa57 3856 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3857 pointer, which can cause warnings. Support 64-bit addresses.
3858
fdecb8fd 3859 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3860 of sizeof(long). This fixes PowerPC image generation on x86_64.
3861
8516d2a8 38622008-07-04 Robert Millan <rmh@aybabtu.com>
3863
3864 This fixes a performance issue when pc & gpt partmap iterators
3865 didn't abort iteration even after our hook found what it was
fe987087 3866 looking for (often causing expensive probes of non-existent drives).
8516d2a8 3867
3868 Some callers relied on previous buggy behaviour, since they would
34c44600 3869 raise an error when their own hooks caused early abortion of its
8516d2a8 3870 iteration.
3871
3872 * kern/device.c (grub_device_open): Improve error message.
3873 * disk/lvm.c (grub_lvm_open): Likewise.
3874 * disk/raid.c (grub_raid_open): Likewise.
3875
3876 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3877 when hook requests it, independently of grub_errno.
3878 (pc_partition_map_probe): Do not fail when find_func() caused
3879 early abortion of pc_partition_map_iterate().
3880
3881 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3882 when hook requests it, independently of grub_errno.
3883 (gpt_partition_map_probe): Do not fail when find_func() caused
3884 early abortion of gpt_partition_map_iterate().
3885
3886 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3887 when hook requests it, independently of grub_errno. Do not fail when
3888 part_map_iterate_hook() caused early abortion of p->iterate().
3889
3890 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3891 when grub_partition_iterate() returned with non-zero.
3892
277d0de9 38932008-07-03 Pavel Roskin <proski@gnu.org>
3894
3895 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3896 like we do in grub_ata_pio_read().
3897 (grub_ata_readwrite): Always write individual sectors. Fix the
3898 sector count for the remainder.
3899 (grub_ata_write): Enable writing to ATA devices. Correctly
3900 report error for ATAPI devices.
3901
d4c9b428 39022008-07-02 Pavel Roskin <proski@gnu.org>
3903
e43fc690 3904 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3905 warning.
3906
f707af42 3907 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3908 for every read sector, we already increment it for the whole
3909 batch. This fixes reading more than 256 sectors at once.
3910
11e16b15 3911 * util/grub-editenv.c (cmd_info): Cast argument to long
3912 explicitly. ptrdiff_t reduces to int on i386.
3913
cbabfdd4 3914 * util/grub-editenv.c (main): Be specific which parameter is
3915 missing.
3916
b8fbce0a 3917 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3918 (memdisk): Make memdisk_orig_addr a pointer.
3919
c9c8e606 3920 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3921 for file offsets, use grub_off_t instead. Fix printf format
3922 warnings.
3923
ca62e598 3924 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3925 there. Real unexpected warnings should not drown in the noise
3926 about known problems.
3927
ce8d1766 3928 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3929 grub_disk_addr_t for memory addresses.
3930
00c7a56a 3931 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3932 explicitly to fix a warning.
3933
08d3ef09 3934 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3935
cb71ba20 3936 * Makefile.in (MODULE_LDFLAGS): New variable.
3937 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3938 the linker accepts --build-id=none.
3939 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3940 MODULE_LDFLAGS.
3941 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3942
d4c9b428 3943 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3944 those in Linux XFS code. Provide a way to access 64-bit parent
3945 inode.
3946 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3947 the end of struct grub_xfs_dir_header.
3948
d4156eee 39492008-07-02 Bean <bean123ch@gmail.com>
3950
3951 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3952 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3953 and GRUB_IEEE1275_FLAG_NO_ANSI.
3954
3955 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3956 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3957 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3958
3959 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3960 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3961
3962 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3963 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3964
3965 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3966 esc sequence on non ANSI terminal.
3967 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3968
3969 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3970 beginning of file.
3971
2270f77b 39722008-07-02 Bean <bean123ch@gmail.com>
3973
3974 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3975 (grub_editenv_SOURCES): New variable.
3976 (pkglib_MODULES): Add loadenv.mod.
3977 (loadenv_mod_SOURCES): New variable.
3978 (loadenv_mod_CFLAGS): Likewise.
3979 (loadenv_mod_LDFLAGS): Likewise.
3980
3981 * include/grub/envblk.h: New file.
3982
3983 * util/envblk.c: New file.
3984
3985 * util/grub-editenv.c: New file.
3986
3987 * commands/loadenv.c: New file.
3988
0e9e51ec 39892008-07-01 Pavel Roskin <proski@gnu.org>
3990
d89b7634 3991 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3992 not unsigned char. This fixes warnings and is consistent with
3993 other tags.
3994
bf1835b1 3995 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3996
8222a04b 3997 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3998
6a42d99d 3999 * term/tparm.c (analyze): Always set *popcount.
4000
10b159d1 4001 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4002 cast to fix a warning.
4003
b8789f6c 4004 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4005 cast to suppress a warning.
4006
29d7e38a 4007 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4008 grub_fshelp_read_file() expects.
4009
f341f669 4010 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4011 write uuid as a 32-bit value in CPU byte order, so declare and
4012 use it as such.
4013
0e9e51ec 4014 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4015 long if the format specifier expects it.
4016 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4017 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4018 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4019 long to fix a warning.
4020 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4021 grub_dprintf() arguments to fix warnings.
4022
3aefa857 40232008-06-30 Pavel Roskin <proski@gnu.org>
4024
56c7668b 4025 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4026 install_bsd_part immediately before core.img is embedded or
4027 modified on disk. This fixes core.img verification if core.img
4028 cannot be embedded.
4029
3aefa857 4030 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4031 core_path to calculate the blocklist.
4032 Patch from Javier Martín <lordhabbit@gmail.com>
4033
5444088d 40342008-06-29 Robert Millan <rmh@aybabtu.com>
4035
4036 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4037 block to disk block.
4038 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4039 Patch from Niels Böhm <bitbucket@arcor.de>
4040
674835c8 40412008-06-29 Robert Millan <rmh@aybabtu.com>
4042
4043 * util/update-grub_lib.in (font_path): Search for fonts in
4044 /boot/grub first, which is more likely to be readable (we aren't
4045 deciding where fonts live, just looking for them).
4046
f527dbc8 40472008-06-26 Pavel Roskin <proski@gnu.org>
4048
6c2d8df6 4049 * util/biosdisk.c (read_device_map): Don't leave dead map
4050 entries for devices failing stat() check.
4051
f527dbc8 4052 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4053 core_path_dev for the core.img path on the target device.
4054
aebe3d13 40552008-06-26 Robert Millan <rmh@aybabtu.com>
4056
4057 * disk/fs_uuid.c: New file.
4058 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4059 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4060 (fs_uuid_mod_LDFLAGS): New variables.
4061 * include/grub/disk.h (grub_disk_dev_id): Add
4062 `GRUB_DISK_DEVICE_UUID_ID'.
4063 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4064 implement iterate().
4065
37aaf354 40662008-06-26 Robert Millan <rmh@aybabtu.com>
4067
4068 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4069 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4070 Linux image includes no initrd.
4071
25ff262a 40722008-06-21 Javier Martín <lordhabbit@gmail.com>
4073
4074 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4075 call to resolve the core image location that effectively appended the
4076 name twice.
4077
76a2bd44 40782008-06-21 Robert Millan <rmh@aybabtu.com>
4079
4080 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4081 call from here ...
4082
4083 * util/grub.d/10_hurd.in: ... to here ...
4084 * util/grub.d/10_linux.in: ... and here.
4085
650e1c79 40862008-06-19 Robert Millan <rmh@aybabtu.com>
4087
fe987087 4088 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 4089 after it has been set by grub_machine_set_prefix().
4090
6ce63911 40912008-06-19 Robert Millan <rmh@aybabtu.com>
4092
4093 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4094 search result when not saving to variable, not the other way around.
4095 When saving to variable, abort iteration as soon as a match is found.
4096
73940cec 40972008-06-19 Robert Millan <rmh@aybabtu.com>
4098
4099 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4100 check for partition that provides /boot/grub. Its logic is flawed,
4101 as it prevents prepare_grub_to_access_device() from being called
4102 multiple times.
4103
3c62a39d 41042008-06-19 Robert Millan <rmh@aybabtu.com>
4105
4106 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4107 "insmod" command directly when abstraction modules are needed,
fe987087 4108 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 4109 since it had already been processed).
4110
47395a42 41112008-06-19 Pavel Roskin <proski@gnu.org>
4112
4113 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4114 changed. This is needed in case GRUB_LIBDIR changes.
4115 * conf/i386-ieee1275.rmk: Likewise.
4116 * conf/i386-linuxbios.rmk: Likewise.
4117 * conf/i386-pc.rmk: Likewise.
4118 * conf/powerpc-ieee1275.rmk: Likewise.
4119
a145ac2d 41202008-06-18 Pavel Roskin <proski@gnu.org>
4121
4122 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4123 kernel_elf_symlist.c to symlist.c for consistency with other
4124 architectures. Update all users.
4125 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4126
7847c51e 41272008-06-18 Robert Millan <rmh@aybabtu.com>
4128
4129 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4130 it in prefix.
4131
4132 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4133 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4134 a RAID device, run setup() for all members independently on whether
4135 LVM abstraction is being used.
4136 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4137 If grub-mkimage has set `*install_dos_part == -2', don't override this
4138 value.
4139 Perform *install_dos_part adjustments independently on whether
4140 we're embedding or not.
4141 Clarify error message when image is too big for embedding.
4142 Remove duplicate *install_dos_part stanza.
4143
b23e5644 41442008-06-17 Robert Millan <rmh@aybabtu.com>
4145
4146 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4147 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4148 variables.
4149 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4150 values in grub_ofconsole_normal_color and
4151 grub_ofconsole_highlight_color (they're not directly related to
4152 background and foreground).
4153 (grub_ofconsole_setcolorstate): Extract background and foreground
4154 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4155
0aac2f79 41562008-06-17 Robert Millan <rmh@aybabtu.com>
4157
4158 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4159 /boot/grub for the check in last commit, not /boot (they could be
4160 different partitions).
4161
3cca7ef3 41622008-06-16 Robert Millan <rmh@aybabtu.com>
4163
4164 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4165 asked to setup access for the same partition that provides /boot,
4166 don't bother using UUIDs since our root already has the value we
4167 want.
4168
347396d8 41692008-06-16 Robert Millan <rmh@aybabtu.com>
4170
4171 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4172 I2O devices.
4173 Patch from Sven Mueller <sven@debian.org>.
4174
991477f8 41752008-06-16 Robert Millan <rmh@aybabtu.com>
4176
4177 * util/update-grub.in: Check for $EUID instead of $UID.
4178 Reported by Vincent Zweije.
4179
d31a32a1 41802008-06-16 Bean <bean123ch@gmail.com>
4181
fe987087 4182 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 4183 (grub_ext2_read_block): Likewise.
4184 (grub_ext2_read_inode): Likewise.
4185 (grub_ext2_mount): Likewise.
4186 (grub_ext2_close): Likewise.
4187 (grub_ext3_get_journal): Removed.
4188
fe987087 4189 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 4190 (grub_reiserfs_read_symlink): Likewise.
4191 (grub_reiserfs_mount): Likewise.
4192 (grub_reiserfs_open): Likewise.
4193 (grub_reiserfs_read): Likewise.
4194 (grub_reiserfs_close): Likewise.
4195 (grub_reiserfs_get_journal): Removed.
4196
4197 * fs/fshelp.c (grub_fshelp_read): Removed.
4198 (grub_fshelp_map_block): Likewise.
4199
4200 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4201 (grub_fshelp_journal): Likewise.
4202 (grub_fshelp_read): Likewise.
4203 (grub_fshelp_map_block): Likewise.
4204
3540a760 42052008-06-16 Pavel Roskin <proski@gnu.org>
4206
4207 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4208 floating point anymore.
4209 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4210
95614c84 42112008-06-15 Pavel Roskin <proski@gnu.org>
4212
4213 * commands/ls.c (grub_ls_list_files): Use integer calculations
4214 for human readable format, avoid floating point use.
4215 * kern/misc.c (grub_ftoa): Remove.
4216 (grub_vsprintf): Remove floating point support.
4217
50465dd6 42182008-06-15 Robert Millan <rmh@aybabtu.com>
4219
fe6b695a 4220 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 4221 devices.
4222 Reported by Max Vozeler.
4223
a9207284 42242008-06-15 Robert Millan <rmh@aybabtu.com>
4225
4226 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4227 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4228 skipped later.
4229 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4230 the beginning of the prefix.
4231
4232 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4233 It is assumed that if we have a memdisk, grub-mkimage has set
4234 grub_prefix to include the "(memdisk)" drive in it.
4235
a7cbd45a 42362008-06-15 Robert Millan <rmh@aybabtu.com>
4237
4238 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4239 Initialize keyboard controller after registering the terminal, so that
4240 grub_printf() can be called from grub_keyboard_controller_init().
4241
21cf716a 42422008-06-15 Robert Millan <rmh@aybabtu.com>
4243
4244 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4245 extent-btree which is written as big endian on disk.
4246 Reported by Alain Greppin <al@chilibi.org>.
4247
23a64d8e 42482008-06-14 Robert Millan <rmh@aybabtu.com>
4249
4250 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4251 * util/i386/pc/grub-install.in (modules): Likewise.
4252
d687651c 42532008-06-13 Pavel Roskin <proski@gnu.org>
4254
4255 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4256
dfe9ddd4 42572008-06-13 Bean <bean123ch@gmail.com>
4258
4259 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4260
4261 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4262
4263 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4264 to indicate sparse block.
4265
16ae7781 42662008-06-12 Pavel Roskin <proski@gnu.org>
4267
e6d1a308 4268 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4269 number, grub_fshelp_read() does it for us.
4270
16ae7781 4271 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4272 linear disk read with journal translation.
4273 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4274 * include/grub/fshelp.h: Declare grub_fshelp_read().
4275
40fd3a2b 42762008-06-09 Pavel Roskin <proski@gnu.org>
4277
4278 * fs/minix.c (grub_minix_mount): Handle error reading
4279 superblock.
4280
f5679726 42812008-06-08 Robert Millan <rmh@aybabtu.com>
4282
4283 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4284 don't append the RAID prefix afterwards.
4285 Reported by Clint Adams.
4286
ce525529 42872008-06-08 Robert Millan <rmh@aybabtu.com>
4288
4289 Based on description from Pavel:
4290 * kern/disk.c (grub_disk_check_range): Rename to ...
4291 (grub_disk_adjust_range): ... this. Add a comment explaining the
4292 tasks performed by this function.
4293
ad4936a0 42942008-06-08 Robert Millan <rmh@aybabtu.com>
4295
4296 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4297 `num_serial' (for consistency with other variables).
4298 (struct grub_ntfs_data): Add `uuid' member.
4299 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4300 (grub_ntfs_uuid): New function.
4301 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4302
dc20b0f9 43032008-06-07 Pavel Roskin <proski@gnu.org>
4304
4305 * util/biosdisk.c (open_device): Revert last change to the
4306 function, it broke installation. The sector needs to be
4307 different dependent on which device is opened.
4308
c5e3cfba 43092008-06-06 Robert Millan <rmh@aybabtu.com>
4310
4311 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4312 rest of GRUB, and breakage doesn't happen if its value were modified.
4313
4314 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4315 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4316 a constant (same value).
4317 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4318 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4319
26a1f8c4 43202008-06-06 Robert Millan <rmh@aybabtu.com>
4321
4322 * util/biosdisk.c (open_device): Do not modify sector offset when
4323 accessing a partition. kern/disk.c already handles this for us.
4324
25d6b327 43252008-06-06 Robert Millan <rmh@aybabtu.com>
4326
4327 * util/grub-emu.c (grub_machine_init): Move code in this function from
4328 here ...
4329 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4330 segfault in case grub_printf() is called).
4331
4332 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4333 grub_probe. Update all users not to explicitly add it again.
4334 (grub_device): New variable; contains corresponding device for grubdir.
4335 (fs_module, partmap_module, devabstraction_module): Pass
4336 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4337 every time.
4338
9ece62fb 43392008-06-05 Robert Millan <rmh@aybabtu.com>
4340
4341 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4342 is found, print it (same layout as with labels).
4343
1ad36d37 43442008-06-04 Robert Millan <rmh@aybabtu.com>
4345
4346 * util/biosdisk.c (get_drive): Rename to ...
4347 (find_grub_drive): ... this. Update all users.
4348
4349 (get_os_disk): Rename to ...
4350 (convert_system_partition_to_system_disk): ... this. Update all users.
4351
4352 (find_drive): Rename to ...
4353 (find_system_device): ... this. Update all users.
4354
e6a30859 43552008-06-04 Robert Millan <rmh@aybabtu.com>
4356
4357 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4358 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4359 (make_device_map): Likewise.
4360
00c108a4 43612008-06-01 Robert Millan <rmh@aybabtu.com>
4362
4363 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4364 before dereferencing it.
4365
4366 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4367 union with fat12/fat16-specific ones. Add some new fields, including
4368 `num_serial' for both versions.
4369 (struct grub_fat_data): Add `uuid' member.
4370 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4371 names. Initialize `data->uuid' using `num_serial'.
4372 (grub_fat_uuid): New function.
4373 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4374
4375 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4376 (grub_reiserfs_uuid): New function.
4377 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4378 member.
4379
4380 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4381 (grub_xfs_uuid): New function.
4382 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4383
1385c5bb 43842008-06-01 Robert Millan <rmh@aybabtu.com>
4385
4386 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4387 code that is backward compatible with pre-uuid search command.
4388
c682dfd7 43892008-05-31 Robert Millan <rmh@aybabtu.com>
4390
4391 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4392 floppies after everything else, to ensure floppy drive isn't accessed
4393 unnecessarily (patch from Bean).
4394
b7db5d47 43952008-05-31 Robert Millan <rmh@aybabtu.com>
4396
4397 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4398 not print device names when we were asked to set a variable.
4399
6e037aa9 44002008-05-31 Robert Millan <rmh@aybabtu.com>
4401
4402 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4403 using "cursor-on" and "cursor-off" commands (understood at least by
4404 the Open Firmware flavour on OLPC).
4405
41305bc8 44062008-05-31 Michael Gorven <michael@gorven.za.net>
4407
4408 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4409 on and off sequences.
4410
69ba137e 44112008-05-31 Robert Millan <rmh@aybabtu.com>
4412
4413 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4414 * util/update-grub.in: Likewise.
4415
520ae21b 44162008-05-30 Pavel Roskin <proski@gnu.org>
4417
4418 * util/biosdisk.c (linux_find_partition): Simplify logic and
4419 make the code more universal. Keep special processing for
4420 devfs, but use a simple rule for all other devices. If the
4421 device ends with a number, append 'p' and the partition number.
4422 Otherwise, append only the partition number.
4423
5786569b 44242008-05-30 Robert Millan <rmh@aybabtu.com>
4425
4426 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4427 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4428 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4429 the `root' parameter to Linux.
4430
51500452 44312008-05-30 Robert Millan <rmh@aybabtu.com>
4432
4433 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4434 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4435 --fs_uuid with --fs-uuid.
4436 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4437 all filesystems support them).
4438
811d3878 44392008-05-30 Robert Millan <rmh@aybabtu.com>
4440
4441 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 4442 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 4443
cab63c95 44442008-05-30 Robert Millan <rmh@aybabtu.com>
4445
4446 * util/grub.d/00_header.in: Remove obsolete comment referencing
4447 convert_system_path_to_grub_path().
4448 * util/update-grub.in: Likewise.
4449 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4450 (convert_system_path_to_grub_path): Add a warning message explaining
4451 that this function is deprecated. Rely on is_path_readable_by_grub()
4452 for the readability checks.
4453 (font_path): Use is_path_readable_by_grub() for the readability
4454 check rather than convert_system_path_to_grub_path().
4455
972e2f7a 44562008-05-30 Robert Millan <rmh@aybabtu.com>
4457
4458 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4459 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4460 converting it first.
4461 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4462 grub.cfg for access to font file, and afterwards call it again to set
4463 the root device.
4464
62191274 44652008-05-30 Robert Millan <rmh@aybabtu.com>
4466
4467 * commands/search.c (options): Add --fs_uuid option.
4468 (search_fs_uuid): New function.
4469 (grub_cmd_search): Fix --set argument passing.
4470 Use search_fs_uuid() when requested via --fs_uuid.
4471 (grub_search_init): Update help message.
4472 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4473 and redeclare it as an array of 16-bit words.
4474 (grub_ext2_uuid): New function.
4475 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4476 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4477 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4478 (GRUB_DEVICE_BOOT_UUID): New variables.
4479 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4480 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4481 whenever possible.
4482 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4483 just assume `root' variable has the right value.
4484 * util/grub.d/10_linux.in: Likewise.
4485 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4486 via PRINT_FS_UUID.
4487 (main): Recognise `-t fs_uuid' argument.
4488
01b73ec8 44892008-05-30 Robert Millan <rmh@aybabtu.com>
4490
4491 * util/biosdisk.c (map): Redefine structure to hold information
4492 about GRUB drive name.
fe6b695a 4493 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 4494 drive names.
4495 (call_hook): Remove.
4496 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4497 member. Assume drive has partitions.
4498 (grub_util_biosdisk_open): Access device names via `.device' struct
4499 member.
4500 (open_device): Likewise.
4501 (find_drive): Likewise.
4502 (read_device_map): Adjust map[] usage to match the new struct
4503 definition. Don't check for duplicates (still possible, but not cheap
4504 anymore).
4505 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4506 (make_device_name): Remove assumption of BIOS-like drive names.
4507
22f16596 45082008-05-30 Pavel Roskin <proski@gnu.org>
4509
4510 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4511 compiling execute.c doesn't need grub_script.tab.h anymore.
4512 (normal/command.c_DEPENDENCIES): Likewise.
4513 (normal/function.c_DEPENDENCIES): Likewise.
4514 * conf/i386-ieee1275.rmk: Likewise.
4515 * conf/i386-linuxbios.rmk: Likewise.
4516 * conf/i386-pc.rmk: Likewise.
4517 * conf/powerpc-ieee1275.rmk: Likewise.
4518 * conf/sparc64-ieee1275.rmk: Likewise.
4519
528ad8f2 45202008-05-29 Pavel Roskin <proski@gnu.org>
4521
d1dff95d 4522 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4523 when scanning metadata for volume group name.
4524
528ad8f2 4525 * include/grub/script.h: Don't include grub_script.tab.h. It's
4526 a generated file, which may only be included from the files with
4527 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4528 use union YYSTYPE, as the later allows forward declaration.
4529 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4530
47248e08 45312008-05-29 Robert Millan <rmh@aybabtu.com>
4532
4533 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4534 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4535 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4536 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4537 scan codes.
4538
ee632529 45392008-05-29 Robert Millan <rmh@aybabtu.com>
4540
4541 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4542 control key combinations.
4543
eee96e08 45442008-05-29 Robert Millan <rmh@aybabtu.com>
4545
4546 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4547 * util/ieee1275/grub-install.in: ... to here.
4548 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4549 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4550 (grub_install_SOURCES): Likewise.
4551
da9a6a94 45522008-05-29 Robert Millan <rmh@aybabtu.com>
4553
4554 * fs/affs.c: Update copyright year.
4555 * fs/ext2.c: Likewise.
4556 * fs/fshelp.c: Likewise.
4557 * fs/hfsplus.c: Likewise.
4558 * fs/ntfs.c: Likewise.
4559 * fs/xfs.c: Likewise.
4560 * include/grub/fshelp.h: Likewise.
4561 * util/grub-mkdevicemap.c: Likewise.
4562
12e65f3a 45632008-05-28 Robert Millan <rmh@aybabtu.com>
4564
4565 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4566 might need to be fatfs to support some firmware implementations
4567 (e.g. OFW or EFI).
4568
23023641 45692008-05-28 Robert Millan <rmh@aybabtu.com>
4570
4571 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4572 devices.
4573 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4574 (make_device_map): Likewise.
4575
887d2619 45762008-05-20 Bean <bean123ch@gmail.com>
4577
4578 * fs/fshelp.c (grub_fshelp_map_block): New function.
4579 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4580 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4581
4582 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4583 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4584 (grub_fshelp_journal): New structure.
4585 (grub_fshelp_map_block): New function prototype.
4586 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4587 (grub_fshelp_map_block): Likewise.
4588
4589 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4590 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4591 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4592 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4593 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4594 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4595 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4596 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4597 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4598 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4599 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4600 (grub_ext2_sblock): New members for journal support.
4601 (grub_ext3_journal_header): New structure.
4602 (grub_ext3_journal_revoke_header): Likewise.
4603 (grub_ext3_journal_block_tag): Likewise.
4604 (grub_ext3_journal_sblock): Likewise.
4605 (grub_fshelp_node): New members logfile and journal.
4606 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4607 grub_fshelp_map_block to get real block number.
4608 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4609 number.
4610 (grub_ext2_read_inode): Likewise.
4611 (grub_ext3_get_journal): New function.
4612 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4613 (grub_ext2_close): Release memory used by journal.
4614
4615 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4616 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4617 (grub_reiserfs_transaction_header): Renamed to
4618 grub_reiserfs_description_block, replace field data with real_blocks.
4619 (grub_reiserfs_commit_block): New structure.
4620 (grub_reiserfs_data): New member journal.
4621 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4622 number.
4623 (grub_reiserfs_read_symlink): Likewise.
4624 (grub_reiserfs_iterate_dir): Likewise.
4625 (grub_reiserfs_open): Likewise.
4626 (grub_reiserfs_read): Likewise.
4627 (grub_reiserfs_get_journal): New function.
4628 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4629 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4630 using grub_reiserfs_get_journal.
4631 (grub_reiserfs_close): Release memory used by journal.
4632
4633 * fs/affs.c (grub_affs_read_block): Change block type to
4634 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4635
4636 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4637
4638 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4639
4640 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4641
4642 * fs/udf.c (grub_udf_read_block): Change block type to
4643 grub_disk_addr_t. Use type cast to avoid warning.
4644
4645 * fs/xfs.c (grub_xfs_read_block): Likewise.
4646
b7c6bed5 46472008-05-16 Christian Franke <franke@computer.org>
4648
4649 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4650 to ensure that break with ESC will always work.
4651 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4652 Remove ESC from keyboard queue.
4653
eedf167f 46542008-05-16 Christian Franke <franke@computer.org>
4655
4656 * util/biosdisk.c: [__CYGWIN__] Add includes.
4657 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4658 (get_os_disk): Move variable declarations to OS specific
4659 parts to avoid warning.
4660 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4661 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4662 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4663 Cygwin.
4664 * util/getroot.c: [__CYGWIN__] Add includes.
4665 (strip_extra_slashes): Fix "/" case.
4666 [__CYGWIN__] (get_win32_path): New function.
4667 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4668 [__CYGWIN__] (find_root_device): Disable.
4669 [__CYGWIN__] (get_bootsec_serial): New function.
4670 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4671 [__linux__] (grub_guess_root_device): Add early returns to simplify
4672 structure.
4673 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4674 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4675 check for Linux only.
4676
a079699e 46772008-05-15 Bean <bean123ch@gmail.com>
4678
4679 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4680 keyboard hang problem in apple's intel mac.
4681
1cf4059a 46822008-05-09 Robert Millan <rmh@aybabtu.com>
4683
4684 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4685 devices.
4686 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4687 (make_device_map): Likewise.
4688 Reported by Aurelien Jarno <aurel32@debian.org>
4689
ed759390 46902008-05-07 Ian Campbell <ijc@hellion.org.uk>
4691
4692 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4693 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4694 (make_device_map): Output entries for xvd type disks.
4695
b56c4eaa 46962008-05-07 Robert Millan <rmh@aybabtu.com>
4697
4698 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4699 devices.
4700 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4701 (make_device_map): Likewise.
4702 Reported by Roland Dreier <rdreier@cisco.com>
4703
7f8866ed 47042008-05-07 Robert Millan <rmh@aybabtu.com>
4705
4706 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4707 grub_strstr() call. Correct a few mistakes in failure path handling.
4708
b0346e0f 47092008-05-06 Robert Millan <rmh@aybabtu.com>
4710
4711 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4712 Do not print a trailing slash (therefore, the root directory is an
4713 empty string).
4714 (convert_system_path_to_grub_path): Do not remove trailing slash
4715 from make_system_path_relative_to_its_root() output.
4716
4717 * util/i386/pc/grub-install.in: Add trailing slash to output from
4718 make_system_path_relative_to_its_root().
4719
6cf12cbd 47202008-05-06 Robert Millan <rmh@aybabtu.com>
4721
4722 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4723 ensures that output lines aren't intermangled with those sent to
4724 stderr (via grub_util_info()).
4725 * util/grub-probe.c (grub_refresh): Likewise.
4726 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4727
0fbb3117 47282008-05-05 Christian Franke <franke@computer.org>
4729
4730 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4731 Add Cygwin device names.
4732 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4733 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4734 (check_device): Return error instead of success on empty name.
4735 (make_device_map): Move label inside linux specific code to
4736 prevent compiler warning.
4737
8124cdb7 47382008-04-30 Robert Millan <rmh@aybabtu.com>
4739
4740 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4741 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4742 first boot option.
4743 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4744
094c01d0 47452008-04-29 Robert Millan <rmh@aybabtu.com>
4746
4747 * docs/grub.cfg: New file (example GRUB configuration).
4748
f4b1fc02 47492008-04-26 Robert Millan <rmh@aybabtu.com>
4750
329ce2a5 4751 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4752 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4753 and `disk/ieee1275/nand.c'.
f4b1fc02 4754
25f16ec1 47552008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 4756
25f16ec1 4757 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4758 i386-linuxbios.
4759
4760 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4761 change the buffer size to 4096 for cdrom device.
4762
4763 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4764 and nand.mod.
4765 (_linux_mod_SOURCES): New variable.
4766 (_linux_mod_CFLAGS): Likewise.
4767 (_linux_mod_LDFLAGS): Likewise.
4768 (linux_mod_SOURCES): Likewise.
4769 (linux_mod_CFLAGS): Likewise.
4770 (linux_mod_LDFLAGS): Likewise.
4771 (nand_mod_SOURCES): Likewise.
4772 (nand_mod_CFLAGS): Likewise.
4773 (nand_mod_LDFLAGS): Likewise.
4774
4775 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4776 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4777 type property. (nand device in olpc don't have this property)
4778
4779 * include/grub/disk.h (grub_disk_dev_id): New macro
4780 GRUB_DISK_DEVICE_NAND_ID.
4781
4782 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4783 function prototype.
4784 (grub_rescue_cmd_initrd): Likewise.
4785
4786 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4787 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4788 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 4789
25f16ec1 4790 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4791 GRUB_MACHINE_IEEE1275 is defined.
4792
4793 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4794 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4795
4796 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4797 on nested function heap_init.
4798 (grub_upper_mem): New variable for i386-ieee1275.
4799 (grub_get_extended_memory): New function for i386-ieee1275.
4800 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4801
4802 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4803 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4804 property.
f19dbdb7 4805
25f16ec1 4806 * loader/i386/ieee1275/linux.c: New file.
4807
4808 * loader/i386/ieee1275/linux_normal.c: New file.
4809
4810 * disk/ieee1275/nand.c: New file.
4811
e89d61e9 48122008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4813
4814 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4815 value.
4816 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4817
602566f6 48182008-04-18 Robert Millan <rmh@aybabtu.com>
4819
4820 Restructures early code path on ieee1275 to unify grub_main() as
4821 the first C function that is executed in every platform.
4822
4823 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4824 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4825 cmain().
4826 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4827 * kern/ieee1275/cmain.c (cmain): Rename to ...
4828 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4829 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4830 at the beginning.
4831
57490c2b 48322008-04-18 Robert Millan <rmh@aybabtu.com>
4833
4834 * util/update-grub.in: Fix syntax error when setting
4835 `GRUB_PRELOAD_MODULES'.
4836 Reported by Stephane Chazelas <stephane@artesyncp.com>
4837
1977517d 48382008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4839
4840 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4841 section into account, newer toolchains generate unique build ids
4842 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 4843 we want build ids to be preserved
1977517d 4844 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4845 far from other sections don't cause the raw binary images grow
4846 size
4847
bfb1f1a2 48482008-04-15 Robert Millan <rmh@aybabtu.com>
4849
4850 * disk/lvm.c: Update copyright year.
4851 * kern/misc.c: Likewise.
4852
01979850 48532008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4854
4855 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 4856 there is no memory left for physical volume name.
01979850 4857
0a1150e2 48582008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4859
4860 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4861 volume name mapping to support bigger than 9 character names properly.
4862
82ead3fe 48632008-04-13 Robert Millan <rmh@aybabtu.com>
4864
4865 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4866 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4867
e54a72f5 48682008-04-13 Christian Franke <franke@computer.org>
4869
4870 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4871 to create a floppy emulation boot CD when non emulation mode
4872 does not work.
4873 Enable Joliet CD filesystem extension.
4874
9fe86034 48752008-04-13 Robert Millan <rmh@aybabtu.com>
4876
4877 * kern/misc.c (grub_strncat): Fix off-by-one error.
4878 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4879
4880 * kern/env.c (grub_env_context_close): Clear current context, not
4881 previous one.
4882 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4883
4884 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4885
7ceeee39 48862008-04-13 Robert Millan <rmh@aybabtu.com>
4887
4888 Improve robustness when handling LVM.
4889
4890 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 4891 (and leave `*p' unmodified).
7ceeee39 4892 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4893 through it.
4894 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4895 iterating through it.
4896 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4897 through it.
fe6b695a 4898 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 4899 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4900 Don't assume `vg->pvs != NULL' when iterating through it.
4901
58cd3d85 49022008-04-13 Robert Millan <rmh@aybabtu.com>
4903
4904 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4905 * genmk.rb (partmap): New variable.
4906 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4907 (#{partmap}): New target rule.
4908 * genpartmaplist.sh: New file.
4909 * Makefile.in (pkglib_DATA): Add partmap.lst.
4910 (partmap.lst): New target rule.
4911 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4912 modules (including all partition maps), instead of preloading them.
4913
78b51059 49142007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4915
4916 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4917 `linux-boot-prober' (if installed) to detect other operating
4918 systems which are installed on the computer and add them to
4919 the boot menu.
4920 * conf/common.rmk: Build and install 30_os-prober.
4921
a91627b4 49222008-04-12 Robert Millan <rmh@aybabtu.com>
4923
4924 * kern/powerpc/ieee1275/init.c: Move from here ...
4925 * kern/ieee1275/init.c: ... to here. Update all users.
4926
4927 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4928 * kern/ieee1275/cmain.c: ... to here. Update all users.
4929
4930 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4931 * kern/ieee1275/openfw.c: ... to here. Update all users.
4932
4933 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4934 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4935
322562ea 49362008-04-10 Pavel Roskin <proski@gnu.org>
4937
4938 * configure.ac: Always use "_cv_" in cache variables for
4939 compatibility with Autoconf 2.62.
4940
a02a73c5 49412008-04-07 Robert Millan <rmh@aybabtu.com>
4942
4943 Revert grub/machine/init.h addition by Pavel (since it breaks on
4944 i386-ieee1275 and others):
4945 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4946 * util/powerpc/ieee1275/misc.c: Likewise.
4947
25c024b1 49482008-04-07 Robert Millan <rmh@aybabtu.com>
4949
4950 * util/grub-probe.c (probe): Improve error message.
4951
3cbd2f98 49522008-04-07 Robert Millan <rmh@aybabtu.com>
4953
4954 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4955 (this prevents the presence of a bogus entry from ruining the whole
4956 thing).
4957
87a297bf 49582008-04-06 Pavel Roskin <proski@gnu.org>
4959
36747a62 4960 * util/biosdisk.c: Include grub/util/biosdisk.h.
4961 * util/grub-fstest.c (execute_command): Make static.
4962 * util/grub-mkdevicemap.c (check_device): Likewise.
4963 * util/i386/pc/misc.c: Include grub/machine/init.h.
4964 * util/powerpc/ieee1275/misc.c: Likewise.
4965 * util/lvm.c: Include grub/util/lvm.h.
4966 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4967 grub/cache.h.
4968 * util/raid.c: Include grub/util/raid.h.
4969 (grub_util_getdiskname): Make static.
4970
87a297bf 4971 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4972 grub_hostfs_fini(), as they are called from grub_init_all() and
4973 grub_fini_all() respectively. This fixes an infinite loop in
4974 grub-fstest due to double registration of hostfs.
4975 Reported by Christian Franke <Christian.Franke@t-online.de>
4976
f6ce7629 49772008-04-05 Pavel Roskin <proski@gnu.org>
4978
4979 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4980 all 8 functions. Otherwise, probe function 0 only.
4981
070e49e4 49822008-04-04 Pavel Roskin <proski@gnu.org>
4983
8b088a4c 4984 * commands/lspci.c (grub_lspci_iter): Print the bus number
4985 correctly.
4986
4f657021 4987 * commands/lspci.c (grub_pci_classes): Fix typos.
4988 (grub_lspci_iter): Don't print func twice. Print vendor ID
4989 before device ID, as it's normally done.
4990
070e49e4 4991 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4992 Fix signedness warnings.
4993 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4994 Likewise.
4995 * util/ieee1275/get_disk_name.c: Include config.h so that
4996 _GNU_SOURCE is defined and getline() is declared. Mark an
4997 unused argument as such. Fix a signedness warning.
4998
ba7328dc 49992008-04-02 Pavel Roskin <proski@gnu.org>
5000
26887f22 5001 * genkernsyms.sh.in: Use more robust assignments for CC and
5002 srcdir. Quote srcdir.
5003 * gensymlist.sh.in: Likewise. Assert at the compile time that
5004 the symbol table is not empty.
5005
ba7328dc 5006 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5007 * fs/cpio.c (grub_cpio_read): Likewise.
5008
0f582c6b 50092008-04-01 Pavel Roskin <proski@gnu.org>
5010
4b6e1995 5011 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5012 * disk/host.c (grub_host_open): Likewise.
5013 * disk/loopback.c (grub_loopback_open): Likewise.
5014 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5015 disk->id as in disk/host.c, not a multi-character constant.
5016
828a2768 5017 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5018 later is obsolete, potentially dangerous and sets a bad example.
5019 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5020 * util/misc.c (grub_util_get_image_size): Likewise.
5021
2bb4fb47 5022 * disk/loopback.c (options): Improve help for "--partitions".
5023
0f582c6b 5024 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5025 options to align them with the short options, e.g. "echo -e".
5026
a33224e0 50272008-03-31 Bean <bean123ch@gmail.com>
5028
5029 * video/reader/png.c (grub_png_data): New member is_16bit and
5030 image_data.
5031 (grub_png_decode_image_header): Detect 16 bit png image.
5032 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5033 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5034 (grub_video_reader_png): Release memory occupied by image_data.
5035
5036 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5037 4096 bytes.
5038 (grub_nfs_mount): Skip the test for sector per cluster.
5039
5040 * include/grub/ntfs.h (MAX_SPC): Removed.
5041
86cb4f54 50422008-03-31 Bean <bean123ch@gmail.com>
5043
5044 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5045 (grub_probe_SOURCES): Add fs/afs.c.
5046 (grub_fstest_SOURCES): Likewise.
5047 (afs_mod_SOURCES): New variable.
5048 (afs_mod_CFLAGS): Likewise.
5049 (afs_mod_LDFLAGS): Likewise.
5050
5051 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5052 (grub_emu_SOURCES): Likewise.
5053
5054 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5055
5056 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5057
5058 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5059
5060 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5061
5062 * fs/afs.c: New file.
5063
17c74c21 50642008-03-30 Pavel Roskin <proski@gnu.org>
5065
4cb68e89 5066 * disk/host.c: Include grub/misc.h to fix a warning.
5067 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5068 warnings about implicit declarations.
5069
8790bb04 5070 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5071 variable.
5072 * include/grub/i386/loader.h: Change declaration of
5073 grub_linux_boot() to match what grub_loader_set() expects.
5074 * util/getroot.c (grub_guess_root_device): Return const char* to
5075 fix a warning.
5076 * util/grub-probe.c (probe): Fix a warning about uninitialized
5077 abstraction_name variable.
5078 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5079 second argument as unused to fix a warning.
5080
9a3f3296 5081 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5082 missing grub_error() call.
5083
0ecef90d 5084 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5085 2.60 and newer uses it to define datadir.
5086
0bf6d401 5087 * commands/sleep.c: Fix warning about implicit declaration.
5088 * disk/memdisk.c: Likewise.
5089 * loader/aout.c: Likewise.
5090 * loader/i386/bsd_normal.c: Likewise.
5091 * util/grub-probe.c: Likewise.
5092
7cdacf97 5093 * commands/i386/cpuid.c (has_longmode): Make static.
5094 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5095 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5096
17c74c21 5097 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5098 GDT. This is more robust, as %ds can change.
5099 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5100 calling real_to_prot().
5101 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5102
80a3e68b 51032008-03-28 Pavel Roskin <proski@gnu.org>
5104
5105 * kern/i386/pc/startup.S: Assert that uncompressed functions
5106 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5107 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5108 code, as they push parts of the code (error handlers) beyond
5109 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5110 code as correctness and size.
5111
77bcd272 51122008-03-28 Pavel Roskin <proski@gnu.org>
5113
5114 * kern/i386/pc/startup.S
5115 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5116 data block address to the real mode, keep offset minimal. This
5117 works around a bug in AWARD BIOS on old Athlon systems, which
5118 makes CD detection hang.
5119
c5dfd43b 51202008-03-26 Pavel Roskin <proski@gnu.org>
5121
5122 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5123 const.
5124 * include/grub/normal.h: Add grub_parse_color_name_pair()
5125 declaration.
5126
bf962df2 51272008-03-24 Bean <bean123ch@gmail.com>
5128
5129 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5130 (cd_count): Removed.
5131 (cd_drive): New variable.
5132 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5133 (grub_biosdisk_call_hook): Likewise.
5134 (grub_biosdisk_iterate): Change cdrom detection method.
5135 (grub_biosdisk_open): Replace cd_start with cd_drive.
5136 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5137 detect cdrom device.
5138
5139 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5140 Removed.
5141 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5142 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5143 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5144 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5145 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5146 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5147 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5148 (grub_biosdisk_cdrp): New structure.
5149 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5150
5151 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5152
5153 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5154 device.
5155
5156 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5157 New function.
5158
68e7fc7a 51592008-03-20 Robert Millan <rmh@aybabtu.com>
5160
5161 Remove 2 TiB limit in ata.mod.
5162 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5163 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5164 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5165 grub_uint64_t instead of grub_uint32_t.
5166
38ad2cf5 51672008-03-05 Bean <bean123ch@gmail.com>
5168
5169 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5170 (grub_multiboot): Set boot device.
5171
5172 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5173
2b89344e 51742008-03-02 Bean <bean123ch@gmail.com>
5175
5176 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5177 symlink_buffer.
5178
87a95d1f 51792008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5180
5181 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5182 texinfo.tex.
5183
5184 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5185 modified.
5186
5187 * docs/fdl.texi: New file.
f19dbdb7 5188
87a95d1f 5189 * docs/mdate-sh: New file. Copied from gnulib.
5190 * docs/texinfo.tex: Likewise.
5191
5192 * config.guess: Updated from gnulib.
5193 * install-sh: Likewise.
5194
7dc15d8e 51952008-02-28 Robert Millan <rmh@aybabtu.com>
5196
5197 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5198 (aout_mod_SOURCES): New variable.
5199 (aout_mod_CFLAGS): Likewise.
5200 (aout_mod_LDFLAGS): Likewise.
5201
5202 * conf/i386-ieee1275.rmk: Likewise.
5203
b00ab696 52042008-02-28 Robert Millan <rmh@aybabtu.com>
5205
5206 * util/update-grub.in: Reorganise terminal validity check. Accept
5207 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5208 Based on suggestion by Franklin PIAT.
5209
79ca2d78 52102008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5211
5212 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5213 function.
5214 * util/getroot.c (grub_util_check_block_device): New function that
5215 returns the given argument if it is a block device and returns NULL else.
5216 * util/grub-probe.c (argument_is_device): New variable.
5217 (probe): Promote device_name from a variable to an argument. Receive
5218 device_name from grub_util_check_block_device() if path is NULL and from
5219 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 5220 (options): Introduce new parameter '-d, --device'.
79ca2d78 5221 (main): Add description of the new parameter to the help screen.
5222 Rename path variable to argument. Set argument_is_device if the '-d'
5223 option is given. Pass argument to probe() depending on
5224 argument_is_device.
5225
0d16e571 52262008-02-24 Bean <bean123ch@gmail.com>
5227
5228 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5229 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5230 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5231 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5232 (GRUB_ISO9660_VOLDESC_END): Likewise.
5233 (grub_iso9660_primary_voldesc): New member escape.
5234 (grub_iso9660_data): New member joliet.
5235 (grub_iso9660_convert_string): New function.
5236 (grub_iso9660_mount): Detect joliet extension.
5237 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5238 (grub_iso9660_iso9660_label): Likewise.
5239
5240 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5241 (grub_setup_SOURCES): Add fs/udf.c.
5242 (grub_fstest_SOURCES): Likewise.
5243 (udf_mod_SOURCES): New variable.
5244 (udf_mod_CFLAGS): Likewise.
5245 (udf_mod_LDFLAGS): Likewise.
5246
5247 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5248 (grub_emu_SOURCES): Likewise.
5249
5250 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5251
5252 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5253
5254 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5255
5256 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5257
5258 * fs/udf.c: New file.
5259
8a594a17 52602008-02-24 Robert Millan <rmh@aybabtu.com>
5261
5262 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5263 (normal/lexer.c_DEPENDENCIES): New variables.
5264 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5265 (normal/lexer.c_DEPENDENCIES): Likewise.
5266 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5267 (normal/lexer.c_DEPENDENCIES): Likewise.
5268 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5269 (normal/lexer.c_DEPENDENCIES): Likewise.
5270 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5271 (normal/lexer.c_DEPENDENCIES): Likewise.
5272 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5273 (normal/lexer.c_DEPENDENCIES): Likewise.
5274
2dc33c03 52752008-02-23 Robert Millan <rmh@aybabtu.com>
5276
5277 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5278 since they were intended to be in hex. This didn't break previously
5279 because of a bug in gpt_partition_map_iterate() (see below).
5280
5281 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5282 when checking the validity of GPT header.
5283 Remove `partno', since it always provides the same information as `i'.
5284
f6f4cfb0 52852008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5286
5287 * include/grub/efi/time.h: Fix a wrong comment.
5288
79ff665f 52892008-02-19 Pavel Roskin <proski@gnu.org>
5290
5291 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5292 message.
5293
d38e24c2 52942008-02-19 Bean <bean123ch@gmail.com>
5295
5296 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5297 (aout_mod_SOURCES): New variable.
5298 (aout_mod_CFLAGS): Likewise.
5299 (aout_mod_LDFLAGS): Likewise.
5300 (_bsd_mod_SOURCES): New variable.
5301 (_bsd_mod_CFLAGS): Likewise.
5302 (_bsd_mod_LDFLAGS): Likewise.
5303 (bsd_mod_SOURCES): New variable.
5304 (bsd_mod_CFLAGS): Likewise.
5305 (bsd_mod_LDFLAGS): Likewise.
5306
5307 * include/grub/aout.h: New file.
5308
5309 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5310
5311 * include/grub/i386/bsd.h: New file.
5312
5313 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5314 to make it public.
5315
5316 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5317 function is called, so that it's possible to change it inside the hook.
5318 (grub_elf64_load): Likewise.
5319 (grub_elf_file): Don't close the file if elf header is not found.
5320 (grub_elf_close): Close the file if grub_elf_file fails (The new
5321 grub_elf_file won't close it).
5322 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5323 (grub_elf64_size): Likewise.
5324
5325 * kern/i386/loader.S (grub_unix_real_boot): New function.
5326
5327 * loader/aout.c: New file.
5328
5329 * loader/i386/bsd.c: New file.
5330
5331 * loader/i386/bsd_normal.c: New file.
5332
5333 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5334
5335 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 5336 can test other formats.
d38e24c2 5337
b93bdb0f 53382008-02-19 Robert Millan <rmh@aybabtu.com>
5339
5340 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5341 (grub_gpt_partition_type_empty): Redefine with macro from
5342 `<grub/gpt_partition.h>'.
5343 (gpt_partition_map_iterate): Adjust partition type comparison.
5344
5345 Export `entry' as partmap-specific `part.data' struct.
5346 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5347
5348 * include/grub/gpt_partition.h (grub_gpt_header)
5349 (grub_gpt_partentry): ... to here (new file).
5350
5351 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5352
5353 (grub_gpt_partition_type_bios_boot): New const variable, defined
5354 with macro from `<grub/gpt_partition.h>'.
5355
5356 (setup): Replace `first_start' with `embed_region', which keeps
5357 track of the embed region (and is partmap-agnostic).
5358
5359 Replace find_first_partition_start() with find_usable_region(),
5360 which finds a usable region for embedding using partmap-specific
5361 knowledge (supports PC/MSDOS and GPT).
5362
5363 Fix all assumptions that the embed region start at sector 1, using
5364 `embed_region.start' from now on. Similarly, use `embed_region.end'
5365 rather than `first_start' to calculate available size.
5366
5367 In grub_util_info() message, replace "into after the MBR" with an
5368 indication of the specific sector our embed region starts at.
5369
66cb40f6 53702008-02-19 Robert Millan <rmh@aybabtu.com>
5371
5372 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5373 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5374 `commands/reboot.c'.
5375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5376 (halt_mod_SOURCES): Likewise.
5377 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5378 (halt_mod_SOURCES): Likewise.
5379
b7202015 53802008-02-17 Christian Franke <franke@computer.org>
5381
5382 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5383
32b0fc49 53842008-02-17 Robert Millan <rmh@aybabtu.com>
5385
5386 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5387 set `first_start' to 0 for non-PC/MSDOS partition maps.
5388
aca63502 53892008-02-16 Robert Millan <rmh@aybabtu.com>
5390
5391 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5392 do not assume partition map is PC/MSDOS before performing checks that
5393 are specific to that layout.
5394
0de8be86 53952008-02-13 Robert Millan <rmh@aybabtu.com>
5396
5397 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5398 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5399 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5400
c3db8364 54012008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5402
5403 * configure.ac: Only a cosmetic change on the handling of
5404 -fno-stack-protector.
5405
f714229e 54062008-02-12 Alexandre Boeglin <alex@boeglin.org>
5407
c3db8364 5408 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5409 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5410 reboot.c.
f714229e 5411 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5412 (halt_mod_SOURCES): New variable.
5413 (halt_mod_CFLAGS): Likewise.
5414 (halt_mod_LDFLAGS): Likewise.
5415 (reboot_mod_SOURCES): Likewise.
5416 (reboot_mod_CFLAGS): Likewise.
5417 (reboot_mod_LDFLAGS): Likewise.
5418
c3db8364 5419 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5420 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5421 reboot.c.
f714229e 5422 (halt_mod_SOURCES): Likewise.
5423 (reboot_mod_SOURCES): Likewise.
5424
c3db8364 5425 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5426 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 5427 (reboot_mod_SOURCES): Likewise.
5428
5429 * commands/i386/pc/reboot.c: merge this file ...
5430
5431 * commands/ieee1275/reboot.c: ... and this file ...
5432
5433 * commands/reboot.c: ... to this file.
c3db8364 5434 Add some precompiler directive to include the correct header for
5435 each machine.
f714229e 5436
5437 * commands/ieee1275/halt.c: move this file ...
5438
5439 * commands/halt.c: ... to here.
c3db8364 5440 Add some precompiler directive to include the correct header for
5441 each machine.
f714229e 5442
5443 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5444 (grub_halt): Likewise.
5445
5446 * kern/efi/efi.c (grub_reboot): New function.
5447 (grub_halt): Likewise.
5448
c74493e0 54492008-02-12 Robert Millan <rmh@aybabtu.com>
5450
5451 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5452 /dev (like it is done for /dev/mapper). This doesn't provide support
5453 for EVMS, but at least it is now easy to identify the problem when it
5454 arises.
5455
d0db4b04 54562008-02-11 Robert Millan <rmh@aybabtu.com>
5457
5458 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5459 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5460 comparing it with -1, not 0.
5461
bf748642 54622008-02-10 Robert Millan <rmh@aybabtu.com>
5463
5464 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5465 `disk/lvm.c'.
5466 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5467 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5468
5469 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5470 `disk/lvm.c' to the end of the list.
5471 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5472 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5473
b5db202a 54742008-02-10 Robert Millan <rmh@aybabtu.com>
5475
5476 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5477 grub_print_error() instead. This will let user know why we're entering
5478 rescue mode.
5479 Based on suggestions from Sam Morris.
5480
83abee31 54812008-02-10 Alexandre Boeglin <alex@boeglin.org>
5482
5483 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5484 on remaining N args, instead of "--" arg N times.
5485
78d5a08b 54862008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5487
5488 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5489 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5490 pattern for unknown glyphs.
5491
68807e5f 54922008-02-09 Robert Millan <rmh@aybabtu.com>
5493
5494 * configure.ac: Probe for `help2man'.
5495 * Makefile.in (builddir): New variable.
5496 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5497 or otherwise add a few flags/options to it.
5498 (install-local): For every executable utility or script that is
5499 installed, invoke $(HELP2MAN) to install a manpage based on --help
5500 output.
5501
5502 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5503 that it doesn't prevent --help from working in build tree.
5504
5505 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5506 with `bug-grub@gnu.org'.
5507 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5508 * util/update-grub.in (usage): New function.
5509 Implement proper argument check, with support for --help and --version
5510 (as well as existing -y).
5511
55122008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 5513
5514 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5515 avoid overwriting previous output.
5516 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5517
c1962162 55182008-02-09 Robert Millan <rmh@aybabtu.com>
5519
5520 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5521 drawing the menu.
5522
3dac2e3f 55232008-02-09 Robert Millan <rmh@aybabtu.com>
5524
5525 * commands/sleep.c: New file.
5526 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5527 (sleep_mod_SOURCES): New variable.
5528 (sleep_mod_CFLAGS): Likewise.
5529 (sleep_mod_LDFLAGS): Likewise.
5530
7a634e08 55312008-02-09 Robert Millan <rmh@aybabtu.com>
5532
5533 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5534 situations in which we can deduce the RAID size and the superblock
5535 doesn't match it.
5536
b92f0c18 55372008-02-09 Robert Millan <rmh@aybabtu.com>
5538
5539 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5540 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5541 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5542
5543 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5544 and return a grub_diskmemberlist_t composed of physical array members.
5545 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5546
5547 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5548 prototype.
5549 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5550 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5551 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5552
5553 * util/grub-probe.c (probe): Move partmap probing code from here ...
5554 (probe_partmap): ... to here.
5555 (probe): Use probe_partmap() once for the disk we're probing, and
5556 additionally, when such disk contains a memberlist() struct member,
5557 once for each disk that is contained in the structure returned by
5558 memberlist().
5559
91a4bf68 55602008-02-09 Robert Millan <rmh@aybabtu.com>
5561
5562 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5563 environment variable to 'all' in order to obtain debug output from
5564 non-util/ code.
5565 * util/i386/pc/grub-setup.c (main): Likewise.
5566
a96f9caa 55672008-02-08 Robert Millan <rmh@aybabtu.com>
5568
5569 * disk/raid.c (grub_raid_scan_device): Check for
5570 `array->device[sb.this_disk.number]' rather than for
5571 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 5572 guaranteed to be accessible.
a96f9caa 5573
b37a9222 55742008-02-08 Robert Millan <rmh@aybabtu.com>
5575
5576 * disk/raid.c: Update copyright.
5577 * fs/cpio.c: Likewise.
5578 * include/grub/raid.h: Likewise.
5579 * loader/i386/pc/multiboot.c: Likewise.
5580 * util/hostfs.c: Likewise.
5581
5626aee1 55822008-02-08 Robert Millan <rmh@aybabtu.com>
5583
5584 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5585 to a grub_disk_t array.
5586 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5587 `device[x]'.
5588 (grub_raid_scan_device): Replace `device[x].name' accesses with
5589 `device[x]->name'. Simplify initialization of `array->device[x]'.
5590
554f0187 55912008-02-08 Robert Millan <rmh@aybabtu.com>
5592
5593 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5594 grub_dprintf() calls.
5595 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5596 error message.
5597
1ec8425d 55982008-02-07 Christian Franke <franke@computer.org>
5599
5600 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5601 instead of fseek and ftell to support large files.
5602 (grub_hostfs_read): Likewise.
5603
f2156fda 56042008-02-07 Robert Millan <rmh@aybabtu.com>
5605
5606 Patch from Jeroen Dekkers.
5607 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 5608 failure, since successfully reading all array members might not be
f2156fda 5609 required.
5610
9216e0e7 56112008-02-06 Robert Millan <rmh@aybabtu.com>
5612
5613 * util/grub-probe.c (probe): Simplify partmap probing (with the
5614 assumption that the first word up to the underscore equals to
5615 the module name).
5616
b0dfd29a 56172008-02-06 Christian Franke <franke@computer.org>
5618
5619 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5620 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5621 last block of a cpio or tar stream.
5622 Check for "TRAILER!!!" instead of any empty data
5623 block to detect last block of a cpio stream.
5624 (grub_cpio_dir): Fix constness of variable np.
5625 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5626 cpio or tar trailer is detected. This fixes a crash
5627 on open of a non existing file.
5628
c32865bf 56292008-02-05 Bean <bean123ch@gmail.com>
5630
5631 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5632 address of entry.
5633 (grub_multiboot_load_elf64): Likewise.
5634 (grub_multiboot): Initialize mbi structure.
5635
5636 * util/grub-fstest.c: Don't include unused header file script.h.
5637
fe6b695a 5638 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 5639 of file.
5640 (grub_fstest_SOURCES): Likewise.
5641
409480b7 56422008-02-05 Robert Millan <rmh@aybabtu.com>
5643
5644 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5645 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5646 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5647 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5648
5649 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5650 (translation_table): Replace hardcoded values with macros
5651 provided by `<grub/term.h>'.
5652
5653 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5654 (keyboard_map): Correct/add a few values, with macros provided
5655 by `<grub/term.h>'.
5656 (keyboard_map_shift): Zero values that don't differ from their
5657 `keyboard_map' equivalents.
5658 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5659 Discard the second scan code that is always sent by Caps lock.
5660 Only use `keyboard_map_shift' when it provides a non-zero value,
5661 otherwise fallback to `keyboard_map'.
5662
99fadbaa 56632008-02-04 Bean <bean123ch@gmail.com>
5664
5665 * Makefile.in (enable_grub_fstest): New variable.
5666
5667 * conf/common.rmk (grub_fstest_init.lst): New rule.
5668 (grub_fstest_init.h): Likewise.
5669 (grub_fstest_init.c): Likewise.
5670 (util/grub-fstest.c_DEPENDENCIES): New variable.
5671 (grub_fstest_SOURCES): Likewise.
5672
5673 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5674
5675 * util/grub-fstest.c: New file.
5676
bf567c50 56772008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5678
5679 Make grub-setup handle a separate root device.
f19dbdb7 5680
bf567c50 5681 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5682 so that the root device can be compared with the destination
5683 device.
5684 When embedding the core image, if the root and destination devices
5685 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5686 0xFF.
5687 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 5688
9be6b98b 56892008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5690
5691 Add support for having a grub directory in a different drive. This
5692 is still only the data handling part.
f19dbdb7 5693
9be6b98b 5694 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5695 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5696 (grub_root_drive): New variable.
5697
5698 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5699 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5700 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5701 as it was.
5702
5703 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5704
5705 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5706 macro.
5707 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5708
5709 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5710 is bogus, because PXE booting does not specify any drive
5711 correctly.
5712
5713 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5714 am not sure if this is really correct.
5715
5716 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5717 is always identical to the boot drive when booting from a CD.
5718
5719 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5720 longer.
5721 (root_drive): New variable.
5722 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5723 (setup_sectors): Push %dx right after popping it, because %dh will
5724 be modified later.
5725 (copy_buffer): Restore %dx.
5726
e0ca0677 57272008-02-03 Robert Millan <rmh@aybabtu.com>
5728
5729 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5730 use `cdboot.img' for cdrom images.
5731
3b3f6629 57322008-02-03 Robert Millan <rmh@aybabtu.com>
5733
5734 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5735 only setup gfxterm when `font' command has succeeded.
5736
d42b3672 57372008-02-03 Robert Millan <rmh@aybabtu.com>
5738
5739 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5740 (grub_rescue_cmd_multiboot_loader)
5741 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5742
fa370ea6 57432008-02-03 Pavel Roskin <proski@gnu.org>
5744
e0c5dacb 5745 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 5746 %edx and %esi from stack only after grub_gate_a20() is called.
5747 grub_gate_a20() clobbers %edx.
5748
f2a76e1d 57492008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5750
5751 * configure.ac (AC_INIT): Bumped to 1.96.
5752
5753 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5754 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5755 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5756 video/readers/png.c.
5757
90fd32d1 57582008-02-03 Bean <bean123ch@gmail.com>
9be665dd 5759
5760 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5761 (cdboot_img_SOURCES): New variable.
5762 (cdboot_img_ASFLAGS): New variable.
5763 (cdboot_img_LDFLAGS): New variable.
5764
5765 * boot/i386/pc/cdboot.S: New file.
5766
5767 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5768 (cd_count): Likewise.
5769 (grub_biosdisk_get_drive): Add support for cd device.
5770 (grub_biosdisk_call_hook): Likewise.
5771 (grub_biosdisk_iterate): Likewise.
5772 (grub_biosdisk_open): Likewise.
5773 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5774 (grub_biosdisk_rw): Support reading from cd device.
5775 (GRUB_MOD_INIT): Iterate cd devices.
5776
5777 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5778 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5779 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5780
5781 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5782
4020aa53 57832008-02-02 Robert Millan <rmh@aybabtu.com>
5784
5785 * commands/read.c: New file.
5786 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5787 (read_mod_SOURCES): New variable.
5788 (read_mod_CFLAGS): Likewise.
5789 (read_mod_LDFLAGS): Likewise.
5790
e03a1132 57912008-02-02 Robert Millan <rmh@aybabtu.com>
5792
5793 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5794 determining whether menu has to be displayed.
5795
58c69220 57962008-02-02 Marco Gerards <marco@gnu.org>
5797
5798 * bus/pci.c: New file.
5799
5800 * include/grub/pci.h: Likewise.
5801
5802 * include/grub/i386/pc/pci.h: Likewise.
5803
5804 * commands/lspci.c: Likewise.
5805
5806 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5807 `lspci.mod'.
5808 (pci_mod_SOURCES): New variable.
5809 (pci_mod_CFLAGS): Likewise.
5810 (pci_mod_LDFLAGS): Likewise.
5811 (lspci_mod_SOURCES): Likewise.
5812 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 5813 (lspci_mod_LDFLAGS): Likewise.
58c69220 5814
c004e1b4 58152008-02-02 Bean <bean123ch@gmail.com>
5816
5817 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5818 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5819
5820 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5821 (grub_xfs_btree_node): New structure.
5822 (grub_xfs_btree_root): New structure.
5823 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5824 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5825 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5826 (GRUB_XFS_EXTENT_SIZE): Likewise.
5827 (grub_xfs_read_block): Support btree format type.
5828 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5829 Use directory block as basic unit.
5830
5831 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5832
5833 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5834 __attribute__ ((__regparm__ (1))).
5835
f95562bf 58362008-02-01 Robert Millan <rmh@aybabtu.com>
5837
5838 Correct a mistake in previous commit.
5839
5840 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5841 top.
5842 (normal/command.c_DEPENDENCIES): New variable.
5843
7d31f41f 58442008-02-01 Robert Millan <rmh@aybabtu.com>
5845
5846 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5847 top.
5848 (normal/command.c_DEPENDENCIES): New variable.
5849 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5850 * conf/i386-ieee1275.rmk: Likewise.
5851 * conf/i386-linuxbios.rmk: Likewise.
5852 * conf/i386-pc.rmk: Likewise.
5853 * conf/sparc64-ieee1275.rmk: Likewise.
5854 * conf/powerpc-ieee1275.rmk: Likewise.
5855 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5856
5857 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5858
60b6be74 58592008-02-01 Robert Millan <rmh@aybabtu.com>
5860
5861 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5862 call at beginning of function.
5863
078522ab 58642008-01-31 Pavel Roskin <proski@gnu.org>
5865
5866 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 5867 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5868 (grub_mkrescue_SOURCES): Likewise.
078522ab 5869 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5870
ccaa8a5f 58712008-01-30 Robert Millan <rmh@aybabtu.com>
5872
5873 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5874 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5875 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5876 (grub_probe_SOURCES): ... to here.
5877
5878 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5879 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5880 * conf/i386-ieee1275.rmk: Likewise.
5881 * conf/i386-linuxbios.rmk: Likewise.
5882 * conf/powerpc-ieee1275.rmk: Likewise.
5883
ae5a9cd7 58842008-01-30 Tristan Gingold <gingold@free.fr>
5885
5886 * kern/rescue.c: Silently accept empty lines.
5887
70bc2ef2 58882008-01-29 Bean <bean123ch@gmail.com>
5889
5890 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5891 (real_code_2): Code cleanup and change comment style.
5892 (move_memory): Avoid using 32-bit address mode.
5893
6a4d50ea 58942008-01-29 Bean <bean123ch@gmail.com>
5895
5896 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5897 (png_mod_SOURCES): New variable.
5898 (png_mod_CFLAGS): Likewise.
5899 (png_mod_LDFLAGS): Likewise.
5900
5901 * video/readers/png.c: New file.
5902
11cc30ac 59032008-01-28 Robert Millan <rmh@aybabtu.com>
5904
5905 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5906 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5907 `ifndef GRUB_MOD_GAP' hack.
5908 * util/elf/grub-mkimage.c (add_segments): Likewise.
5909
3abc589f 59102008-01-27 Robert Millan <rmh@aybabtu.com>
5911
5912 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5913 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 5914 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 5915
e1907778 59162008-01-27 Robert Millan <rmh@aybabtu.com>
5917
5918 Get grub-emu to build again (including parallel builds).
5919
5920 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5921 Split into ...
5922 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5923 (normal/execute.c_DEPENDENCIES): ... this, ...
5924 (grub-emu_DEPENDENCIES): ... and this.
5925
5926 * conf/i386-efi.rmk: Likewise.
5927 * conf/i386-linuxbios.rmk: Likewise.
5928 * conf/i386-ieee1275.rmk: Likewise.
5929 * conf/powerpc-ieee1275.rmk: Likewise.
5930 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5931
2216b101 59322008-01-27 Robert Millan <rmh@aybabtu.com>
5933
5934 * NEWS: Add a few items.
5935
f75172d9 59362008-01-27 Robert Millan <rmh@aybabtu.com>
5937
5938 Fix parallel builds with grub-emu. Based on earlier commit for
5939 grub-probe and grub-setup.
5940
5941 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5942 (util/grub-emu.c_DEPENDENCIES): ... this.
5943 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5944 (util/grub-emu.c_DEPENDENCIES): ... this.
5945 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5946 (util/grub-emu.c_DEPENDENCIES): ... this.
5947 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5948 (util/grub-emu.c_DEPENDENCIES): ... this.
5949 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5950 (util/grub-emu.c_DEPENDENCIES): ... this.
5951
3f51de77 59522008-01-27 Pavel Roskin <proski@gnu.org>
5953
5954 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5955 to create a gap between _end and the modules added to the image
5956 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5957 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5958 * util/elf/grub-mkimage.c (add_segments): Likewise.
5959
2033f53e 59602008-01-26 Pavel Roskin <proski@gnu.org>
5961
5962 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5963 just return an error.
5964
22da1f6f 59652008-01-26 Bean <bean123ch@gmail.com>
5966
5967 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5968 (grub_reiserfs_get_item): Save offset of the next item.
5969 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5970
2a9525e6 59712008-01-25 Robert Millan <rmh@aybabtu.com>
5972
5973 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5974 make all filesystem sources appear together (possibly fixing omissions
5975 while at it).
5976 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5977 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5978 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5979 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5980
5981 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5982 add `kern/file.c'.
5983 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5984 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5985 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5986 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5987
5988 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5989 (probe): Add a sanity check to make sure of our ability to read
5990 requested files when probing for filesystem type.
5991
5992 * genmk.rb: Update copyright year (2007).
5993
5994 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5995 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5996 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5997 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5998 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5999 : Remove function prototypes.
6000
b95f71b5 60012008-01-25 Robert Millan <rmh@aybabtu.com>
6002
6003 Revert my previous commits (based on wrong assumption of how grub_errno
6004 works).
6005
fe6b695a 6006 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 6007 * kern/file.c (grub_file_open): Likewise.
6008
d08bbb49 60092008-01-24 Pavel Roskin <proski@gnu.org>
6010
6011 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6012 that hang if GRUB tries to setup colors.
6013 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6014 colors for firmwares that don't support it.
6015 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6016 Recognize Open Hack'Ware, set flags to work around its
6017 limitations.
6018
605e36ed 60192008-01-24 Robert Millan <rmh@aybabtu.com>
6020
6021 * kern/file.c (grub_file_open): Do not account previous failures of
6022 unrelated functions when grub_errno is checked for.
6023 Reported by Oleg Strikov.
6024
bac332a1 60252008-01-24 Bean <bean123ch@gmail.com>
6026
6027 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6028 (grub_ufs_sblock): New member volume name.
6029 (grub_ufs_find_file): Fix string copy bug.
6030 (grub_ufs_label): Implement this function properly.
6031
6032 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6033 (grub_hfs_iterate_records): Use the correct file number for extents
6034 and catalog file. Fix problem in next index calculation.
6035 (grub_hfs_find_node): Replace recursive function call with loop.
6036 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6037
15c80c09 60382008-01-23 Robert Millan <rmh@aybabtu.com>
6039
6040 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6041 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6042 (grub_multiboot2_real_boot): New function prototype.
6043
6044 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6045 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6046
6047 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6048 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6049
305338fd 60502008-01-23 Robert Millan <rmh@aybabtu.com>
6051
6052 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6053 #ifdef'ed out grub_printf().
6054
3ea52685 60552008-01-23 Robert Millan <rmh@aybabtu.com>
6056
6057 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6058 grub_dprintf calls, since they make "debug=all" mode unusable.
6059 (grub_console_checkkey): Likewise.
6060
5882ae4b 60612008-01-23 Robert Millan <rmh@aybabtu.com>
6062
6063 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6064 `term/i386/pc/at_keyboard.c'.
6065 (pkglib_MODULES): Add `serial.mod'.
6066 (serial_mod_SOURCES): New variable.
6067 (serial_mod_CFLAGS): Likewise.
6068 (serial_mod_LDFLAGS): Likewise.
6069
6070 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6071 `<grub/powerpc/ieee1275/console.h>'.
6072 (grub_keyboard_controller_init): New function prototype.
6073 (grub_console_checkkey): Likewise.
6074 (grub_console_getkey): Likewise.
6075
6076 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6077 keyboard on i386.
6078
6079 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6080 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6081
06ab5303 60822008-01-23 Robert Millan <rmh@aybabtu.com>
6083
6084 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6085 present, "(memdisk)/boot/grub" becomes the default prefix.
6086
6087 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6088 a memdisk tarball with all the modules. Add --overlay=DIR option that
6089 allows users to overlay additional files into the image.
6090
dbb475a4 60912008-01-23 Robert Millan <rmh@aybabtu.com>
6092
6093 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6094 and `machine/memory.h'.
6095 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6096 (_multiboot_mod_SOURCES): New variable.
6097 (_multiboot_mod_CFLAGS): Likewise.
6098 (_multiboot_mod_LDFLAGS): Likewise.
6099 (multiboot_mod_SOURCES): Likewise.
6100 (multiboot_mod_CFLAGS): Likewise.
6101 (multiboot_mod_LDFLAGS): Likewise.
6102
6103 * include/grub/i386/ieee1275/loader.h: New file.
6104
6105 * include/grub/i386/ieee1275/machine.h: Likewise.
6106
6107 * include/grub/i386/ieee1275/memory.h: Likewise.
6108
6109 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6110 variable declaration.
6111 (grub_os_area_size): Likewise.
6112
6113 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6114 (grub_lower_mem, grub_upper_mem): New variables.
6115 (grub_stop_floppy): New function (just to make
6116 grub_multiboot2_real_boot() happy).
6117
6118 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6119 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6120 (grub_stop): New function.
6121 Include `"../realmode.S"' and `"../loader.S"'.
6122
6123 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6124 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6125
6126 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6127 rely on grub_multiboot2_real_boot() for final boot.
6128
25638629 61292008-01-22 Robert Millan <rmh@aybabtu.com>
6130
6131 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6132 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6133 device that doesn't look like an SD card.
6134 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6135 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6136 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6137 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6138 found.
6139
9dad816d 61402008-01-22 Robert Millan <rmh@aybabtu.com>
6141
6142 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6143 avoid claiming over our own code.
6144
34842f2d 61452008-01-22 Bean <bean123ch@gmail.com>
6146
6147 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6148 (jpeg_mod_SOURCES): New variable.
6149 (jpeg_mod_CFLAGS): Likewise.
6150 (jpeg_mod_LDFLAGS): Likewise.
6151
6152 * video/readers/jpeg.c : New file.
6153
44023a28 61542008-01-22 Bean <bean123ch@gmail.com>
6155
6156 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6157 there are no more items.
6158
bc2d8ac6 61592008-01-21 Robert Millan <rmh@aybabtu.com>
6160
6161 * kern/mm.c (grub_mm_init_region): Improve debug message.
6162
261bd4bc 61632008-01-21 Robert Millan <rmh@aybabtu.com>
6164
6165 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6166 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6167 address.
6168 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6169 a C macro.
6170 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6171 Indicates start of upper memory.
6172 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6173 (generate_image): Abort when image size is big enough to corrupt
6174 upper memory.
6175
6176 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6177 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6178 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6179 instead of hardcoding 0xA0000.
6180 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6181 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6182 instead of hardcoding 0xA0000.
6183
f970b55e 61842008-01-21 Robert Millan <rmh@aybabtu.com>
6185
6186 * disk/memdisk.c (memdisk_size): New variable.
6187 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6188 `memdisk_size'.
6189 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6190 image to dynamic memory.
6191 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6192 `memdisk_size'. Free memdisk block.
6193
1a8b0526 61942008-01-21 Robert Millan <rmh@aybabtu.com>
6195
6196 Fix detection of very small filesystems (like tar).
6197
6198 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6199 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6200 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6201 a problem with this disk).
6202
6e9b4aab 62032008-01-21 Robert Millan <rmh@aybabtu.com>
6204
6205 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6206 on grub_biosdisk_rw_standard() error.
6207
0d8837b2 62082008-01-21 Robert Millan <rmh@aybabtu.com>
6209
6210 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6211 recent changes.
6212 * kern/elf.c: Likewise.
6213 * kern/ieee1275/ieee1275.c: Likewise.
6214 * kern/powerpc/ieee1275/openfw.c: Likewise.
6215 * term/ieee1275/ofconsole.c: Likewise.
6216
ffd36e34 62172008-01-21 Robert Millan <rmh@aybabtu.com>
6218
6219 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6220
3f0093d0 6221 * include/grub/kernel.h (grub_arch_memdisk_addr)
6222 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 6223
3f0093d0 6224 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6225 (grub_arch_memdisk_size): ... to here.
ffd36e34 6226
6c391b21 62272008-01-21 Robert Millan <rmh@aybabtu.com>
6228
6229 Mostly based on bugfix from Bean.
6230
6231 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6232 attribute with hook() parameter.
6233 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6234 declaration.
6235 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6236 attribute with hook() parameter.
6237 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6238 declaration.
6239
55a581dc 62402008-01-21 Robert Millan <rmh@aybabtu.com>
6241
6242 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6243 (pkglib_MODULES): Add `memdisk.mod'.
6244 (memdisk_mod_SOURCES): New variable.
6245 (memdisk_mod_CFLAGS): Likewise.
6246 (memdisk_mod_LDFLAGS): Likewise.
6247
6248 * disk/memdisk.c: New file.
6249
6250 * include/grub/disk.h (grub_disk_dev_id): Add
6251 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6252
6253 * include/grub/i386/pc/kernel.h
6254 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6255 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6256 (grub_kernel_image_size): New variable declaration.
6257 (grub_total_module_size): Likewise.
6258 (grub_memdisk_image_size): Likewise.
6259
6260 * include/grub/i386/pc/memory.h
6261 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6262
6263 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6264 (grub_arch_memdisk_addr): New variable declaration.
6265 (grub_arch_memdisk_size): Likewise.
6266
6267 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6268 (grub_arch_memdisk_size): Likewise.
6269
6270 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6271 (codestart): Replace hardcoded `0x100000' with
6272 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6273
6274 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6275 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6276 not NULL, append the contents of the file it refers to, at the end of
6277 the compressed kernel image. Initialize `grub_memdisk_image_size'
6278 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6279 (options): Add "memdisk"|'m' option.
6280 (main): Parse --memdisk|-m option, and pass user-provided path as
6281 parameter to generate_image().
6282
3d7f54c9 62832008-01-20 Robert Millan <rmh@aybabtu.com>
6284
6285 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6286 grub_dprintf() calls from here ...
6287 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6288
0bf74728 62892008-01-20 Robert Millan <rmh@aybabtu.com>
6290
6291 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6292
6293 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6294 declaration.
6295 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6296 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6297 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 6298 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 6299 property).
6300 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6301 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6302
33bf70a7 63032008-01-19 Robert Millan <rmh@aybabtu.com>
6304
fe6b695a 6305 Get rid of confusing function (superseded by
33bf70a7 6306 `grub_ieee1275_get_integer_property')
6307 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6308 prototype.
6309 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6310 function.
6311 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6312 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 6313 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 6314
e2da7d26 63152008-01-19 Robert Millan <rmh@aybabtu.com>
6316
6317 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6318 command after "shut-down", since implementations differ on which
6319 the command for halt is.
6320
59f1fd8d 63212008-01-19 Robert Millan <rmh@aybabtu.com>
6322
6323 * include/grub/i386/linuxbios/console.h: Add header protection.
6324 (grub_keyboard_controller_init): New function prototype.
6325 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6326 (KEYBOARD_COMMAND_READ): Likewise.
6327 (KEYBOARD_COMMAND_WRITE): Likewise.
6328 (KEYBOARD_SCANCODE_SET1): Likewise.
6329 (grub_keyboard_controller_write): New function.
6330 (grub_keyboard_controller_read): Likewise.
6331 (grub_keyboard_controller_init): Likewise.
6332
6333 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6334 (grub_console_init): On coreboot/LinuxBIOS, call
6335 grub_keyboard_controller_init().
6336
5f5a7c15 63372008-01-19 Robert Millan <rmh@aybabtu.com>
6338
6339 PowerPC changes provided by Pavel Roskin.
6340
6341 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6342 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6343 don't rely on cmain() doing it.
6344 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6345 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6346
1210e168 63472008-01-16 Robert Millan <rmh@aybabtu.com>
6348
6349 * include/grub/i386/linuxbios/memory.h
6350 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6351 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6352 receive `table_header' as argument. Instead, probe for it in the
6353 known memory ranges where it can be present.
6354 (grub_available_iterate): Do not pass a fixed `table_header' address
6355 to grub_linuxbios_table_iterate().
6356
3d04eab8 63572008-01-15 Robert Millan <rmh@aybabtu.com>
6358
6359 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6360 * conf/i386-ieee1275.rmk: New file.
6361 * include/grub/i386/ieee1275/console.h: Likewise.
6362 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6363 * include/grub/i386/ieee1275/kernel.h: Likewise.
6364 * include/grub/i386/ieee1275/time.h: Likewise.
6365 * kern/i386/ieee1275/init.c: Likewise.
6366 * kern/i386/ieee1275/startup.S: Likewise.
6367
d1bc1b73 63682008-01-15 Robert Millan <rmh@aybabtu.com>
6369
6370 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6371 when pointers are 32-bit (but still do set it to one when they are
6372 64-bit).
6373
66a65807 63742008-01-15 Robert Millan <rmh@aybabtu.com>
6375
6376 * include/grub/ieee1275/ieee1275.h
6377 (grub_ieee1275_get_integer_property): New function prototype.
6378
6379 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6380 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 6381 grub_ieee1275_get_property() to handle endianness.
66a65807 6382
6383 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6384 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 6385 where appropriate.
66a65807 6386 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6387 (grub_map): Likewise.
6388 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6389
a83ccafd 63902008-01-15 Bean <bean123ch@gmail.com>
6391
6392 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6393 (grub_script_execute_cmdline): Reset grub_errno.
6394
6395 * normal/main.c (read_config_file): Reset grub_errno.
6396
6397 * normal/parse.y (script_init): New.
6398 (script): Move function and menuentry here.
6399 (delimiter): New.
6400 (command): Add delimiter at the end of command.
6401 (commands): Adjust to match the new command.
6402 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 6403 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 6404 (if): Use the new commands.
6405
6406 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6407
df6ecfc6 64082008-01-15 Robert Millan <rmh@aybabtu.com>
6409
6410 * normal/menu.c (run_menu): Move timeout message from here ...
6411 (print_timeout): ... to here.
6412 (run_menu): Use print_timeout() once during initial draw to print
6413 the whole message, and again in every clock tick to update only
6414 the number of seconds.
6415
87ae25eb 64162008-01-15 Robert Millan <rmh@aybabtu.com>
6417
6418 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6419 actual size of `available' from grub_ieee1275_get_property(), and
6420 restrict parsing to that bound.
6421
47bf09a4 64222008-01-15 Christian Franke <franke@computer.org>
6423
6424 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6425 (argp_program_version): Remove variable.
6426 (argp_program_bug_address): Likewise.
6427 (options): Convert from struct argp_option to struct option.
6428 (struct arguments): Remove.
6429 (parse_opt): Remove.
6430 (usage): New function.
6431 (main): Replace struct args members by simple variables.
6432 Replace argp_parse() by getopt_long().
6433 Add switch to evaluate options.
6434 Add missing "(...)" around root_dev in prefix string.
6435
c86f1469 64362008-01-14 Robert Millan <rmh@aybabtu.com>
6437
6438 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6439 for grub_ieee1275_exit(), in order to improve portability.
6440
e622c559 64412008-01-14 Robert Millan <rmh@aybabtu.com>
6442
6443 * util/grub.d/10_linux.in (prefix): Define.
6444 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6445
44cb1ec8 64462008-01-13 Pavel Roskin <proski@gnu.org>
6447
6448 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6449 grub_errno if no errors have been detected.
6450
1eb8c802 64512008-01-12 Robert Millan <rmh@aybabtu.com>
6452
6453 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6454 (grub_util_get_dev_abstraction): New function prototype.
6455
6456 * util/getroot.c: Include `<grub/util/getroot.h>'
6457 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6458 (grub_util_get_dev_abstraction): ... here (new function).
6459
6460 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6461 `PRINT_ABSTRACTION'.
6462 (probe): Probe for abstraction type when requested.
6463 (main): Understand `--target=abstraction'.
6464
6465 * util/i386/efi/grub-install.in: Add abstraction module to core
6466 image when it is found to be necessary.
6467 * util/i386/pc/grub-install.in: Likewise.
6468 * util/powerpc/ieee1275/grub-install.in: Likewise.
6469
6470 * util/update-grub_lib.in (font_path): Return system path without
6471 converting to GRUB path.
6472 * util/update-grub.in: Convert system path returned by font_path()
6473 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6474 abstraction module is needed for loading fonts (if any). Export
6475 that as `GRUB_PRELOAD_MODULES'.
6476 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6477 insmod commands).
6478
52bd3de9 64792008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6480
6481 Remove some unused code from reiserfs.
f19dbdb7 6482
52bd3de9 6483 * fs/reiserfs.c (struct grub_reiserfs_key)
6484 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6485 (struct grub_reiserfs_node_body): Removed.
6486 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6487 Likewise.
6488 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6489 Likewise.
6490 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6491 Likewise.
6492 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6493 Likewise.
6494 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6495 Likewise.
6496 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6497 Likewise.
6498 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6499 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6500 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6501
2f80039d 65022008-01-10 Robert Millan <rmh@aybabtu.com>
6503
6504 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6505 Determines if a file is garbage left by packaging systems, etc.
6506 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6507 for processing /etc/grub.d scripts.
6508 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6509 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6510 as a condition for processing Linux images.
6511
87888032 65122008-01-10 Pavel Roskin <proski@gnu.org>
6513
6514 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6515 to compile reiserfs.c on PowerPC.
6516
7e54fced 65172008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 6518
6519 * kern/device.c (grub_device_iterate): Do not abort device iteration
6520 when one of the devices cannot be opened.
6521 * kern/disk.c (grub_disk_open): Do not account previous failures of
6522 unrelated functions when grub_errno is checked for.
6523
5aa541e6 65242008-01-08 Robert Millan <rmh@aybabtu.com>
6525
6526 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6527 `! grub_linux_is_bzimage', change order of address comparison to make
6528 it more intuitive, and improve "too big zImage" error message.
6529
7076340d 65302008-01-08 Robert Millan <rmh@aybabtu.com>
6531
6532 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6533 `$(update-grub_DATA)'.
6534 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6535 targets.
6536
9ca70333 65372008-01-07 Robert Millan <rmh@aybabtu.com>
6538
6539 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6540 which instruction is modified by grub-setup during installation
6541 (since it wasn't obvious by only looking at this file).
6542
38ccf575 65432008-01-07 Robert Millan <rmh@aybabtu.com>
6544
6545 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6546 listing actual TODO items.
6547
f5db4291 65482008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6549
868967cf 6550 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6551 correctly.
6552 (grub_reiserfs_get_key_offset): Likewise.
6553 (grub_reiserfs_set_key_offset): Likewise.
6554 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 6555 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 6556
6557 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6558 better to remove the bitfield version completely.
f19dbdb7 6559
868967cf 65602008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6561
f5db4291 6562 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6563 allocated from the heap, due to the fshelp implementation.
6564 (grub_reiserfs_dir): Free NODE, due to the same reason.
6565
492e6d9d 65662008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6567
6568 Mostly from Vincent Pelletier:
f19dbdb7 6569
492e6d9d 6570 * fs/reiserfs.c: New file.
f19dbdb7 6571
492e6d9d 6572 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6573 (reiserfs_mod_SOURCES): New variable.
6574 (reiserfs_mod_CFLAGS): Likewise.
6575 (reiserfs_mod_LDFLAGS): Likewise.
6576
6577 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6578 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6579 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6580 normal/color.c.
6581
9ce3e7c1 65822008-01-06 Robert Millan <rmh@aybabtu.com>
6583
6584 * normal/color.c: Remove `<grub/env.h>'.
6585
f3b58148 65862008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6587
6588 * include/grub/normal.h: Include <grub/env.h>.
6589
7ac3bcfa 65902008-01-05 Robert Millan <rmh@aybabtu.com>
6591
6592 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6593 usage example with `(hd0,1)'.
fb358190 6594 Reported by Samuel Thibault.
7ac3bcfa 6595
c8ee99d7 65962008-01-05 Robert Millan <rmh@aybabtu.com>
6597
6598 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6599 (grub_linux_boot_zimage): Rename to ...
6600 (grub_linux_boot): ... this.
6601 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6602 (grub_linux_boot_zimage): Conditionalize zImage copy.
6603
6604 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6605 (grub_linux_boot_bzimage): Remove prototype.
6606 (grub_linux_boot_zimage): Rename to ...
6607 (grub_linux_boot): ... this.
6608
6609 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6610 (grub_linux_boot): Remove function.
6611
0ece25b1 66122008-01-05 Robert Millan <rmh@aybabtu.com>
6613
6614 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6615 (grub_env_write_color_highlight): Likewise.
6616 (grub_wait_after_message): Likewise.
6617
6618 * normal/color.c: New file.
6619
6620 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6621 (normal_mod_DEPENDENCIES): Likewise.
6622
6623 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6624 (normal_mod_DEPENDENCIES): Likewise.
6625
6626 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6627 (normal_mod_DEPENDENCIES): Likewise.
6628
6629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6630 (normal_mod_DEPENDENCIES): Likewise.
6631
6632 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6633 for waiting after a message is printed.
6634 * normal/main.c (read_config_file): Likewise.
6635 (grub_normal_init): Register grub_env_write_color_normal() and
6636 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6637 `color_highlight' variables as global.
6638
6639 * normal/menu.c (grub_wait_after_message): New function.
6640 (grub_color_menu_normal): New variable. Replaces ...
6641 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6642 (grub_color_menu_highlight): New variable. Replaces ...
6643 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6644 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6645 `GRUB_TERM_COLOR_STANDARD'.
6646 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6647 `normal_code' and `highlight_code' to `old_color_normal' and
6648 `old_color_highlight', respectively.
6649 (grub_menu_init_page): Update colors when drawing the menu, based on
6650 `menu_color_normal' and `menu_color_highlight' variables.
6651 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6652 a message is printed.
6653
182dd4e5 66542008-01-05 Robert Millan <rmh@aybabtu.com>
6655
6656 * kern/env.c (grub_env_context_open): Propagate hooks for global
6657 variables to new context.
6658
6659 * kern/main.c (grub_set_root_dev): Export `root' variable.
6660
ddf8f6ad 66612008-01-05 Robert Millan <rmh@aybabtu.com>
6662
6663 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 6664 discs unconditionally, since udev and others have options to provide
ddf8f6ad 6665 them.
6666
d8b43d9b 66672008-01-05 Robert Millan <rmh@aybabtu.com>
6668
6669 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6670
2bff2de3 66712008-01-04 Christian Franke <franke@computer.org>
6672
6673 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6674 of eisa_mmap.
6675
97eab917 66762008-01-03 Pavel Roskin <proski@gnu.org>
6677
6678 * kern/i386/linuxbios/init.c: Put "void" to all function
6679 declarations with no arguments.
6680 * kern/powerpc/ieee1275/init.c: Likewise.
6681 * term/i386/pc/at_keyboard.c: Likewise.
6682 * term/i386/pc/vga_text.c: Likewise.
6683 * util/grub-mkdevicemap.c: Likewise.
6684
b9416d00 66852008-01-02 Robert Millan <rmh@aybabtu.com>
6686
6687 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6688 message when loaded image is out of bounds.
6689 (grub_multiboot_load_elf64): Likewise.
6690
92695df9 66912008-01-02 Pavel Roskin <proski@gnu.org>
6692
6693 * util/grub.d/10_linux.in: Try version without ".old" when
6694 looking for initrd. It's better to use initrd from the newer
6695 kernel of the same version than no initrd at all.
6696
d98d9cad 66972008-01-01 Robert Millan <rmh@aybabtu.com>
6698
6699 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6700
dbfdce36 67012008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6702
f19dbdb7 6703 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 6704 grub_video_get_active_render_target.
6705 (grub_video_adapter): Added unmap_color and get_active_render_target.
6706
f19dbdb7 6707 * video/video.c: Added grub_video_unmap_color and
dbfdce36 6708 grub_video_get_active_render_target.
6709 (grub_video_get_info): Changed method to accept NULL pointer as an
6710 argument to allow detection of active video adapter.
6711
6712 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6713 grub_video_vbe_unmap_color_int.
6714 Added grub_video_vbe_unmap_color and
6715 grub_video_vbe_get_active_render_target.
6716 (grub_video_vbe_adapter): Added unmap_color and
6717 get_active_render_target.
6718
f19dbdb7 6719 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 6720 with grub_video_vbe_unmap_color_int.
6721
6722 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6723 (DEFAULT_NORMAL_COLOR): Likewise.
6724 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6725 (DEFAULT_FG_COLOR): Removed.
6726 (DEFAULT_BG_COLOR): Likewise.
6727 (DEFAULT_CURSOR_COLOR): Changed value.
6728 (grub_virtual_screen): Added standard_color_setting,
6729 normal_color_setting, highlight_color_setting and term_color.
6730 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6731 (bitmap_width): Added.
6732 (bitmap_height): Likewise.
6733 (bitmap): Likewise.
6734 (set_term_color): Likewise.
6735 (grub_virtual_screen_setup): Changed to use new terminal coloring
6736 settings.
6737 (grub_gfxterm_init): Added init for bitmap.
6738 (grub_gfxterm_fini): Added destroy for bitmap.
6739 (redraw_screen_rect): Updated to use background bitmap and new
6740 terminal coloring.
6741 (scroll_up): Added optimization for case when there is no bitmap.
6742 (grub_gfxterm_cls): Fixed to use correct background color.
6743 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6744 coloring.
6745 (grub_virtual_screen_setcolor): Likewise.
6746 (grub_virtual_screen_getcolor): Added.
6747 (grub_gfxterm_background_image_cmd): Likewise.
6748 (grub_video_term): Added setcolor and getcolor.
6749 (MOD_INIT): Added registration of background_image command.
6750 (MOD_TERM): Added unregistration for background_image command.
6751
c3c20931 67522007-12-30 Pavel Roskin <proski@gnu.org>
6753
6754 * loader/multiboot_loader.c: Fix multiboot command
6755 unregistration. Fix all typos in the word "multiboot".
6756
df266716 67572007-12-29 Pavel Roskin <proski@gnu.org>
94239199 6758
6759 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6760 support for initrd names used in Fedora.
6761
fc6e896c 67622007-12-26 Bean <bean123ch@gmail.com>
6763
6764 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6765 (cpio_mod_SOURCES): New variable.
6766 (cpio_mod_CFLAGS): Likewise.
6767 (cpio_mod_LDFLAGS): Likewise.
6768
6769 * fs/cpio.c: New file.
6770
6771 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6772
6773 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6774
6775 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6776
6777 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6778
533110ad 67792007-12-25 Robert Millan <rmh@aybabtu.com>
6780
6781 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6782 (grub_getcolor): New function.
6783
6784 * kern/term.c (grub_getcolor): New function.
6785 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6786 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6787 (print_entry): Set normal and highlight colors to
6788 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6789 respectively, before printing and restore them to old
6790 values afterwards.
6791 (grub_menu_init_page): Likewise. Fill an additional colored space
6792 that would otherwise be left blank.
6793
6794 * term/efi/console.c (grub_console_getcolor): New function.
6795 (struct grub_console_term.getcolor): New variable.
6796 * term/i386/pc/console.c (grub_console_getcolor): New function.
6797 (struct grub_console_term.getcolor): New variable.
6798 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6799 (struct grub_console_term.getcolor): New variable.
6800
6801 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6802 (struct grub_console_term.setcolor): Remove variable.
6803 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6804 (struct grub_console_term.setcolor): Remove variable.
6805 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6806 (struct grub_console_term.setcolor): Remove variable.
6807 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6808 (struct grub_console_term.setcolor): Remove variable.
6809
4931827f 68102007-12-25 Robert Millan <rmh@aybabtu.com>
6811
6812 * configure.ac: Search for possible unifont.hex locations, and
6813 define UNIFONT_HEX if found.
6814
6815 * Makefile.in (UNIFONT_HEX): Define variable.
6816 (DATA): Rename to ...
6817 (PKGLIB): ... this. Update all users.
6818 (PKGDATA): New variable.
6819 (pkgdata_IMAGES): Rename to ...
6820 (pkglib_IMAGES): ... this. Update all users.
6821 (pkgdata_MODULES): Rename to ...
6822 (pkglib_MODULES): ... this. Update all users.
6823 (pkgdata_PROGRAMS): Rename to ...
6824 (pkglib_PROGRAMS): ... this. Update all users.
6825 (pkgdata_DATA): Rename to ...
6826 (pkglib_DATA): ... this. Update all users.
6827 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6828 (unicode.pff, ascii.pff): New rules.
6829 (all-local): Add `$(PKGDATA)' dependency.
6830 (install-local): Process `$(PKGDATA)'.
6831
6832 * util/update-grub_lib.in (font_path): Search for *.pff files in
6833 a few more locations, including `${pkgdata}'.
6834
57e57e31 68352007-12-23 Robert Millan <rmh@aybabtu.com>
6836
6837 Patch from Bean <bean123ch@gmail.com>:
6838 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6839 `size'.
6840
4bc72aa9 68412007-12-21 Bean <bean123ch@gmail.com>
6842
6843 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6844 (ntfscomp_mod_SOURCES): New variable.
6845 (ntfscomp_mod_CFLAGS): Likewise.
6846 (ntfscomp_mod_LDFLAGS): Likewise.
6847
6848 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6849 (grub_probe_SOURCES): Likewise.
6850 (grub_emu_SOURCES): Likewise.
6851
6852 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6853 (grub_emu_SOURCES): Likewise.
6854
6855 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6856 (grub_emu_SOURCES): Likewise.
6857
6858 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6859 (grub_emu_SOURCES): Likewise.
6860
6861 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6862 (read_run_list): Renamed to grub_ntfs_read_run_list.
6863 (decomp_nextvcn): Moved to ntfscomp.c.
6864 (decomp_getch): Likewise.
6865 (decomp_get16): Likewise.
6866 (decomp_block): Likewise.
6867 (read_block): Likewise.
6868 (read_data): Partially moved to ntfscomp.c.
6869 (fixup): Change unsigned to grub_uint16_t.
6870 (read_mft): Change unsigned long to grub_uint32_t.
6871 (read_attr): Likewise.
6872 (read_data): Likewise.
6873 (read_run_data): Likewise.
6874 (read_run_list): Likewise.
6875 (read_mft): Likewise.
6876
6877 * fs/ntfscomp.c: New file.
6878
6879 * include/grub/ntfs.h: New file.
6880
af680a87 68812007-12-16 Robert Millan <rmh@aybabtu.com>
6882
6883 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6884 IDE disk check, since Linux is known to support 20 IDE disks.
6885 Reported by Colin Watson.
6886
84be7599 68872007-12-15 Bean <bean123ch@gmail.com>
6888
6889 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6890 (lnxboot_img_SOURCES): New variable.
6891 (lnxboot_img_ASFLAGS): Likewise.
6892 (lnxboot_img_LDFLAGS): Likewise.
6893
6894 * boot/i386/pc/lnxboot.S: New file.
6895
6af9db01 68962007-11-24 Pavel Roskin <proski@gnu.org>
6897
6898 * configure.ac: Test if '--build-id=none' is supported by the
6899 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6900 objcopy to generate incorrect binary files (binutils
6901 2.17.50.0.18-1 as shipped by Fedora 8).
6902 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6903 linking, so that build ID doesn't break the test.
6904
7361cfe6 69052007-11-24 Pavel Roskin <proski@gnu.org>
6906
6907 * include/grub/i386/time.h: use "void" in the argument list
6908 of grub_cpu_idle().
6909 * include/grub/powerpc/time.h: Likewise.
6910 * include/grub/sparc64/time.h: Likewise.
6911
1593e10c 69122007-11-18 Christian Franke <franke@computer.org>
6913
6914 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6915 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6916 This fixes the problem that function keys did not work in grub-emu.
6917
3b8db1a8 69182007-11-18 Christian Franke <franke@computer.org>
6919
6920 * disk/host.c (grub_host_open): Remove attribute unused from
6921 name parameter. Add check for "host". This fixes the problem
6922 that grub-emu does not find partitions.
6923
2e29408d 69242007-11-18 Christian Franke <franke@computer.org>
6925
6926 * util/hostfs.c (is_dir): New function.
6927 (grub_hostfs_dir): Handle missing dirent.d_type case.
6928 (grub_hostfs_read): Add missing fseek().
6929 (grub_hostfs_label): Clear label pointer. This fixes a crash
6930 of grub-emu on "ls (host)".
6931
398cd047 69322007-11-18 Christian Franke <franke@computer.org>
6933
6934 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6935 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6936 to 64 bit boundary by default.
6937
c405c391 69382007-11-18 Bean <bean123ch@gmail.com>
6939
6940 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6941 (hexdump_mod_SOURCES): New variable.
6942 (hexdump_mod_CFLAGS): Likewise.
6943 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 6944
c405c391 6945 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6946
6947 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6948
6949 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6950
6951 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6952
6953 * include/grub/hexdump.h: New file.
6954
6955 * commands/hexdump.c: New file.
6956
5cced7fd 69572007-11-10 Robert Millan <rmh@aybabtu.com>
6958
6959 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6960 in grub_outb() calls.
6961 (beep_on): Likewise.
6962
8b714eb0 69632007-11-10 Christian Franke <franke@computer.org>
6964
6965 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6966 (grub_menu_run): Likewise.
6967
ce0f1839 69682007-11-10 Robert Millan <rmh@aybabtu.com>
6969
6970 * include/grub/i386/efi/machine.h: New file.
6971 * include/grub/i386/linuxbios/machine.h: Likewise.
6972 * include/grub/i386/pc/machine.h: Likewise.
6973 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6974 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6975
6976 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6977 (serial_hw_io_addr): New variable.
6978 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6979 instead of `(unsigned short *) 0x400'.
6980
270c237d 69812007-11-10 Bean <bean123ch@gmail.com>
6982
6983 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6984
a87783bf 69852007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6986
6987 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6988 (vga_mod_SOURCES): Added.
6989 (vga_mod_CFLAGS): Likewise.
6990 (vga_mod_LDFLAGS): Likewise.
6991
6992 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6993 grub_outb() calls.
6994 (set_map_mask): Likewise.
6995 (set_read_map): Likewise.
6996 (set_read_address): Likewise.
6997 (vga_font): Removed variable.
6998 (get_vga_glyph): Removed function.
6999 (invalidate_char): Likewise.
7000 (write_char): Changed to use grub_font_get_glyph() for font
7001 information.
7002 (grub_vga_putchar): Likewise.
7003 (grub_vga_getcharwidth): Likewise.
7004
6433b448 70052007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7006
7007 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7008 flags.
7009 (pxeboot_img_LDFLAGS): Likewise.
7010 (diskboot_img_LDFLAGS): Likewise.
7011 (kernel_img_LDFLAGS): Likewise.
7012
49178511 70132007-11-06 Robert Millan <rmh@aybabtu.com>
7014
7015 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7016 in grub_outb() calls.
7017 (serial_hw_init): Likewise.
7018
53b052de 70192007-11-05 Robert Millan <rmh@aybabtu.com>
7020
7021 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7022 spaces. Skip non-regular files.
7023
5ab33bba 70242007-11-05 Robert Millan <rmh@aybabtu.com>
7025
7026 * kern/disk.c (grub_disk_firmware_fini)
7027 (grub_disk_firmware_is_tainted): New variables.
7028
7029 * include/grub/disk.h (grub_disk_firmware_fini)
7030 (grub_disk_firmware_is_tainted): Likewise.
7031
7032 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7033 (grub_disk_biosdisk_fini): ... to here.
7034 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7035 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7036 is set. Register grub_disk_biosdisk_fini() in
7037 `grub_disk_firmware_fini'.
7038
7039 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7040 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7041 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7042 to finish existing firmware disk interface.
7043
7044 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7045 (ata_mod_SOURCES): New variable.
7046 (ata_mod_CFLAGS): Likewise.
7047 (ata_mod_LDFLAGS): Likewise.
7048
0149ab7c 70492007-11-05 Robert Millan <rmh@aybabtu.com>
7050
7051 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7052 (grub_ata_wait): Reimplement using grub_millisleep().
7053
7054 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7055 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7056
be7ac41e 70572007-11-03 Marco Gerards <marco@gnu.org>
7058
7059 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7060 (CRTC_ADDR_PORT): New macro.
7061 (CRTC_DATA_PORT): Likewise.
7062 (CRTC_CURSOR): Likewise.
7063 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7064 (CRTC_CURSOR_ADDR_LOW): Likewise.
7065 (update_cursor): New function.
7066 (grub_console_real_putchar): Call `update_cursor'.
7067 (grub_console_gotoxy): Likewise.
7068 (grub_console_cls): Set the default color when clearing the
7069 screen.
7070 (grub_console_setcursor): Implemented.
7071
bb06ab2e 70722007-11-03 Marco Gerards <marco@gnu.org>
7073
7074 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7075 become activate.
7076 (grub_ata_pio_write): Likewise.
7077
7078 (grub_atapi_identify): Wait after issuing an ATA command.
7079 (grub_atapi_packet): Likewise.
7080 (grub_ata_identify): Likewise.
7081 (grub_ata_readwrite): Likewise.
7082
cf8f780b 70832007-11-03 Marco Gerards <marco@gnu.org>
7084
7085 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7086 (grub_ata_pio_write): Likewise.
7087 (grub_ata_readwrite): Use `grub_error', instead of
7088 returning `grub_errno'.
7089
ed649e54 70902007-11-03 Marco Gerards <marco@gnu.org>
7091
7092 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7093 grub_ata_pio_write once for every single sector, instead of for
7094 multiple sectors.
7095
ca25d8f0 70962007-10-31 Robert Millan <rmh@aybabtu.com>
7097
7098 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7099
7100 * conf/i386-linuxbios.rmk: New file.
7101
7102 * kern/i386/pc/hardware.c: Likewise.
7103 * term/i386/pc/at_keyboard.c: Likewise.
7104 * term/i386/pc/vga_text.c: Likewise.
7105
7106 * include/grub/i386/linuxbios/boot.h: Likewise.
7107 * include/grub/i386/linuxbios/console.h: Likewise.
7108 * include/grub/i386/linuxbios/init.h: Likewise.
7109 * include/grub/i386/linuxbios/kernel.h: Likewise.
7110 * include/grub/i386/linuxbios/loader.h: Likewise.
7111 * include/grub/i386/linuxbios/memory.h: Likewise.
7112 * include/grub/i386/linuxbios/serial.h: Likewise.
7113 * include/grub/i386/linuxbios/time.h: Likewise.
7114
7115 * kern/i386/linuxbios/init.c: Likewise.
7116 * kern/i386/linuxbios/startup.S: Likewise.
7117 * kern/i386/linuxbios/table.c: Likewise.
7118
e911ecc1 71192007-10-31 Marco Gerards <marco@gnu.org>
7120
7121 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7122 (ata_mod_SOURCES): New variable.
7123 (ata_mod_CFLAGS): Likewise.
7124 (ata_mod_LDFLAGS): Likewise.
7125
7126 * disk/ata.c: New file.
7127
7128 * include/grub/disk.h (grub_disk_dev_id): Add
7129 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 7130
7f66d0e0 71312007-10-31 Robert Millan <rmh@aybabtu.com>
7132
7133 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7134 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7135
7136 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7137 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7138
7139 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7140 `<grub/types.h>'.
7141
7142 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7143
5cd7dd46 71442007-10-27 Robert Millan <rmh@aybabtu.com>
7145
3236ca65 7146 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 7147
2ebfc90f 71482007-10-22 Robert Millan <rmh@aybabtu.com>
7149
7150 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7151 `"../realmode.S"'.
7152 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7153
73fcb0f3 71542007-10-22 Robert Millan <rmh@aybabtu.com>
7155
7156 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7157 (pkgdata_MODULES): Add `biosdisk.mod'.
7158 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7159 variables.
7160
7161 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7162 (grub_biosdisk_init): Replace with ...
7163 (GRUB_MOD_INIT(biosdisk)): ... this.
7164 (grub_biosdisk_fini): Replace with ...
7165 (GRUB_MOD_FINI(biosdisk)): ... this.
7166
7167 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7168 (grub_machine_init): Remove call to grub_biosdisk_init().
7169 (grub_machine_fini): Remove call to grub_machine_fini().
7170
7171 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7172
3381d274 71732007-10-22 Robert Millan <rmh@aybabtu.com>
7174
7175 * include/grub/time.h: New file.
7176 * include/grub/i386/time.h: Likewise.
7177 * include/grub/powerpc/time.h: Likewise.
7178 * include/grub/sparc64/time.h: Likewise.
7179
7180 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7181 instances to ...
7182 (KERNEL_MACHINE_TIME_HEADER): ... this.
7183 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7184 instances to ...
7185 (KERNEL_MACHINE_TIME_HEADER): ... this.
7186 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7187 instances to ...
7188 (KERNEL_MACHINE_TIME_HEADER): ... this.
7189
7190 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7191 (grub_millisleep): New function.
7192 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7193 (grub_millisleep): New function.
7194 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7195 Remove `grub/machine/time.h' include.
7196 (grub_millisleep): New function.
7197 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7198 Remove `grub/machine/time.h' include.
7199 (grub_millisleep): New function.
7200
7201 * include/grub/misc.h (grub_div_roundup): New function.
7202
7203 * kern/misc.c: Include `<grub/time.h>'.
7204 (grub_millisleep_generic): New function.
7205
7206 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7207 Add `time.h'.
7208 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7209 Add `time.h'.
7210 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7211 `machine/time.h'. Add `time.h'.
7212 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7213
a39a0312 72142007-10-21 Robert Millan <rmh@aybabtu.com>
7215
7216 * include/grub/misc.h (grub_max): New function.
7217
2aad70e2 72182007-10-21 Robert Millan <rmh@aybabtu.com>
7219
7220 * util/misc.c (grub_util_info): Call fflush() before returning.
7221
54b71c4b 72222007-10-20 Robert Millan <rmh@aybabtu.com>
7223
7224 * genmk.rb (Image): Copy `extra_flags' from here ...
7225 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7226
7227 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7228 to `argc' and `args' arguments.
7229
a979f513 72302007-10-17 Robert Millan <rmh@aybabtu.com>
7231
7232 * kern/i386/loader.S: New file.
7233
7234 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7235 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7236 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7237 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7238 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7239 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7240 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7241 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7242 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7243 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7244 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7245 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7246 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7247 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7248
7249 * kern/i386/realmode.S: New file.
7250
7251 * kern/i386/pc/startup.S (protstack): Moved from here ...
7252 * kern/i386/realmode.S (protstack)... to here.
7253 * kern/i386/pc/startup.S (gdt): Moved from here ...
7254 * kern/i386/realmode.S (gdt)... to here.
7255 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7256 * kern/i386/realmode.S (prot_to_real)... to here.
7257
7258 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7259 `kern/i386/realmode.S'.
7260
825fc8fd 72612007-10-17 Robert Millan <rmh@aybabtu.com>
7262
7263 * include/grub/i386/loader.h: New file.
7264
7265 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7266 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7267 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7268 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7269 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7270 * include/grub/i386/loader.h (grub_linux_prot_size)
7271 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7272 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7273 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7274 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7275
7276 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7277
e179b2f4 72782007-10-15 Robert Millan <rmh@aybabtu.com>
7279
7280 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7281 filesystem when dev->disk is unset.
7282 Do probe for filesystem even when dev->disk->has_partitions is set.
7283 In case a filesystem is found, always report it.
7284 In case it isn't, if dev->disk->has_partitions is set, report that
7285 a partition table was found instead of reporting that no filesystem
7286 could be identified.
7287
5db82af6 72882007-10-12 Robert Millan <rmh@aybabtu.com>
7289
7290 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7291 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7292
68f6ac74 7293 * include/grub/types.h (grub_host_to_target16): New macro.
7294 (grub_host_to_target32): Likewise.
7295 (grub_host_to_target64): Likewise.
7296 (grub_target_to_host16): Likewise.
7297 (grub_target_to_host32): Likewise.
7298 (grub_target_to_host64): Likewise.
5db82af6 7299
7300 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7301 Renamed from to ...
7302 (GRUB_MOD_ALIGN): ...this. Update all users.
7303
68f6ac74 7304 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7305 grub_host_to_target32.
7306 Replace grub_be_to_cpu32 with grub_target_to_host32.
7307 (load_modules): Likewise.
7308 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7309 Replace grub_be_to_cpu32 with grub_target_to_host32.
7310 Replace grub_cpu_to_be16 with grub_host_to_target16.
7311 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 7312
3cf497cc 73132007-10-12 Robert Millan <rmh@aybabtu.com>
7314
7315 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7316 * util/elf/grub-mkimage.c: ... here.
7317
7318 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7319 `util/powerpc/ieee1275/grub-mkimage.c'.
7320
c8cc3692 73212007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 7322
c8cc3692 7323 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7324 and make it easier to figure out.
7325 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7326 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7327 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7328 leave us with less than HEAP_MIN_SIZE total heap.
7329 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 7330
5c58b791 73312007-10-03 Robert Millan <rmh@aybabtu.com>
7332
7333 * include/grub/i386/io.h: New file.
7334 * commands/i386/pc/play.c (inb): Removed.
7335 (outb): Removed.
7336 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7337 with grub_outb().
afcd2ef8 7338 * term/i386/pc/serial.c (inb): Removed.
7339 (outb): Removed.
7340 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7341 with grub_outb().
7342 * term/i386/pc/vga.c (inb): Removed.
7343 (outb): Removed.
7344 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7345 with grub_outb().
5c58b791 7346
1a477ed6 73472007-10-02 Robert Millan <rmh@aybabtu.com>
7348
7349 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7350 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7351 Reported by Marcin Kurek.
7352
6b5d80fa 73532007-09-07 Robert Millan <rmh@aybabtu.com>
7354
7355 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7356 SmartFirmware version updates (as released by Sven Luther), and avoid
7357 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7358 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7359 known broken.
7360
5618afbf 73612007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7362
7363 From Hitoshi Ozeki:
7364 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7365 when merging two regions.
7366
6139dcd9 73672007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7368
508e39ee 7369 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7370 * normal/completion.c (grub_normal_do_completion): Likewise.
7371 Reported by Hitoshi Ozeki.
7372
73732007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7374
6139dcd9 7375 Do not use devices at boot in chainloading.
f19dbdb7 7376
6139dcd9 7377 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7378 (boot_part_addr): Likewise.
7379 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7380 with BOOT_DRIVE and BOOT_PART_ADDR.
7381 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7382 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7383
38da6516 73842007-08-29 Robert Millan <rmh@aybabtu.com>
7385
7386 Patch from Simon Peter <dn.tlp@gmx.net>:
7387 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7388 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7389 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7390 util/i386/pc/grub-setup.c_DEPENDENCIES.
7391 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7392 util/grub-probe.c_DEPENDENCIES.
7393 * conf/powerpc-ieee1275.rmk: Likewise.
7394
29d0928c 73952007-08-28 Robert Millan <rmh@aybabtu.com>
7396
7397 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7398 to tell grub-mkdevicemap how to name devices.
7399 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7400 feature).
7401
7402 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7403 util/i386/get_disk_name.c.
7404 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7405 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7406 util/ieee1275/get_disk_name.c.
7407
7408 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7409
7410 * DISTLIST: Add util/i386/get_disk_name.c and
7411 util/ieee1275/get_disk_name.c.
7412
7413 * util/grub-mkdevicemap.c: Replace device naming logic with
7414 grub_util_get_disk_name() calls.
7415
5a0d3cca 74162007-08-20 Robert Millan <rmh@aybabtu.com>
7417
7418 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7419 (so that it works for both plural and singular quantities).
7420
8b72db2f 74212007-08-05 Robert Millan <rmh@aybabtu.com>
7422
7423 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7424 so that [xz] isn't taken into account when determining order.
7425
352466bf 74262007-08-02 Marco Gerards <marco@gnu.org>
7427
7428 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7429 `include/multiboot2.h', `include/grub/elfload.h',
7430 `include/multiboot.h', `include/grub/multiboot.h',
7431 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7432 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7433 `kern/elf.c', `loader/multiboot_loader.c',
7434 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7435 `loader/i386/pc/multiboot2.c',
7436 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7437 `util/i386/pc/grub-mkrescue.in'. Remove
7438 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7439 `include/grub/i386/pc/util/biosdisk.h' and
7440 `include/grub/powerpc/ieee1275/multiboot.h'.
7441
8f096014 74422007-08-02 Bean <bean123ch@gmail.com>
7443
7444 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7445 (ntfs_mod_SOURCES): New variable.
7446 (ntfs_mod_CFLAGS): Likewise.
7447 (ntfs_mod_LDFLAGS): Likewise.
7448
7449 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7450 (grub_probe_SOURCES): Likewise.
7451 (grub_emu_SOURCES): Likewise.
7452
7453 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7454 (grub_emu_SOURCES): Likewise.
7455
7456 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7457 (grub_emu_SOURCES): Likewise.
f19dbdb7 7458
8f096014 7459 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7460
7461 * fs/ntfs.c: New file.
7462
9959f7db 74632007-08-02 Bean <bean123ch@gmail.com>
7464
7465 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7466
7467 * file.h (grub_file): Likewise.
7468
7469 * fshelp.h (grub_fshelp_read_file): Likewise.
7470
7471 * util/i386/pc/grub-setup.c (setup): Likewise.
7472 (save_first_sector): Likewise.
7473 (save_blocklists): Likewise.
f19dbdb7 7474
9959f7db 7475 * fs/affs.c (grub_affs_read_file): Likewise.
7476
7477 * fs/ext2.c (grub_ext2_read_file): Likewise.
7478
7479 * fs/fat.c (grub_fat_read_data): Likewise.
7480
7481 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7482
7483 * fs/hfs.c (grub_hfs_read_file): Likewise.
7484
7485 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7486
7487 * fs/jfs.c (grub_jfs_read_file): Likewise.
7488
7489 * fs/minix.c (grub_minix_read_file): Likewise.
7490
7491 * fs/sfs.c (grub_sfs_read_file): Likewise.
7492
7493 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 7494
9959f7db 7495 * fs/xfs.c (grub_xfs_read_file): Likewise.
7496
7497 * command/blocklist.c (read_blocklist): Likewise.
7498 (print_blocklist): Likewise.
7499
0a203f83 75002007-08-02 Marco Gerards <marco@gnu.org>
7501
7502 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7503 `util/hostfs.c'.
7504
7505 * disk/host.c: New file.
7506
7507 * util/hostfs.c: Likewise.
7508
7509 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7510 return `GRUB_ERR_BAD_FS'.
7511 * fs/sfs.c (grub_sfs_mount): Likewise.
7512 * fs/xfs.c (grub_xfs_mount): Likewise.
7513
7514 * include/grub/disk.h (enum grub_disk_dev_id): Add
7515 `GRUB_DISK_DEVICE_HOST_ID'.
7516
7517 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7518
e5dfe777 75192007-07-24 Jerone Young <jerone@gmail.com>
7520
f19dbdb7 7521 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 7522 modules for compilation.
7523 * conf/powerpc-ieee1275.rmk: Likewise.
7524
7525 * include/multiboot.h: Move multiboot definitions to one file. Rename
7526 many definitions to not get grub specific.
7527 * include/multiboot2.h: Create header with multiboot 2 definitions.
7528 * include/grub/multiboot.h: Header for grub specific function
7529 prototypes and definitions.
7530 * include/grub/multiboot2.h: Likewise.
7531 * include/grub/multiboot_loader.h: Likewise.
7532 * include/grub/i386/pc/multiboot.h: Removed.
7533 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7534
7535 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7536 and 2 to allow for one multiboot and module commands.
7537 * loader/multiboot2.c: Add multiboot2 functionality.
7538 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7539 and definition names.
7540 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7541 2 functions.
7542 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7543 ieee1275 specific multiboot2 code.
7544
7545 * kern/i386/pc/startup.S: Change headers and definition names for
7546 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7547
daf0f0ba 75482007-07-22 Robert Millan <rmh@aybabtu.com>
7549
7550 * geninitheader.sh: Process file specified in first parameter rather
7551 than hardcoding grub_modules_init.lst.
fe6b695a 7552 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 7553 than hardcoding grub_modules_init.h.
7554
7555 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7556 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7557 grub_probe_init.[ch] and grub_setup_init.[ch].
7558
7559 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7560 grub_modules_init.h with grub_emu_init.h.
7561 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7562 grub_probe_init.[ch] files.
7563 * conf/i386-efi.rmk: Likewise.
7564 * conf/i386-pc.rmk: Likewise.
7565 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7566 grub_setup_init.[ch] files.
7567
7568 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7569 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7570 to initialize modules rather than a list of hardcoded functions.
7571 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7572 grub_init_all() to initialize modules rather than a list of hardcoded
7573 functions.
7574
54cdc1cc 75752007-07-22 Robert Millan <rmh@aybabtu.com>
7576
7577 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7578 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7579
ad0686cc 75802007-07-22 Robert Millan <rmh@aybabtu.com>
7581
7582 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7583 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7584 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7585 flag when running on SmartFirmware.
7586 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7587 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7588 was set.
7589
7590 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7591 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7592 rather than decreasing it.
7593
7594 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7595 there's not enough space to do it, fail in the same way as when it
7596 can't be done because there are no partitions.
7597
7598 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7599 when nvsetenv failed.
7600
969c02ec 76012007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7602
7603 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7604 because this rule is automatically generated.
7605 (grub-mkrescue): Removed for the same reason as above.
7606
5a79f472 76072007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7608
7609 Migrate to GNU General Public License Version 3.
f19dbdb7 7610
5a79f472 7611 * COPYING: Replaced with the plain text version of GPLv3.
7612
7613 * config.guess: Updated from gnulib.
7614 * config.sub: Likewise.
7615
7616 * geninit.sh: Output a GPLv3 copyright notice.
7617 * geninitheader.sh: Likewise.
7618 * genmodsrc.sh: Likewise.
7619 * gensymlist.sh.in: Likewise.
7620
7621 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7622 * boot/i386/pc/diskboot.S: Likewise.
7623 * boot/i386/pc/pxeboot.S: Likewise.
7624 * commands/blocklist.c: Likewise.
7625 * commands/boot.c: Likewise.
7626 * commands/cat.c: Likewise.
7627 * commands/cmp.c: Likewise.
7628 * commands/configfile.c: Likewise.
7629 * commands/echo.c: Likewise.
7630 * commands/help.c: Likewise.
7631 * commands/ls.c: Likewise.
7632 * commands/search.c: Likewise.
7633 * commands/terminal.c: Likewise.
7634 * commands/test.c: Likewise.
7635 * commands/videotest.c: Likewise.
7636 * commands/i386/cpuid.c: Likewise.
7637 * commands/i386/pc/halt.c: Likewise.
7638 * commands/i386/pc/play.c: Likewise.
7639 * commands/i386/pc/reboot.c: Likewise.
7640 * commands/i386/pc/vbeinfo.c: Likewise.
7641 * commands/i386/pc/vbetest.c: Likewise.
7642 * commands/ieee1275/halt.c: Likewise.
7643 * commands/ieee1275/reboot.c: Likewise.
7644 * commands/ieee1275/suspend.c: Likewise.
7645 * disk/loopback.c: Likewise.
7646 * disk/lvm.c: Likewise.
7647 * disk/raid.c: Likewise.
7648 * disk/efi/efidisk.c: Likewise.
7649 * disk/i386/pc/biosdisk.c: Likewise.
7650 * disk/ieee1275/ofdisk.c: Likewise.
7651 * font/manager.c: Likewise.
7652 * fs/affs.c: Likewise.
7653 * fs/ext2.c: Likewise.
7654 * fs/fat.c: Likewise.
7655 * fs/fshelp.c: Likewise.
7656 * fs/hfs.c: Likewise.
7657 * fs/hfsplus.c: Likewise.
7658 * fs/iso9660.c: Likewise.
7659 * fs/jfs.c: Likewise.
7660 * fs/minix.c: Likewise.
7661 * fs/sfs.c: Likewise.
7662 * fs/ufs.c: Likewise.
7663 * fs/xfs.c: Likewise.
7664 * hello/hello.c: Likewise.
7665 * include/grub/acorn_filecore.h: Likewise.
7666 * include/grub/arg.h: Likewise.
7667 * include/grub/bitmap.h: Likewise.
7668 * include/grub/boot.h: Likewise.
7669 * include/grub/cache.h: Likewise.
7670 * include/grub/device.h: Likewise.
7671 * include/grub/disk.h: Likewise.
7672 * include/grub/dl.h: Likewise.
7673 * include/grub/elfload.h: Likewise.
7674 * include/grub/env.h: Likewise.
7675 * include/grub/err.h: Likewise.
7676 * include/grub/file.h: Likewise.
7677 * include/grub/font.h: Likewise.
7678 * include/grub/fs.h: Likewise.
7679 * include/grub/fshelp.h: Likewise.
7680 * include/grub/gzio.h: Likewise.
7681 * include/grub/hfs.h: Likewise.
7682 * include/grub/kernel.h: Likewise.
7683 * include/grub/loader.h: Likewise.
7684 * include/grub/lvm.h: Likewise.
7685 * include/grub/misc.h: Likewise.
7686 * include/grub/mm.h: Likewise.
7687 * include/grub/net.h: Likewise.
7688 * include/grub/normal.h: Likewise.
7689 * include/grub/parser.h: Likewise.
7690 * include/grub/partition.h: Likewise.
7691 * include/grub/pc_partition.h: Likewise.
7692 * include/grub/raid.h: Likewise.
7693 * include/grub/rescue.h: Likewise.
7694 * include/grub/script.h: Likewise.
7695 * include/grub/setjmp.h: Likewise.
7696 * include/grub/symbol.h: Likewise.
7697 * include/grub/term.h: Likewise.
7698 * include/grub/terminfo.h: Likewise.
7699 * include/grub/tparm.h: Likewise.
7700 * include/grub/types.h: Likewise.
7701 * include/grub/video.h: Likewise.
7702 * include/grub/efi/api.h: Likewise.
7703 * include/grub/efi/chainloader.h: Likewise.
7704 * include/grub/efi/console.h: Likewise.
7705 * include/grub/efi/console_control.h: Likewise.
7706 * include/grub/efi/disk.h: Likewise.
7707 * include/grub/efi/efi.h: Likewise.
7708 * include/grub/efi/pe32.h: Likewise.
7709 * include/grub/efi/time.h: Likewise.
7710 * include/grub/i386/linux.h: Likewise.
7711 * include/grub/i386/setjmp.h: Likewise.
7712 * include/grub/i386/types.h: Likewise.
7713 * include/grub/i386/efi/kernel.h: Likewise.
7714 * include/grub/i386/efi/loader.h: Likewise.
7715 * include/grub/i386/efi/time.h: Likewise.
7716 * include/grub/i386/pc/biosdisk.h: Likewise.
7717 * include/grub/i386/pc/boot.h: Likewise.
7718 * include/grub/i386/pc/chainloader.h: Likewise.
7719 * include/grub/i386/pc/console.h: Likewise.
7720 * include/grub/i386/pc/init.h: Likewise.
7721 * include/grub/i386/pc/kernel.h: Likewise.
7722 * include/grub/i386/pc/loader.h: Likewise.
7723 * include/grub/i386/pc/memory.h: Likewise.
7724 * include/grub/i386/pc/multiboot.h: Likewise.
7725 * include/grub/i386/pc/serial.h: Likewise.
7726 * include/grub/i386/pc/time.h: Likewise.
7727 * include/grub/i386/pc/vbe.h: Likewise.
7728 * include/grub/i386/pc/vbeblit.h: Likewise.
7729 * include/grub/i386/pc/vbefill.h: Likewise.
7730 * include/grub/i386/pc/vbeutil.h: Likewise.
7731 * include/grub/i386/pc/vga.h: Likewise.
7732 * include/grub/ieee1275/ieee1275.h: Likewise.
7733 * include/grub/ieee1275/ofdisk.h: Likewise.
7734 * include/grub/powerpc/libgcc.h: Likewise.
7735 * include/grub/powerpc/setjmp.h: Likewise.
7736 * include/grub/powerpc/types.h: Likewise.
7737 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7738 * include/grub/powerpc/ieee1275/console.h: Likewise.
7739 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7740 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7741 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7742 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7743 * include/grub/powerpc/ieee1275/time.h: Likewise.
7744 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7745 * include/grub/sparc64/libgcc.h: Likewise.
7746 * include/grub/sparc64/setjmp.h: Likewise.
7747 * include/grub/sparc64/types.h: Likewise.
7748 * include/grub/sparc64/ieee1275/console.h: Likewise.
7749 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7750 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7751 * include/grub/sparc64/ieee1275/time.h: Likewise.
7752 * include/grub/util/biosdisk.h: Likewise.
7753 * include/grub/util/getroot.h: Likewise.
7754 * include/grub/util/lvm.h: Likewise.
7755 * include/grub/util/misc.h: Likewise.
7756 * include/grub/util/raid.h: Likewise.
7757 * include/grub/util/resolve.h: Likewise.
7758 * io/gzio.c: Likewise.
7759 * kern/device.c: Likewise.
7760 * kern/disk.c: Likewise.
7761 * kern/dl.c: Likewise.
7762 * kern/elf.c: Likewise.
7763 * kern/env.c: Likewise.
7764 * kern/err.c: Likewise.
7765 * kern/file.c: Likewise.
7766 * kern/fs.c: Likewise.
7767 * kern/loader.c: Likewise.
7768 * kern/main.c: Likewise.
7769 * kern/misc.c: Likewise.
7770 * kern/mm.c: Likewise.
7771 * kern/parser.c: Likewise.
7772 * kern/partition.c: Likewise.
7773 * kern/rescue.c: Likewise.
7774 * kern/term.c: Likewise.
7775 * kern/efi/efi.c: Likewise.
7776 * kern/efi/init.c: Likewise.
7777 * kern/efi/mm.c: Likewise.
7778 * kern/i386/dl.c: Likewise.
7779 * kern/i386/efi/init.c: Likewise.
7780 * kern/i386/efi/startup.S: Likewise.
7781 * kern/i386/pc/init.c: Likewise.
7782 * kern/i386/pc/lzo1x.S: Likewise.
7783 * kern/i386/pc/startup.S: Likewise.
7784 * kern/ieee1275/ieee1275.c: Likewise.
7785 * kern/powerpc/cache.S: Likewise.
7786 * kern/powerpc/dl.c: Likewise.
7787 * kern/powerpc/ieee1275/cmain.c: Likewise.
7788 * kern/powerpc/ieee1275/crt0.S: Likewise.
7789 * kern/powerpc/ieee1275/init.c: Likewise.
7790 * kern/powerpc/ieee1275/openfw.c: Likewise.
7791 * kern/sparc64/cache.S: Likewise.
7792 * kern/sparc64/dl.c: Likewise.
7793 * kern/sparc64/ieee1275/init.c: Likewise.
7794 * kern/sparc64/ieee1275/openfw.c: Likewise.
7795 * loader/efi/chainloader.c: Likewise.
7796 * loader/efi/chainloader_normal.c: Likewise.
7797 * loader/i386/efi/linux.c: Likewise.
7798 * loader/i386/efi/linux_normal.c: Likewise.
7799 * loader/i386/pc/chainloader.c: Likewise.
7800 * loader/i386/pc/chainloader_normal.c: Likewise.
7801 * loader/i386/pc/linux.c: Likewise.
7802 * loader/i386/pc/linux_normal.c: Likewise.
7803 * loader/i386/pc/multiboot.c: Likewise.
7804 * loader/i386/pc/multiboot_normal.c: Likewise.
7805 * loader/powerpc/ieee1275/linux.c: Likewise.
7806 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7807 * normal/arg.c: Likewise.
7808 * normal/cmdline.c: Likewise.
7809 * normal/command.c: Likewise.
7810 * normal/completion.c: Likewise.
7811 * normal/execute.c: Likewise.
7812 * normal/function.c: Likewise.
7813 * normal/lexer.c: Likewise.
7814 * normal/main.c: Likewise.
7815 * normal/menu.c: Likewise.
7816 * normal/menu_entry.c: Likewise.
7817 * normal/misc.c: Likewise.
7818 * normal/parser.y: Likewise.
7819 * normal/script.c: Likewise.
7820 * normal/i386/setjmp.S: Likewise.
7821 * normal/powerpc/setjmp.S: Likewise.
7822 * normal/sparc64/setjmp.S: Likewise.
7823 * partmap/acorn.c: Likewise.
7824 * partmap/amiga.c: Likewise.
7825 * partmap/apple.c: Likewise.
7826 * partmap/gpt.c: Likewise.
7827 * partmap/pc.c: Likewise.
7828 * partmap/sun.c: Likewise.
7829 * term/gfxterm.c: Likewise.
7830 * term/terminfo.c: Likewise.
7831 * term/efi/console.c: Likewise.
7832 * term/i386/pc/console.c: Likewise.
7833 * term/i386/pc/serial.c: Likewise.
7834 * term/i386/pc/vesafb.c: Likewise.
7835 * term/i386/pc/vga.c: Likewise.
7836 * term/ieee1275/ofconsole.c: Likewise.
7837 * util/biosdisk.c: Likewise.
7838 * util/console.c: Likewise.
7839 * util/genmoddep.c: Likewise.
7840 * util/getroot.c: Likewise.
7841 * util/grub-emu.c: Likewise.
7842 * util/grub-mkdevicemap.c: Likewise.
7843 * util/grub-probe.c: Likewise.
7844 * util/lvm.c: Likewise.
7845 * util/misc.c: Likewise.
7846 * util/raid.c: Likewise.
7847 * util/resolve.c: Likewise.
7848 * util/update-grub.in: Likewise.
7849 * util/update-grub_lib.in: Likewise.
7850 * util/grub.d/00_header.in: Likewise.
7851 * util/grub.d/10_hurd.in: Likewise.
7852 * util/grub.d/10_linux.in: Likewise.
7853 * util/i386/efi/grub-install.in: Likewise.
7854 * util/i386/efi/grub-mkimage.c: Likewise.
7855 * util/i386/pc/grub-install.in: Likewise.
7856 * util/i386/pc/grub-mkimage.c: Likewise.
7857 * util/i386/pc/grub-mkrescue.in: Likewise.
7858 * util/i386/pc/grub-setup.c: Likewise.
7859 * util/i386/pc/misc.c: Likewise.
7860 * util/powerpc/ieee1275/grub-install.in: Likewise.
7861 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7862 * util/powerpc/ieee1275/misc.c: Likewise.
7863 * video/bitmap.c: Likewise.
7864 * video/video.c: Likewise.
7865 * video/i386/pc/vbe.c: Likewise.
7866 * video/i386/pc/vbeblit.c: Likewise.
7867 * video/i386/pc/vbefill.c: Likewise.
7868 * video/i386/pc/vbeutil.c: Likewise.
7869 * video/readers/tga.c: Likewise.
7870
3572d015 78712007-07-02 Robert Millan <rmh@aybabtu.com>
7872
7873 * conf/i386-efi.rmk: Replace obsolete reference to
7874 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7875 with util/getroot.c.
7876 * conf/powerpc-ieee1275.rmk: Likewise.
7877 * conf/sparc64-ieee1275.rmk: Likewise.
7878
7879 * util/grub-emu.c (main): Fix unchecked pointer handling.
7880
2c2a681b 78812007-07-02 Robert Millan <rmh@aybabtu.com>
7882
7883 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7884 invocation to fail, in order to support partition-less media.
7885
7886 * util/i386/pc/grub-install.in: Likewise.
7887
7888 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7889 which fs or partmap modules are needed (akin to its sister scripts).
7890
7891 Also use grub-probe to get rid of unportable /proc/mounts check.
7892
7893 Print the same informational message that the other scripts do, before
fe6b695a 7894 exiting.
2c2a681b 7895
6193defe 78962007-06-23 Robert Millan <rmh@aybabtu.com>
7897
fe6b695a 7898 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 7899 a font file can be found and, if so, echo the GRUB path to it.
7900
7901 * util/update-grub.in: Handle multiple terminals depending on user
7902 input, platform availability and font file presence. Propagate
7903 variables of our findings to /etc/grub.d/ children.
7904
7905 * util/grub.d/00_header.in: Handle multiple terminals, based on
7906 environment setup by update-grub.
7907
eface1dc 79082007-06-23 Robert Millan <rmh@aybabtu.com>
7909
ba50d28f 7910 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 7911
bf697e28 79122007-06-21 Robert Millan <rmh@aybabtu.com>
7913
7914 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7915 indicate end of data section in kernel image.
7916 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7917 GRUB_KERNEL_MACHINE_DATA_END.
7918
7919 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7920 space for it.
7921 * kern/i386/efi/startup.S: Likewise.
7922
7923 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7924 during image generation. Implement --prefix option to override this
7925 patch.
7926 * util/i386/efi/grub-mkimage.c: Likewise.
7927
7928 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7929 code to make path relative to its root into a separate function.
7930
7931 * util/i386/pc/grub-install.in: Use newly provided
7932 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7933 pass the result to grub-install --prefix.
7934
baa574b4 79352007-06-13 Robert Millan <rmh@aybabtu.com>
7936
7937 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7938 DEFAULT_DEVICE_MAP.
7939 * util/grub-emu.c: Use above definitions from misc.h instead of
7940 defining them.
7941 * util/grub-mkdevicemap.c: Likewise.
7942 * util/i386/pc/grub-setup.c: Likewise.
7943 * util/grub-probe.c: Likewise.
7944 (probe): Abort with grub_util_error() when either
7945 grub_guess_root_device or grub_util_get_grub_dev fails.
7946
0215dcbf 79472007-06-12 Robert Millan <rmh@aybabtu.com>
7948
7949 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7950 "pager" assignment.
7951 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7952 "pcdata".
7953 * util/grub-probe.c (probe): Likewise for "drive_name".
7954
8af2ab7b 79552007-06-11 Robert Millan <rmh@aybabtu.com>
7956
7957 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7958 not just the cdrom one.
7959
59d31694 79602007-06-11 Robert Millan <rmh@aybabtu.com>
7961
7962 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7963 Add --pkglibdir=DIR option to override pkglibdir.
7964 Mention --image-type=TYPE in help output.
7965 Fix --grub-mkimage (it was a no-op).
fe6b695a 7966 Abort gracefully when no parameter is given.
59d31694 7967
7ee367e4 79682007-06-11 Robert Millan <rmh@aybabtu.com>
7969
7970 * util/i386/pc/grub-mkrescue.in: New file.
7971 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7972 * Makefile.in: Handle bin_SCRIPTS.
7973
29b0ed46 79742007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7975
7976 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7977 list of video modes.
7978
c0f90770 79792007-06-06 Robert Millan <rmh@aybabtu.com>
7980
7981 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7982 file doesn't exist, or if it is in a filesystem grub can't read.
7983
7984 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7985 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7986 header comment to fit in 80 columns when the variables are resolved.
7987
7988 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7989 could be identified by update-grub. Remove redundant check for
fe6b695a 7990 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 7991 handles that).
7992
fb36dc26 79932007-06-04 Robert Millan <rmh@aybabtu.com>
7994
7995 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7996
7997 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7998
7999 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8000
0c68c93e 80012007-06-04 Robert Millan <rmh@aybabtu.com>
8002
8003 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8004
8005 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8006 grub_apple_partition_map_fini.
8007
8008 * util/biosdisk.c
8009 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8010 to access >2 TiB disks).
8011
8012 Print disk->total_sectors with %llu instead of %lu, since this
8013 variable is always 64-bit (prevents wrong disk size from being displayed
8014 on either >2 TiB disk or big-endian CPU).
8015
8016 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8017 into a generic case that supports all (sane) partition maps.
8018
8019 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8020 breaks big-endian.
8021
8022 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8023 and grub_apple_partition_map_fini() after that.
8024
0f23eb74 80252007-06-01 Robert Millan <rmh@aybabtu.com>
8026
8027 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8028
8029 * util/grub.d/00_header.in: Only enable gfxterm when
8030 convert_system_path_to_grub_path() succeeds.
8031
42c71976 80322007-05-20 Robert Millan <rmh@aybabtu.com>
8033
8034 * util/update-grub_lib.in: New file.
8035 * DISTLIST: Add update-grub_lib.in.
8036 * conf/common.rmk: Generate update-grub_lib and install it in
8037 $(lib_DATA).
8038 * Makefile.in: Add install routine for $(lib_DATA).
8039
8040 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8041 function provided by update-grub_lib to support arbitrary paths of
8042 unifont.pff.
8043 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8044 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8045
5beb2291 80462007-05-19 Robert Millan <rmh@aybabtu.com>
8047
8048 * commands/i386/cpuid.c: New module.
8049 * DISTLIST: Add it.
8050 * conf/i386-efi.rmk: Enable cpuid.mod.
8051 * conf/i386-pc.rmk: Likewise.
8052
7262eca1 80532007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8054
8055 * kern/disk.c (grub_disk_read): Check return value of
8056 grub_realloc().
8057
260ba823 80582007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8059
8060 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8061 arrays.
8062 * disk/raid.c (grub_raid_open): Likewise.
8063
1ecb6cf2 80642007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8065
8066 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8067 stack instead of on the heap.
8068
8069 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8070 before doing a read on it.
8071
8072 * configure.ac: Only use -fno-stack-protector for the target
8073 environment.
f19dbdb7 8074
21c8cbb1 80752007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8076
8077 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8078 __attribute_ ((unused)) to mode_type argument.
8079
8080 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 8081
21c8cbb1 8082 * kern/misc.c (memcmp): Fix prototype.
8083
8084 * include/grub/partition.h [GRUB_UTIL]
8085 (grub_gpt_partition_map_init): Add prototype.
8086 (grub_gpt_partition_map_fini): Likewise.
8087
8088 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8089 at the right place.
8090
8091 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8092 (grub_fat_read_data): Likewise.
8093 (grub_fat_find_dir): Likewise.
8094
8095 * font/manager.c (find_glyph): Make table a const.
8096 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 8097
849d55d3 80982007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8099
8100 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8101 code, first search for device in /dev/mapper, then in /dev.
8102 (grub_util_get_grub_dev): New function.
8103 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8104 prototype.
8105 * util/grub-probe.c (probe): Remove check for RAID, call
8106 grub_util_get_grub_dev() instead of
8107 grub_util_biosdisk_get_grub_dev().
8108 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8109 grub_util_biosdisk_get_grub_dev().
8110 * util/i386/pc/grub-setup.c (main): Likewise.
8111
8fff7c2f 81122007-05-16 Robert Millan <rmh@aybabtu.com>
8113
8114 * DISTLIST: Update for the latest changes.
8115 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8116 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8117 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8118 grub/util/biosdisk.h.
8119 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8120 grub/util/biosdisk.h.
8121
48e12b52 81222007-05-16 Robert Millan <rmh@aybabtu.com>
8123
8124 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8125
46b9d128 81262007-05-16 Robert Millan <rmh@aybabtu.com>
8127
8128 * util/i386/efi/grub-install.in: New.
8129 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8130 newly added grub-install.
8131 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8132 include.
8133 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8134 grub/util/biosdisk.h.
8135 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8136 grub/util/biosdisk.h.
8137
2d1a40a9 81382007-05-16 Robert Millan <rmh@aybabtu.com>
8139
8140 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8141 * include/grub/util/biosdisk.h: ... here.
8142 * util/i386/pc/biosdisk.c: Moved to ...
8143 * util/biosdisk.c: ... here.
8144 * util/i386/pc/getroot.c: Moved to ...
8145 * util/getroot.c: ... here.
8146 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8147 * util/grub-mkdevicemap.c: ... here.
8148 * util/i386/pc/grub-probe.c: Moved to ...
8149 * util/grub-probe.c: ... here.
8150
9e26e3bc 81512007-05-15 Robert Millan <rmh@aybabtu.com>
8152
8153 * util/update-grub.in: Remove duplicated line in grub.cfg header
8154 message.
8155
57f96397 81562007-05-13 Robert Millan <rmh@aybabtu.com>
8157
8158 * util/update-grub.in: Fix a few assumptions about the devices holding
8159 /, /boot and /boot/grub being the same.
8160 * util/grub.d/00_header.in: Likewise.
8161 * util/grub.d/10_hurd.in: Likewise.
8162 * util/grub.d/10_linux.in: Likewise.
8163
8164 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8165 patterns. Use that to define the `.old' suffix as older than `'.
8166
8167 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8168
8169 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8170 the grub.cfg header message.
8171
2e610d62 81722007-05-11 Robert Millan <rmh@aybabtu.com>
8173
8174 * util/update-grub.in: Create device.map if it doesn't already exist,
8175 before attempting to run grub-probe.
8176 Check for grub-probe and grub-mkdevicemap with the same code
8177 grub-install is using.
8178 Remove test mode.
8179
3f6a10ef 81802007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8181
8182 * Makefile.in: Add the datarootdir autoconf variable.
8183
02e7b75e 81842007-05-09 Robert Millan <rmh@aybabtu.com>
8185
8186 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 8187 fail gracefully if dev->disk->partition == NULL.
02e7b75e 8188
75f396cc 81892007-05-07 Robert Millan <rmh@aybabtu.com>
8190
8191 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8192 determine partition map module.
8193 * util/i386/pc/grub-install.in: Use this feature to decide which
8194 partition module to load, instead of hardcoding pc and gpt.
8195
da65cb36 81962007-05-07 Robert Millan <rmh@aybabtu.com>
8197
8198 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8199 source directory differs from build directory.
8200
b57d6a91 82012007-05-05 Robert Millan <rmh@aybabtu.com>
8202
8203 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8204 initialisation.
8205
509d00f1 82062007-05-05 Robert Millan <rmh@aybabtu.com>
8207
8208 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8209
c48f23ef 82102007-05-05 Robert Millan <rmh@aybabtu.com>
8211
8212 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8213 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8214
20b97658 82152007-05-05 Robert Millan <rmh@aybabtu.com>
8216
8217 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8218 (grub_probe_SOURCES): Likewise.
8219 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8220 GPT and initialize dos_part and bsd_part accordingly.
8221 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8222 install_bsd_part.
8223 (main): Activate gpt module for use during partition identification,
8224 and deactivate it afterwards.
8225 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8226 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8227 partition identification, and deactivate it afterwards.
8228
99123174 82292007-05-05 Robert Millan <rmh@aybabtu.com>
8230
8231 * term/i386/pc/console.c (grub_console_fini): Call
8232 grub_term_set_current() before grub_term_unregister().
8233
ebd97f6e 82342007-05-04 Robert Millan <rmh@aybabtu.com>
8235
8236 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8237 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8238 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8239 and update-grub_DATA.
8240 * conf/common.rmk: Build and install update-grub components.
8241 * conf/common.mk: Regenerate.
8242 * util/update-grub.in: New. Core of update-grub.
8243 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8244 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8245 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8246 * util/grub.d/README: New. Document grub.d directory layout.
8247
b06a264d 82482007-05-01 Robert Millan <rmh@aybabtu.com>
8249
8250 * util/grub-emu.c: Move initialization functions
8251 grub_util_biosdisk_init() and grub_init_all() before
8252 grub_util_biosdisk_get_grub_dev(), which relies on them.
8253
41f0050e 82542007-04-19 Robert Millan <rmh@aybabtu.com>
8255
8256 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8257 it is used later.
8258
04582bb3 82592007-04-18 Jerone Young <jerone@gmail.com>
8260
f19dbdb7 8261 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 8262 stanza.
8263
08db4632 82642007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 8265
08db4632 8266 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8267 continue on and look for device node with real device name.
8268
801b76be 82692007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 8270
fe6b695a 8271 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 8272 ability.
8273 * Makefile.in: Add autoconf package transformation code.
8274 * util/i386/pc/grub-install.in: Likewise.
8275 * util/powerpc/ieee1275/grub-install.in: Likewise.
8276
6795c4e1 82772007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8278
8279 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8280 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8281 (EXT2_REVISION): Likewise.
8282 (EXT2_INODE_SIZE): Likewise.
8283 (struct grub_ext2_block_group): Added a missing member
8284 "used_dirs".
8285 (grub_ext2_read_inode): Divide by the inode size in a superblock
8286 instead of 128 to obtain INODES_PER_BLOCK.
8287 Use the macro EXT2_INODE_SIZE instead of directly using
8288 SBLOCK->INODE_SIZE.
8289
d70af616 82902007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8291
8292 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8293 superblock instead of the structure size to compute an
8294 offset. This fixes the problem that GRUB could not read a
8295 filesystem when inode size is different from 128-byte.
8296
3b801603 82972007-03-05 Marco Gerards <marco@gnu.org>
8298
8299 * normal/main.c (read_config_file): When "menu" is not set, create
8300 an initial context.
8301
4785bfe4 83022007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8303
8304 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8305 (HEAP_LIMIT): New macro.
8306 (grub_claim_heap): Claim memory up to `heaplimit'.
8307
a0cbb023 83082007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8309
8310 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8311 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8312 (_start): Likewise.
8313 (grub_arch_modules_addr): Return address after `_end'.
8314 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8315 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8316 (add_segments): Calculate `_end' from phdr size and location.
8317 (ALIGN_UP): Moved to ...
8318 * include/grub/misc.h: here.
8319 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8320 New macro.
8321 (GRUB_IEEE1275_MODULE_BASE): Removed.
8322
fd7d8eba 83232007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8324
8325 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8326 loop boundary.
8327
9b09e6fc 83282007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8329
8330 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8331 All users updated.
8332 (grub_elf64_load_hook_t): Likewise.
8333 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8334 debug output.
8335
3ce27299 83362007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8337
8338 * kern/mm.c: Update copyright.
8339 (grub_mm_debug): Correct syntax error.
8340 (grub_mm_dump_free): New function.
8341 (grub_debug_free): Call `grub_free'.
8342 * include/grub/mm.h: Update copyright.
8343 (grub_mm_dump_free): Add declaration.
8344
077d5fee 83452007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8346
8347 * include/grub/ieee1275/ieee1275.h: Update copyright.
8348 * kern/powerpc/ieee1275/init.c: Likewise.
8349 * kern/powerpc/ieee1275/openfw.c: Likewise.
8350
8351 * loader/powerpc/ieee1275/linux.c: Likewise.
8352 * include/grub/elfload.h: Likewise.
8353 * kern/elf.c: Likewise.
8354 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8355 callers.
8356 (grub_elf64_load): Likewise.
8357 (grub_elf32_load_segment): Move to a nested function.
8358 (grub_elf64_load_segment): Likewise.
8359
dc946850 83602007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8361
8362 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8363 prototype.
8364 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8365 (grub_heap_len): Likewise.
8366 (HEAP_SIZE): New macro.
8367 (grub_claim_heap): New function.
8368 (grub_machine_init): Don't claim heap directly. Call
8369 `grub_claim_heap'.
8370 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8371 (grub_available_iterate): New function.
8372
baa2a121 83732007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8374
8375 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8376 * configure.ac: Use it for testing the HOST and TARGET compilers.
8377
4fe9862e 83782006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8379
8380 * Makefile.in (enable_grub_emu): New variable.
8381 * configure.ac (--enable-grub-emu): New option.
8382 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8383 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8384 * conf/i386-pc.rmk: Likewise.
8385 * conf/powerpc-ieee1275.rmk: Likewise.
8386 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8387
a8aa5762 83882006-12-12 Marco Gerards <marco@gnu.org>
8389
8390 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8391
8392 * kern/env.c (grub_env_unset): Don't free the member `value' when
8393 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8394 pointer.
8395
8396 * normal/main.c (current_menu): Removed.
8397 (free_menu): Unset the `menu' environment variable.
8398 (grub_normal_menu_addentry): Make use of the environment variable
8399 `menu', instead of using the global `current_menu'. Allocate
8400 memory for the sourcecode of this entry.
8401 (read_config_file): New argument `nested', changed all callers.
8402 Only in the case of a new context, initialize a new menu. Set the
8403 `menu' environment variable.
8404 (grub_normal_execute): Don't set and unset the environment
8405 variable `menu' here anymore. Only free the menu when leaving the
8406 context.
8407
8408 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8409 leak.
8410
957b3a3e 84112006-12-11 Marco Gerards <marco@gnu.org>
8412
8413 * normal/menu_entry.c (run): Fix off by one bug so the last line
8414 is executed. Move the loader check to outside the loop.
8415
ef875714 84162006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8417
8418 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8419
4e739985 84202006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8421
8422 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8423 the number of sectors. Reported by Andrey Shuvikov
8424 <mr_hyro@yahoo.com>.
f19dbdb7 8425
790707f2 84262006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8427
8428 * kern/disk.c (grub_disk_read): When there is a read error, always
8429 try to read only the necessary data.
f19dbdb7 8430
790707f2 8431 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8432 disk/raid.c.
8433 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8434 prototype.
8435 [GRUB_UTIL] (grub_raid_fini): Likewise.
8436 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 8437 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 8438 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8439 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8440 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8441 and grub_raid_fini().
f19dbdb7 8442
03e58196 84432006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8444
8445 * include/grub/types.h (__unused): Rename to UNUSED.
8446 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8447 (grub_elf64_size): Likewise.
f19dbdb7 8448
ae4f23bf 84492006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8450
8451 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8452 grub_error_push and grub_error_pop in the error-handling path.
8453 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8454 length.
8455
2166cc83 84562006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8457
8458 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8459 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8460 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8461 (kernel_elf_SOURCES): Likewise.
8462 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8463 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8464 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8465 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8466 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8467 (elf_mod_SOURCES): New variable.
8468 (elf_mod_CFLAGS): Likewise.
8469 (elf_mod_LDFLAGS): Likewise.
8470 * include/grub/types.h (__unused): New macro.
8471 * include/grub/elfload.h: New file.
8472 * kern/elf.c: Likewise.
8473 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8474 (ELF32_LOADMASK): New macro.
8475 (ELF64_LOADMASK): Likewise.
8476 (vmlinux): Removed.
8477 (grub_linux_load32): New function.
8478 (grub_linux_load64): Likewise.
8479 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8480 Use grub_elf_t instead of grub_file_t.
8481
a09d5aa5 84822006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8483
8484 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8485 `catch_result' to struct set_color_args.
8486
d976fc51 84872006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8488
8489 * normal/menu.c: Include grub/script.h.
8490 * normal/menu_entry.c: Likewise.
8491 * include/grub/normal.h: Do not include grub/script.h.
8492
67507549 84932006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8494
8495 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8496
69203a99 84972006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8498
8499 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8500 disk.
8501 (grub_disk_close): Print debug messages when closing a disk.
8502 (grub_disk_read): Print debug messages when disk read fails.
8503 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8504 filesystem type.
8505 * kern/partition.c: Include misc.h.
8506 (grub_partition_iterate): Print debug messages when detecting
8507 partition type.
8508
e2b8278c 85092006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8510
8511 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8512 is negative.
8513 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8514
97b2f2ff 85152006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8516
8517 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8518 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8519
6555d655 85202006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8521
8522 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8523 instead of sizeof(lv). Patch by Michael Guntsche.
8524
4d42b77f 85252006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8526
8527 * disk/lvm.c: Rename VGS to VG_LIST.
8528 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8529 (grub_lvm_open): Likewise.
8530 Thanks to Michael Guntsche for finding this bug.
8531
5d74d927 85322006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8533
8534 * configure.ac (AC_INIT): Bumped to 1.95.
8535
a1bb27e4 85362006-10-14 Robert Millan <rmh@aybabtu.com>
8537
8538 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8539 with "/dev/.static/dev/md".
8540
e0994b8b 85412006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8542
8543 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8544 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8545 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8546 DRIVE_NAME are always freed.
8547
8548 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8549 DOS_PART, as a DOS partition is counted from one instead of zero
8550 now. Reported by Robert Millan.
8551
ddd5cee9 85522006-10-14 Robert Millan <rmh@aybabtu.com>
8553
8554 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8555 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8556 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8557 string returned by grub_guess_root_device.
8558 * util/i386/pc/grub-setup.c: Likewise.
8559 * util/i386/pc/grub-probefs.c: Likewise.
8560
8561 * util/i386/pc/grub-probefs.c: Rename to ...
8562 * util/i386/pc/grub-probe.c: ... this.
8563 * DISTLIST: Remove grub-probefs, add grub-probe.
8564 * conf/i386-efi.rmk: Likewise.
8565 * conf/i386-pc.rmk: Likewise.
8566 * util/i386/pc/grub-install.in: Likewise.
8567
8568 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8569 choose which information we want to print.
8570
2b002173 85712006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8572
8573 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8574 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8575 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8576 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8577 video/readers/tga.c and video/i386/pc/vbeutil.c.
8578
85792006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8580
8581 Added support for RAID and LVM.
f19dbdb7 8582
2b002173 8583 * disk/lvm.c: New file.
8584 * disk/raid.c: Likewise.
8585 * include/grub/lvm.h: Likewise.
f19dbdb7 8586 * include/grub/raid.h: Likewise.
2b002173 8587 * include/grub/util/lvm.h: Likewise.
8588 * include/grub/util/raid.h: Likewise.
8589 * util/lvm.c: Likewise.
8590 * util/raid.c: Likewise.
8591
8592 * include/grub/disk.h (grub_disk_dev_id): Add
8593 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8594 (grub_disk_get_size): New prototype.
8595 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8596 returns a partition.
8597 (grub_disk_get_size): New function.
f19dbdb7 8598
2b002173 8599 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8600 verbatim if grub_install_dos_part is -2.
8601
8602 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8603 and LVM devices.
8604
8605 * util/i386/pc/grub-setup.c (setup): New argument
8606 MUST_EMBED. Force embedding of GRUB when the argument is
8607 true. Close FILE before returning.
8608 (main): Add support for RAID and LVM.
f19dbdb7 8609
2b002173 8610 * conf/common.rmk: Add RAID and LVM modules.
8611 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8612 util/lvm.c.
8613 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8614
8615 * kern/misc.c (grub_strstr): New function.
8616 * include/grub/misc.h (grub_strstr): New prototype.
8617
050548d0 86182006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8619
8620 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8621
da849d2d 86222006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8623
8624 * kern/misc.c (grub_strtoull): Guess the base only if not
8625 specified.
8626
97b2f2ff 86272006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 8628
8629 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8630 PowerMac support.
8631
97b2f2ff 86322006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 8633
8634 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8635
8636 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8637 Remove `flags' argument. All callers changed.
8638 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8639 (IEEE1275_IHANDLE_INVALID): New variable.
8640 (IEEE1275_CELL_INVALID): New variable.
8641 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8642 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8643 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8644 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8645 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8646 codes from Open Firmware. All callers updated.
8647 (grub_ieee1275_next_property): Directly return Open Firmware return
8648 code.
8649 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8650 Standardize error checking from `grub_ieee1275_get_property'.
8651 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8652 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8653
97b2f2ff 86542006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 8655
8656 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8657 `instance_to_package_args' to `instance_to_path_args'.
8658
8659 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8660 `grub_ieee1275_chosen'.
8661
8662 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8663 `grub_ieee1275_interpret'.
8664
97b2f2ff 86652006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 8666
8667 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8668
97b2f2ff 86692006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 8670
8671 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8672 (__cmpdi): Likewise.
8673
8674 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8675 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8676 `grub_ssize_t'.
8677
02bb8acc 8678 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 8679
8680 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8681 to type `grub_ssize_t'.
8682 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8683
7f9a8531 86842006-09-22 Marco Gerards <marco@gnu.org>
8685
8686 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8687 newlines.
8688
b5ef1102 86892006-09-22 Marco Gerards <marco@gnu.org>
8690
8691 * commands/echo.c: New file.
8692
8693 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8694
8695 * conf/common.rmk (echo_mod_SOURCES): New variable.
8696 (echo_mod_CFLAGS): Likewise.
8697 (echo_mod_LDFLAGS): Likewise.
8698
2cff3677 86992006-09-22 Marco Gerards <marco@gnu.org>
8700
8701 * normal/main.c (get_line): Malloc memory instead of using
8702 preallocated memory. Removed the arguments `cmdline' and
8703 `max_len'. Updated all callers.
8704
6ba4688b 87052006-09-22 Marco Gerards <marco@gnu.org>
8706
8707 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8708 (normal_mod_DEPENDENCIES): Likewise.
8709
8710 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8711 (normal_mod_DEPENDENCIES): Likewise.
8712
8713 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8714
e02ac02c 87152006-09-22 Johan Rydberg <jrydberg@gnu.org>
8716
8717 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8718 programs.
8719 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8720 (normal_mod_DEPENDENCIES): Likewise.
8721 * conf/i386-pc.mk: Regenerate.
8722 * conf/i386-efi.mk: Likewise
8723 * conf/common.mk: Likewise.
8724 * conf/powerpc-ieee1275.mk: Likewise.
8725 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8726
8d252e44 87272006-09-22 Robert Millan <rmh@aybabtu.com>
8728
8729 Sync with i386 version.
8730 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8731 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8732
209bf7ac 87332006-09-21 Robert Millan <rmh@aybabtu.com>
8734
8735 Import from GRUB Legacy (lib/device.c):
8736 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8737 (init_device_map) [__linux__]: Add support for I2O devices.
8738
6b146090 87392006-09-14 Marco Gerards <marco@gnu.org>
8740
8741 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8742 `-melf_i386'.
8743
e38600a8 87442006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 8745
8746 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8747 /boot/grub/*.lst.
78fa1790 8748
2952da5d 8749 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 8750
2952da5d 8751 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8752 before adding it to device.map.
8753
01b82a64 87542006-08-15 Johan Rydberg <jrydberg@gnu.org>
8755
fe6b695a 8756 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 8757 compiles a file; using the -MD option.
8758 * conf/common.mk: Regenerate.
8759 * conf/i386-pc.mk: Likewise.
8760 * conf/i386-efi.mk: Likewise.
8761 * conf/powerpc-ieee1275.mk: Likewise.
8762 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8763
1064790d 87642006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8765
8766 Move the prototypes of grub_setjmp and grub_longjmp to
8767 cpu/setjmp.h, so that each architecture may specify different
8768 attributes.
f19dbdb7 8769
1064790d 8770 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8771 (grub_longjmp): Likewise.
8772 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8773 (grub_longjmp): Likewise.
8774 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8775 (grub_longjmp): Likewise.
8776
8777 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8778 [!GRUB_UTIL] (grub_longjmp): Removed.
8779
29dda3ed 87802006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8781
8782 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8783 "color!" method does not return any value.
8784
ad2a06ed 87852006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8786
8787 * include/grub/bitmap.h: New file.
8788
8789 * include/grub/i386/pc/vbeutil.h: Likewise.
8790
8791 * video/bitmap.c: Likewise.
8792
8793 * video/readers/tga.c: Likewise.
8794
8795 * video/i386/pc/vbeutil.c: Likewise.
8796
8797 * commands/videotest.c: Code cleanup and updated to reflect to new
8798 video API.
8799
8800 * term/gfxterm.c: Likewise.
8801
8802 * video/video.c: Likewise.
8803
8804 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8805 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8806 (bitmap_mod_SOURCES): New entry.
8807 (bitmap_mod_CFLAGS): Likewise.
8808 (bitmap_mod_LDFLAGS): Likewise.
8809 (tga_mod_SOURCES): Likewise.
8810 (tga_mod_CFLAGS): Likewise.
8811 (tga_mod_LDFLAGS): Likewise.
8812
8813 * include/grub/video.h (grub_video_blit_operators): New enum type.
8814 (grub_video_render_target): Changed as forward declaration and moved
8815 actual definition to be video driver specific.
8816 (grub_video_adapter.blit_bitmap): Added blitting operator.
8817 (grub_video_adapter.blit_render_target): Likewise.
8818 (grub_video_blit_bitmap): Likewise.
8819 (grub_video_blit_render_target): Likewise.
8820
8821 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8822 driver specific render target definition.
8823 (grub_video_vbe_map_rgba): Added driver internal helper.
8824 (grub_video_vbe_unmap_color): Updated to use
8825 grub_video_i386_vbeblit_info.
8826 (grub_video_vbe_get_video_ptr): Likewise.
8827
8828 * include/grub/i386/pc/vbeblit.h
8829 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8830 grub_video_i386_vbeblit_info.
8831 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8832 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8833 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8834 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8835 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8836 (grub_video_i386_vbeblit_index_index): Likewise.
8837 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8838 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8839 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8840 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8841 operator.
8842 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8843 operator.
8844
8845 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8846 include/grub/i386/pc/vbeblit.h.
8847
8848 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8849 Updated to use grub_video_i386_vbeblit_info.
8850 (grub_video_i386_vbefill_R8G8B8): Likewise.
8851 (grub_video_i386_vbefill_index): Likewise.
8852 (grub_video_i386_vbefill): Added generic filler.
8853
8854 * video/i386/pc/vbefill.c: Updated to reflect changes on
8855 include/grub/i386/pc/vbefill.h.
8856
8857 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8858 grub_video_i386_vbeblit_info.
8859 (grub_video_vbe_unmap_color): Likewise.
8860 (grub_video_vbe_blit_glyph): Likewise.
8861 (grub_video_vbe_scroll): Likewise.
8862 (grub_video_vbe_draw_pixel): Removed function.
8863 (grub_video_vbe_get_pixel): Likewise.
8864 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8865 updated code to use it.
8866 (common_blitter): Added common blitter for render target and bitmap.
8867 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8868 (grub_video_vbe_blit_render_target): Likewise.
8869
bc8c036d 88702006-07-30 Johan Rydberg <jrydberg@gnu.org>
8871
8872 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8873 is in text mode if there is no console control protocol instance
8874 available.
8875
684a8eff 88762006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8877
8878 * include/grub/video.h: Code cleanup.
8879
8880 * include/grub/i386/pc/vbe.h: Likewise.
8881
8882 * video/i386/pc/vbe.c: Likewise.
8883
8884 * video/i386/pc/vbeblit.c: Likewise.
8885
8886 * video/i386/pc/vbefill.c: Likewise.
8887
8888 * video/video.c: Likewise. Also added more comments.
8889
5915059b 88902006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8891
8892 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8893 (struct grub_biosdisk_dap): Likewise.
8894
8895 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8896 linkage settings for all functions.
8897
90ce5d56 88982006-07-12 Marco Gerards <marco@gnu.org>
8899
8900 * configure.ac (--enable-mm-debug): Fix typo.
8901
8902 * genkernsyms.sh.in: Use proper quoting for `CC'.
8903
43e7f879 89042006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8905
8906 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8907 (normal_mod_ASFLAGS): Remove "-m32".
8908
4889bdec 89092006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8910
8911 * util/misc.c: Include config.h.
8912 [!HAVE_MEMALIGN]: Do not include malloc.h.
8913 (grub_memalign): Use posix_memalign, if present. Then, use
8914 memalign, if present. Otherwise, emit an error.
8915
8916 * util/grub-emu.c: Do not include malloc.h.
8917
8918 * include/grub/util/misc.h: Include unistd.h. This is required for
8919 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8920 D. Eades III <hde@foobar-qux.org>.
8921
8922 * configure.ac (AC_GNU_SOURCE): Added.
8923 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8924 type.
8925
fd39d4da 89262006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8927
8928 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8929 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8930
b786f3b5 89312006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8932
8933 * include/grub/types.h (grub_host_addr_t): Rename to
8934 grub_target_addr_t.
8935 (grub_host_off_t): Rename to grub_target_off_t.
8936 (grub_host_size_t): Rename to grub_target_size_t.
8937 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8938 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8939
8940 * include/grub/kernel.h (struct grub_module_header): Change type
8941 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8942 (grub_module_info): Likewise.
f19dbdb7 8943
051988bb 89442006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8945
8946 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8947 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8948 Velazquez <jesus.velazquez@gmail.com>.
8949
deae281b 89502006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8951
8952 Count partitions from 1 instead of 0 in the string representation
8953 of partitions. Still use 0-based internally.
f19dbdb7 8954
deae281b 8955 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8956 (sun_partition_map_iterate): Use grub_partition_t instead of
8957 struct grub_partition *. Cast DESC->START_CYLINDER to
8958 grub_uint64_t after converting the endian.
8959 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8960 (sun_partition_map_get_name): Add 1 to P->INDEX.
8961
8962 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8963 PCDATA->DOS_PART.
8964 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8965
8966 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8967 zero instead of one.
8968 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8969 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8970
8971 * partmap/apple.c (apple_partition_map_iterate): Change the type
8972 of POS to unsigned.
8973 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8974 (apple_partition_map_get_name): Add 1 into P->INDEX.
8975
8976 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8977 of POS to unsigned.
8978 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8979 calculate the offset of a partition.
8980 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8981 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8982
8983 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8984 SECTOR to grub_disk_addr_t.
8985 (acorn_partition_map_iterate): Likewise.
8986 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8987 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8988 top.
8989 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8990
8991 * kern/i386/pc/init.c (make_install_device): Add 1 into
8992 GRUB_INSTALL_DOS_PART.
8993
8994 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8995 conditional.
8996
524a1e6a 89972006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8998
8999 Clean up the code to support 64-bit addressing in disks and
9000 files. This change is not enough for filesystems yet.
f19dbdb7 9001
524a1e6a 9002 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9003 type of "start" to grub_uint64_t.
9004 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9005 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9006 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9007 convert addresses.
9008
9009 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9010 to grub_disk_addr_t.
9011
9012 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9013 string.
9014
9015 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9016
9017 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9018 to char *.
9019
9020 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9021
9022 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9023
9024 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9025
9026 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9027 to grub_off_t, to detect an error from grub_file_seek.
9028 (grub_multiboot_load_elf32): Likewise.
9029
9030 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9031 maximum unsigned long value when an overflow is detected.
9032 (grub_strtoull): New function.
9033 (grub_divmod64): Likewise.
9034 (grub_lltoa): use grub_divmod64.
9035
9036 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9037 grub_disk_addr_t.
9038 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9039 the pointer to next character. Use grub_strtoull instead of
9040 grub_strtoul.
9041 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9042 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9043 respectively.
9044
fe6b695a 9045 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 9046 return value is signed.
9047 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9048 test if OFFSET is less than zero, as OFFSET is unsigned now.
9049
9050 * kern/disk.c (struct grub_disk_cache): Change the type of
9051 "sector" to grub_disk_addr_t.
9052 (grub_disk_cache_get_index): Change the type of SECTOR to
9053 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9054 unsigned after shifting.
9055 (grub_disk_cache_invalidate): Change the type of SECTOR to
9056 grub_disk_addr_t.
9057 (grub_disk_cache_unlock): Likewise.
9058 (grub_disk_cache_store): Likewise.
9059 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9060 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9061 grub_disk_addr_t and grub_uint64_t, respectively.
9062 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9063 body, as the value of OFFSET is tweaked by
9064 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9065 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9066 respectively.
9067 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9068 body, as the value of OFFSET is tweaked by
9069 grub_disk_check_range. Change the types of LEN and N to
9070 grub_size_t.
9071
9072 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9073 and "saved_offset" to grub_off_t.
9074 (test_header): Cast BUF to char *.
9075 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9076 to char *.
9077 (grub_gzio_read): Change the types of OFFSET and SIZE to
9078 grub_off_t and grub_size_t, respectively.
9079
9080 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9081 Removed.
9082 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9083 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9084 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9085 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9086 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9087
9088 * include/grub/types.h (grub_off_t): Unconditionally set to
9089 grub_uint64_t.
9090 (grub_disk_addr_t): Changed to grub_uint64_t.
9091
9092 * include/grub/partition.h (struct grub_partition): Change the
9093 types of "start", "len" and "offset" to grub_disk_addr_t,
9094 grub_uint64_t and grub_disk_addr_t, respectively.
9095 (grub_partition_get_start): Return grub_disk_addr_t.
9096 (grub_partition_get_len): Return grub_uint64_t.
9097
9098 * include/grub/misc.h (grub_strtoull): New prototype.
9099 (grub_divmod64): Likewise.
9100
9101 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9102 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9103 grub_off_t, respectively.
9104 All callers and references changed.
9105
9106 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9107 grub_size_t in "read".
9108 All callers and references changed.
9109
9110 * include/grub/file.h (struct grub_file): Change the types of
9111 "offset" and "size" to grub_off_t and grub_off_t,
9112 respectively. Change the type of SECTOR to grub_disk_addr_t in
9113 "read_hook".
9114 (grub_file_read): Change the type of LEN to grub_size_t.
9115 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9116 grub_off_t.
9117 (grub_file_size): Return grub_off_t.
9118 (grub_file_tell): Likewise.
9119 All callers and references changed.
9120
9121 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9122 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9123 "write".
9124 (struct grub_disk): Change the type of "total_sectors" to
9125 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 9126 "read_hook".
524a1e6a 9127 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9128 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9129 (grub_disk_write): Likewise.
9130 All callers and references changed.
9131
9132 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9133 char * for grub_strncmp to silence gcc.
9134 (grub_iso9660_mount): Likewise.
9135 (grub_iso9660_mount): Likewise.
9136 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9137 return statement.
9138 (grub_iso9660_iterate_dir): Likewise.
9139 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9140
9141 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9142 LEN to grub_disk_addr_t and grub_size_t, respectively.
9143
9144 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9145
9146 * fs/jfs.c (grub_jfs_read_file): Likewise.
9147
9148 * fs/minix.c (grub_jfs_read_file): Likewise.
9149
9150 * fs/sfs.c (grub_jfs_read_file): Likewise.
9151
9152 * fs/ufs.c (grub_jfs_read_file): Likewise.
9153
9154 * fs/xfs.c (grub_jfs_read_file): Likewise.
9155
9156 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9157 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9158 respectively.
9159
9160 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9161 BLKNR to -1 instead of returning GRUB_ERRNO.
9162 (grub_ext2_read_file): Change the types of SECTOR and
9163 LEN to grub_disk_addr_t and grub_size_t, respectively.
9164
9165 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9166 LEN to grub_disk_addr_t and grub_size_t, respectively.
9167
9168 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9169 grub_file_read.
9170
9171 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9172 string. Do not cast SECTOR explicitly.
9173
9174 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9175 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9176 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9177 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9178 over 2TB and LBA mode is not supported, raise an error.
9179 (get_safe_sectors): New function.
9180 (grub_biosdisk_read): Use get_safe_sectors.
9181 (grub_biosdisk_write): Likewise.
9182
9183 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9184 (grub_efidisk_write): Likewise.
9185
9186 * disk/loopback.c (delete_loopback): Cosmetic changes.
9187 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9188 correctly.
9189 (grub_loopback_open): Likewise.
9190 (grub_loopback_read): Likewise. Also, change the type of POS to
9191 grub_off_t, and fix the usage of grub_memset.
9192
9193 * commands/i386/pc/play.c: Include grub/machine/time.h.
9194
9195 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9196 print FILE->SIZE.
9197
9198 * commands/configfile.c: Include grub/env.h.
9199
9200 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9201 GRUB_ERRNO directly instead. Change the type of POS to
9202 grub_off_t. Follow the coding standard.
9203
9204 * commands/blocklist.c: Include grub/partition.h.
9205 (grub_cmd_blocklist): Return an error if the underlying device is
9206 not a disk. Take the starting sector of a partition into account,
9207 if a partition is used.
9208
9209 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9210 a length field.
9211 (lba_mode): Support 64-bit addresses.
9212 (chs_mode): Likewise.
9213 (copy_buffer): Adapted to the new offsets of a length field and a
9214 segment field.
9215 (blocklist_default_start): Allocate 64-bit space.
9216
9217 * boot/i386/pc/boot.S (force_lba): Removed.
9218 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 9219 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 9220 space.
9221 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9222 is useless.
9223 (lba_mode): Refactored to support a 64-bit address. More size
9224 optimization.
9225 (setup_sectors): Likewise.
9226
53af98ad 92272006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9228
9229 * DISTLIST: Added include/grub/i386/linux.h. Removed
9230 include/grub/i386/pc/linux.h
9231
9232 * configure.ac (AC_INIT): Bumped to 1.94.
9233
9234 * config.guess: Updated from gnulib.
9235 * config.sub: Likewise.
9236 * install-sh: Likewise.
9237 * mkinstalldirs: Likewise.
9238
b4c1940a 92392006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9240
9241 * conf/common.rmk (grub_modules_init.lst): Depended on
9242 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9243 MODSRCFILES.
9244
9245 * genmk.rb (PModule::rule): Reverted the previous change.
9246
cfca1cfd 92472006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9248
9249 * conf/common.rmk (grub_modules_init.lst): Depends on
9250 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9251 that the target does not exist before producing.
9252 (grub_modules_init.h): Remove the target before generating.
9253 (grub_emu_init.c): Likewise.
9254
9255 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9256
aa6d7826 92572006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9258
9259 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9260 for the target-specific tests. Make sure that we also have the
9261 up-to-date target variables for those tests.
9262
26c607b9 92632006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9264
9265 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9266 (PModule::rule): Likewise.
9267
0162321a 92682006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9269
9270 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9271 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9272 target-specific flags should be prefixed.
9273 (PModule::rule): Likewise.
9274
6c826348 92752006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9276
9277 * configure.ac (CMP): Check if cmp is available explicitly.
9278
b977bf01 92792006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9280
9281 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9282 (target_cpu): New variable.
9283 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 9284
b977bf01 9285 * util/i386/pc/grub-install.in (host_cpu): Removed.
9286 (target_cpu): New variable.
9287 (pkglibdir): Use target_cpu instead of host_cpu.
9288
9289 * util/genmoddep.c: Removed.
f19dbdb7 9290
b977bf01 9291 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9292 instead of GRUB_HOST_SIZEOF_VOID_P.
9293 * kern/dl.c: Likewise.
9294
9295 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9296 ...
9297 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9298 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9299 (GRUB_TARGET_SIZEOF_LONG): ... this.
9300 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9301 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9302 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9303 to ...
9304 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9305 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9306 (GRUB_TARGET_SIZEOF_LONG): ... this.
9307 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9308 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9309 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9310 to ...
9311 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9312 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9313 (GRUB_TARGET_SIZEOF_LONG): ... this.
9314 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9315 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9316
9317 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9318 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9319 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9320 instead of GRUB_HOST_SIZEOF_LONG.
9321 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9322 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9323 GRUB_CPU_WORDS_BIGENDIAN.
9324 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9325 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9326 grub_host_ssize_t.
9327
9328 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9329 (genmoddep_SOURCES): Likewise.
9330 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9331 (genmoddep_SOURCES): Likewise.
9332 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9333 (genmoddep_SOURCES): Likewise.
9334 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9335 Likewise.
9336 (genmoddep_SOURCES): Likewise.
9337
9338 * genmoddep.awk: New file.
9339
9340 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9341 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9342 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9343 (PModule::rule): Likewise.
9344 (Program::rule): Likewise.
9345 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9346 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9347 respectively.
9348
9349 * configure.ac: Rewritten intensively to use host and target
9350 instead of build and host, respectively.
9351
9352 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9353 (host_cpu): Removed.
9354 (target_cpu): New variable.
9355 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9356 (BUILD_CC): Removed.
9357 (BUILD_CFLAGS): Likewise.
9358 (BUILD_CPPFLAGS): Likewise.
9359 (TARGET_CC): New variable.
9360 (TARGET_CFLAGS): Likewise.
9361 (TARGET_CPPFLAGS): Likewise.
9362 (TARGET_LDFLAGS): Likewise.
9363 (AWK): Likewise.
9364 (include): Use target_cpu instead of host_cpu.
9365 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 9366
b977bf01 9367 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9368
f09771a1 93692006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9370
9371 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9372 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9373 field 'false' to 'exec_on_false'.
9374 (grub_script_create_cmdif): Renamed argument names to reflect above
9375 changes.
9376
9377 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9378
9379 * normal/script.c (grub_script_create_cmdif): Likewise.
9380
118f4fb3 93812006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9382
9383 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9384 top.
9385 (grub_hfsplus_btree_recptr): Likewise.
9386 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9387 FILEBLOCK both to pass a block number and store next block
9388 number.
9389 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9390 overflow file correctly. Specify errors appropriately, because
9391 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9392 grub_hfsplus_btree_recptr to get the pointer to a found key.
9393 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9394 is found.
9395
9396 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9397 linux.mod.
9398 (_linux_mod_SOURCES): New variable.
9399 (_linux_mod_CFLAGS): Likewise.
9400 (_linux_mod_LDFLAGS): Likewise.
9401 (linux_mod_SOURCES): Likewise.
9402 (linux_mod_CFLAGS): Likewise.
9403 (linux_mod_LDFLAGS): Likewise.
9404
9405 * DISTLIST: Added loader/i386/efi/linux.c,
9406 loader/i386/efi/linux_normal.c and
9407 include/grub/i386/efi/loader.h.
9408
9409 * loader/i386/efi/linux.c: New file.
9410 * loader/i386/efi/linux_normal.c: Likewise.
9411 * include/grub/i386/efi/loader.h: Likewise.
9412
89a7d726 94132006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9414
9415 * commands/blocklist.c: New file.
9416
9417 * DISTLIST: Added commands/blocklist.c.
9418
9419 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 9420 color for the background, and a darker color for the foreground.
89a7d726 9421 (grub_console_checkkey): Return READ_KEY.
9422 (grub_console_cls): Set the background to
9423 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9424
9425 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9426
9427 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9428 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9429
9430 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9431 prototype.
9432
9433 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9434 BG. The spec is wrong again.
9435
9436 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9437 prototype.
9438 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9439
9440 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9441 commands/blocklist.c.
9442 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 9443
89a7d726 9444 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9445 (blocklist_mod_SOURCES): New variable.
9446 (blocklist_mod_CFLAGS): Likewise.
9447 (blocklist_mod_LDFLAGS): Likewise.
9448
75c8f258 94492006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9450
9451 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9452 duplication.
9453 (lba_mode): Use %eax more intensively to reduce the code size.
9454
da2eb181 94552006-05-20 Marco Gerards <marco@gnu.org>
9456
9457 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9458
9459 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9460 for `menuentry'.
9461 (script): Accept leading newlines.
9462 (newlines): New rule to describe 0 or more newlines.
9463 (commands): Accept `command' with trailing newline. Fixed the
9464 order in which arguments were passed to `grub_script_add_cmd'.
9465 Accept commands separated by newlines.
9466 (function): Changed to accept newlines.
9467 (menuentry) Rewritten.
9468
9469 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9470 front of the list, instead of to the end.
9471
577b4050 94722006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9473
9474 * util/i386/pc/grub-install.in (bindir): New variable.
9475 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9476 Shaver <lbgwjl@gmail.com>.
9477
0d6e1189 94782006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9479
9480 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9481 grub/machine/linux.h
9482 * loader/i386/pc/linux.c: Likewise.
9483
9484 * include/grub/i386/pc/linux.h: Moved to ...
9485 * include/grub/i386/linux.h: ... here.
9486
9487 * include/grub/i386/linux.h (struct linux_kernel_params): New
9488 struct.
f19dbdb7 9489
31b86e9f 94902006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9491
9492 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9493 checking.
9494 (grub_video_vbe_blit_glyph): Likewise.
9495 (grub_video_vbe_blit_bitmap): Likewise.
9496 (grub_video_vbe_blit_render_target): Likewise.
9497
83b984de 94982006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9499
9500 * configure.ac (--with-platform): Properly quote the square
9501 brackets.
9502
5f0413bd 95032006-05-08 Marco Gerards <marco@gnu.org>
9504
9505 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9506 this...
9507 (kernel_elf_HEADERS): ...to this. Updated all users.
9508 (grubof_symlist.c): Renamed from this...
9509 (kernel_elf_symlist.c): ...to this. Updated all users.
9510 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9511 (grubof_SOURCES): Renamed from this...
9512 (kernel_elf_SOURCES): ...to this.
9513 (grubof_HEADERS): Renamed from this...
9514 (kernel_elf_HEADERS): ...to this.
9515 (grubof_CFLAGS): Renamed from this...
9516 (kernel_elf_CFLAGS): ...to this.
9517 (grubof_ASFLAGS): Renamed from this...
9518 (kernel_elf_ASFLAGS): ...to this.
9519 (grubof_LDFLAGS): Renamed from this...
9520 (kernel_elf_LDFLAGS): ...to this.
9521
9522 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9523 this...
9524 (kernel_elf_HEADERS): ...to this. Updated all users.
9525 (grubof_symlist.c): Renamed from this...
9526 (kernel_elf_symlist.c): ...to this. Updated all users.
9527 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9528 (grubof_SOURCES): Renamed from this...
9529 (kernel_elf_SOURCES): ...to this.
9530 (grubof_HEADERS): Renamed from this...
9531 (kernel_elf_HEADERS): ...to this.
9532 (grubof_CFLAGS): Renamed from this...
9533 (kernel_elf_CFLAGS): ...to this.
9534 (grubof_ASFLAGS): Renamed from this...
9535 (kernel_elf_ASFLAGS): ...to this.
9536 (grubof_LDFLAGS): Renamed from this...
9537 (kernel_elf_LDFLAGS): ...to this.
9538
9539 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9540 `kernel.elf' instead of `grubof'.
9541
05568c2e 95422006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9543
9544 Add --with-platform to configure. Use pkglibdir instead of
9545 pkgdatadir. This is reported by Roger Leigh.
9546
9547 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9548 (host_vendor): Likewise.
9549 (host_os): Likewise.
9550 (pkgdatadir): Likewise.
9551 (platform): New variable.
9552 (pkglibdir): Likewise.
9553 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 9554
05568c2e 9555 * util/i386/pc/grub-install.in (datadir): Removed.
9556 (host_vendor): Likewise.
9557 (host_os): Likewise.
9558 (pkgdatadir): Likewise.
9559 (platform): New variable.
9560 (pkglibdir): Likewise.
9561 Use PKGLIBDIR instead of PKGDATADIR.
9562
9563 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9564 instead of GRUB_DATADIR.
9565 (main): Likewise.
9566 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9567 (main): Likewise.
9568 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9569 (main): Likewise.
9570
9571 * configure.ac (--with-platform): New option.
9572 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9573
9574 * Makefile.in: Include a makefile based on PLATFORM instead of
9575 HOST_VENDOR.
9576 (pkgdatadir): Not appended by the machine type.
9577 (pkglibdir): Appended by the machine type.
9578 (host_vendor): Removed.
9579 (platform): New variable.
9580 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9581 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9582 (uninstall): Likewise.
9583
4e93851c 95842006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9585
9586 Use the environment context in the menu. Remove the commands
9587 "default" and "timeout", and use variables instead.
f19dbdb7 9588
4e93851c 9589 * normal/menu.c: Include grub/env.h.
9590 (print_entry): Cast TITLE to silence gcc.
9591 (get_timeout): New function.
9592 (set_timeout): Likewise.
9593 (get_entry_number): Likewise.
9594 (run_menu): Use a default entry, a fallback entry and a timeout
9595 in the environment variables "default", "fallback" and
9596 "timeout". Also, tweak the default entry if it is not within the
9597 current menu entries.
9598 (grub_menu_run): Use a fallback entry in the environment variable
9599 "fallback".
9600
9601 * normal/main.c (read_config_file): Do not initialize
9602 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9603 NEWMENU->TIMEOUT.
9604 (grub_normal_execute): Use a data slot to store the menu.
9605
9606 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9607 fallback_entry and timeout.
9608 (struct grub_menu_list): Removed.
9609 (grub_menu_list_t): Likewise.
9610 (struct grub_context): Likewise.
9611 (grub_context_t): Likewise.
9612 (grub_context_get): Likewise.
9613 (grub_context_get_current_menu): Likewise.
9614 (grub_context_push_menu): Likewise.
9615 (grub_context_pop_menu): Likewise.
9616 (grub_default_init): Likewise.
9617 (grub_default_fini): Likewise.
9618 (grub_timeout_init): Likewise.
9619 (grub_timeout_fini): Likewise.
9620
9621 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9622 and timeout.mod.
9623 (normal_mod_SOURCES): Removed normal/context.c.
9624
9625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9626 commands/default.c, commands/timeout.c and normal/context.c.
9627 (normal_mod_SOURCES): Removed normal/context.c.
9628
9629 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9630 commands/timeout.c and normal/context.c.
9631 (normal_mod_SOURCES): Removed normal/context.c.
9632
9633 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9634 commands/default.c, commands/timeout.c and normal/context.c.
9635 (normal_mod_SOURCES): Removed normal/context.c.
9636
9637 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9638 timeout.mod.
9639 (default_mod_SOURCES): Removed.
9640 (default_mod_CFLAGS): Likewise.
9641 (default_mod_LDFLAGS): Likewise.
9642 (timeout_mod_SOURCES): Removed.
9643 (timeout_mod_CFLAGS): Likewise.
9644 (timeout_mod_LDFLAGS): Likewise.
9645
9646 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9647 normal/context.c.
9648
9649 * commands/default.c: Removed.
9650 * commands/timeout.c: Likewise.
9651 * normal/context.c: Likewise.
9652
1eb9cc1d 96532006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9654
9655 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9656
385bd9c1 96572006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9658
9659 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9660 "next" to "prev" for readability.
9661 (struct grub_env_sorted_var): New struct.
9662 (grub_env_context): Renamed to ...
9663 (initial_context): ... this.
9664 (grub_env_var_context): Renamed to ...
9665 (current_context): ... this.
9666 (grub_env_find): Look only at CURRENT_CONTEXT.
9667 (grub_env_context_open): Rewritten to copy exported variables from
9668 previous context.
9669 (grub_env_context_close): Rewritten according to the new
9670 scheme. Also, add an assertion to prevent the initial context from
9671 removed.
9672 (grub_env_insert): Removed the code for the sorted list.
9673 (grub_env_remove): Likewise.
9674 (grub_env_export): Simply mark the variable with
9675 GRUB_ENV_VAR_GLOBAL.
9676 (grub_env_set): A cosmetic change for naming consistency.
9677 (grub_env_get): Likewise.
9678 (grub_env_unset): Likewise.
9679 (grub_env_iterate): Rewritten to sort variables within this
9680 function.
9681 (grub_register_variable_hook): Fixed for naming consistency. Call
9682 grub_env_find again, only if NAME is not found at the first time.
9683 (mangle_data_slot_name): New function.
9684 (grub_env_set_data_slot): Likewise.
9685 (grub_env_get_data_slot): Likewise.
9686 (grub_env_unset_data_slot): Likewise.
9687
9688 * include/grub/env.h (grub_env_var_type): New enum.
9689 (GRUB_ENV_VAR_LOCAL): New constant.
9690 (GRUB_ENV_VAR_GLOBAL): Likewise.
9691 (GRUB_ENV_VAR_DATA): Likewise.
9692 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9693 "type".
9694 (grub_env_set): Replace VAR with NAME for consistency.
9695 (grub_register_variable_hook): Likewise.
9696 (grub_env_export): Specify the name of the argument.
9697 (grub_env_set_data_slot): New prototype.
9698 (grub_env_get_data_slot): Likewise.
9699 (grub_env_unset_data_slot): Likewise.
9700
7f362539 97012006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9702
9703 Extend the loader so that GRUB can accept a loader which comes
9704 back to GRUB when a loaded image exits. Also, this change adds
9705 support for a chainloader on EFI.
f19dbdb7 9706
7f362539 9707 * term/efi/console.c: Include grub/misc.h.
9708 (grub_console_checkkey): Display a scan code on the top for
9709 debugging. This will be removed once the EFI port gets stable.
9710 Correct the scan code mapping.
9711
9712 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9713 allocate memory from larger regions, in order to reduce the number
9714 of allocated regions. Otherwise, the MacOSX loader panics.
9715 (filter_memory_map): Avoid less than 1MB for compatibility with
9716 other loaders.
9717 (add_memory_regions): Allocate from the tail of a region, if
9718 possible, to avoid allocating a region near to 1MB, for the MacOSX
9719 loader.
9720
9721 * kern/efi/init.c (grub_efi_set_prefix): Specify
9722 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9723
9724 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9725 argument IMAGE_HANDLE and specify it to get a loaded image.
9726 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9727 grub_efi_get_loaded_image.
fe6b695a 9728 (grub_efi_get_filename): Divide the length by the size of
7f362539 9729 grub_efi_char16_t.
9730 (grub_efi_get_device_path): New function.
9731 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9732 the length by the size of grub_efi_char16_t for a file path device
9733 path node.
9734
9735 * kern/loader.c (grub_loader_noreturn): New variable.
9736 (grub_loader_set): Accept a new argument NORETURN. Set
9737 GRUB_LOADER_NORETURN to NORETURN.
9738 All callers changed.
9739 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9740 grub_machine_fini.
9741
9742 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9743 prototype.
9744 (grub_efi_get_loaded_image): Take an argument to specify an image
9745 handle.
9746
9747 * include/grub/loader.h (grub_loader_set): Added one more argument
9748 NORETURN.
9749
9750 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9751 instead of grub_efi_open_protocol.
9752 (grub_efidisk_get_device_name): Likewise.
9753 (grub_efidisk_close): Print a newline.
9754 (grub_efidisk_get_device_handle): Fixed to use
9755 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9756 GRUB_EFI_DEVICE_PATH_TYPE.
9757
9758 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9759 * kern/efi/efi.c (device_path_guid): ... here.
9760
9761 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9762 chain.mod.
9763 (kernel_mod_HEADERS): Added efi/disk.h.
9764 (_chain_mod_SOURCES): New variable.
9765 (_chain_mod_CFLAGS): Likewise.
9766 (_chain_mod_LDFLAGS): Likewise.
9767 (chain_mod_SOURCES): Likewise.
9768 (chain_mod_CFLAGS): Likewise.
9769 (chain_mod_LDFLAGS): Likewise.
9770
9771 * DISTLIST: Added include/grub/efi/chainloader.h,
9772 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9773
9774 * include/grub/efi/chainloader.h: New file.
9775 * loader/efi/chainloader.c: Likewise.
9776 * loader/efi/chainloader_normal.c: Likewise.
9777
c0111d6e 97782006-04-30 Marco Gerards <marco@gnu.org>
9779
9780 * commands/configfile.c (grub_cmd_source): New function.
9781 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9782 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9783
df5341da 97842006-04-30 Marco Gerards <marco@gnu.org>
9785
9786 * normal/execute.c (grub_script_execute_cmd): Change the return
9787 type to `grub_err_t'. Correctly return the error.
9788 (grub_script_execute_cmdline): In case a command line is not a
9789 command or a function, try to interpret it as an assignment.
9790
f85934bd 97912006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9792
9793 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9794 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9795 skip a node whose name is obviously invalid as UTF-16,
9796 i.e. contains a NUL character. Stop the iteration when the last
9797 directory entry is found. Instead of using the return value of
9798 grub_hfsplus_btree_iterate_node, store the value in RET and use
9799 it, because the iterator can be stopped by the last directory
9800 entry.
9801
8f8a2cf8 98022006-04-30 Marco Gerards <marco@gnu.org>
9803
9804 * include/grub/env.h (grub_env_export): New prototype. Reported
9805 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9806
a27e84ce 98072006-04-30 Marco Gerards <marco@gnu.org>
9808
9809 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9810 size of the extents in a catalog file record.
9811
eaef0553 98122006-04-29 Marco Gerards <marco@gnu.org>
9813
9814 * commands/configfile.c (grub_cmd_configfile): Execute the
9815 configfile within its own context.
9816
9817 * include/grub/env.h (grub_env_context_open): New prototype.
9818 (grub_env_context_close): Likewise.
9819
9820 * kern/env.c (grub_env): Removed.
9821 (grub_env_sorted): Likewise.
9822 (grub_env_context): New variable.
9823 (grub_env_var_context): Likewise.
9824 (grub_env_find): Search both the active context and the global
9825 context.
9826 (grub_env_context_open): New function.
9827 (grub_env_context_close): Likewise.
9828 (grub_env_insert): Likewise.
9829 (grub_env_remove): Likewise.
9830 (grub_env_export): Likewise.
9831 (grub_env_set): Changed to use helper functions to avoid code
9832 duplication.
9833 (grub_env_iterate): Rewritten so both the current context and the
9834 global context are being used.
9835
9836 * normal/command.c (export_command): New function.
9837 (grub_command_init): Register the `export' function.
9838
7b455f4d 98392006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9840
9841 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9842 explicitly to suppress gcc's warnings.
9843 * fs/fat.c (grub_fat_find_dir): Likewise.
9844 (grub_fat_label): Likewise.
9845 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9846 (grub_xfs_mount): Likewise.
9847 (grub_xfs_label): Likewise.
9848 * fs/affs.c (grub_affs_mount): Likewise.
9849 (grub_affs_label): Likewise.
9850 (grub_affs_iterate_dir): Likewise.
9851 * fs/sfs.c (grub_sfs_mount): Likewise.
9852 (grub_sfs_iterate_dir): Likewise.
9853 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9854 * fs/hfs.c (grub_hfs_mount): Likewise.
9855 (grub_hfs_cmp_catkeys): Likewise.
9856 (grub_hfs_find_dir): Likewise.
9857 (grub_hfs_dir): Likewise.
9858 (grub_hfs_label): Likewise.
9859 * fs/jfs.c (grub_jfs_mount): Likewise.
9860 (grub_jfs_opendir): Likewise.
9861 (grub_jfs_getent): Likewise.
9862 (grub_jfs_lookup_symlink): Likewise.
9863 (grub_jfs_label): Likewise.
9864 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9865 (grub_hfsplus_iterate_dir): Likewise.
9866 (grub_hfsplus_btree_iterate_node): Made static.
9867
9868 * util/grub-emu.c (prefix): New variable.
9869 (grub_machine_set_prefix): New function.
9870 (main): Do not set the environment variable "prefix" here. Only
9871 set PREFIX, which is used later by grub_machine_set_prefix.
9872
9873 * include/grub/video.h: Do not include grub/symbol.h.
9874 (grub_video_register): Not exported. This symbol is not defined in
9875 the kernel.
9876 (grub_video_unregister): Likewise.
9877 (grub_video_iterate): Likewise.
9878 (grub_video_setup): Likewise.
9879 (grub_video_restore): Likewise.
9880 (grub_video_get_info): Likewise.
9881 (grub_video_get_blit_format): Likewise.
9882 (grub_video_set_palette): Likewise.
9883 (grub_video_get_palette): Likewise.
9884 (grub_video_set_viewport): Likewise.
9885 (grub_video_get_viewport): Likewise.
9886 (grub_video_map_color): Likewise.
9887 (grub_video_map_rgb): Likewise.
9888 (grub_video_map_rgba): Likewise.
9889 (grub_video_fill_rect): Likewise.
9890 (grub_video_blit_glyph): Likewise.
9891 (grub_video_blit_bitmap): Likewise.
9892 (grub_video_blit_render_target): Likewise.
9893 (grub_video_scroll): Likewise.
9894 (grub_video_swap_buffers): Likewise.
9895 (grub_video_create_render_target): Likewise.
9896 (grub_video_delete_render_target): Likewise.
9897 (grub_video_set_active_render_target): Likewise.
9898
9899 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9900 Undefined.
9901 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9902
9903 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9904 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9905 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9906 instead of $(srcdir)/genkernsyms.sh.
9907
9908 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9909 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9910 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9911 instead of $(srcdir)/genkernsyms.sh.
9912
9913 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9914 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9915 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9916 instead of $(srcdir)/genkernsyms.sh.
9917
9918 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9919 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9920 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9921 instead of $(srcdir)/genkernsyms.sh.
9922
9923 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9924 genkernsyms.sh.
9925
9926 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9927 genkernsyms.sh.
9928 (gensymlist.sh): New target.
9929 (genkernsyms.sh): Likewise.
9930
9931 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9932 genkernsyms.sh.in and gensymlist.sh.in.
9933
9934 * genkernsyms.sh: Removed.
9935 * gensymlist.sh: Likewise.
f19dbdb7 9936
7b455f4d 9937 * genkernsyms.sh.in: New file.
9938 * gensymlist.sh.in: Likewise.
9939
1885bb27 99402006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9941
9942 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9943 clobber "prefix", since we may have already set it manually.
9944
71538dff 99452006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9946
9947 * kern/misc.c (abort): New alias for grub_abort.
9948
2965c7cc 99492006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9950
9951 A new machine-specific function "grub_machine_set_prefix" is
9952 defined. This is called after loading modules, so that a prefix
9953 initialization can use modules. Also, this change adds an
9954 intensive debugging feature for the memory manager via the
9955 configure option "--enable-mm-debug".
f19dbdb7 9956
2965c7cc 9957 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9958 PART.LEN.
9959
9960 * kern/sparc64/ieee1275/init.c (abort): Removed.
9961 (grub_stop): Likewise.
9962 (grub_exit): New function.
9963 (grub_set_prefix): Renamed to ...
9964 (grub_machine_set_prefix): ... this.
9965 (grub_machine_init): Do not call grub_set_prefix.
9966
9967 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9968 (grub_machine_set_prefix): ... this.
9969 (grub_machine_init): Do not call grub_set_prefix.
9970
9971 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9972 (grub_machine_init): Do not set the prefix here.
9973
9974 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9975
9976 * kern/efi/init.c: Include grub/mm.h.
9977 (grub_efi_set_prefix): New function.
9978
9979 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9980 (grub_efi_get_filename): New function.
9981 (grub_print_device_path): Renamed to ...
9982 (grub_efi_print_device_path): ... this.
9983
9984 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9985 [MM_DEBUG] (grub_realloc): Likewise.
9986 [MM_DEBUG] (grub_free): Likewise.
9987 [MM_DEBUG] (grub_memalign): Likewise.
9988 [MM_DEBUG] (grub_mm_debug): New variable.
9989 [MM_DEBUG] (grub_debug_malloc): New function.
9990 [MM_DEBUG] (grub_debug_free): New function.
9991 [MM_DEBUG] (grub_debug_realloc): New function.
9992 [MM_DEBUG] (grub_debug_memalign): New function.
9993
9994 * kern/misc.c (grub_abort): Print a newline to distinguish
9995 the message.
9996
9997 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9998 grub_set_root_dev after loading modules. This is necessary when
9999 setting a prefix depends on modules.
10000
10001 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10002 (grub_efi_print_device_path): ... this.
10003 (grub_efi_get_filename): New prototype.
10004 (grub_efi_set_prefix): Likewise.
10005
10006 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10007 and grub/disk.h.
10008 (grub_efidisk_get_device_handle): New prototype.
10009 (grub_efidisk_get_device_name): Likewise.
10010
10011 * include/grub/mm.h: Include config.h.
10012 (MM_DEBUG): Removed.
10013 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10014 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10015 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10016 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10017 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10018 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10019 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10020 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10021 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10022
10023 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10024
10025 * disk/efi/efidisk.c: Include grub/partition.h.
10026 (iterate_child_devices): New function.
10027 (add_device): First, compare only last device path nodes, so that
10028 devices are sorted by the types.
10029 (grub_efidisk_get_device_handle): New function.
10030 (grub_efidisk_get_device_name): Likewise.
10031
10032 * configure.ac (--enable-mm-debug): New option to enable the
10033 memory manager debugging feature. This makes the binary much
10034 bigger, so is disabled by default.
10035
9cacaa17 100362006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10037
10038 Use grub_abort instead of grub_stop, and grub_exit must be
10039 define in each architecture now. Also, this change adds support
10040 for EFI disks.
f19dbdb7 10041
9cacaa17 10042 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10043 (grub_getkey): New function.
10044 (grub_term_get_current): Likewise.
10045
10046 * util/i386/pc/grub-setup.c: Include grub/term.h.
10047 (grub_getkey): New function.
10048 (grub_term_get_current): Likewise.
10049
10050 * util/misc.c (grub_stop): Renamed to ...
10051 (grub_exit): ... this.
10052
10053 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10054 (grub_exit): ... this.
10055 (grub_machine_init): Use grub_abort instead of abort.
10056 (grub_stop): Removed.
10057
10058 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10059 abort.
10060
10061 * kern/i386/pc/startup.S (grub_exit): New function.
10062 (cold_reboot): New label.
10063
10064 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10065 (grub_efi_init): Call grub_efidisk_init.
10066 (grub_efi_fini): Call grub_efidisk_fini.
10067
10068 * kern/efi/efi.c: Include grub/mm.h.
10069 (grub_efi_console_control_guid): Renamed to ...
10070 (console_control_guid): ... this.
10071 (grub_efi_loaded_image_guid): Renamed to ...
10072 (loaded_image_guid): ... this.
10073 (grub_efi_locate_handle): New function.
10074 (grub_efi_open_protocol): Likewise.
10075 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10076 GRUB_EFI_CONSOLE_CONTROL_GUID.
10077 (grub_efi_exit): Removed.
10078 (grub_stop): Likewise.
10079 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10080 (grub_exit): New function.
10081 (grub_print_device_path): Likewise.
10082
10083 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10084 (grub_enter_rescue_mode): Register "exit".
10085
10086 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10087 (grub_abort): New function.
10088
10089 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10090
10091 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10092
10093 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10094
10095 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10096 (grub_print_device_path): New prototype.
10097 (grub_efi_locate_handle): Likewise.
10098 (grub_efi_open_protocol): Likewise.
10099
10100 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10101 * disk/efi/efidisk.c: Likewise.
10102
10103 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10104
10105 * include/grub/efi/console_control.h
10106 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10107
10108 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10109 last 8 bytes as an array.
10110 (GRUB_EFI_DISK_IO_GUID): New macro.
10111 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10112 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10113 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10114 grub_uint8_t.
10115 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10116 (struct grub_efi_device_path): Rename the member "sub_type" to
10117 "subtype".
10118 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10119 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10120 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10121 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10122 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10123 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10124 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10125 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10126 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10127 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10128 (struct grub_efi_pci_device_path): New structure.
10129 (grub_efi_pci_device_path_t): New type.
10130 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10131 (struct grub_efi_pccard_device_path): New structure.
10132 (grub_efi_pccard_device_path_t): New type.
10133 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10134 (struct grub_efi_memory_mapped_device_path): New structure.
10135 (grub_efi_memory_mapped_device_path_t): New type.
10136 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10137 (struct grub_efi_vendor_device_path): New structure.
10138 (grub_efi_vendor_device_path_t): New type.
10139 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10140 (struct grub_efi_controller_device_path): New structure.
10141 (grub_efi_controller_device_path_t): New type.
10142 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10143 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10144 (struct grub_efi_acpi_device_path): New structure.
10145 (grub_efi_acpi_device_path_t): New type.
10146 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10147 (struct grub_efi_expanded_acpi_device_path): New structure.
10148 (grub_efi_expanded_acpi_device_path_t): New type.
10149 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10150 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10151 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10152 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10153 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10154 (struct grub_efi_atapi_device_path): New structure.
10155 (grub_efi_atapi_device_path_t): New type.
10156 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10157 (struct grub_efi_fibre_channel_device_path): New structure.
10158 (grub_efi_fibre_channel_device_path_t): New type.
10159 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10160 (struct grub_efi_1394_device_path): New structure.
10161 (grub_efi_1394_device_path_t): New type.
10162 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10163 (struct grub_efi_usb_device_path): New structure.
10164 (grub_efi_usb_device_path_t): New type.
10165 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10166 (struct grub_efi_usb_class_device_path): New structure.
10167 (grub_efi_usb_class_device_path_t): New type.
10168 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10169 (struct grub_efi_i2o_device_path): New structure.
10170 (grub_efi_i2o_device_path_t): New type.
10171 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10172 (struct grub_efi_mac_address_device_path): New structure.
10173 (grub_efi_mac_address_device_path_t): New type.
10174 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10175 (struct grub_efi_ipv4_device_path): New structure.
10176 (grub_efi_ipv4_device_path_t): New type.
10177 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10178 (struct grub_efi_ipv6_device_path): New structure.
10179 (grub_efi_ipv6_device_path_t): New type.
10180 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10181 (struct grub_efi_infiniband_device_path): New structure.
10182 (grub_efi_infiniband_device_path_t): New type.
10183 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10184 (struct grub_efi_uart_device_path): New structure.
10185 (grub_efi_uart_device_path_t): New type.
10186 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10187 (struct grub_efi_vendor_messaging_device_path): New structure.
10188 (grub_efi_vendor_messaging_device_path_t): New type.
10189 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10190 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10191 (struct grub_efi_hard_drive_device_path): New structure.
10192 (grub_efi_hard_drive_device_path_t): New type.
10193 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10194 (struct grub_efi_cdrom_device_path): New structure.
10195 (grub_efi_cdrom_device_path_t): New type.
10196 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10197 (struct grub_efi_vendor_media_device_path): New structure.
10198 (grub_efi_vendor_media_device_path_t): New type.
10199 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10200 (struct grub_efi_file_path_device_path): New structure.
10201 (grub_efi_file_path_device_path_t): New type.
10202 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10203 (struct grub_efi_protocol_device_path): New structure.
10204 (grub_efi_protocol_device_path_t): New type.
10205 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10206 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10207 (struct grub_efi_bios_device_path): New structure.
10208 (grub_efi_bios_device_path_t): New type.
10209 (struct grub_efi_disk_io): New structure.
10210 (grub_efi_disk_io_t): New type.
10211 (struct grub_efi_block_io_media): New structure.
10212 (grub_efi_block_io_media_t): New type.
10213 (struct grub_efi_block_io): New structure.
10214 (grub_efi_block_io_t): New type.
10215
10216 * include/grub/misc.h (grub_stop): Removed.
10217 (grub_exit): New prototype.
10218 (grub_abort): Likewise.
10219
10220 * include/grub/disk.h (enum grub_disk_dev_id): Added
10221 GRUB_DISK_DEVICE_EFIDISK_ID.
10222
10223 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10224 disk/efi/efidisk.c.
10225 (kernel_syms.lst): Remove the target if an error occurs.
10226
49986a9f 102272006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10228
10229 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10230 as it was simply too buggy.
10231
970d3b8a 102322006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10233
10234 * kern/misc.c (grub_lltoa): New function.
10235 (grub_vsprintf): Added support for the long long suffix,
10236 i.e. "ll".
10237
ff04ec24 102382006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10239
10240 * Makefile.in (LDFLAGS): Add variable.
10241 (LD): Remove variable.
10242 * configure.ac: Add -m32 to LDFLAGS.
10243 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10244 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10245 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10246 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10247 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10248 variables.
10249 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10250 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10251 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10252
37e5e1a4 102532006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10254
10255 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10256 length for unknown glyph.
10257
c352d8dd 102582006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10259
2eab1c0d 10260 Add support for pre-loaded modules into the EFI port.
f19dbdb7 10261
2eab1c0d 10262 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10263 completely. Accept one more argument DIR. The caller has changed.
10264
10265 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10266
10267 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10268 (grub_efi_loaded_image_guid): New variable.
10269 (grub_efi_get_loaded_image): New function.
10270 (grub_arch_modules_addr): Likewise.
10271
10272 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10273 prototype.
10274
10275 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10276 (struct grub_efi_loaded_image): New structure.
10277 (grub_efi_loaded_image_t): New type.
10278
102792006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10280
c352d8dd 10281 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10282 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10283 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10284
6d01d6b4 102852006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10286
10287 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10288
976a4ea0 102892006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10290
10291 * DISTLIST: Added include/grub/efi/console.h,
10292 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10293 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10294
10295 * include/grub/efi/console.h: New file.
10296 * include/grub/efi/time.h: Likewise.
10297 * include/grub/i386/efi/kernel.h: Likewise.
10298 * kern/efi/init.c: Likewise.
10299 * kern/efi/mm.c: Likewise.
10300 * term/efi/console.c: Likewise.
f19dbdb7 10301
976a4ea0 10302 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10303 (grub_stop): Removed.
10304 (grub_get_rtc): Likewise.
10305 (grub_machine_init): Simply call grub_efi_init.
10306 (grub_machine_fini): Call grub_efi_fini.
10307
10308 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10309 (grub_efi_output_string): Removed.
10310 (grub_efi_stall): New function.
10311 (grub_stop): Likewise.
10312 (grub_get_rtc): Likewise.
10313
10314 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10315 (grub_efi_stall): New prototype.
10316 (grub_efi_allocate_pages): Likewise.
10317 (grub_efi_free_pages): Likewise.
10318 (grub_efi_get_memory_map): Likewise.
10319 (grub_efi_mm_init): Likewise.
10320 (grub_efi_mm_fini): Likewise.
10321 (grub_efi_init): Likewise.
10322 (grub_efi_fini): Likewise.
10323
10324 * include/grub/i386/efi/time.h: Do not include
10325 grub/symbol.h. Include grub/efi/time.h.
10326 (GRUB_TICKS_PER_SECOND): Removed.
10327 (grub_get_rtc): Likewise.
10328
10329 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10330 Added padding. The EFI spec is buggy.
10331 (GRUB_EFI_BLACK): New macro.
10332 (GRUB_EFI_BLUE): Likewise.
10333 (GRUB_EFI_GREEN): Likewise.
10334 (GRUB_EFI_CYAN): Likewise.
10335 (GRUB_EFI_RED): Likewise.
10336 (GRUB_EFI_MAGENTA): Likewise.
10337 (GRUB_EFI_BROWN): Likewise.
10338 (GRUB_EFI_LIGHTGRAY): Likewise.
10339 (GRUB_EFI_BRIGHT): Likewise.
10340 (GRUB_EFI_DARKGRAY): Likewise.
10341 (GRUB_EFI_LIGHTBLUE): Likewise.
10342 (GRUB_EFI_LIGHTGREEN): Likewise.
10343 (GRUB_EFI_LIGHTCYAN): Likewise.
10344 (GRUB_EFI_LIGHTRED): Likewise.
10345 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10346 (GRUB_EFI_YELLOW): Likewise.
10347 (GRUB_EFI_WHITE): Likewise.
10348 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10349 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10350 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10351 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10352 (GRUB_EFI_BACKGROUND_RED): Likewise.
10353 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10354 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10355 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10356 (GRUB_EFI_TEXT_ATTR): Likewise.
10357
10358 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10359 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10360 (kernel_mod_HEADERS): Added efi/time.h.
10361
83709125 103622006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10363
10364 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10365 include/grub/efi/api.h, include/grub/efi/console_control.h,
10366 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10367 include/grub/i386/efi/time.h, kern/efi/efi.c,
10368 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10369 and util/i386/efi/grub-mkimage.c.
10370
10371 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10372
10373 * genmk.rb (PModule#rule): Do not export symbols if
10374 #{prefix}_EXPORTS is set to "no".
10375
10376 * conf/i386-efi.mk: New file.
10377 * conf/i386-efi.rmk: Likewise.
10378 * include/grub/efi/api.h: Likewise.
10379 * include/grub/efi/console_control.h: Likewise.
10380 * include/grub/efi/efi.h: Likewise.
10381 * include/grub/efi/pe32.h: Likewise.
10382 * include/grub/i386/efi/time.h: Likewise.
10383 * kern/efi/efi.c: Likewise.
10384 * kern/i386/efi/init.c: Likewise.
10385 * kern/i386/efi/startup.S: Likewise.
10386 * util/i386/efi/grub-mkimage.c: Likewise.
10387
103882006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 10389
10390 * include/grub/script.h: Include <grub/parser.h> and
10391 "grub_script.tab.h".
10392 (struct grub_lexer_param): New struct.
10393 (struct grub_parser_param): Likewise.
10394 (grub_script_create_arglist): Pass the state in an argument.
10395 (grub_script_add_arglist): Likewise.
10396 (grub_script_create_cmdline): Likewise.
10397 (grub_script_create_cmdblock): Likewise.
10398 (grub_script_create_cmdif): Likewise.
10399 (grub_script_create_cmdmenu): Likewise.
10400 (grub_script_add_cmd): Likewise.
10401 (grub_script_arg_add): Likewise.
10402 (grub_script_lexer_ref): Likewise.
10403 (grub_script_lexer_deref): Likewise.
10404 (grub_script_lexer_record_start): Likewise.
10405 (grub_script_lexer_record_stop): Likewise.
10406 (grub_script_mem_record): Likewise.
10407 (grub_script_mem_record_stop): Likewise.
10408 (grub_script_malloc): Likewise.
10409 (grub_script_yylex): Likewise.
10410 (grub_script_yyparse): Likewise.
10411 (grub_script_yyerror): Likewise.
10412 (grub_script_yylex): Likewise.
10413 (grub_script_lexer_init): Return the state.
10414
10415 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10416 (grub_script_lexer_done): Likewise.
10417 (grub_script_lexer_getline): Likewise.
10418 (grub_script_lexer_refs): Likewise.
10419 (script): Likewise.
10420 (newscript): Likewise.
10421 (record): Likewise.
10422 (recording): Likewise.
10423 (recordpos): Likewise.
10424 (recordlen): Likewise.
10425 (grub_script_lexer_init): Return the state instead of setting
10426 global variables.
10427 (grub_script_lexer_ref): Use the newly added argument for state
10428 instead of globals.
10429 (grub_script_lexer_deref): Likewise.
10430 (grub_script_lexer_record_start): Likewise.
10431 (grub_script_lexer_record_stop): Likewise.
10432 (recordchar): Likewise.
10433 (nextchar): Likewise.
10434 (grub_script_yylex2): Likewise.
10435 (grub_script_yylex): Likewise.
10436 (grub_script_yyerror): Likewise.
10437
10438 * normal/parser.y (func_mem): Removed variable.
10439 (menu_entry): Likewise.
10440 (err): Likewise.
10441 (%lex-param): New parser option.
10442 (%parse-param): Likewise.
10443 (script): Always return the AST.
10444 (argument): Pass the state around.
10445 (arguments): Likewise.
10446 (grubcmd): Likewise.
10447 (commands): Likewise.
10448 (function): Likewise.
10449 (menuentry): Likewise.
10450 (if_statement): Likewise.
10451 (if): Likewise.
10452
10453 * normal/script.c (grub_script_memused): Removed variable.
10454 (grub_script_parsed): Likewise.
10455 (grub_script_malloc): Added a state argument. Use that instead of
10456 global variables.
10457 (grub_script_mem_record): Likewise.
10458 (grub_script_mem_record_stop): Likewise.
10459 (grub_script_arg_add): Likewise.
10460 (grub_script_add_arglist): Likewise.
10461 (grub_script_create_cmdline): Likewise.
10462 (grub_script_create_cmdif): Likewise.
10463 (grub_script_create_cmdmenu): Likewise.
10464 (grub_script_add_cmd): Likewise.
10465 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 10466
e2a8c904 104672006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 10468
10469 * normal/command.c (grub_command_init): Remove the title command.
10470
10471 * normal/lexer.c (grub_script_yylex): Renamed from this...
10472 (grub_script_yylex2): ... to this.
10473 (grub_script_yylex): New function. Temporary
10474 introduced to filter some tokens.
10475 (grub_script_yyerror): Print a newline.
10476
10477 * normal/main.c (read_config_file): Output information about the
10478 lines that contain errors. Wait for a key after all lines have
10479 been processed. Don't return an empty menu.
10480
10481 * normal/parser.y (func_mem): Don't initialize.
10482 (menu_entry): Likewise.
10483 (err): New variable.
10484 (script): Don't return anything when an error was encountered.
10485 (ws, returns): Removed rules.
10486 (argument): Disabled concatenated variable support.
10487 (arguments): Remove explicit separators.
10488 (grubcmd): Likewise.
10489 (function): Likewise.
10490 (menuentry): Likewise.
10491 (if): Likewise.
10492 (commands): Likewise. Add error handling.
10493
10494 * normal/script.c (grub_script_create_cmdline): If
10495 `grub_script_parsed' is 0, assume the parser encountered an error.
10496
c9a86192 104972006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10498
10499 * configure.ac: Add support for EFI. Fix the typo
10500 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10501
70f3b243 105022006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10503
10504 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10505 foreign multibyte characters should be shown correctly.
10506
65f201ad 105072006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10508
10509 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10510 calculation.
10511 (read_config_file): Made it to close file before returning.
10512
b4b93674 105132006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10514
10515 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10516 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10517 video/i386/pc/vbefill.c.
10518
10519 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10520 video/i386/pc/vbefill.c.
10521
10522 * include/grub/video.h (grub_video_blit_format): New enum.
10523 (grub_video_mode_info): Added new member blit_format.
10524 (grub_video_get_blit_format): New function prototype.
10525
10526 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10527 function prototype.
10528 (grub_video_vbe_map_rgb): Likewise.
10529 (grub_video_vbe_unmap_color): Likewise.
10530
10531 * include/grub/i386/pc/vbeblit.h: New file.
10532
10533 * include/grub/i386/pc/vbefill.h: New file.
10534
10535 * video/video.c (grub_video_get_blit_format): New function.
10536 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10537 (grub_video_vbe_map_rgb): Likewise.
10538 (grub_video_vbe_unmap_color): Likewise.
10539
10540 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10541 optimized fills.
10542 (grub_video_vbe_blit_render_target): Changed to use more optimized
10543 blits.
10544 (grub_video_vbe_setup): Added detection for optimized settings.
10545 (grub_video_vbe_create_render_target): Likewise.
10546
10547 * video/i386/pc/vbeblit.c: New file.
10548
10549 * video/i386/pc/vbefill.c: New file.
10550
c2379b9c 105512006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10552
10553 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10554 here...
10555
10556 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10557 parsing to support both hex and dec ranges. If filename was missing
10558 show usage information.
10559
bd0d7896 105602006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10561
10562 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10563 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10564
10565 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10566 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10567 (video_mod_SOURCES): Added.
10568 (video_mod_CFLAGS): Likewise.
10569 (video_mod_LDFLAGS): Likewise.
10570 (gfxterm_mod_SOURCES): Likewise.
10571 (gfxterm_mod_CFLAGS): Likewise.
10572 (gfxterm_mod_LDFLAGS): Likewise.
10573 (videotest_mod_SOURCES): Likewise.
10574 (videotest_mod_CFLAGS): Likewise.
10575 (videotest_mod_LDFLAGS): Likewise.
10576 (vesafb_mod_SOURCES): Removed.
10577 (vesafb_mod_CFLAGS): Likewise.
10578 (vesafb_mod_LDFLAGS): Likewise.
10579 (vga_mod_SOURCES): Likewise.
10580 (vga_mod_CFLAGS): Likewise.
10581 (vga_mod_LDFLAGS): Likewise.
10582
10583 * commands/videotest.c: New file.
10584
10585 * font/manager.c (fill_with_default_glyph): Modified to use
10586 grub_font_glyph.
10587 (grub_font_get_glyph): Likewise.
10588 (fontmanager): Renamed from this...
10589 (font_manager): ... to this.
10590
10591 * include/grub/font.h (grub_font_glyph): Added new structure.
10592 (grub_font_get_glyph): Modified to use grub_font_glyph.
10593
10594 * include/grub/misc.h (grub_abs): Added as inline function.
10595
10596 * include/grub/video.h: New file.
10597
10598 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10599 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10600 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10601 (grub_vbe_get_controller_info): Renamed from this...
10602 (grub_vbe_bios_get_controller_info): ... to this.
10603 (grub_vbe_get_mode_info): Renamed from this...
10604 (grub_vbe_bios_get_mode_info): ... to this.
10605 (grub_vbe_set_mode): Renamed from this...
10606 (grub_vbe_bios_set_mode): ... to this.
10607 (grub_vbe_get_mode): Renamed from this...
10608 (grub_vbe_bios_get_mode): ... to this.
10609 (grub_vbe_set_memory_window): Renamed from this...
10610 (grub_vbe_bios_set_memory_window): ... to this.
10611 (grub_vbe_get_memory_window): Renamed from this...
10612 (grub_vbe_bios_get_memory_window): ... to this.
10613 (grub_vbe_set_scanline_length): Renamed from this...
10614 (grub_vbe_set_scanline_length): ... to this.
10615 (grub_vbe_get_scanline_length): Renamed from this...
10616 (grub_vbe_bios_get_scanline_length): ... to this.
10617 (grub_vbe_set_display_start): Renamed from this...
10618 (grub_vbe_bios_set_display_start): ... to this.
10619 (grub_vbe_get_display_start): Renamed from this...
10620 (grub_vbe_bios_get_display_start): ... to this.
10621 (grub_vbe_set_palette_data): Renamed from this...
10622 (grub_vbe_bios_set_palette_data): ... to this.
10623 (grub_vbe_set_pixel_rgb): Removed.
10624 (grub_vbe_set_pixel_index): Likewise.
10625
10626 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10627 from this...
10628 (grub_vbe_bios_get_controller_info): ... to this.
10629 (grub_vbe_get_mode_info): Renamed from this...
10630 (grub_vbe_bios_get_mode_info): ... to this.
10631 (grub_vbe_set_mode): Renamed from this...
10632 (grub_vbe_bios_set_mode): ... to this.
10633 (grub_vbe_get_mode): Renamed from this...
10634 (grub_vbe_bios_get_mode): ... to this.
10635 (grub_vbe_set_memory_window): Renamed from this...
10636 (grub_vbe_bios_set_memory_window): ... to this.
10637 (grub_vbe_get_memory_window): Renamed from this...
10638 (grub_vbe_bios_get_memory_window): ... to this.
10639 (grub_vbe_set_scanline_length): Renamed from this...
10640 (grub_vbe_set_scanline_length): ... to this.
10641 (grub_vbe_get_scanline_length): Renamed from this...
10642 (grub_vbe_bios_get_scanline_length): ... to this.
10643 (grub_vbe_set_display_start): Renamed from this...
10644 (grub_vbe_bios_set_display_start): ... to this.
10645 (grub_vbe_get_display_start): Renamed from this...
10646 (grub_vbe_bios_get_display_start): ... to this.
10647 (grub_vbe_set_palette_data): Renamed from this...
10648 (grub_vbe_bios_set_palette_data): ... to this.
10649 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10650 getting corrupted after calling it. Added more pushes and pops.
10651 (grub_vbe_bios_set_mode): Likewise.
10652 (grub_vbe_bios_get_mode): Likewise.
10653 (grub_vbe_bios_get_memory_window): Likewise.
10654 (grub_vbe_bios_set_scanline_length): Likewise.
10655 (grub_vbe_bios_get_scanline_length): Likewise.
10656 (grub_vbe_bios_get_display_start): Likewise.
10657 (grub_vbe_bios_set_palette_data): Likewise.
10658
10659 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10660 (cl_insert): Likewise.
10661 (cl_delete): Likewise.
10662
10663 * term/gfxterm.c: New file.
10664
10665 * term/i386/pc/vesafb.c: Removed file.
10666
10667 * video/video.c: New file.
10668
10669 * video/i386/pc/vbe.c (real2pm): Added new function.
10670 (grub_video_vbe_draw_pixel): Likewise.
10671 (grub_video_vbe_get_video_ptr): Likewise.
10672 (grub_video_vbe_get_pixel): Likewise
10673 (grub_video_vbe_init): Likewise.
10674 (grub_video_vbe_fini): Likewise.
10675 (grub_video_vbe_setup): Likewise.
10676 (grub_video_vbe_get_info): Likewise.
10677 (grub_video_vbe_set_palette): Likewise.
10678 (grub_video_vbe_get_palette): Likewise.
10679 (grub_video_vbe_set_viewport): Likewise.
10680 (grub_video_vbe_get_viewport): Likewise.
10681 (grub_video_vbe_map_color): Likewise.
10682 (grub_video_vbe_map_rgb): Likewise.
10683 (grub_video_vbe_map_rgba): Likewise.
10684 (grub_video_vbe_unmap_color): Likewise.
10685 (grub_video_vbe_fill_rect): Likewise.
10686 (grub_video_vbe_blit_glyph): Likewise.
10687 (grub_video_vbe_blit_bitmap): Likewise.
10688 (grub_video_vbe_blit_render_target): Likewise.
10689 (grub_video_vbe_scroll): Likewise.
10690 (grub_video_vbe_swap_buffers): Likewise.
10691 (grub_video_vbe_create_render_target): Likewise.
10692 (grub_video_vbe_delete_render_target): Likewise.
10693 (grub_video_vbe_set_active_render_target): Likewise.
10694 (grub_vbe_set_pixel_rgb): Remove function.
10695 (grub_vbe_set_pixel_index): Likewise.
10696 (index_color_mode): Remove static variable.
10697 (active_mode): Likewise.
10698 (framebuffer): Likewise.
10699 (bytes_per_scan_line): Likewise.
10700 (grub_video_vbe_adapter): Added new static variable.
10701 (framebuffer): Likewise.
10702 (render_target): Likewise.
10703 (initial_mode): Likewise.
10704 (mode_in_use): Likewise.
10705 (mode_list): Likewise.
10706
5f97350b 107072006-03-10 Marco Gerards <marco@gnu.org>
10708
10709 * configure.ac (AC_INIT): Bumped to 1.93.
10710
10711 * DISTLIST: Added `include/grub/hfs.h'.
10712
a3c5c6f8 107132006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10714
10715 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10716 18H, which might help the BIOS falling back to next boot media.
10717
6de53d26 107182006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10719
10720 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10721 Poe Chen <poe.poechen@gmail.com>.
10722
77c4a393 107232006-01-17 Marco Gerards <marco@gnu.org>
10724
10725 * include/grub/normal.h: Include <grub/script.h>.
10726 (grub_command_list): Removed struct.
10727 (grub_command_list_t): Removed type.
10728 (grub_menu_entry): Remove members `num' and `command_list'. Add
10729 members `commands' and `sourcecode'.
10730 * include/grub/script.h: Add inclusion guards.
10731 (grub_script_cmd_menuentry): New struct.
10732 (grub_script_execute_menuentry): New prototype.
10733 (grub_script_lexer_record_start): Likewise.
10734 (grub_script_lexer_record_stop): Likewise.
10735 * normal/execute.c (grub_script_execute_menuentry): New function.
10736 * normal/lexer.c (record, recording, recordpos, recordlen): New
10737 variables.
10738 (grub_script_lexer_record_start): New function.
10739 (grub_script_lexer_record_stop): Likewise.
10740 (recordchar): Likewise.
10741 (nextchar): Likewise.
10742 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10743 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10744 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10745 (current_menu): New variable.
10746 (free_menu): Mainly rewritten.
10747 (grub_normal_menu_addentry): New function.
10748 (read_config_file): Rewritten.
10749 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 10750 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 10751 the menu entry.
10752 (run): Mainly rewritten.
10753 * normal/parser.y (menu_entry): New variable.
10754 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10755 (menuentry): New rule.
10756 (command): Add `menuentry'.
10757 (if_statement): Allow additional returns before `fi'.
10758 * normal/script.c (grub_script_create_cmdmenu): New function.
10759
144f1f98 107602006-01-03 Marco Gerards <marco@gnu.org>
10761
10762 * INSTALL: GNU Bison is required.
10763 * configure.ac: Rewritten the test to detect Bison.
10764 * Makefile.in (YACC): New variable. Reported by Xun Sun
10765 <xun.sun.cn@gmail.com>.
10766
af4b2d89 107672006-01-03 Marco Gerards <marco@gnu.org>
10768
10769 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10770 the HFS+ filesystem to filesystem blocks.
10771 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10772 GCC warning is silenced.
10773
15643b71 107742006-01-03 Marco Gerards <marco@gnu.org>
10775
10776 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10777 read from disk from big endian to host byte order.
10778
00905879 107792006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10780
10781 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10782 documentation.
10783 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10784 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10785 embedded HFS+ filesystem.
10786 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10787 (grub_hfs_sblock): Move from here...
10788 * include/grub/hfs.h: To here... New file.
10789 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10790 documentation.
10791 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10792 New macros.
10793 (grub_hfsplus_volheader): Change type of member `magic' to
10794 `grub_uint16_t'.
10795 (grub_hfsplus_data): Add new member `embedded_offset'.
10796 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10797 returned block.
10798 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10799 Calculate the offset.
10800
8899bc3e 108012005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10802
10803 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10804 Removed.
10805 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10806
ae8c0277 108072005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10808
10809 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10810 ENV->NAME is NULL after allocating ENV->VALUE.
10811
07084456 108122005-12-25 Marco Gerards <marco@gnu.org>
10813
10814 * kern/env.c (grub_env_set): Rewritten the error handling code.
10815
4750f5f1 108162005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10817
10818 * geninit.sh: Made more robust, and more portable.
10819
50214199 108202005-12-25 Marco Gerards <marco@gnu.org>
10821
10822 Add support for Apple HFS+ filesystems.
f19dbdb7 10823
50214199 10824 * fs/hfsplus.c: New file.
10825
10826 * DISTLIST: Added `fs/hfsplus.c'.
10827
10828 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10829 (hfsplus_mod_SOURCES): New variable.
10830 (hfsplus_mod_CFLAGS): Likewise.
10831 (hfsplus_mod_LDFLAGS): Likewise.
10832 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10833 (grub_setup_SOURCES): Likewise.
10834 (grub_mkdevicemap_SOURCES): Likewise.
10835 (grub_emu_SOURCES): Likewise.
10836 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10837
10838 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10839
10840 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10841
befaed6c 108422005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10843
10844 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10845 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10846 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10847 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10848 normal/lexer.c, normal/parser.y, normal/script.c, and
10849 partmap/gpt.c.
10850 Removed kern/sparc64/cache.c.
10851
10852 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10853 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10854 grub_emu_init.c.
10855
10856 * configure.ac (AC_INIT): Bumped to 1.92.
10857
6a124103 108582005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10859
10860 * kern/err.c (grub_error_push): Added new function to support error
10861 stacks.
10862 (grub_error_pop): Likewise.
10863 (grub_error_stack_items): New local variable to support error stacks.
10864 (grub_error_stack_pos): Likewise.
10865 (grub_error_stack_assert): Likewise.
10866 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10867 stack depth.
10868 (grub_print_error): Added support to print errors from error stack.
10869
10870 * include/grub/err.h (grub_error_push): Added function prototype.
10871 (grub_error_pop): Likewise.
10872
be973c1b 108732005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10874
10875 * configure.ac: Accept `powerpc64' as host_cpu.
10876 (amd64): Rename to `biarch32'.
10877
10878 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10879 non-cacheline-aligned addresses.
10880
10881 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10882 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10883 if `size' is non-zero.
10884
b04216ab 108852005-12-03 Marco Gerards <mgerards@xs4all.nl>
10886
10887 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10888 and `cd' to make sure the filename is not prefixed with a
10889 directory name.
10890 (pkgdata_MODULES): Add `gpt.mod'.
10891 (gpt_mod_SOURCES): New variable.
10892 (gpt_mod_CFLAGS): Likewise.
10893 (gpt_mod_LDFLAGS): Likewise.
10894
10895 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10896
10897 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10898 New macro.
10899
10900 * partmap/gpt.c: New file.
10901
10902 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10903 GPT partition map is detected.
10904
41730ed9 109052005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10906
10907 * commands/i386/pc/play.c: New file.
10908 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10909 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10910 macros.
f19dbdb7 10911
95dc3643 109122005-11-27 Marco Gerards <mgerards@xs4all.nl>
10913
10914 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10915 ((unused))' to silence gcc warning.
10916
1569ec51 109172005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10918
10919 * configure.ac: Correct `AC_PROG_YACC' test.
10920
9abde152 109212005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10922
10923 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10924 check before installing files.
10925
44b83271 109262005-11-22 Mike Small <smallm@panix.com>
10927
10928 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10929 number regex so multidigit numbers are recognized correctly.
10930
109312005-11-22 Mike Small <smallm@panix.com>
10932
10933 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10934 debugging message before attempting to claim memory.
10935 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10936 multiple addresses in case of failure.
10937
9c12956b 109382005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10939
10940 * term/tparm.c (get_space): Remove empty `if' statement.
10941
10942 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10943
10944 * kern/parser.c (check_varstate): Rename `state' to 's'.
10945
aeaf81d9 109462005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10947
10948 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10949 variable definitions to the beginning of each function. Sort stack
10950 variables by size.
10951 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10952 `buf' argument to `char *'.
10953
79bbb63f 109542005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10955
10956 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10957 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10958 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 10959 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10960 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10961 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10962 configfile.mod, search.mod, gzio.mod and test.mod.
10963 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10964 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10965 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10966 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10967 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10968 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10969 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10970 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10971 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10972 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10973 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10974 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10975 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10976 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10977 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10978 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10979 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10980 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10981 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10982 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10983 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10984 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10985 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10986
10987 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10988 `grep --include'.
10989 (pkgdata_MODULES): Add test.mod.
10990
233b1628 109912005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10992
10993 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10994 appending to variables with "+=".
10995 (PModule): Use full pathname to generate *.lst filenames.
10996
10997 * Makefile.in: Fixed list rules moved from genmk.rb.
10998 (.DELETE_ON_ERROR): New special target.
10999 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11000
11001 * conf/i386-pc.rmk: Include conf/common.mk.
11002 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 11003 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 11004 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11005 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11006 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11007 configfile.mod, search.mod, gzio.mod and test.mod.
11008 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11009 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11010 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11011 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11012 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11013 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11014 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11015 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11016 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11017 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11018 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11019 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11020 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11021 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11022 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11023 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11024 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11025 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11026 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11027 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11028 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11029 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11030 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11031 here...
11032 * conf/common.rmk: ... to here. New file.
11033
11034 * conf/common.mk: New file.
11035
16f820c8 110362005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11037
11038 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11039 (grub_script.tab.c): ... here.
11040
11041 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11042 (grub_script.tab.c): ... here.
11043
11044 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11045 (grub_script.tab.c): ... here.
11046
11047 * normal/command.c (grub_command_find): Fixed a memory leak of
11048 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11049
63ba1554 110502005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11051
11052 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11053 "@" which marks the start of a comment on ARM.
11054 (VARIABLE): Likewise.
11055
7f67dc13 110562005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11057
79bbb63f 11058 Add support for Linux/ADFS partition tables.
7f67dc13 11059
11060 * partmap/acorn.c: New file.
11061
11062 * include/grub/acorn_filecore.h: Likewise.
11063
11064 * DISTLIST: Added `partmap/acorn.c' and
11065 `include/grub/acorn_filecore.h'.
f19dbdb7 11066
7f67dc13 11067 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11068 `partmap/acorn.c'.
11069 (pkgdata_MODULES): Add `acorn.mod'.
11070 (acorn_mod_SOURCES): New variable.
11071 (acorn_mod_CFLAGS): Likewise.
11072
11073 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11074 `partmap/acorn.c'.
11075 (pkgdata_MODULES): Add `acorn.mod'.
11076 (acorn_mod_SOURCES): New variable.
11077 (acorn_mod_CFLAGS): Likewise.
11078
11079 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11080 (pkgdata_MODULES): Add `acorn.mod'.
11081 (acorn_mod_SOURCES): New variable.
11082 (acorn_mod_CFLAGS): Likewise.
11083 (acorn_mod_LDFLAGS): Likewise.
11084
11085 * include/types.h (grub_disk_addr_t): New typedef.
11086
6d099807 110872005-11-13 Marco Gerards <mgerards@xs4all.nl>
11088
11089 * geninit.sh: New file.
11090
11091 * geninitheader.sh: Likewise.
11092
11093 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11094 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11095 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11096 * commands/configfile.c (grub_configfile_init)
11097 (grub_configfile_fini): Likewise.
11098 * commands/default.c (grub_default_init, grub_default_fini):
11099 Likewise.
11100 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11101 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11102 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11103 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11104 Likewise.
11105 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11106 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11107 Likewise.
11108 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 11109 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 11110 Likewise.
11111 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11112 Likewise.
fe6b695a 11113 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 11114 Likewise.
11115 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11116 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11117 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11118 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11119 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11120 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11121 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11122 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11123 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11124 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11125 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11126 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11127 * partmap/amiga.c (grub_amiga_partition_map_init)
11128 (grub_amiga_partition_map_fini): Likewise.
11129 * partmap/apple.c (grub_apple_partition_map_init)
11130 (grub_apple_partition_map_fini): Likewise.
11131 * partmap/pc.c (grub_pc_partition_map_init)
11132 (grub_pc_partition_map_fini): Likewise.
11133 * partmap/sun.c (grub_sun_partition_map_init,
11134 grub_sun_partition_map_fini): Likewise.
11135 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11136 Likewise.
11137
11138 * util/grub-emu.c: Include <grub_modules_init.h>.
11139 (main): Don't initialize and de-initialize any modules directly,
11140 use `grub_init_all' and `grub_fini_all' instead.
11141
11142 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11143 `grub_vesafb_mod_init'.
11144 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11145 all users.
11146 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11147 `grub_vga_mod_init'. Updated all users.
11148 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 11149
6d099807 11150 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11151 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11152 rules.
11153
11154 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11155 Generate a function to initialize the module in utilities.
11156 Updated all callers.
11157 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11158 initialize the module in utilities. Updated all callers.
11159
9046bcf0 111602005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11161
11162 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11163 escape sequence and a literal ^L to clear the screen.
11164
11165 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11166 when returning from Open Firmware.
11167
d13ea639 111682005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11169
11170 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11171 (grub_ofconsole_height): Likewise.
11172 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11173 manually insert a '\n'.
11174 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11175 `grub_ofconsole_height'. Return early if these are already set.
11176
a8fcf206 111772005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11178
11179 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11180 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11181 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11182 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11183 and `normal/script.c'.
11184 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11185 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11186 (test_mod_SOURCES): New variable.
11187 (test_mod_CFLAGS): Likewise.
11188 (test_mod_LDFLAGS): Likewise.
11189 (pkgdata_MODULES): Add `test.mod'.
11190 (grub_script.tab.c): New rule.
11191 (grub_script.tab.h): Likewise.
11192
b6b32745 111932005-11-07 Marco Gerards <mgerards@xs4all.nl>
11194
11195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11196 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11197 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11198 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11199 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11200 (test_mod_SOURCES): New variable.
11201 (test_mod_CFLAGS): Likewise.
11202 (pkgdata_MODULES): Add `test.mod'.
11203 (grub_script.tab.c): New rule.
11204 (grub_script.tab.h): Likewise.
11205
daac212a 112062005-11-06 Marco Gerards <mgerards@xs4all.nl>
11207
11208 Add initial scripting support.
11209
11210 * commands/test.c: New file.
11211 * include/grub/script.h: Likewise.
11212 * normal/execute.c: Likewise.
11213 * normal/function.c: Likewise.
11214 * normal/lexer.c: Likewise.
11215 * normal/parser.y: Likewise.
11216 * normal/script.c: Likewise.
11217
11218 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 11219
daac212a 11220 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11221 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11222 `normal/function.c' and `normal/script.c'.
11223 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11224 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 11225 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11226 variables.
daac212a 11227 (pkgdata_MODULES): Add `test.mod'.
11228 (grub_script.tab.c): New rule.
11229 (grub_script.tab.h): Likewise.
11230
11231 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11232
11233 * include/grub/normal.h (grub_test_init): New prototype.
11234 (grub_test_fini): Likewise.
f19dbdb7 11235
daac212a 11236 * normal/command.c: Include <grub/script.h>.
11237 (grub_command_execute): Rewritten.
f19dbdb7 11238
daac212a 11239 * util/grub-emu.c (main): Call `grub_test_init' and
11240 `grub_test_fini'.
11241
77500b2b 112422005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11243
11244 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11245 to 0.
11246 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11247 there are no pending characters.
11248
e45deb9e 112492005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11250
11251 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11252 `grub_strndup' to drop device arguments. Replace unnecessary
11253 `grub_strndup' with `grub_strdup'.
11254
4ce32619 112552005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11256
11257 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11258 `debug' environment variable has been set.
11259
112602005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 11261
4ce32619 11262 * Makefile.in (install-local): Use $(DATA).
11263 (uninstall): Likewise.
11264 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11265 (sbin_UTILITIES): ... to here.
11266 (sbin_SCRIPTS): New variable.
11267 (grub_install_SOURCES): New variable.
11268 * util/powerpc/ieee1275/grub-install.in: New file.
11269 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11270 variable.
11271 (add_segments): Call `grub_util_get_path'.
11272
25fe6f03 112732005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11274
11275 From Timothy Baldwin:
11276 * commands/ls.c (grub_ls_list_files): Close FILE with
11277 grub_file_close.
11278 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11279
04ccf3ec 112802005-10-24 Marco Gerards <mgerards@xs4all.nl>
11281
11282 * include/grub/parser.h: New file.
11283
11284 * kern/parser.c: Likewise.
11285
11286 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11287 (grub_setup_SOURCES): Likewise.
11288 (grub_probefs_SOURCES): Likewise.
11289 (grub_emu_SOURCES): Likewise.
11290 (kernel_img_HEADERS): Add `parser.h'.
11291
11292 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11293 (grub_emu_SOURCES): Add `kern/parser.c'.
11294 (grubof_SOURCES): Likewise.
11295
11296 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11297 (grubof_SOURCES): Add `kern/parser.c'.
11298
11299 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11300
11301 * kern/misc.c (grub_split_cmdline): Removed function.
11302
11303 * kern/rescue.c: Include <grub/parser.h>.
11304 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11305 of `grub_split_cmdline'.
11306
11307 * normal/command.c: Include <grub/parser.h>.
11308 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11309 of `grub_split_cmdline'.
11310
11311 * normal/completion.c: Include <grub/parser.h>.
11312 (cmdline_state): New variable.
11313 (iterate_dir): End the filename with a quote depending on the
11314 command line state.
11315 (get_state): new function.
11316 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11317 split the arguments and determine the current argument. When the
11318 argument string is not quoted, escape all spaces.
11319
6d8f4b0e 113202005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11321
11322 * normal/sparc64/setjmp.S: New file.
11323
15cf03ed 113242005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11325
11326 * include/grub/sparc64/libgcc.h: New file.
11327 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11328 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11329 normal/sparc64/setjmp.c.
11330
03e8661a 113312005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11332
11333 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11334 * kern/sparc64/cache.S: New file.
11335 * kern/sparc64/cache.c: Removed.
11336 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11337 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11338 -mtune=ultrasparc.
11339 (COMMON_LDFLAGS): Add -melf64_sparc.
11340 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11341 (grubof_SOURCES): Use cache.S instead of cache.c.
11342 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11343 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11344 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11345 commented though.
11346 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11347 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11348 (linux_mod_CFLAGS): Commented out.
11349 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11350 out because module isn't built.
11351 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11352 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11353 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11354 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11355 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11356 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11357 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11358 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11359 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11360 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11361 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11362 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11363 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11364 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11365
34eeec8a 113662005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11367
11368 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11369 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11370 longer, because HFS should not be used on PC.
11371
708367a3 113722005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11373
11374 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11375 consistently within the loop.
11376
6fa1251a 113772005-10-15 Marco Gerards <mgerards@xs4all.nl>
11378
11379 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11380 directory can not be read.
11381
4801580b 113822005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11383
11384 * configure.ac (AC_INIT): Increase the version number to 1.91.
11385
11386 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11387 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11388 term/i386/pc/serial.c.
11389
219ad426 113902005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11391
11392 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11393 file size must be permitted.
11394
11395 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11396 between %ah and %al.
11397
688e5699 113982005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11399
11400 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11401 grub_uint64_t.
11402 Call the hook with a NUL-terminated filename.
11403 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11404 grub_cpu_to_be32.
11405
11406 * kern/term.c (cursor_state): New variable.
11407 (grub_term_set_current): Reset the cursor state on a new
11408 terminal.
11409 (grub_setcursor): Rewritten to use CURSOR_STATE.
11410 (grub_getcursor): New function.
11411
11412 * include/grub/term.h (grub_getcursor): New prototype.
11413
11414 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11415 integers on ARM. Reported by Timothy Baldwin
11416 <T.E.Baldwin99@members.leeds.ac.uk>.
11417
bb34586c 114182005-10-11 Marco Gerards <mgerards@xs4all.nl>
11419
11420 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11421 allocated.
11422 (grub_sfs_dir): Likewise.
11423
9a909877 114242005-10-09 Marco Gerards <mgerards@xs4all.nl>
11425
11426 Add support for the SFS filesystem.
11427
11428 * fs/sfs.c: New file.
11429
11430 * DISTLIST: Added `fs/sfs.c'.
11431
11432 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11433 (grub_probefs_SOURCES): Likewise.
11434 (grub_emu_SOURCES): Likewise.
11435 (pkgdata_MODULES): Add `sfs.mod'.
11436 (sfs_mod_SOURCES): New variable.
11437 (sfs_mod_CFLAGS): Likewise.
11438 (sfs_mod_LDFLAGS): Likewise.
11439
11440 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11441 (pkgdata_MODULES): Add `sfs.mod'.
11442 (sfs_mod_SOURCES): New variable.
11443 (sfs_mod_CFLAGS): Likewise.
11444
11445 * util/grub-emu.c (main): Call `grub_sfs_init' and
11446 `grub_sfs_fini'.
11447
11448 * include/grub/fs.h (grub_sfs_init): New prototype.
11449 (grub_sfs_fini): Likewise.
11450
57bdbde3 114512005-10-07 Marco Gerards <mgerards@xs4all.nl>
11452
11453 Add support for the AFFS filesystem.
11454
11455 * fs/affs.c: New file.
11456
11457 * DISTLIST: Added `fs/affs.c'.
11458
11459 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11460 (grub_probefs_SOURCES): Likewise.
11461 (grub_emu_SOURCES): Likewise.
11462 (pkgdata_MODULES): Add `affs.mod'.
11463 (affs_mod_SOURCES): New variable.
11464 (affs_mod_CFLAGS): Likewise.
11465 (affs_mod_LDFLAGS): Likewise.
11466
11467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11468 (pkgdata_MODULES): Add `affs.mod'.
11469 (affs_mod_SOURCES): New variable.
11470 (affs_mod_CFLAGS): Likewise.
11471
11472 * util/grub-emu.c (main): Call `grub_affs_init' and
11473 `grub_affs_fini'.
11474
11475 * include/grub/fs.h (grub_affs_init): New prototype.
11476 (grub_affs_fini): Likewise.
11477
047b67e0 114782005-10-01 Marco Gerards <mgerards@xs4all.nl>
11479
11480 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11481
59b8208a 114822005-10-01 Marco Gerards <mgerards@xs4all.nl>
11483
11484 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11485 `-m32' to CFLAGS.
11486
11487 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11488 linking.
f19dbdb7 11489
59b8208a 11490 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11491 (COMMON_LDFLAGS): New variable.
11492 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11493 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11494 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11495 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11496 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11497 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11498 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11499 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11500 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11501 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11502 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11503 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11504 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11505 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11506 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11507 variables.
11508 (normal_mod_ASFLAGS): Add `-m32'.
11509
11510 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11511 (grub_host_size_t, grub_host_ssize_t): New types.
11512 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 11513 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 11514 `GRUB_HOST_SIZEOF_VOID_P'.
11515
11516 * include/grub/kernel.h (struct grub_module_header): Type of
11517 member offset changed to `grub_host_off_t'. Type of member size
11518 changed to `grub_host_size_t'.
11519 (struct grub_module_info): Type of member offset changed to
11520 `grub_host_off_t'. Type of member size changed to
11521 `grub_host_size_t'.
11522
b4093103 115232005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11524
11525 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 11526
b4093103 11527 * kern/i386/pc/startup.S (multiboot_header): New label.
11528 (multiboot_entry): Likewise.
11529 (multiboot_trampoline): Likewise.
11530
11531 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11532 Increased to 0x4A0.
11533
11534 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11535 put parentheses after a question mark.
11536 [!GRUB_UTIL] (my_mod): New variable.
11537
11538 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11539
b2499b29 115402005-09-28 Marco Gerards <mgerards@xs4all.nl>
11541
11542 Adds support for the XFS filesystem. Btrees are not supported
11543 yet.
11544
11545 * fs/xfs.c: New file.
11546
11547 * DISTLIST: Added `fs/xfs.c'.
11548
11549 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11550 (grub_probefs_SOURCES): Likewise.
11551 (grub_emu_SOURCES): Likewise.
11552 (pkgdata_MODULES): Add `xfs.mod'.
11553 (xfs_mod_SOURCES): New variable.
11554 (xfs_mod_CFLAGS): Likewise.
11555
11556 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11557 (pkgdata_MODULES): Add `xfs.mod'.
11558 (xfs_mod_SOURCES): New variable.
11559 (xfs_mod_CFLAGS): Likewise.
11560
11561 * util/grub-emu.c (main): Call `grub_xfs_init' and
11562 `grub_xfs_fini'.
11563
11564 * include/grub/fs.h (grub_xfs_init): New prototype.
11565 (grub_xfs_fini): Likewise.
11566
f19dbdb7 11567
83d37a62 115682005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11569
11570 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11571 color modes, allow greater than 16 colors to be configured as
11572 a default palette.
11573
47d2d65e 115742005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11575
11576 * normal/completion.c (complete_arguments): Add the qualifier
11577 const into OPTIONS.
11578
11579 From Omniflux <omniflux+lists@omniflux.com>:
11580 * include/grub/terminfo.h: New file.
11581 * include/grub/tparm.h: Likewise.
11582 * include/grub/i386/pc/serial.h: Likewise.
11583 * term/terminfo.c: Likewise.
11584 * term/tparm.c: Likewise.
11585 * term/i386/pc/serial.c: Likewise.
11586 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11587 serial.mod.
11588 (terminfo_mod_SOURCES): New variable.
11589 (terminfo_mod_CFLAGS): Likewise.
11590 (serial_mod_SOURCES): Likewise.
11591 (serial_mod_CFLAGS): Likewise.
11592
48b671ff 115932005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11594
11595 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11596 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11597 and kern/powerpc/ieee1275/cmain.c, respectively.
11598
11599 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11600 * kern/powerpc/ieee1275/crt0.S: ... here.
11601
11602 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11603 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 11604
48b671ff 11605 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11606 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11607 instead of boot/powerpc/ieee1275/crt0.S and
11608 boot/powerpc/ieee1275/cmain.c, respectively.
11609
11610 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11611 sectors. It was not used anyway.
11612
09fc77a7 116132005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11614
11615 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11616 `unused parameter' warning.
11617
003789c7 116182005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11619
11620 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11621 function.
11622 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11623 getcharwidth.
11624
67f44c86 116252005-08-28 Marco Gerards <metgerards@student.han.nl>
11626
11627 * include/grub/normal.h (enum grub_completion_type): Added
11628 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11629
11630 * normal/cmdline.c (print_completion): Handle
11631 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11632 * normal/menu_entry.c (store_completion): Likewise.
11633
11634 * normal/completion.c (complete_arguments): New function.
11635 (grub_normal_do_completion): Call `complete_arguments' when the
11636 current words start with a dash.
11637
0b5abe02 116382005-08-27 Marco Gerards <metgerards@student.han.nl>
11639
11640 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11641 `gzio.mod' instead of `io.mod').
11642
d9864ee1 116432005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11644
11645 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11646 (DISTDIRS): Added io and video.
11647 Rewrite the search routine to make an output consistently.
11648
11649 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11650 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11651 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11652 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11653 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11654 util/powerpc/ieee1275/misc.c.
f19dbdb7 11655
d9864ee1 11656 * include/grub/gzio.h: New file.
11657 * io/gzio.c: Likewise.
f19dbdb7 11658
d9864ee1 11659 * kern/file.c (grub_file_close): Call grub_device_close only if
11660 FILE->DEVICE is not NULL.
11661
11662 * include/grub/mm.h [!NULL] (NULL): New macro.
11663
11664 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11665
11666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11667 (pkgdata_MODULES): Added gzio.mod.
11668 (gzio_mod_SOURCES): New variable.
11669 (gzio_mod_CFLAGS): Likewise.
11670
11671 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11672 (pkgdata_MODULES): Added gzio.mod.
11673 (gzio_mod_SOURCES): New variable.
11674 (gzio_mod_CFLAGS): Likewise.
11675
11676 * commands/cat.c: Include grub/gzio.h.
11677 (grub_cmd_cat): Use grub_gzfile_open instead of
11678 grub_file_open.
f19dbdb7 11679
d9864ee1 11680 * commands/cmp.c: Include grub/gzio.h.
11681 (grub_cmd_cmp): Use grub_gzfile_open instead of
11682 grub_file_open.
11683
11684 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11685 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11686 grub_file_open.
11687 (grub_rescue_cmd_module): Likewise.
11688
fa46f4b5 116892005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11690
11691 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11692 kern/sparc64/ieee1275/init.c because it contains _start.
11693 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11694
e9211b5d 116952005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11696
11697 * configure.ac: Add support for sparc64 host with ieee1275
11698 firmware.
11699 * configure: Generated from configure.ac.
11700 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11701 instead of int.
11702 (grub_ofdisk_read): Likewise.
11703 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11704 pointers as (void *) to remove a warning.
11705 (grub_ofdisk_close): Likewise.
11706 (grub_ofdisk_read): Likewise.
11707 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11708 returns, so make it return void to remove a warning.
11709 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11710 Corresponding prototype change.
11711 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11712 values, and cast the pointers as (void *) to remove a warning.
11713 (grub_mm_dump): Likewise.
11714 * conf/sparc64-ieee1275.mk: New file.
11715 * conf/sparc64-ieee1275.rmk: Likewise.
11716 * include/grub/sparc64/setjmp.h: Likewise.
11717 * include/grub/sparc64/types.h: Likewise.
11718 * include/grub/sparc64/ieee1275/console.h: Likewise.
11719 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11720 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11721 * include/grub/sparc64/ieee1275/time.h: Likewise.
11722 * kern/sparc64/cache.c: Likewise.
11723 * kern/sparc64/dl.c: Likewise.
11724 * kern/sparc64/ieee1275/init.c: Likewise.
11725 * kern/sparc64/ieee1275/openfw.c: Likewise.
11726
385c6a92 117272005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11728
11729 * util/console.c (grub_ncurses_putchar): If C is greater than
11730 0x7f, set C to a question mark.
11731 (grub_ncurses_getcharwidth): New function.
11732 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11733 getcharwidth.
11734
11735 * normal/menu.c (print_entry): Made aware of Unicode. First,
11736 convert TITLE to UCS-4, and predict the cursor position by
11737 grub_getcharwidth.
11738
11739 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11740 const to SRC.
11741 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11742
16ccb8b1 117432005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11744
11745 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11746 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11747 grub_strcat.
11748
11749 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11750 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11751 grub_strcpy and grub_strlen. Take it into account that a space
11752 character is inserted as a delimiter.
11753
6a85ce79 117542005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11755
11756 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 11757 invalid magic in the error.
6a85ce79 11758
11759 * commands/search.c: New file.
f19dbdb7 11760
6a85ce79 11761 * util/grub-emu.c (main): Call grub_search_init and
11762 grub_search_fini.
11763
11764 * kern/rescue.c (grub_rescue_print_disks): Removed.
11765 (grub_rescue_print_devices): New function.
11766 (grub_rescue_cmd_ls): Use grub_device_iterate with
11767 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11768 grub_rescue_print_disks.
11769
11770 * kern/partition.c (grub_partition_iterate): Return the result of
11771 PARTMAP->ITERATE instead of GRUB_ERRNO.
11772
11773 * kern/device.c: Include grub/partition.h.
11774 (grub_device_iterate): New function.
11775
11776 * include/grub/partition.h (grub_partition_iterate): Return int
11777 instead of grub_err_t.
11778
11779 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11780 prototype.
11781 [GRUB_UTIL] (grub_search_fini): Likewise.
11782
11783 * include/grub/device.h (grub_device_iterate): New prototype.
11784
11785 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11786 commands/search.c.
11787 (pkgdata_MODULES): Added search.mod.
11788 (search_mod_SOURCES): New variable.
11789 (search_mod_CFLAGS): Likewise.
11790
11791 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11792 (pkgdata_MODULES): Added search.mod.
11793 (search_mod_SOURCES): New variable.
11794 (search_mod_CFLAGS): Likewise.
11795
11796 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11797 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11798 All callers changed.
11799
11800 * DISTLIST: Added commands/search.c.
11801
ef095434 118022005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11803
11804 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11805 conversion.
11806 (grub_getcharwidth): New function.
11807
11808 * kern/misc.c (grub_utf8_to_ucs4): New function.
11809
11810 * include/grub/term.h (struct grub_term): Added a new member
11811 "getcharwidth".
11812 (grub_getcharwidth): New prototype.
11813
11814 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11815
11816 * term/i386/pc/console.c (map_char): New function. Segregated from
11817 grub_console_putchar.
11818 (grub_console_putchar): Use map_char.
11819 (grub_console_getcharwidth): New function.
11820 (grub_console_term): Specified grub_console_getcharwidth as
11821 getcharwidth.
11822
11823 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11824 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11825
11826 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11827 GRUB_ERRNO.
11828 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11829 on grub_strtoul completely.
11830 (write_char): Declare local variables in the beginning of the
11831 function.
11832 (grub_vesafb_getcharwidth): New function.
11833 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11834 getcharwidth.
11835
1f0a95e4 118362005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11837
11838 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11839 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11840 commands/i386/pc/vbetest.c.
11841
11842 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11843 call grub_vbe_get_controller_info again, because the returned
11844 information is volatile.
11845 (grub_vbe_set_video_mode): Mostly rewritten.
11846 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11847 grub_vbe_status_t correctly.
11848 (grub_vbe_get_video_mode_info): Likewise.
11849 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11850 several if statements.
11851
11852 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11853 * commands/i386/pc/vbeinfo.c: ... this.
11854
11855 * commands/i386/pc/vbe_test.c: Renamed to ...
11856 * commands/i386/pc/vbetest.c: ... this.
11857
11858 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11859 ...
11860 (grub_cmd_vbeinfo): ... this. Save video modes before
11861 iterating. Skip a video mode, if it is not available, not enough
11862 information is given or it is monochrome. Show the memory
11863 model. Leave the interpretation of MODEVAR to grub_strtoul
11864 completely.
11865 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11866 (GRUB_MOD_FINI): Likewise.
11867
11868 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11869 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11870 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11871 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11872 grub_strtoul completely.
11873 (real2pm): Removed.
11874 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11875 (GRUB_MOD_FINI): Likewise.
11876
11877 * normal/misc.c: Include grub/mm.h.
11878
11879 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11880 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11881 (vbe_list_modes_mod_SOURCES): Removed.
11882 (vbe_list_modes_mod_CFLAGS): Likewise.
11883 (vbe_test_mod_SOURCES): Likewise.
11884 (vbe_test_mod_CFLAGS): Likewise.
11885 (vbeinfo_mod_SOURCES): New variable.
11886 (vbeinfo_mod_CFLAGS): Likewise.
11887 (vbetest_mod_SOURCES): Likewise.
11888 (vbetest_mod_CFLAGS): Likewise.
11889
992ffbbe 118902005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11891
11892 * normal/misc.c: New file.
11893
11894 * DISTLIST: Added normal/misc.c.
f19dbdb7 11895
992ffbbe 11896 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11897 DISK to HOOK. Call HOOK with DISK.
11898 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11899 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11900 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11901
11902 * normal/menu_entry.c (struct screen): Added a new member
11903 "completion_shown".
11904 (completion_buffer): New global variable.
11905 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11906 (store_completion): New function.
11907 (complete): Likewise.
11908 (clear_completions): Likewise.
11909 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11910 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11911 a tab, call complete.
11912
11913 * normal/completion.c (disk_dev): Removed.
11914 (print_simple_completion): Likewise.
11915 (print_partition_completion): Likewise.
11916 (print_func): New global variable.
11917 (add_completion): Do not take the arguments WHAT or PRINT any
11918 longer. Added a new argument TYPE. Instead of printing directly,
11919 call PRINT_FUNC if not NULL.
11920 All callers changed.
11921 (complete_device): Use a local variable DEV instead of
11922 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11923 (grub_normal_do_completion): Take a new argument HOOK. Do not
11924 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11925 empty string, return NULL instead.
11926 All callers changed.
11927
11928 * normal/cmdline.c (print_completion): New function.
11929
11930 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11931 to HOOK.
11932 All callers changed.
11933
11934 * kern/disk.c (grub_print_partinfo): Removed.
11935
11936 * include/grub/partition.h (struct grub_partition_map): Add a new
11937 argument DISK into HOOK of ITERATE.
11938 (grub_partition_iterate): Add a new argument DISK to HOOK.
11939
11940 * include/grub/normal.h (enum grub_completion_type): New enum.
11941 (grub_completion_type_t): New type.
11942 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11943 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11944 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11945 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11946 (grub_normal_do_completion): Added a new argument HOOK.
11947 (grub_normal_print_device_info): New prototype.
11948
11949 * include/grub/disk.h (grub_print_partinfo): Removed.
11950
11951 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11952 (normal_mod_SOURCES): Likewise.
11953 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11954 (normal_mod_SOURCES): Likewise.
11955
11956 * commands/ls.c (grub_ls_list_disks): Use
11957 grub_normal_print_device_info instead of grub_print_partinfo. Free
11958 PNAME.
11959 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11960 duplicating the code.
11961
0bd41162 119622005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11963
11964 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 11965 follow GCS more precisely.
11966 * commands/i386/pc/vbe_test.c: Likewise.
11967 * include/grub/i386/pc/vbe.h: Likewise.
11968 * term/i386/pc/vesafb.c: Likewise.
11969 * video/i386/pc/vbe.c: Likewise.
0bd41162 11970
6323696a 119712005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11972
11973 * DISTLIST: Added term/i386/pc/vesafb.c
11974 DISTLIST: Added video/i386/pc/vbe.c
11975 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11976 DISTLIST: Added commands/i386/pc/vbe_test.c.
11977 * commands/i386/pc/vbe_list_modes.c: New file.
11978 * commands/i386/pc/vbe_test.c: Likewise.
11979 * term/i386/pc/vesafb.c: Likewise.
11980 * video/i386/pc/vbe.c: Likewise.
11981 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11982 (grub_vbe_probe) Added prototype.
11983 (grub_vbe_set_video_mode) Likewise.
11984 (grub_vbe_get_video_mode) Likewise.
11985 (grub_vbe_get_video_mode_info) Likewise.
11986 (grub_vbe_set_pixel_rgb) Likewise.
11987 (grub_vbe_set_pixel_index) Likewise.
11988 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11989 (pkgdata_MODULES): Added vesafb.mod.
11990 (pkgdata_MODULES): Added vbe_list_modes.mod.
11991 (pkgdata_MODULES): Added vbe_test.mod.
11992 (vbe_mod_SOURCES): Added.
11993 (vbe_mod_CFLAGS): Likewise.
11994 (vesafb_mod_SOURCES): Likewise.
11995 (vesafb_mod_CFLAGS): Likewise.
11996 (vbe_list_modes_mod_SOURCES): Likewise.
11997 (vbe_list_modes_mod_CFLAGS): Likewise.
11998 (vbe_test_mod_SOURCES): Likewise.
11999 (vbe_test_mod_CFLAGS): Likewise.
12000
0a74e62f 120012005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12002
0a74e62f 12003 * normal/command.c (grub_command_execute): If INTERACTIVE is
12004 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12005 CMDLINE. Disable the pager if INTERACTIVE is true.
12006 All callers are changed.
12007
12008 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12009 before reading a config file.
12010 * normal/main.c (read_config_file): Even if a command is not
12011 found, register it if it is within an entry.
12012
12013 * util/grub-emu.c: Include sys/types.h and unistd.h.
12014 (options): Added --hold.
12015 (struct arguments): Added a new member "hold".
12016 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12017 missing.
12018 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12019 cleared by a debugger, if it is not zero.
12020
12021 * include/grub/normal.h (grub_command_execute): Add an argument
12022 INTERACTIVE.
12023
e51f85ae 120242005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12025
12026 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12027
e9c6f39b 120282005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12029
12030 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12031 program with another one, because the old one didn't detect a bug
12032 in gcc-3.4. Always use regparm 2, because the new test is still
12033 not enough for gcc-4.0. Someone must investigate a simple test
12034 case which detects a bug in gcc-4.0.
12035
8de3495c 120362005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12037
12038 * DISTLIST: Added normal/completion.c.
12039
12040 * normal/completion.c: New file.
f19dbdb7 12041
8de3495c 12042 * term/i386/pc/console.c (grub_console_getwh): New function.
12043 (grub_console_term): Assign grub_console_getwh to getwh.
12044
12045 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12046 function is defined in normal/completion.c as
12047 grub_normal_do_completion.
12048 (grub_cmdline_get): Use grub_normal_do_completion instead of
12049 grub_tab_complete.
12050
12051 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12052 returns non-zero, otherwise return 0.
12053 (grub_partition_iterate): First, probe the partition map. Then,
12054 call ITERATE only for this partition map.
12055
12056 * kern/misc.c (grub_strncmp): Rewritten.
12057
12058 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12059 returns non-zero. Otherwise return 0.
12060
12061 * include/grub/partition.h (grub_partition_map_iterate): Return
12062 int instead of void.
12063
12064 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12065
12066 * include/grub/misc.h (grub_strncmp): Change the type of N to
12067 grub_size_t.
12068
12069 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12070 of void.
12071
12072 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 12073 unsigned explicitly before comparing it with I.
8de3495c 12074
12075 * kern/main.c (grub_env_write_root): Add the attribute unused into
12076 VAR.
12077
12078 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12079 normal/completion.c.
12080 (normal_mod_SOURCES): Likewise.
12081 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12082 (normal_mod_SOURCES): Likewise.
12083
12084 * normal/command.c (grub_iterate_commands): If ITERATE returns
12085 non-zero, return one immediately.
12086
e85e144b 120872005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12088
12089 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12090 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12091 descriptions.
12092 (grub_vbe_get_controller_info): New function.
12093 (grub_vbe_get_mode_info): Likewise.
12094 (grub_vbe_set_mode): Likewise.
12095 (grub_vbe_get_mode): Likewise.
12096 (grub_vbe_set_memory_window): Likewise.
12097 (grub_vbe_get_memory_window): Likewise.
12098 (grub_vbe_set_scanline_length): Likewise.
12099 (grub_vbe_get_scanline_length): Likewise.
12100 (grub_vbe_set_display_start): Likewise.
12101 (grub_vbe_get_display_start): Likewise.
12102 (grub_vbe_set_palette_data): Likewise.
12103 * include/grub/i386/pc/vbe.h: New file.
12104
c46153d2 121052005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12106
12107 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12108 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12109 * DISTLIST: Likewise.
12110 * kern/ieee1275/of.c: Moved to ...
12111 * kern/ieee1275/ieee1275.c: ... here.
12112
0cb90c45 121132005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12114
12115 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12116 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12117 Pass 0 as `end' parameter to grub_strtoul().
12118
a19fb360 121192005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12120
12121 * include/grub/powerpc/ieee1275/console.h: Do not include
12122 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12123 ifdef.
12124 (grub_console_cur_color): Remove i386-specific prototype.
12125 (grub_console_real_putchar): Likewise.
12126 (grub_console_checkkey): Likewise.
12127 (grub_console_getkey): Likewise.
12128 (grub_console_getxy): Likewise.
12129 (grub_console_gotoxy): Likewise.
12130 (grub_console_cls): Likewise.
12131 (grub_console_setcursor): Likewise.
12132 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12133 Include <grub/machine/console.h>.
12134 * term/ieee1275/ofconsole.c: Likewise.
12135
4ac9bd04 121362005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12137
12138 * Makefile.in (LIBLZO): New variable.
12139
12140 * configure.ac: Check for LZO version 2.
12141
12142 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12143 lzo/lzo1x.h instead of lzo1x.h.
12144
12145 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12146 of -llzo.
12147
12148 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12149 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12150
12151 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12152 copying the data from PARTITION to P.
12153
f4917dfd 121542005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12155
12156 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12157 negative, unload the module.
12158
12159 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12160 map is "pc_partition_map" but not "pc".
12161 (usage): Fix the description. The options are --boot-image and
12162 --core-image but not --boot-file or --core-file.
12163 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12164 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12165 DEFAULT_DIRECTORY.
12166
12167 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12168 --core-file. Specify INSTALL_DEVICE as an argument.
12169
12170 * util/console.c: Include config.h.
12171 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12172 [HAVE_NCURSES_H]: Include ncurses.h.
12173 [HAVE_CURSES_H]: Include curses.h.
12174 [!A_NORMAL] (A_NORMAL): Defined as zero.
12175 [!A_STANDOUT] (A_STANDOUT): Likewise.
12176
12177 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12178 -lncurses.
12179 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12180
12181 * configure.ac: Check for curses libraries and headers.
12182
12183 * Makefile.in (LIBCURSES): New variable.
12184
12185 * genmk.rb (Script::rule): Set the executable bits.
12186
12187 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12188 name of the PC partition map is "pc_partition_map" but not "pc".
12189
0e143073 121902005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12191
12192 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12193 (modules): Likewise.
12194 (usage): Added descriptions for --modules and --grub-probefs.
12195 Handle --modules and --grub-probefs. Save the arguments in MODULES
12196 and GRUB_PROBEFS, respectively.
12197 Auto-detect a filesystem module against GRUBDIR. If the result is
12198 empty and modules are not specified explicitly, abort the
12199 installation. Add the result to MODULES.
12200
12201 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12202 disk/powerpc/ieee1275/ofdisk.c,
12203 include/grub/powerpc/ieee1275/init.h and
12204 term/powerpc/ieee1275/ofconsole.c.
12205 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12206 term/ieee1275/ofconsole.c.
12207
12208 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12209
12210 * COPYING: Upgraded to the latest version. Only the address of the
12211 FSF office has changed.
f19dbdb7 12212
efd6e6d5 122132005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12214
12215 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12216 kern/ieee1275.c with kern/ieee1275/of.c.
12217
12218 * kern/ieee1275.c: Moved to ...
12219 * kern/ieee1275/of.c: ... here.
12220
8ceafda2 122212005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12222
12223 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 12224 readability.
8ceafda2 12225
12226 * config.guess: Updated to the latest version from gnulib.
12227 * config.sub: Likewise.
12228 * install.sh: Likewise.
12229 * mkinstalldirs: Likewise.
12230
12231 * include/grub/console.h: Removed. This file is arch-specific. Do
12232 not put this in include/grub.
12233
12234 * include/grub/i386/pc/console.h: Resurrected.
12235
12236 * util/console.c: Include grub/machine/console.h instead of
12237 grub/console.h.
12238 * util/grub-emu.c: Likewise.
12239
267f6cd9 122402005-08-04 Marco Gerards <metgerards@student.han.nl>
12241
12242 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12243 hardcoded value.
f19dbdb7 12244
267f6cd9 12245 From Vincent Pelletier <subdino2004@yahoo.fr>
12246 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12247 Redefined to use grub_getwh.
12248 (grub_term): New member named getwh.
12249 (grub_getwh): New prototype.
12250 * kern/term.c (grub_getwh): New function.
12251 * term/i386/pc/console.c (grub_console_getwh): New function.
12252 (grub_console_term): New member `getwh'.
12253 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12254 (grub_vga_term): New member `getwh'.
0b5abe02 12255 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 12256 grub_ssize_t.
12257 (grub_ofconsole_getw): New function.
12258 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12259 (grub_ofconsole_term): New field named getwh and new initial
12260 value.
12261
3be7266d 122622005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12263
12264 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12265 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12266 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12267 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12268 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12269 of <grub/machine/ieee1275.h>.
12270 * commands/ieee1275/reboot.c: Likewise.
12271 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12272 * kern/ieee1275.c: ... to here. All users updated. Change all
12273 parameter structs to use new type `grub_ieee1275_cell_t'.
12274 * term/powerpc/ieee1275/ofconsole.c: Move ...
12275 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12276 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12277 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12278 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12279 to return int.
12280 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12281 Remove unused prototypes. All users updated.
12282 * include/grub/powerpc/ieee1275/console.h: Removed.
12283 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12284 `grub_ieee1275_cell_t'.
12285 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12286 Cast comparisons with -1 to the correct type.
12287 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12288 type to match `grub_ieee1275_entry_fn'.
12289
8b5f3938 122902005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12291
12292 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12293
12294 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12295 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12296 partmap/sun.c.
12297 (grub_probefs_SOURCES): New variable.
12298
12299 * util/i386/pc/grub-probefs.c: New file.
12300
12301 * util/i386/pc/grub-setup.c (main): Call
12302 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12303 grub_hfs_init and grub_jfs_init to initialize the system. Call
12304 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12305 grub_pc_partition_map_fini to finish the system.
12306
ea409713 123072005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12308
12309 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12310 function.
12311 (grub_multiboot_load_elf32): Likewise.
12312 (grub_multiboot_is_elf64): Likewise.
12313 (grub_multiboot_load_elf64): Likewise.
12314 (grub_multiboot_load_elf): Likewise.
12315 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12316 an ELF32 or ELF64 file.
12317 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12318
12319 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12320 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12321 NULL before calling FS->LABEL.
12322 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12323 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12324 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12325 before calling FS->LABEL.
12326
141a288b 123272005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12328
12329 * util/i386/pc/grub-install.in (datadir): New variable.
12330 (libdir): Removed.
12331 (pkgdatadir): New variable.
12332 (pkglibdir): Removed.
12333
0d5f8a54 123342005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12335
12336 * DISTLIST: Added util/i386/pc/grub-install.in.
12337
12338 * util/i386/pc/grub-install.in: New file.
12339
12340 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12341 (grub_install_SOURCES): Likewise.
12342
12343 * genmk.rb: Added support for scripts.
12344 (Script): New class.
12345 (scripts): New variable.
12346
12347 * Makefile.in (install-local): Install sbin_SCRIPTS by
12348 INSTALL_SCRIPT.
12349 (uninstall): Remove sbin_SCRIPTS.
12350
12351 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12352 device, try to get a GRUB device by
12353 grub_util_biosdisk_get_grub_dev.
12354 Free DEST_DEV.
12355
12356 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12357 description for --device-map.
12358
5f968e1e 123592005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12360
12361 Change the semantics of variable hooks. They now return strings
12362 instead of error values.
f19dbdb7 12363
5f968e1e 12364 * util/i386/pc/grub-setup.c: Include grub/env.h.
12365 (setup): Use grub_device_set_root instead of grub_env_set.
12366
12367 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12368 grub_env_get instead of grub_device_set_root and
12369 grub_device_get_root, respectively.
12370
12371 * kern/main.c (grub_env_write_root): New function.
12372 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12373 grub_env_set instead of grub_device_set_root.
12374
12375 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12376 many variables.
12377 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12378 rather than calling ENV->WRITE_HOOK afterwards.
12379 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12380 passing a pointer of a pointer.
12381 (grub_register_variable_hook): Change the types of "read_hook" and
12382 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12383 respectively.
12384 Allocate the default empty string on the heap, because this string
12385 may be freed later.
12386
12387 * kern/device.c: Include grub/env.h.
12388 (grub_device_set_root): Removed.
12389 (grub_device_get_root): Likewise.
12390 (grub_device_open): Use grub_env_get instead of
12391 grub_device_get_root.
12392
12393 * include/grub/env.h (grub_env_read_hook_t): New type.
12394 (grub_env_write_hook_t): Likewise.
12395 (grub_env_var): Change the types of "read_hook" and "write_hook"
12396 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12397 (grub_register_variable_hook): Likewise.
12398
12399 * include/grub/device.h (grub_device_set_root): Removed.
12400 (grub_device_set_root): Likewise.
12401
12402 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12403 make sure that DIRNAME terminates with '/', so that
12404 grub_fat_find_dir will fail if PATH is not a directory.
12405
12406 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12407 from DIRNAME.
12408 Use the qualifier auto for print_files and print_files_long.
12409 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12410 as a regular file.
12411 Put a newline only if there is no error.
12412 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12413 used.
12414
896f0afd 124152005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12416
12417 * kern/partition.c (grub_partition_probe): Initialize PART to
12418 NULL. Otherwise, when no partition map is registered, this returns
12419 a garbage.
12420
b28b81b2 124212005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12422
12423 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12424 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12425 valid.
12426
5f3607e0 124272005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12428
12429 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12430 information on each device, if it does not have partitions. Print
12431 "Device" instead of "Disk", because this function is not specific
12432 to disk devices.
12433
12434 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12435 static to ensure that it is put on the memory rather than a
12436 register.
12437
502c87e8 124382005-07-17 Yoshinori Okuji <okuji@enbug.org>
12439
12440 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12441 (grub_cat_init): Likewise.
12442 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12443 (options): Likewise.
12444 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12445 (grub_configfile_init): Likewise.
12446 * font/manager.c (GRUB_MOD_INIT): Likewise.
12447 * commands/help.c (GRUB_MOD_INIT): Likewise.
12448 (grub_help_init): Likewise.
12449 * normal/command.c (grub_command_init): Likewise.
12450 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12451 * disk/loopback.c (grub_loop_init): Likewise.
12452 (GRUB_MOD_INIT): Likewise.
12453 * commands/ls.c (grub_ls_init): Likewise.
12454 (GRUB_MOD_INIT): Likewise.
12455 (options): Likewise.
12456 * commands/boot.c (grub_boot_init): Likewise.
12457 (GRUB_MOD_INIT): Likewise.
12458 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12459 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12460 (GRUB_MOD_INIT): Likewise.
12461 * commands/cmp.c (grub_cmp_init): Likewise.
12462 (GRUB_MOD_INIT): Likewise.
12463
12464 * normal/arg.c: Use <> instead of "" to include header files.
12465 (SHORT_ARG_HELP): New macro.
12466 (SHORT_ARG_USAGE): Likewise.
12467 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12468 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12469 descriptions.
12470 (find_short): Check if C is 'h' or 'u' explicitly.
12471 (grub_arg_show_help): Use space characters instead of tabs. Treat
12472 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12473 are shown with --help and --usage only if they are not used for
12474 the command itself.
12475 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12476 'h' and 'u'.
12477
12478 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12479 const into "longarg". Change the type of "shortarg" to int.
12480
f806d18e 124812005-07-17 Yoshinori Okuji <okuji@enbug.org>
12482
12483 * boot/i386/pc/boot.S (boot_drive_check): New label.
12484
12485 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12486 macro.
12487
12488 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12489 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12490
e293232b 124912005-07-17 Yoshinori Okuji <okuji@enbug.org>
12492
12493 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12494 When turning off Gate A20, skip the check and return immediately,
12495 because this is not fatal usually.
12496
ebedfd00 124972005-07-17 Yoshinori Okuji <okuji@enbug.org>
12498
12499 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12500 be 0x7C00 instead of 0x8000.
12501
12502 * boot/i386/pc/pxeboot.S: Rewritten.
12503
12504 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12505 EXT_C.
12506 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12507 result.
12508
654fc59f 125092005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12510
12511 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12512 robustness. This routine now supports a BIOS call and System
12513 Control Port A to modify the gate A20.
12514
12515 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12516 Increased to 0x440.
12517
09f9923f 125182005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12519
12520 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12521 device path and resulting ihandle.
12522 (grub_ofdisk_close): dprintf the ihandle being closed.
12523 (grub_ofdisk_read): dprintf function parameters.
12524 * kern/mm.c (grub_mm_init_region): Likewise.
12525 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12526 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12527 size, and boot arguments.
12528 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12529 before loading into memory.
12530 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12531 before loading into memory.
12532
7ef504d8 125332005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12534
12535 * kern/mm.c: Added much documentation.
12536 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12537 8, set to 5 instead of 8.
12538
e0f050c2 125392005-07-10 Yoshinori Okuji <okuji@enbug.org>
12540
12541 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12542
12543 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12544 (grub_mkdevicemap_SOURCES): New variable.
12545
12546 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12547 lib/device.c of GRUB Legacy.
12548
7224189a 125492005-07-10 Yoshinori Okuji <okuji@enbug.org>
12550
12551 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12552 instead of PATH is NULL.
12553
68c864eb 125542005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12555
12556 * commands/cmp.c (BUFFER_SIZE): New macro.
12557 (grub_cmd_cmp): Close the right file at the right time. Compare
12558 only data just read. Don't report files of different size as
12559 identical. Dynamically allocate buffers. Move variable
12560 declarations at the beginning of function.
12561
e6f3e614 125622005-07-09 Yoshinori Okuji <okuji@enbug.org>
12563
12564 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12565 reverse.
12566
f8f1559a 125672004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12568
12569 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12570 when backspace is pressed at beginning of line.
12571
39c9d41d 125722005-07-03 Yoshinori Okuji <okuji@enbug.org>
12573
12574 * DISTLIST: Added genfslist.sh.
12575
12576 * normal/main.c (fs_module_list): New variable.
12577 (autoload_fs_module): New function.
12578 (read_fs_list): Likewise.
12579 (grub_normal_execute): Call read_fs_list.
12580
12581 * kern/fs.c (grub_fs_autoload_hook): New variable.
12582 (grub_fs_probe): Added support for auto-loading.
12583
12584 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12585 (grub_fs_module_list_t): New type.
12586
12587 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12588 (grub_fs_autoload_hook): New prototype.
12589
12590 * genfslist.sh: New file.
f19dbdb7 12591
39c9d41d 12592 * genmk.rb: Added a rule to generate a filesystem list.
12593
121c1d83 125942005-06-30 Marco Gerards <metgerards@student.han.nl>
12595
12596 * configure.ac: Fix the test for cross-compiling.
12597
12598 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12599 define GRUB_UTIL anymore.
12600
12601 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12602 so this function works on other systems than just big endian.
12603 (load_modules): Likewise.
12604 (add_segments): Likewise.
12605
e75d76e1 126062005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12607
12608 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12609 contains `l' modifier, get a long from va_arg().
12610
50b5a0a7 126112005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12612
12613 * kern/mm.c (grub_free): If the next free block which is being
12614 merged is the first free block, set the first block to the block
12615 being freed.
12616 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12617
89371b20 126182005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12619
12620 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12621 `grub_ieee1275_chosen'.
12622
168d6e58 126232005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12624
12625 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12626 (grub_ieee1275_chosen): New variable.
12627 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12628 `chosen'.
12629 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12630 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12631 Rename first argument to `phandle' for consistency.
12632 (grub_ieee1275_get_property_length): Likewise.
12633 (grub_ieee1275_next_property): Likewise. Change type of first argument
12634 to grub_ieee1275_phandle_t.
12635 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12636 Move export next to declaration.
12637 (grub_ieee1275_chosen): New variable.
12638 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12639 Correct cosmetic typo.
12640 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12641 `grub_ieee1275_chosen'.
12642 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12643 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12644 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12645 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12646 `grub_ieee1275_chosen'.
12647
ca5baa3f 126482005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12649
12650 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12651 /chosen/bootargs.
12652 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12653 /chosen/bootargs as "variable=value" pairs.
12654
708b345f 126552005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12656
12657 * include/grub/misc.h (grub_dprintf): New macro.
12658 (grub_real_dprintf): New prototype.
12659 (grub_strword): Likewise.
12660 (grub_iswordseparator): Likewise.
12661 * kern/misc.c (grub_real_dprintf): New function.
12662 (grub_strword): Likewise.
12663 (grub_iswordseparator): Likewise.
12664
f4c5e67c 126652005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12666
12667 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12668 (roundup): Remove macro.
12669 (grub_ieee1275_flags): Make static.
12670 (grub_ieee1275_realmode): Remove.
12671 (grub_ieee1275_test_flag): New function.
12672 (grub_ieee1275_set_flag): Likewise.
12673 (find_options): Rename to `grub_ieee1275_find_options'; update
12674 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12675 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12676 (cmain): New prototype.
12677 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12678 `grub_ieee1275_flags' directly.
12679 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12680 machine/biosdisk.h.
12681 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12682 Don't include grub/machine/init.h.
12683 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12684 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12685 Remove prototype.
12686 (grub_ieee1275_realmode): Likewise.
12687 (grub_ieee1275_flag): New enum.
12688 (grub_ieee1275_test_flag): New prototype.
12689 (grub_ieee1275_set_flag): New prototype.
12690 * include/grub/powerpc/ieee1275/init.h: Remove file.
12691 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12692 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12693 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12694 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12695 comment.
12696 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12697 `grub_ieee1275_test_flag'.
12698 (grub_ieee1275_encode_devname): Likewise.
12699
ed16607e 127002005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12701
12702 * include/grub/powerpc/ieee1275/ieee1275.h
12703 (grub_ieee1275_encode_devname): New prototype.
12704 (grub_ieee1275_get_filename): Likewise.
12705 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12706 function.
12707 (grub_set_prefix): Likewise.
12708 (grub_machine_init): Call grub_set_prefix.
12709 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12710 (grub_parse_type): New enum.
12711 (grub_ieee1275_get_devargs): New function.
12712 (grub_ieee1275_get_devname): Likewise.
12713 (grub_ieee1275_parse_args): Likewise.
12714 (grub_ieee1275_get_filename): Likewise.
12715 (grub_ieee1275_encode_devname): Likewise.
12716
be369920 127172005-03-30 Marco Gerards <metgerards@student.han.nl>
12718
12719 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12720 `grub_loader_unset'.
12721
a5ce3a4a 127222005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12723
12724 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12725 instead of grub_ieee1275_interpret.
12726 (grub_halt_init): New function.
12727 (grub_halt_fini): Likewise.
12728 (GRUB_MOD_INIT): Correct message grammar.
12729 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12730 instead of grub_ieee1275_interpret.
12731 (grub_reboot_init): New function.
12732 (grub_reboot_fini): Likewise.
12733 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12734 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12735 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12736 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12737 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12738 function.
12739 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12740 Add prototype.
12741 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12742 prototype.
12743 (grub_halt): Likewise.
12744 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12745 (cmain): Remove __attribute__((unused)).
12746 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12747 (grub_heap_len): Likewise.
12748 (grub_machine_fini): New function.
12749 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12750 (grub_halt): Likewise.
12751 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12752 function.
12753 * util/powerpc/ieee1275/misc.c: New file.
12754
0058f771 127552005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12756
12757 * DISTLIST: New file.
12758 * gendistlist.sh: Likewise.
f19dbdb7 12759
0058f771 12760 * Makefile.in (COMMON_DISTFILES): Removed.
12761 (BOOT_DISTFILES): Likewise.
12762 (CONF_DISTFILES): Likewise.
12763 (DISK_DISTFILES): Likewise.
12764 (FS_DISTFILES): Likewise.
12765 (INCLUDE_DISTFILES): Likewise.
12766 (KERN_DISTFILES): Likewise.
12767 (LOADER_DISTFILES): Likewise.
12768 (TERM_DISTFILES): Likewise.
12769 (UTIL_DISTFILES): Likewise.
12770 (DISTFILES): Likewise.
12771 (uninstall): Uninstall files in $(pkgdata_DATA).
12772 (DISTLIST): New target.
12773 (distdir): Use the contents of the file DISTLIST to get a list of
12774 distributed files.
12775
46b3b8a5 127762005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12777
12778 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12779 descriptor. This is ported from GRUB Legacy.
12780
12781 * gencmdlist.sh: Added an extra semicolon to make it work with
12782 old sed versions. Reported by Robert Bihlmeyer
12783 <robbe@orcus.priv.at>.
12784
5822ff87 127852005-03-08 Yoshinori Okuji <okuji@enbug.org>
12786
12787 Automatic loading of commands is supported.
f19dbdb7 12788
5822ff87 12789 * normal/main.c (read_command_list): New function.
12790 (grub_normal_execute): Call read_command_list.
12791
12792 * normal/command.c (grub_register_command): Return zero or CMD.
12793 Allocate CMD->NAME from the heap.
12794 Initialize CMD->MODULE_NAME to zero.
12795 Find the same name as well. If the same command is found and it is
12796 a dummy command, overwrite members. If it is not a dummy command,
12797 return zero.
12798 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12799 (grub_command_find): If a dummy command is found, load a module
12800 and retry to find a command only once.
12801
12802 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12803 make sure that each command is loaded.
12804
12805 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12806 macro.
12807 (struct grub_command): Remove const from the member `name'.
12808 Add a new member `module_name'.
12809 (grub_register_command): Return grub_command_t.
12810
12811 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12812 sure that each command is loaded.
12813
12814 * genmk.rb (PModule::rule): Specify a module name without the
12815 suffix ".mod" to gencmdlist.sh.
12816
7b1f4b57 128172005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12818
12819 * gencmdlist.sh: New file.
f19dbdb7 12820
7b1f4b57 12821 * genmk.rb (PModule::rule): Generate a rule for a command list.
12822 Clean command.lst.
12823 Generate command.lst from $(COMMANDFILES).
12824
12825 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12826 (DATA): Added $(pkgdata_DATA).
12827 (install-local): Install files in $(pkgdata_DATA).
12828
062aaf39 128292005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12830
12831 * term/i386/pc/vga.c (debug_command): Removed.
12832 (GRUB_MOD_INIT): Do not register the command "debug".
12833
12834 From Hollis Blanchard:
12835 * commands/configfile.c: New file.
12836 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12837 commands/configfile.c.
12838 (pkgdata_MODULES): Added configfile.mod.
12839 (configfile_mod_SOURCES): New variable.
12840 (configfile_mod_CFLAGS): Likewise.
12841 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12842 commands/configfile.c.
12843 (pkgdata_MODULES): Added configfile.mod.
12844 (configfile_mod_SOURCES): New variable.
12845 (configfile_mod_CFLAGS): Likewise.
12846 * util/grub-emu.c (main): Call grub_configfile_init and
12847 grub_configfile_fini.
12848 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12849 prototype.
12850 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 12851
cee01aa6 128522005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12853
12854 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12855 address.
12856
12857 * commands/help.c (grub_cmd_help): Do not print newlines after
12858 the last command in print_command_help.
12859
93f3a1d8 128602005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12861
12862 * commands/default.h: New file.
12863 * commands/timeout.h: Likewise.
12864 * normal/context.c: Likewise.
f19dbdb7 12865
93f3a1d8 12866 * util/misc.c: Do not include sys/times.h.
12867 Include sys/time.h and grub/machine/time.h.
12868 (grub_get_rtc): Rewritten with gettimeofday.
12869
12870 * util/grub-emu.c (main): Call grub_default_init and
12871 grub_timeout_init before grub_normal_init, and call
12872 grub_timeout_fini and grub_default_fini after grub_main.
12873
12874 * util/console.c (grub_ncurses_checkkey): Return the read
12875 character or -1.
12876
12877 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12878 timeouts.
12879
12880 * normal/main.c (read_config_file): Push MENU. If this fails,
12881 print an error and wait for a user input.
12882 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12883 If a menu is empty or an error occurs, pop MENU.
12884 (grub_normal_execute): Pop and free MENU after grub_menu_run
12885 returns.
12886
12887 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12888
12889 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12890 include time.h.
12891 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12892 without GRUB_UTIL.
12893 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12894 time.h.
12895 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12896 without GRUB_UTIL.
12897
12898 * include/grub/normal.h (struct grub_menu_list): New struct.
12899 (grub_menu_list_t): New type.
12900 (struct grub_context): New struct.
12901 (grub_context_t): New type.
12902 (grub_register_command): Got rid of EXPORT_FUNC.
12903 (grub_unregister_command): Likewise.
12904 (grub_context_get): New prototype.
12905 (grub_context_get_current_menu): Likewise.
12906 (grub_context_push_menu): Likewise.
12907 (grub_context_pop_menu): Likewise.
12908 [GRUB_UTIL] (grub_default_init): Likewise.
12909 [GRUB_UTIL] (grub_default_fini): Likewise.
12910 [GRUB_UTIL] (grub_timeout_init): Likewise.
12911 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12912
12913 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12914 commands/timeout.c and normal/context.c.
12915 (pkgdata_MODULES): Added default.mod and timeout.mod.
12916 (normal_mod_SOURCES): Added normal/context.c.
12917 (default_mod_SOURCES): New variable.
12918 (default_mod_CFLAGS): Likewise.
12919 (timeout_mod_SOURCES): Likewise.
12920 (timeout_mod_CFLAGS): Likewise.
12921 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12922 conf/i386-pc.rmk.
12923 (pkgdata_MODULES): Added default.mod and timeout.mod.
12924 (normal_mod_SOURCES): Added normal/context.c.
12925 (default_mod_SOURCES): New variable.
12926 (default_mod_CFLAGS): Likewise.
12927 (timeout_mod_SOURCES): Likewise.
12928 (timeout_mod_CFLAGS): Likewise.
12929
12930 * Makefile.in (all-local): Added $(MKFILES).
12931
4ed2e1dd 129322005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12933
12934 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12935 (grub_emu_SOURCES): Likewise.
12936 (pkgdata_MODULES): Add `sun.mod'.
12937 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12939 `partmap/sun.c'.
12940 (pkgdata_MODULES): Add `sun.mod'.
12941 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12942 * include/grub/partition.h (grub_sun_partition_map_init): New
12943 prototype.
12944 (grub_sun_partition_map_fini): Likewise.
12945 * partmap/sun.c: New file.
12946 * util/grub-emu.c (main): Initialize and de-initialize the sun
12947 partitionmap support.
12948
4d4e372e 129492005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12950
12951 This implements an Emacs-like menu entry editor.
f19dbdb7 12952
4d4e372e 12953 * normal/menu_entry.c: New file.
f19dbdb7 12954
4d4e372e 12955 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12956 characters to ASCII.
12957 (saved_char): New variable.
12958 (grub_ncurses_checkkey): Rewritten completely.
12959 (grub_ncurses_getkey): Likewise.
12960 (grub_ncurses_init): Call raw instead of cbreak.
12961
12962 * normal/menu.c (print_entry): Do not put a space.
12963 (init_page): Renamed to ...
12964 (grub_menu_init_page): ... this. All callers changed.
12965 (edit_menu_entry): Removed.
12966 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12967
12968 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12969
12970 * kern/misc.c (grub_vprintf): Call grub_refresh.
12971
12972 * normal/menu.c (DISP_LEFT): Renamed to ...
12973 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12974 * normal/menu.c (DISP_UP): Renamed to ...
12975 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12976 * normal/menu.c (DISP_RIGHT): Renamed to ...
12977 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12978 * normal/menu.c (DISP_DOWN): Renamed to ...
12979 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12980 * normal/menu.c (DISP_HLINE): Renamed to ...
12981 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12982 * normal/menu.c (DISP_VLINE): Renamed to ...
12983 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12984 * normal/menu.c (DISP_UL): Renamed to ...
12985 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12986 * normal/menu.c (DISP_UR): Renamed to ...
12987 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12988 * normal/menu.c (DISP_LL): Renamed to ...
12989 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12990 * normal/menu.c (DISP_LR): Renamed to ...
12991 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12992 * normal/menu.c (TERM_WIDTH): Renamed to ...
12993 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12994 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12995 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12996 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12997 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12998 * normal/menu.c (TERM_MARGIN): Renamed to ...
12999 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13000 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13001 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13002 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13003 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13004 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13005 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13006 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13007 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13008 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13009 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13010 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13011 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13012 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13013 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13014 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13015 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13016 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13017 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13018 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13019 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13020 All callers changed.
13021
13022 * include/grub/normal.h: New prototype.
13023
13024 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13025 normal/menu_entry.c.
13026 (normal_mod_SOURCES): Likewise.
13027 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13028 (normal_mod_SOURCES): Likewise.
13029
e6b92c8a 130302005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13031
13032 * include/grub/normal.h (grub_halt_init): New prototype.
13033 (grub_halt_fini): Likewise.
13034 (grub_reboot_init): Likewise.
13035 (grub_reboot_fini): Likewise.
13036
13037 * util/grub-emu.c: Include signal.h.
13038 (main_env): New global variable.
13039 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13040 catch C-c.
13041 (grub_machine_fini): New function.
13042 (main): Call grub_halt_init and grub_reboot_init before
13043 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13044 Call setjmp with MAIN_ENV to go back afterwards.
13045 Call grub_machine_fini right before return.
13046
13047 * include/grub/util/misc.h: Include setjmp.h.
13048 (main_env): New prototype.
13049
13050 * include/grub/kernel.h (grub_machine_fini): New prototype.
13051 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13052 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13053
13054 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13055 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13056 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 13057
e6b92c8a 13058 * util/i386/pc/misc.c: New file.
f19dbdb7 13059
e6b92c8a 13060 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13061 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13062 commands/i386/pc/reboot.c.
13063
c642636f 130642005-02-14 Guillem Jover <guillem@hadrons.org>
13065
13066 * include/grub/dl.h (grub_dl_check_header): New prototype.
13067 (grub_arch_dl_check_header): Change return type to grub_err_t,
13068 remove size parameter and export function. Update all callers.
13069 * kern/dl.c (grub_dl_check_header): New function.
13070 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13071 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13072 are inside the core.
13073 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13074 independent ELF header checks.
13075 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13076 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13077 `grub_dl_check_header' instead of explicit checks. Check for the
13078 ELF type.
13079 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13080 `grub_dl_check_header' instead of explicit checks. Remove arch
13081 specific ELF header checks.
13082
e6b92c8a 13083 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13084 argument SIZE.
13085
5eabe94b 130862005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13087
13088 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13089 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13090
1b14a681 130912005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13092
13093 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 13094 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 13095 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 13096 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 13097 * partmap/amiga.c (amiga_partition_map_iterate): Return
13098 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13099 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13100
aca108aa 131012005-02-01 Guillem Jover <guillem@hadrons.org>
13102
13103 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13104 help info.
13105
c9f9c556 131062005-01-31 Marco Gerards <metgerards@student.han.nl>
13107
13108 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13109 Removed prototype.
13110 (grub_rescue_cmd_linux): New prototype.
13111 (grub_rescue_cmd_initrd): Likewise.
13112 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13113 `bi_rec'.
13114 (grub_linux_release_mem): Release the memory for the initrd.
13115 (grub_load_linux): Renamed from this...
13116 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13117 Changed `entry' not to be static. Loop over memory regions to
13118 find another one when the default fails.
13119 (grub_rescue_cmd_initrd): New function.
13120 (grub_linux_init): Remove function.
13121 (grub_linux_fini): Likewise.
13122 (GRUB_MOD_INIT): Register `initrd'.
13123 (GRUB_MOD_FINI): Unregister `initrd'.
13124 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13125 Function removed.
13126 (grub_linux_normal_fini): Likewise.
13127 (GRUB_MOD_INIT): Register `initrd'.
13128 (GRUB_MOD_FINI): Unregister `initrd'.
13129
990cf3aa 131302005-01-31 Marco Gerards <metgerards@student.han.nl>
13131
13132 * commands/help.c: New file.
13133 * normal/arg.c (show_help): Renamed to...
13134 (grub_arg_show_help): ... this.
13135 * commands/i386/pc/halt.c: New file.
13136 * commands/i386/pc/reboot.c: Likewise.
13137 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13138 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13139 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13140 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13141 variables.
13142 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13143 `commands/help.c'.
13144 (pkgdata_MODULES): Add `help.mod'.
13145 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13146 * grub/i386/pc/init.h (grub_reboot): New prototype.
13147 (grub_halt): Likewise.
13148 * include/grub/normal.h (grub_arg_show_help): New prototype.
13149 (grub_help_init): Likewise.
13150 (grub_help_fini): Likewise.
13151 * util/grub-emu.c (main): Initialize and deinitialize the help
13152 command.
13153
13154 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13155
13156 * normal/command.c (grub_command_init): Fixed the description of
13157 the `set' and `unset' commands.
13158
131592005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 13160
13161 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13162 function.
13163 * commands/ieee1275/halt.c: New file.
13164 * commands/ieee1275/reboot.c: Likewise.
13165 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13166 `__attribute__ ((unused))'. Some GCS related fixed.
13167 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13168 (grub_suspend_fini): Likewise.
13169 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13170 and `halt.mod'.
13171 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13172 (halt_mod_CFLAGS): New variables.
13173 * include/grub/powerpc/ieee1275/ieee1275.h
13174 (grub_ieee1275_interpret): New prototype.
13175
1ab09cc7 131762005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13177
13178 * include/grub/misc.h (memmove): New prototype.
13179 (memcpy): Likewise.
13180
8b8cbdb2 131812005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13182
13183 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13184 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13185
e3741a27 131862005-01-22 Marco Gerards <metgerards@student.han.nl>
13187
13188 * kern/misc.c (grub_strndup): Function rewritten.
13189
776bd780 131902005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13191
13192 * normal/menu.c (TERM_WIDTH): Macro redefined.
13193 (TERM_TOP_BORDER_Y): Likewise.
13194 (draw_border): Replaced while-loop by a for-loop. Make the number
13195 of lines consistent with the number of lines displayed in
13196 print_entries. Added a margin below the rectangle.
13197 (print_entry): Make the entry fit in the rectangle.
13198 (print_entries): Display the scroll arrows next to the right
13199 border.
13200
78026bce 132012005-01-21 Marco Gerards <metgerards@student.han.nl>
13202
13203 * fs/minix.c (grub_minix_find_file): Reserve more space for
13204 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13205 `grub_strncpy' to copy `path' into it.
13206
67bbaf0f 132072005-01-21 Marco Gerards <metgerards@student.han.nl>
13208
13209 Add the loopback device, a device via which files can be accessed
13210 as devices.
f19dbdb7 13211
67bbaf0f 13212 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13213 (pkgdata_MODULES): Add loopback.mod.
13214 (loopback_mod_SOURCES): New variable.
13215 (loopback_mod_CFLAGS): Likewise.
13216 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13217 `disk/loopback.c'.
13218 (pkgdata_MODULES): Add loopback.mod.
13219 (loopback_mod_SOURCES): New variable.
13220 (loopback_mod_CFLAGS): Likewise.
13221 * disk/loopback.c: new file.
13222 * include/grub/normal.h (grub_loop_init): New prototype.
13223 (grub_loop_fini): New prototype.
13224 * util/grub-emu.c (main): Initialize and de-initialize loopback
13225 support.
13226 * include/grub/disk.h (grub_disk_dev_id): Add
13227 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13228
6f1c18bd 132292005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13230
13231 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13232 function.
13233 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13234 (suspend_mod_SOURCES): New variable.
13235 (suspend_mod_CFLAGS): Likewise.
13236 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13237 New prototype.
13238 * commands/ieee1275/suspend.c: New file.
13239
b38551da 132402005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13241
13242 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 13243 ((unused))' to `__attribute__ ((used))'.
b38551da 13244 (GRUB_MOD_FINI): Likewise.
13245 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13246 * genmk.rb (PModule): Assign space to common symbols when linking
13247 modules.
13248
777aff39 132492005-01-20 Marco Gerards <metgerards@student.han.nl>
13250
13251 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13252 `unsigned' arguments to `grub_size_t'.
13253 (grub_malloc): Likewise.
13254 (grub_realloc): Likewise.
13255 (grub_memalign): Likewise.
13256 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13257 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13258 * util/misc.c (grub_malloc): Likewise.
13259 (grub_realloc): Likewise.
13260 * kern/mm.c (get_header_from_pointer): Change the casts to
13261 `unsigned' into a cast to `grub_size_t'.
13262
13263 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13264 point to `currnode' when `currnode' is changed.
13265
13266 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13267 Schottelius <nico-linux@schottelius.org>.
13268
d0ff18e1 132692005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13270
13271 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13272 (note_path): Remove variable.
13273 (GRUB_IEEE1275_NOTE_NAME): New macro.
13274 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13275 (grub_ieee1275_note_hdr): New structure.
13276 (grub_ieee1275_note_desc): Likewise.
13277 (grub_ieee1275_note): Likewise.
13278 (load_note): Remove `dir' argument. All callers updated. Remove
13279 `note_img' and `path'. Do not load a file from `note_path'.
13280 Initialize a struct grub_ieee1275_note and write that to `out'.
13281 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13282
4ca7004c 132832005-01-05 Marco Gerards <metgerards@student.han.nl>
13284
13285 * util/misc.c (grub_util_read_image): Revert last change. It
13286 called `grub_util_read_at', which seeks from the beginning of the
13287 file.
13288
0b412211 132892005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13290
13291 * TODO: Add note about endianness in grub-mkimage.
13292 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13293 section.
13294 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13295 (grub_mkimage_SOURCES): New target.
13296 * include/grub/kernel.h (grub_start_addr): Remove variable.
13297 (grub_end_addr): Likewise.
13298 (grub_total_module_size): Likewise.
13299 (grub_kernel_image_size): Likewise.
13300 (GRUB_MODULE_MAGIC): New constant.
13301 (grub_module_info): New structure.
13302 (grub_arch_modules_addr): New prototype.
13303 (grub_get_end_addr): Remove prototype.
13304 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13305 * include/grub/powerpc/ieee1275/kernel.h: New file.
13306 * include/grub/util/misc.h (grub_util_get_fp_size): New
13307 prototype.
13308 (grub_util_read_at): Likewise.
13309 (grub_util_write_image_at): Likewise.
13310 * kern/main.c (grub_get_end_addr): Remove function.
13311 (grub_load_modules): Call grub_arch_modules_addr instead of using
13312 grub_end_addr. Look for a grub_module_info struct in memory. Use
13313 the grub_module_info fields instead of calling grub_get_end_addr
13314 as loop conditions. Move grub_add_unused_region code here.
13315 (grub_add_unused_region): Remove function.
13316 * kern/i386/pc/init.c: Include grub/cache.h.
13317 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13318 one call to add_mem_region.
13319 (grub_arch_modules_addr): New function.
13320 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13321 (grub_total_module_size): Likewise.
13322 Include grub/machine/kernel.h.
13323 (grub_arch_modules_addr): New function.
13324 * util/grub-emu.c (grub_end_addr): Remove variable.
13325 (grub_total_module_size): Likewise.
13326 (grub_arch_modules_addr): New function.
13327 * util/misc.c: Include unistd.h.
13328 (grub_util_get_fp_size): New function.
13329 (grub_util_read_at): Likewise.
13330 (grub_util_write_image_at): Likewise.
13331 (grub_util_read_image): Call grub_util_read_at.
13332 (grub_util_write_image): Call grub_util_write_image_at.
13333 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13334 additional memory in kernel_img for a struct grub_module_info.
13335 Fill in that grub_module_info.
13336 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13337
458786f8 133382005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13339
13340 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13341 New function.
13342 * include/grub/powerpc/ieee1275/ieee1275.h
13343 (grub_ieee1275_milliseconds): New prototype.
13344 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13345 Change to 1000.
13346 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13347 grub_ieee1275_milliseconds.
13348
ac507d1b 133492005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13350
13351 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13352 variable.
13353 (find_options): New function.
13354 (cmain): Call find_options.
13355 * include/grub/powerpc/ieee1275/ieee1275.h
13356 (grub_ieee1275_realmode): New extern variable.
13357 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13358 grub_map if grub_ieee1275_realmode is false.
13359
6b8fd1c4 133602004-12-29 Marco Gerards <metgerards@student.han.nl>
13361
13362 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13363 lines are inserted and make it work like readline. Reported by
13364 Vincent Pelletier <subdino2004@yahoo.fr>.
13365
8514a1e0 133662004-12-28 Marco Gerards <metgerards@student.han.nl>
13367
13368 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13369
13370 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13371 `kern/powerpc/cache.S'.
13372
924b6140 133732004-12-27 Marco Gerards <metgerards@student.han.nl>
13374
13375 * genmk.rb: Handle the `Program' class in the main loop. Written
13376 by Johan Rydberg <jrydberg@gnu.org>.
13377 (Program): New class.
13378 (programs): New variable.
13379 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13380 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13381 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13382 (help_arch): Function removed.
13383 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13384 `powerpc/libgcc.h' and `loader.h'.
13385 (pkgdata_PROGRAMS): New variable.
13386 (sbin_UTILITIES): Variable removed.
13387 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13388 (grubof_SOURCES): Variable re-defined so it only includes the
13389 core functionality.
13390 (grubof_CFLAGS): Remove `-DGRUBOF'.
13391 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13392 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13393 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13394 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13395 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13396 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13397 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13398 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13399 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13400 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13401 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13402 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13403 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13404 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13405 (pc_mod_CFLAGS): New variables.
13406 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13407 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13408 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13409 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13410 Moved from here...
13411 * include/grub/i386/pc/init.h (grub_os_area_addr)
13412 (rub_os_area_size): ... to here.
13413 * include/grub/powerpc/ieee1275/ieee1275.h
13414 (grub_ieee1275_entry_fn): Export symbol.
13415 * include/grub/powerpc/ieee1275/init.h: New file.
13416 * include/grub/powerpc/libgcc.h: Likewise.
13417 * include/grub/cache.h: Likewise.
13418 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13419 <hollis@penguinppc.org>.
13420 * kern/dl.c: Include <grub/cache.h>.
13421 (grub_dl_flush_cache): New function.
13422 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13423 for this module.
13424 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13425 (grub_console_init): Removed prototypes.
13426 (grub_machine_init): Don't initialize the modules anymore.
13427 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13428 static.
13429 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13430 Macro undef removed.
13431 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13432 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13433 relocation `R_PPC_REL32'. Return an error when the relocation is
13434 unknown.
13435 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13436 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13437 * util/misc.c (grub_arch_sync_caches): Likewise.
13438
e4b47e0c 134392004-12-19 Marco Gerards <metgerards@student.han.nl>
13440
13441 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13442 `symlist.c', add `grubof_symlist.c'.
13443 (symlist.c): Variable removed.
13444 (grubof_HEADERS): Variable added.
13445 (grubof_symlist.c): New target.
13446 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13447 `kernel_img_HEADERS'.
13448 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13449 * kern/powerpc/dl.c: New file.
13450 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13451 Function removed.
13452 (grub_arch_dl_relocate_symbols): Likewise.
13453 (grub_register_exported_symbols): Likewise.
13454
4ceb3636 134552004-12-13 Marco Gerards <metgerards@student.han.nl>
13456
13457 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13458 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13459 to fail instead. Reported by Vincent Pelletier
13460 <subdino2004@yahoo.fr>.
13461
13462 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13463 it is not allocated. Reported by Vincent Pelletier
13464 <subdino2004@yahoo.fr>.
13465
13466 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13467 output so the output looks better.
f19dbdb7 13468
3f1578fe 134692004-12-04 Marco Gerards <metgerards@student.han.nl>
13470
13471 Modulize the partition map support and add support for the amiga
13472 partition map.
f19dbdb7 13473
3f1578fe 13474 * commands/ls.c: Include <grub/partition.h> instead of
13475 <grub/machine/partition.h>.
13476 * kern/disk.c: Likewise.
13477 * kern/rescue.c: Likewise.
13478 * loader/i386/pc/chainloader.c: Likewise.
13479 * normal/cmdline.c: Likewise.
13480 * kern/powerpc/ieee1275/init.c: Likewise.
13481 (grub_machine_init): Call `grub_pc_partition_map_init',
13482 `grub_amiga_partition_map_init' and
13483 `grub_apple_partition_map_init'.
13484 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13485 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13486 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13487 `partition.h' and `pc_partition.h'.
13488 (grub_setup_SOURCES): Remove
13489 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13490 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13491 (grub_emu_SOURCES): Likewise.
13492 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13493 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13494 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13495 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13496 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13497 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13498 (grubof_SOURCES): Likewise.
13499 * disk/i386/pc/partition.c: File removed.
13500 * disk/powerpc/ieee1275/partition.c: Likewise.
13501 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13502 * include/grub/i386/pc/partition.h: Likewise.
13503 * kern/partition.c: New file.
13504 * partmap/amiga.c: Likewise.
13505 * partmap/apple.c: Likewise.
13506 * partmap/pc.c: Likewise.
13507 * include/grub/partition.h: Likewise..
13508 * include/grub/pc_partition.h: Likewise.
13509 * util/grub-emu.c: Include <grub/partition.h> instead of
13510 <grub/machine/partition.h>.
13511 (main): Call `grub_pc_partition_map_init',
13512 `grub_amiga_partition_map_init' and
13513 `grub_apple_partition_map_init' and deinitialize afterwards.
13514 * util/i386/pc/biosdisk.c: Include `#include
13515 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13516 `<grub/machine/partition.h>'.
13517 * util/i386/pc/grub-setup.c: Likewise.
13518 * util/i386/pc/biosdisk.c: Likewise.
13519 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13520 partition information in case of a PC partition.
13521 * util/i386/pc/grub-setup.c: Include `#include
13522 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13523 `<grub/machine/partition.h>'.
13524 (setup): Only access the PC specific partition information in case
13525 of a PC partition.
13526
0ef4ced9 135272004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13528
0ef4ced9 13529 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13530 (grub_longjmp): Likewise.
13531 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13532 20.
13533 * normal/powerpc/setjmp.S: New file.
13534 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13535 `normal/powerpc/setjmp.S'.
13536 (grubof_CFLAGS): Add `-DGRUBOF'.
13537 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13538 [GRUB_UTIL && !GRUBOF].
f19dbdb7 13539
19950e29 135402004-11-16 Marco Gerards <metgerards@student.han.nl>
13541
13542 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13543 property named `name'. Correctly handle the error returned by
13544 `grub_ieee1275_finddevice' if a device can not be opened.
13545
a2fea427 135462004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13547
13548 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13549 `actual' for negativity.
13550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13551 kern/fshelp.c.
13552
41ea0ea3 135532004-11-01 Marco Gerards <metgerards@student.han.nl>
13554
13555 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13556 (PAGE_OFFSET): New macro.
13557 (CRTC_ADDR_PORT): Likewise.
13558 (CRTC_DATA_PORT): Likewise.
13559 (START_ADDR_HIGH_REGISTER): Likewise.
13560 (START_ADDR_LOW_REGISTER): Likewise.
13561 (GRAPHICS_ADDR_PORT): Likewise.
13562 (GRAPHICS_DATA_PORT): Likewise.
13563 (READ_MAP_REGISTER): Likewise.
13564 (INPUT_STATUS1_REGISTER): Likewise.
13565 (INPUT_STATUS1_VERTR_BIT): Likewise.
13566 (page): New variable.
13567 (wait_vretrace): New function.
13568 (set_read_map): Likewise.
13569 (set_start_address): Likewise.
13570 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13571 the right page.
13572 (check_vga_mem): Take the page into account.
13573 (write_char): Likewise.
13574 (write_cursor): Likewise.
13575 (scroll_up): Likewise. Copy the page to the page that is not
13576 shown and switch between both pages.
13577 (grub_vga_putchar): Fix off by one error.
13578 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13579 account.
13580
ad0bd20b 135812004-11-01 Marco Gerards <metgerards@student.han.nl>
13582
13583 Add support for iso9660 (including rockridge).
f19dbdb7 13584
ad0bd20b 13585 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13586 (iso9660_mod_SOURCES): New variable.
13587 (iso9660_mod_CFLAGS): Likewise.
13588 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13589 * include/grub/fs.h (grub_iso9660_init): New prototype.
13590 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13591 * fs/iso9660.c: New file.
13592
13593 * include/grub/misc.h (grub_strncat): New prototype.
13594 * kern/misc.c (grub_strncat): New function.
f19dbdb7 13595
ad0bd20b 13596 * fs/hfs.c (grub_hfs_mount): Translate the error
13597 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13598 * fs/jfs.c (grub_jfs_mount): Likewise.
13599 * fs/ufs.c (grub_ufs_mount): Likewise.
13600
a5477a59 136012004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13602
13603 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13604 which initialized BAT registers.
13605 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13606 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13607 Move from here...
13608 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13609 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13610 ... to here.
13611 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13612 (grub_mapclaim): Likewise.
13613 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13614 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13615 hand.
13616
9304c1f8 136172004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13618
13619 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13620 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13621 -ffreestanding and -msoft-float.
13622
86f4ae25 136232004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13624
13625 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13626 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13627 set in grub_ieee1275_flags.
13628
38912228 136292004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13630
13631 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13632 prototype.
13633 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13634 grub_console_init first.
13635 Change the memory range used for grub_ieee1275_claim and
13636 grub_mm_init_region.
13637 Print an error message if the claim fails.
13638 Include <grub/misc.h>.
13639
d1923dc8 136402004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13641
13642 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13643 Call grub_children_iterate for device nodes of type `scsi',
13644 `ide', or `ata'.
13645 (grub_ofdisk_open): Remove manual device alias resolution.
13646 Fix memory leak when device cannot be opened.
f19dbdb7 13647 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 13648 (grub_children_iterate): New prototype.
13649 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13650 New function.
13651 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13652 Return -1 if args.size was -1.
13653
4512e4f3 136542004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13655
13656 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13657 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13658 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13659 Open Firmware's memory for it; claim memory from _start to _end.
13660 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13661 (_end): New extern.
13662 (_start): Zero BSS from __bss_start to _end.
13663 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13664 New extern.
13665 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13666
4d61feb0 136672004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13668
ad0bd20b 13669 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13670 -1 if args.base was -1.
4d61feb0 13671
026fa2f9 136722004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13673
13674 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13675 escape sequence instead of a literal ^L. Also call
13676 grub_ofconsole_gotoxy.
13677
9f2220ef 136782004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13679
13680 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13681 void * arguments to grub_addr_t. All callers updated. Also make
13682 the `result' argument optional.
13683 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13684 All callers updated.
13685
8a572cd7 136862004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13687
13688 * commands/ls.c (grub_ls_list_files): Use the string following the
13689 initial ')', if present, as the filesystem path.
13690 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13691
13692 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13693
18aa81f2 136942004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13695
13696 Make the source code of the menu interface more readable.
f19dbdb7 13697
18aa81f2 13698 * normal/menu.c: Include grub/mm.h.
13699 (TERM_WIDTH): New macro.
13700 (TERM_HEIGHT): Likewise.
13701 (TERM_INFO_HEIGHT): Likewise.
13702 (TERM_MARGIN): Likewise.
13703 (TERM_SCROLL_WIDTH): Likewise.
13704 (TERM_TOP_BORDER_Y): Likewise.
13705 (TERM_LEFT_BORDER_X): Likewise.
13706 (TERM_BORDER_WIDTH): Likewise.
13707 (TERM_MESSAGE_HEIGHT): Likewise.
13708 (TERM_BORDER_HEIGHT): Likewise.
13709 (TERM_NUM_ENTRIES): Likewise.
13710 (TERM_FIRST_ENTRY_Y): Likewise.
13711 (TERM_ENTRY_WIDTH): Likewise.
13712 (TERM_CURSOR_X): Likewise.
13713 (draw_border): Use macros instead of magic numbers.
13714 (print_entry): Likewise.
13715 (print_entries): Likewise.
13716 (run_menu): Likewise. Also, handle the key 'e'.
13717 (run_menu_entry): Ignore empty command lines.
13718 (print_message): Added a new argument EDIT. If EDIT is true,
13719 print a different message.
13720 (init_page): Likewise.
13721 (edit_menu_entry): New function. Not implemented yet.
13722
b47efe30 137232004-09-17 Marco Gerards <metgerards@student.han.nl>
13724
13725 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13726 can be loaded from normal mode.
f19dbdb7 13727
b47efe30 13728 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13729 `multiboot.mod'.
13730 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13731 (multiboot_mod_CFLAGS): New variables.
13732 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 13733 * loader/i386/pc/multiboot_normal.c: Likewise.
13734
b47efe30 13735 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13736 attribute `unused'.
f19dbdb7 13737
b47efe30 13738 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13739 `fdiro' to read the mode information from instead of `diro'.
13740
13741 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13742 looking up a symlink.
13743
13744 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13745 macro.
13746 * normal/command.c (grub_command_execute): Don't parse the
13747 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13748 flags of the command.
13749
13750 * normal/menu.c (grub_menu_run): Fix typo.
13751
da75ac71 137522004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13753
13754 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13755
13756 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13757 `y + 1' instead of `y - 1'.
13758
13759 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 13760
062b24c2 137612004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13762
13763 From Hollis Blanchard <hollis@penguinppc.org>:
13764 * kern/misc.c (memmove): New alias for grub_memmove.
13765 (memcmp): New alias for grub_memcmp.
13766 (memset): New alias for grub_memset.
f19dbdb7 13767 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 13768 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 13769 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 13770 (grub_ieee1275_get_property): Likewise.
f19dbdb7 13771
8ddad845 137722004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13773
13774 Added normal mode command `chainloader' as module chain.mod, which
13775 depends on normal.mod and _chain.mod.
f19dbdb7 13776
8ddad845 13777 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13778 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13779 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13780 Deleted prototype.
13781 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13782 but arguments parsing moved to ...
13783 (grub_chainloader_cmd): ... here. New function.
13784 * include/grub/i386/pc/chainloader.h: New file.
13785 * loader/i386/pc/chainloader_normal.c: Likewise.
13786
2c1f4ce3 137872004-09-11 Marco Gerards <metgerards@student.han.nl>
13788
13789 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13790 (grub_mkimage_LDFLAGS): Likewise.
13791 (grub_emu_SOURCES): Likewise.
13792 (kernel_img_HEADERS): Added fshelp.h.
13793 * fs/ext2.c: Include <grub/fshelp.h>.
13794 (FILETYPE_REG): New macro.
13795 (FILETYPE_INO_REG): Likewise.
13796 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13797 Changed all users.
13798 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13799 all users.
13800 (grub_fshelp_node): New struct.
13801 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13802 to a pointer.
13803 (grub_ext2_get_file_block): Removed function.
13804 (grub_ext2_read_block): New function.
13805 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13806 This function was written.
13807 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13808 (grub_ext2_find_file): Removed function.
13809 (grub_ext2_read_symlink): New function.
13810 (grub_ext2_iterate_dir): Likewise.
13811 (grub_ext2_open): Rewritten.
13812 (grub_ext2_dir): Rewritten.
13813 * include/grub/fshelp.h: New file.
13814 * fs/fshelp.c: Likewise.
13815
3c52136a 138162004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13817
13818 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13819 (print_message): Add a missing newline.
13820 (run_menu): Added timeout support.
13821 (run_menu_entry): New local function.
13822 (grub_menu_run): Added support for booting.
13823
13824 * kern/loader.c (grub_loader_is_loaded): New function.
13825
13826 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13827 (grub_get_rtc): Exported.
13828
13829 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13830 (grub_get_rtc): Exported.
13831
13832 * include/grub/normal.h (struct grub_command_list): Remove
13833 constant from the member `command'.
13834
13835 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13836
13837 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13838
13839 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13840
aa033560 138412004-08-28 Marco Gerards <metgerards@student.han.nl>
13842
13843 Add support for the JFS filesystem.
13844
13845 * fs/jfs.c: New file.
13846 * include/grub/fs.h (grub_jfs_init): New prototype.
13847 (grub_jfs_fini): New prototype.
13848 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13849 (grub_emu_SOURCES): Likewise.
13850 (pkgdata_MODULES): Add jfs.mod.
13851 (jfs_mod_SOURCES): New variable.
13852 (jfs_mod_CFLAGS): Likewise.
13853 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13854 (grubof_SOURCES): Likewise.
13855 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13856
13857 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13858 endian to the host endian.
13859 (grub_fat_utf16_to_utf8): Move function from there...
13860 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 13861 the endianness of the source string anymore.
aa033560 13862 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13863
94bc45af 138642004-08-24 Marco Gerards <metgerards@student.han.nl>
13865
13866 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13867 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13868 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13869 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 13870
94bc45af 13871 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13872 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13873 for `node_found' and `it_dir'.
13874 (grub_hfs_dir): Add prototype for `dir_hook'.
13875
13876 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13877 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13878 and `indir32' to silence a gcc warning.
13879
13880 * include/grub/fs.h (grub_hfs_init): New prototype.
13881 (grub_hfs_fini): Likewise.
f19dbdb7 13882
13883
97543f08 138842004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13885
13886 Each disk device has its own id now. This is useful to make use
13887 of multiple disk devices.
f19dbdb7 13888
97543f08 13889 * include/grub/disk.h (grub_disk_dev_id): New enum.
13890 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13891 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13892
13893 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13894 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13895
13896 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13897 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13898
13899 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13900 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13901
13902 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13903 "id" which is used by the cache manager.
13904
13905 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13906 of just "GRUB".
13907
64372eb4 139082004-08-18 Marco Gerards <metgerards@student.han.nl>
13909
13910 * fs/hfs.c: New file.
13911 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13912 (grub_emu_SOURCES): Likewise.
13913 (pkgdata_MODULES): Add hfs.mod.
13914 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13915 (grubof_SOURCES): Likewise.
13916 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13917
13918 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13919 * kern/misc.c (grub_strncasecmp): Add function.
13920
cc61b58f 139212004-08-14 Marco Gerards <metgerards@student.han.nl>
13922
13923 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13924 with parentheses.
13925
13926 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13927 (grub_ext2_dir): In case the directory entry type is unknown, read
13928 it from the inode.
13929
0ef123f6 139302004-08-02 Peter Bruin <pjbruin@dds.nl>
13931
13932 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13933 grub_load_linux instead of grub_rescue_cmd_linux as second
13934 argument of grub_rescue_register_command.
13935
13936 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13937
a447c5df 139382004-07-27 Marco Gerards <metgerards@student.han.nl>
13939
13940 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13941 function.
13942 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13943 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13944 `loader/powerpc/ieee1275/linux.c',
13945 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13946 * include/grub/powerpc/ieee1275/ieee1275.h
13947 (grub_ieee1275_release): New prototype.
13948 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13949 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13950 normal, boot, linux and linux_normal.
13951 * loader/powerpc/ieee1275/linux.c: New file.
13952 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13953
5a9e3546 139542004-07-12 Marco Gerards <metgerards@student.han.nl>
13955
13956 * normal/arg.c (grub_arg_parse): Correct error handling after
13957 reallocating the argumentlist (check if `argl' is not null instead
13958 of checking if `args' is not null).
13959 * kern/mm.c (grub_realloc): Return the same pointer when using the
13960 same region, instead of returning the header address.
13961
e15199cb 139622004-07-11 Marco Gerards <metgerards@student.han.nl>
13963
13964 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13965 one block instead of two when looking for the initial partition.
13966 (grub_partition_probe): Initialize the local variable `p' with 0.
13967 Use base 10 for the grub_strtoul call.
13968 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13969 need for one local variable.
13970 (grub_strtoul): Don't add the new value to `num', instead of that
13971 just assign it.
13972
020616c2 139732004-07-11 Marco Gerards <metgerards@student.han.nl>
13974
13975 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13976 (pxeboot_img_SOURCES): New variable.
13977 (pxeboot_img_ASFLAGS): Likewise.
13978 (pxeboot_img_LDFLAGS): Likewise.
13979 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13980 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13981 <lode_leroy@hotmail.com>.
13982
6c51eb64 139832004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13984
13985 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13986 there was no input.
13987
cfb12aff 139882004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13989
13990 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13991 the history buffer logic.
13992
6eabba74 139932004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13994
13995 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13996 (FILETYPE_INO_SYMLINK): New macros.
13997 (grub_ext2_find_file): Check if the node is a directory using the
13998 inode stat information instead of using the filetype in the
13999 dirent. Exclude the first character of an absolute symlink.
14000 (grub_ext2_dir): Mask out the filetype part of the mode member of
14001 the inode.
14002
66e19ef8 140032004-05-24 Marco Gerards <metgerards@student.han.nl>
14004
14005 Add support for UFS version 1 and 2. Add support for the minix
14006 filesystem version 1 and 2, both the variants with 14 and 30 long
14007 filenames.
f19dbdb7 14008
66e19ef8 14009 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14010 fs/minix.c.
14011 (grub_emu_SOURCES): Likewise.
14012 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14013 (ufs_mod_SOURCES): New variable.
14014 (ufs_mod_CFLAGS): Likewise.
14015 (minix_mod_SOURCES): Likewise.
14016 (minix_mod_CFLAGS): Likewise.
14017 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14018 fs/minix.c.
14019 (grubof_SOURCES): Likewise.
14020 * fs/ufs.c: New file.
14021 * fs/minix.c: New file.
14022 * include/grub/fs.h (grub_ufs_init): New prototype.
14023 (grub_ufs_fini): Likewise.
14024 (grub_minix_init): Likewise.
14025 (grub_minix_fini): Likewise.
14026 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14027 minix fs.
14028
cc2e748a 140292004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14030
14031 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14032 commands/ls.c, commands/terminal.c, commands/boot.c,
14033 commands/cmp.c and commands/cat.c.
14034 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14035
14036 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14037 "env.h"
14038
4b13b216 140392004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14040
14041 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14042 and grub_, respectively. Because the conversion is trivial and
14043 mechanical, I omit the details here. Please refer to the CVS
14044 if you need more information.
14045
6a142551 140462004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14047
14048 * include/pupa: Renamed to ...
14049 * include/grub: ... this.
14050 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14051 * util/i386/pc/grub-mkimage.c: ... this.
14052 * util/i386/pc/pupa-setup.c: Renamed to ...
14053 * util/i386/pc/grub-setup.c: ... this.
14054 * util/pupa-emu.c: Renamed to ...
14055 * util/grub-emu.c: ... this.
14056
e56cdf21 140572004-03-29 Marco Gerards <metgerards@student.han.nl>
14058
14059 Add support for the newworld apple macintosh (PPC). This has been
14060 tested on the powerbook 2000 only. It only adds support for
14061 generic ieee1275 functions, console and disk support. This should
14062 be easy to port to other architectures with support for Open
14063 Firmware.
f19dbdb7 14064
e56cdf21 14065 * configure.ac: Accept the powerpc as host_cpu. In the case of
14066 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14067 specific tests are only executed while building for the i386.
14068 Inverse test for crosscompile.
14069 * genmk.rb (Utility): Allow assembler files.
14070 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14071 * conf/powerpc-ieee1275.rmk: New file.
14072 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14073 * disk/powerpc/ieee1275/partition.c: Likewise.
14074 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14075 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14076 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14077 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14078 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14079 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14080 * include/pupa/powerpc/ieee1275/loader.h
14081 * include/pupa/powerpc/setjmp.h: Likewise.
14082 * include/pupa/powerpc/types.h: Likewise.
14083 * kern/powerpc/ieee1275/init.c: Likewise.
14084 * kern/powerpc/ieee1275/openfw.c: Likewise.
14085 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14086
14087 These files were written by Johan Rydberg
14088 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 14089
e56cdf21 14090 * boot/powerpc/ieee1275/cmain.c: New file.
14091 * boot/powerpc/ieee1275/crt0.S: Likewise.
14092 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14093 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14094
8c8cc205 140952004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14096
14097 * Makefile.in: Update copyright.
14098 * genmodsrc.sh: Likewise.
14099 * gensymlist.sh: Likewise.
14100 * term/i386/pc/vga.c: Indent correctly.
14101
14102 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14103 bugreporting address.
14104 * util/i386/pc/pupa-setup.c (usage): Likewise,
14105 (main): Call pupa_ext2_init and pupa_ext2_fini.
14106
f19dbdb7 14107 * fs/fat.c (log2): Renamed to ...
8c8cc205 14108 (fat_log2): ... this.
14109 All callers changed.
14110 * kern/misc.c (memcpy): Alias to pupa_memmove.
14111 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14112 lvalue cast.
14113 * util/console.c (pupa_ncurses_fini): Return 0.
14114
14115 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14116 Move fail label here.
14117 [__GNU__]: Don't warn when using stat.
14118 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14119 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14120 long int. Use strtol instead of strtoul.
f19dbdb7 14121
db1771cf 141222004-03-14 Marco Gerards <metgerards@student.han.nl>
14123
14124 * commands/boot.c: New file.
14125 * commands/cat.c: Likewise.
14126 * commands/cmp.c: Likewise.
14127 * commands/ls.c: Likewise.
14128 * commands/terminal.c: Likewise.
14129 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14130 (pupa_register_command): Changed interface to match the new
14131 argument parser.
14132 (pupa_command_execute): Changed (almost rewritten) so it uses
14133 pupa_split_command. Added support for setting variables using the
14134 syntax `foo=bar'.
14135 (rescue_command): Changed to work with the new argument parser.
14136 (terminal_command): Moved from here to commands/terminal.c.
14137 (set_command): New function.
14138 (unset_command): New function.
14139 (insmod_command): New function.
14140 (rmmod_command): New function.
14141 (lsmod_command): New function.
14142 (pupa_command_init): Don't initialize the command terminal
14143 anymore. Initialize the commands set, unset, insmod, rmmod and
14144 lsmod.
14145 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14146 (kernel_img_HEADERS): Add arg.h and env.h.
14147 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14148 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14149 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14150 normal/arg.c.
14151 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14152 terminal.mod.
14153 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14154 (boot_mod_SOURCES): New variable.
14155 (terminal_mod_SOURCES): Likewise.
14156 (ls_mod_SOURCES): Likewise.
14157 (cmp_mod_SOURCES): Likewise.
14158 (cat_mod_SOURCES): Likewise.
14159
14160 * normal/arg.c: New file.
14161 * kern/env.c: Likewise.
14162 * include/pupa/arg.h: Likewise.
14163 * include/pupa/env.h: Likewise.
14164 * font/manager.c (font_command): Changed to match argument parsing
14165 interface changes.
14166 (PUPA_MOD_INIT): Likewise.
14167 * hello/hello.c (pupa_cmd_hello): Likewise.
14168 (PUPA_MOD_INIT): Likewise.
14169 * include/pupa/disk.h: Include <pupa/device.h>.
14170 (pupa_print_partinfo): New prototype.
14171 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14172 (pupa_dl_get_prefix): Likewise.
14173 * include/pupa/misc.h: Include <pupa/err.h>.
14174 (pupa_isgraph): New prototype.
14175 (pupa_isdigit): Likewise.
14176 (pupa_split_cmdline): Likewise.
14177 * include/pupa/normal.h: Include <pupa/arg.h>.
14178 (pupa_command): Changed the prototype of the member `func' to
14179 match the argument parsing interface. Added member `options'.
14180 (pupa_register_command): Updated to match function.
14181 (pupa_arg_parse): New prototype.
14182 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14183 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14184 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14185 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14186 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14187 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14188 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14189 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14190 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14191 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14192 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14193 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14194 * kern/disk.c: Include <pupa/file.h>.
14195 (pupa_print_partinfo): New function.
14196 * kern/dl.c: Include <pupa/env.h>.
14197 (pupa_dl_dir): Variable removed.
14198 (pupa_dl_load): Use the environment variable `prefix' instead of
14199 the variable pupa_dl_dir.
14200 (pupa_dl_set_prefix): Function removed.
14201 (pupa_dl_get_prefix): Likewise.
14202 * kern/i386/pc/init.c: Include <pupa/env.h>.
14203 (pupa_machine_init): Use the environment variable `prefix' instead of
14204 using pupa_dl_set_prefix to set the prefix.
14205 * kern/main.c: Include <pupa/env.h>.
14206 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14207 using pupa_dl_get_prefix to get the prefix.
14208 * kern/misc.c: Include <pupa/env.h>.
14209 (pupa_isdigit): New function.
14210 (pupa_isgraph): Likewise.
14211 (pupa_ftoa): Likewise.
14212 (pupa_vsprintf): Added support for printing values of the type
14213 `double'. Make it possible to format variable output when using
14214 formatting like `%1.2%f'.
14215 (pupa_split_cmdline): New function.
14216 * kern/rescue.c: Include <pupa/env.h>.
14217 (next_word): Removed function.
14218 (pupa_rescue_cmd_prefix): Likewise.
14219 (pupa_rescue_cmd_set): New function.
14220 (pupa_rescue_cmd_unset): New function.
14221 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14222 split the command line instead of splitting it here. Added
14223 support for setting variables using the syntax `foo=bar'. Don't
14224 initialize the prefix command anymore. Initialized the set and
14225 unset commands.
14226 * normal/cmdline.c: Include <pupa/env.h>.
14227 (pupa_tab_complete): Added prototypes for print_simple_completion,
14228 print_partition_completion, add_completion, iterate_commands,
14229 iterate_dev, iterate_part and iterate_dir. Moved code to print
14230 partition information from here to kern/disk.c.
fe6b695a 14231 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 14232 * normal/main.c: Include <pupa/env.h>.
14233 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14234 instead of using pupa_dl_get_prefix to get the prefix.
14235 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14236 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14237 warning.
14238 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14239 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14240 ((unused))' to silence a gcc warning.
14241 (pupa_vga_setcolor): Likewise.
14242 (debug_command): Changed to match argument parsing
14243 interface changes.
14244 * util/pupa-emu.c: Include <pupa/env.h>.
14245 (options): Added 0's for unused fields to silence a gcc warning.
14246 (argp): Likewise.
14247 (main): Use the environment variable `prefix' instead of using
14248 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14249 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14250 and terminal.
14251
14252 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14253 * util/misc.c: Include <malloc.h>.
14254 (pupa_malloc): Rewritten so errors are correctly reported.
14255 (pupa_realloc): Likewise.
14256 (pupa_memalign): Likewise.
14257 (pupa_mm_init_region): Declare unused variables with
14258 `__attribute__ ((unused))' to silence a gcc warning.
14259 * normal/i386/setjmp.S: Remove tab at the end of the file to
14260 silence a gcc warning.
14261 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14262 variables with `__attribute__ ((unused))' to silence a gcc
14263 warning.
14264 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14265 local variable i unsigned to silence a gcc warning.
14266
14267 * kern/term.c: Include <pupa/misc.h>.
14268 (pupa_more_lines): New variable.
14269 (pupa_more): Likewise.
14270 (pupa_putcode): When the pager is active pause at the end of every
14271 screen.
14272 (pupa_set_more): New function.
14273 * include/pupa/term.h (pupa_set_more): New prototype.
14274
14275
3b1139cb 142762004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14277
14278 Now this project is GRUB 2 rather than PUPA. The location of
14279 the CVS repository was moved to GRUB's.
f19dbdb7 14280
3b1139cb 14281 * configure.ac: Use bug-grub as the reporting address.
14282 Use GRUB instead of PUPA.
14283 Change the version number to 1.90.
14284
8367695c 142852004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14286
14287 * genkernsyms.sh: Updated copyright information.
14288 * genmk.rb: Likewise.
14289 * genmodsrc.sh: Likewise.
14290 * gensymlist.sh: Likewise.
14291 * boot/i386/pc/boot.S: Likewise.
14292 * boot/i386/pc/diskboot.S: Likewise.
14293 * disk/i386/pc/biosdisk.c: Likewise.
14294 * disk/i386/pc/partition.c: Likewise.
14295 * font/manager.c: Likewise.
14296 * fs/ext2.c: Likewise.
14297 * fs/fat.c: Likewise.
14298 * include/pupa/boot.h: Likewise.
14299 * include/pupa/device.h: Likewise.
14300 * include/pupa/disk.h: Likewise.
14301 * include/pupa/dl.h: Likewise.
14302 * include/pupa/elf.h: Likewise.
14303 * include/pupa/err.h: Likewise.
14304 * include/pupa/file.h: Likewise.
14305 * include/pupa/font.h: Likewise.
14306 * include/pupa/fs.h: Likewise.
14307 * include/pupa/kernel.h: Likewise.
14308 * include/pupa/loader.h: Likewise.
14309 * include/pupa/misc.h: Likewise.
14310 * include/pupa/mm.h: Likewise.
14311 * include/pupa/net.h: Likewise.
14312 * include/pupa/normal.h: Likewise.
14313 * include/pupa/rescue.h: Likewise.
14314 * include/pupa/setjmp.h: Likewise.
14315 * include/pupa/symbol.h: Likewise.
14316 * include/pupa/term.h: Likewise.
14317 * include/pupa/types.h: Likewise.
14318 * include/pupa/i386/setjmp.h: Likewise.
14319 * include/pupa/i386/types.h: Likewise.
14320 * include/pupa/i386/pc/biosdisk.h: Likewise.
14321 * include/pupa/i386/pc/boot.h: Likewise.
14322 * include/pupa/i386/pc/console.h: Likewise.
14323 * include/pupa/i386/pc/init.h: Likewise.
14324 * include/pupa/i386/pc/kernel.h: Likewise.
14325 * include/pupa/i386/pc/linux.h: Likewise.
14326 * include/pupa/i386/pc/loader.h: Likewise.
14327 * include/pupa/i386/pc/memory.h: Likewise.
14328 * include/pupa/i386/pc/multiboot.h: Likewise.
14329 * include/pupa/i386/pc/partition.h: Likewise.
14330 * include/pupa/i386/pc/time.h: Likewise.
14331 * include/pupa/i386/pc/vga.h: Likewise.
14332 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14333 * include/pupa/util/getroot.h: Likewise.
14334 * include/pupa/util/misc.h: Likewise.
14335 * include/pupa/util/resolve.h: Likewise.
14336 * kern/device.c: Likewise.
14337 * kern/disk.c: Likewise.
14338 * kern/dl.c: Likewise.
14339 * kern/err.c: Likewise.
14340 * kern/file.c: Likewise.
14341 * kern/fs.c: Likewise.
14342 * kern/loader.c: Likewise.
14343 * kern/main.c: Likewise.
14344 * kern/misc.c: Likewise.
14345 * kern/mm.c: Likewise.
14346 * kern/rescue.c: Likewise.
14347 * kern/term.c: Likewise.
14348 * kern/i386/dl.c: Likewise.
14349 * kern/i386/pc/init.c: Likewise.
14350 * kern/i386/pc/lzo1x.S: Likewise.
14351 * kern/i386/pc/startup.S: Likewise.
14352 * loader/i386/pc/chainloader.c: Likewise.
14353 * loader/i386/pc/linux.c: Likewise.
14354 * loader/i386/pc/multiboot.c: Likewise.
14355 * normal/cmdline.c: Likewise.
14356 * normal/command.c: Likewise.
14357 * normal/main.c: Likewise.
14358 * normal/menu.c: Likewise.
14359 * normal/i386/setjmp.S: Likewise.
14360 * term/i386/pc/console.c: Likewise.
14361 * term/i386/pc/vga.c: Likewise.
14362 * util/console.c: Likewise.
14363 * util/genmoddep.c: Likewise.
14364 * util/misc.c: Likewise.
14365 * util/pupa-emu.c: Likewise.
14366 * util/resolve.c: Likewise.
14367 * util/unifont2pff.rb: Likewise.
14368 * util/i386/pc/biosdisk.c: Likewise.
14369 * util/i386/pc/getroot.c: Likewise.
14370 * util/i386/pc/pupa-mkimage.c: Likewise.
14371 * util/i386/pc/pupa-setup.c: Likewise.
14372
e6eced71 143732004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14374
14375 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14376 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14377 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14378 reading and reset it after reading.
14379 (pupa_ext2_close): Return PUPA_ERR_NONE.
14380
14381 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14382 Correct value.
14383 (struct linux_kernel_header): Add kernel_version and
14384 initrd_addr_max.
14385 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14386 pupa_file_read succeeds.
14387 (pupa_rescue_cmd_initrd): Implement.
14388
5aded270 143892003-12-03 Marco Gerards <metgerards@student.han.nl>
14390
14391 * fs/ext2.c (pupa_ext2_label): New function.
14392 (pupa_ext2_fs): Added label.
14393 * fs/fat.c (pupa_fat_label): New function.
14394 (pupa_fat_fs): Added label.
14395 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14396
14397 * kern/misc.c (pupa_strndup): New function.
14398 * include/pupa/misc.h (pupa_strndup): New prototype.
14399
14400 * include/pupa/normal.h: Include <pupa/err.h>.
14401 (pupa_set_history): New prototype.
14402 (pupa_iterate_commands): New prototype.
14403 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14404 <pupa/disk.h>, <pupa/file.h>.
14405 (hist_size): New variable.
14406 (hist_lines): Likewise.
14407 (hist_end): Likewise.
14408 (hist_used): Likewise.
14409 (pupa_set_history): New function.
14410 (pupa_history_get): Likewise.
14411 (pupa_history_add): Likewise.
14412 (pupa_history_replace): Likewise.
14413 (pupa_tab_complete): Likewise.
14414 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14415 completion shows partitionnames while completing partitions, this
14416 feature was suggested by Jeff Bailey.
14417 * normal/command.c (pupa_iterate_commands): New function.
14418 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14419 (pupa_normal_init): Initialize history buffer.
14420 (PUPA_MOD_INIT): Likewise.
14421 (pupa_normal_fini): Free the history buffer.
14422 (PUPA_MOD_FINI): Likewise.
14423
14424 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14425 key.
14426
14427 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14428 * configure.ac [i386]: Check for regparam bug.
14429 (NESTED_FUNC_ATTR) [! i386]: Defined.
14430
1f7315a3 144312003-11-17 Marco Gerards <metgerards@student.han.nl>
14432
14433 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14434 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14435 (pupa_emu_SOURCES): New variable.
14436 (pupa_emu_LDFLAGS): Likewise.
14437 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14438 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14439 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14440 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14441 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14442 (pupa_jmp_buf): New typedef.
14443 (pupa_setjmp) [PUPA_UTIL]: New macro.
14444 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14445 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14446 (pupa_refresh): New prototype.
14447 * include/pupa/util/getroot.h: New file.
14448 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14449 it.
14450 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14451 (pupa_rescue_cmd_cat): Likewise.
14452 (pupa_rescue_cmd_ls): Likewise.
14453 (pupa_rescue_cmd_testload): Likewise.
14454 (pupa_rescue_cmd_lsmod): Likewise.
14455 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14456 * normal/menu.c (run_menu): Likewise.
14457 * kern/term.c (pupa_cls): Likewise.
14458 (pupa_refresh): New function.
14459 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14460 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14461 * util/console.c: New file.
f19dbdb7 14462
1f7315a3 14463 * util/i386/pc/getroot.c: New file.
14464 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14465 (pupa_putchar): New function.
14466 (pupa_refresh): Likewise.
14467 (xgetcwd): Function moved to ...
14468 (strip_extra_slashes): Likewise.
14469 (get_prefix): Likewise.
f19dbdb7 14470 * util/i386/pc/getroot.c: ... here.
1f7315a3 14471 (find_root_device): Function moved and renamed to...
14472 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14473 Changed all callers.
14474 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14475 and renamed to...
14476 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14477 Changed all callers.
14478 * util/misc.c (pupa_memalign): New function.
14479 (pupa_mm_init_region): Likewise.
14480 (pupa_register_exported_symbols): Likewise.
14481 (pupa_putchar): Function removed.
14482 * util/pupa-emu.c: New file.
14483
9a5c1ade 144842003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14485
14486 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14487 (_multiboot_mod_SOURCES): New variable.
14488 (_multiboot_mod_CFLAGS): Likewise.
14489 * loader/i386/pc/multiboot.c: New file.
14490 * include/pupa/i386/pc/multiboot.h: Likewise.
14491 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14492 (pupa_multiboot_real_boot): New function.
14493 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14494 (pupa_multiboot_real_boot): New prototype.
14495 (pupa_rescue_cmd_multiboot): Likewise
14496 (pupa_rescue_cmd_module): Likewise.
14497
14498 * kern/loader.c (pupa_loader_set): Continue when
14499 pupa_loader_unload_func() fails.
14500 (pupa_loader_unset): New function.
14501 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14502
14503 * kern/misc.c (pupa_stpcpy): New function.
14504 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14505
8e72a9c0 145062003-11-12 Marco Gerards <metgerards@student.han.nl>
14507
14508 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14509 for available extensions.
14510
14511 * include/pupa/i386/pc/time.h: New file.
14512 * kern/disk.c: Include <pupa/machine/time.h>.
14513 (PUPA_CACHE_TIMEOUT): New macro.
14514 (pupa_last_time): New variable.
14515 (pupa_disk_open): Flush the cache when there was a timeout.
14516 (pupa_disk_close): Reset the timer.
14517 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14518 pupa_currticks.
14519 * util/misc.c: Include <sys/times.h>
14520 (pupa_get_rtc): New function.
14521
c4adbd32 145222003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14523
14524 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14525 as blocks.
14526 (pupa_ext2_get_file_block): Use blocks member.
14527
14528 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14529 first block. Return -1 instead of pupa_errno on error.
14530
bfd30f06 145312003-10-27 Marco Gerards <metgerards@student.han.nl>
14532
14533 * README: In the pupa-mkimage example use _chain instead of chain
14534 and ext2 instead of fat.
14535 * TODO: Replace ext2fs with jfs as an example. Add an item for
14536 adding journal playback for ext2fs.
14537 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14538 (pkgdata_MODULES): Added ext2.mod.
14539 (ext2_mod_SOURCES): New variable.
14540 (ext2_mod_CFLAGS): Likewise.
14541 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14542 * include/pupa/misc.h (pupa_strncpy): New prototype.
14543 (pupa_strcat): Likewise.
14544 (pupa_strncmp): Likewise.
14545 * kern/misc.c (pupa_strcat): Enable function.
14546 (pupa_strncpy): New function.
14547 (pupa_strncmp): Likewise.
14548 * fs/ext2.c: New file.
f19dbdb7 14549
bfd30f06 14550 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14551 when the read failed before retrying.
14552 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14553 (_FILE_OFFSET_BITS): Likewise.
14554 * configure.ac: Added AC_SYS_LARGEFILE.
14555
98d15063 145562003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14557
14558 * genmk.rb (PModule#rule): Make sure to get only symbol names
14559 from the output of nm.
14560 Reported by Robert Millan <zeratul2@wanadoo.es>.
14561
18d9c7cd 145622003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14563
14564 I forgot to check in these changes for a long time. This adds
14565 incomplete support for VGA console, and this is still very
14566 buggy. Also, a lot of consideration is required for I18N,
14567 UNICODE, and VGA font issues. Therefore, assume that this is
14568 such that "better than nothing".
f19dbdb7 14569
18d9c7cd 14570 * font/manager.c: New file.
14571 * include/pupa/font.h: Likewise.
14572 * include/pupa/i386/pc/vga.h: Likewise.
14573 * term/i386/pc/vga.c: Likewise.
14574 * util/unifont2pff.rb: Likewise.
14575
14576 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14577 (pkgdata_MODULES): Added vga.mod and font.mod.
14578 (vga_mod_SOURCES): New variables.
14579 (vga_mod_CFLAGS): Likewise.
14580 (font_mod_SOURCES): Likewise.
14581 (font_mod_CFLAGS): Likewise.
14582
14583 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14584
14585 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 14586 (struct pupa_term): Added init and fini.
18d9c7cd 14587 Changed the argument of putchar to pupa_uint32_t.
14588
14589 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14590 (pupa_console_real_putchar): New prototype.
14591 (pupa_console_putchar): Removed.
14592 (pupa_console_checkkey): Exported.
14593 (pupa_console_getkey): Likewise.
14594
14595 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14596 characters.
14597
14598 * kern/term.c (pupa_term_set_current): Rewritten.
14599 (pupa_putchar): Likewise.
14600 (pupa_putcode): New function.
14601
14602 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14603 (pupa_console_real_putchar): ... this.
14604 (pupa_vga_set_mode): New function.
14605 (pupa_vga_get_font): Likewise.
14606
14607 * normal/command.c: Include pupa/term.h.
14608 (terminal_command): New function.
14609 (pupa_command_init): Register the command "terminal".
14610
14611 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14612 (DISP_UP): Likewise.
14613 (DISP_RIGHT): Likewise.
14614 (DISP_DOWN): Likewise.
14615 (DISP_HLINE): Likewise.
14616 (DISP_VLINE): Likewise.
14617 (DISP_UL): Likewise.
14618 (DISP_UR): Likewise.
14619 (DISP_LL): Likewise.
14620 (DISP_LR): Likewise.
14621
14622 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 14623
977329f5 146242003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14625
14626 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14627 FIX. Reverse the path_list.
14628
14629 * include/pupa/normal.h: Export pupa_register_command and
14630 pupa_unregister_command.
14631
14632 * hello/hello.c (pupa_cmd_hello): New module.
14633 * conf/i386-pc.rmk: Added hello.mod.
14634
1f5ab428 146352003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14636
14637 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 14638
1f5ab428 14639 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14640 (compress_kernel): New variable.
14641 (generate_image): Heavily modified to support compressing a
14642 large part of the core image.
14643
14644 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14645 leak.
14646 (pupa_util_load_image): New function.
14647
14648 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14649 (pupa_compressed_size): New variable.
14650 (codestart): Enable Gate A20 here.
14651 Decompress the compressed part of the core image.
14652 Rearrange the code to put functions and variables which are
14653 required for initialization in the non-compressed part.
14654 Include lzo1x.S.
14655
14656 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14657 here.
14658
14659 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14660
f19dbdb7 14661 * include/pupa/i386/pc/kernel.h
1f5ab428 14662 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14663 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14664 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14665 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14666 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14667
14668 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14669
14670 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14671 (Utility#rule): Likewise.
14672
14673 * configure.ac: Check if LZO is available.
14674
ce5bf700 146752003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14676
14677 * include/pupa/normal.h: New file.
14678 * include/pupa/setjmp.h: Likewise.
14679 * include/pupa/i386/setjmp.h: Likewise.
14680 * normal/cmdline.c: Likewise.
14681 * normal/command.c: Likewise.
14682 * normal/main.c: Likewise.
14683 * normal/menu.c: Likewise.
14684 * normal/i386/setjmp.S: Likewise.
f19dbdb7 14685
ce5bf700 14686 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14687 (pupa_rescue_cmd_initrd): Likewise.
14688
14689 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14690 Likewise.
14691
14692 * kern/i386/pc/startup.S (translation_table): New variable.
14693 (translate_keycode): New function.
14694 (pupa_console_getkey): Call translate_keycode.
14695
14696 * kern/rescue.c (attempt_normal_mode): New function.
14697 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14698 it failed, print a message.
14699
14700 * kern/mm.c (pupa_real_malloc): Print more information when a
14701 free magic is broken.
14702 (pupa_free): If the first free header is not free actually, set
14703 it to P.
14704
14705 * kern/main.c (pupa_load_normal_mode): Just load the module
14706 "normal".
14707 (pupa_main): Don't print the message
14708 "Entering into rescue mode..." here.
14709
14710 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14711 Declared.
14712 (pupa_rescue_cmd_initrd): Likewise.
14713 (pupa_rescue_cmd_initrd): Likewise.
14714
14715 * include/pupa/symbol.h (FUNCTION): Specify the type.
14716 (VARIABLE): Likewise.
14717
14718 * include/pupa/err.h (pupa_err_t): Added
14719 PUPA_ERR_UNKNOWN_COMMAND.
14720
14721 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14722 (pupa_dl_get_prefix): Likewise.
14723
14724 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14725 Added _chain.mod and _linux.mod instead of chain.mod and
14726 linux.mod.
14727 (chain_mod_SOURCES): Renamed to ...
14728 (_chain_mod_SOURCES): ... this.
14729 (chain_mod_CFLAGS): Renamed to ...
14730 (_chain_mod_CFLAGS): ... this.
14731 (linux_mod_SOURCES): Renamed to ...
14732 (_linux_mod_SOURCES): ... this.
14733 (linux_mod_CFLAGS): Renamed to ...
14734 (_linux_mod_CFLAGS): ... this.
14735 (normal_mod_SOURCES): New variable.
14736 (normal_mod_CFLAGS): Likewise.
14737 (normal_mod_ASFLAGS): Likewise.
14738
147392003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14740
14741 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14742 possible.
14743
fe6b695a 14744 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 14745 recursively.
14746 (pupa_dl_unref): Unrefer depending modules recursively.
14747 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14748 a module is unloaded before one depending on that module is
14749 unloaded.
14750 (pupa_dl_unload): Unload depending modules explicitly,
14751 if possible.
14752
c04da074 147532003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14754
14755 * include/pupa/i386/pc/linux.h: New file.
14756 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 14757
c04da074 14758 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14759 Removed.
14760 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14761 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14762 of PUPA_CHAINLOADER_BOOT_SECTOR.
14763
14764 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14765 (pupa_linux_prot_size): New variable.
14766 (pupa_linux_tmp_addr): Likewise.
14767 (pupa_linux_real_addr): Likewise.
14768 (pupa_linux_boot_zimage): New function.
14769 (pupa_linux_boot_bzimage): Likewise.
14770
14771 * kern/i386/pc/init.c (struct mem_region): New structure.
14772 (MAX_REGIONS): New macro.
14773 (mem_regions): New variable.
14774 (num_regions): Likewise.
14775 (pupa_os_area_addr): Likewise.
14776 (pupa_os_area_size): Likewise.
14777 (pupa_lower_mem): Likewise.
14778 (pupa_upper_mem): Likewise.
14779 (add_mem_region): New function.
14780 (compact_mem_regions): Likewise.
14781 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14782 the size of the conventional memory and that of so-called upper
14783 memory (before the first memory hole).
14784 Instead of adding each found region to free memory, use
14785 add_mem_region and add them after removing overlaps.
14786 Also, add only 1/4 of the upper memory to free memory. The rest
14787 is used for loading OS images. Maybe this is ad hoc, but this
14788 makes it much easier to relocate OS images when booting.
14789
14790 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14791 (pupa_enter_rescue_mode): Don't register initrd and module.
14792
14793 * kern/mm.c: Include pupa/dl.h.
14794
14795 * kern/main.c: Include pupa/file.h and pupa/device.h.
14796
14797 * kern/loader.c (pupa_loader_load_module_func): Removed.
14798 (pupa_loader_load_module): Likewise.
14799
14800 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14801 ``.o''.
14802
14803 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14804 (pupa_linux_tmp_addr): Likewise.
14805 (pupa_linux_real_addr): Likewise.
14806 (pupa_linux_boot_zimage): Likewise.
14807 (pupa_linux_boot_bzimage): Likewise.
14808
14809 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14810 (pupa_upper_mem): Likewise.
14811 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14812 module is too dangerous.
14813
14814 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14815 (pupa_os_area_size): Likewise.
14816 (pupa_loader_set): Remove the first argument. Loader doesn't
14817 manage modules or initrd any longer.
14818 (pupa_loader_load_module): Removed.
14819
14820 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14821 (linux_mod_SOURCES): New variable.
14822 (linux_mod_CFLAGS): Likewise.
14823
a13f9237 148242003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14825
14826 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14827 the length of a blocklist correctly.
14828
14829 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14830 Use ioctl only if the OS file is a block device.
14831 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14832 not very useful for normal files.
14833
14834 * kern/main.c (pupa_set_root_dev): New function.
14835 (pupa_load_normal_mode): Likewise.
14836 (pupa_main): Call those above.
14837
14838 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14839 pupa_uint16_t.
14840
14841 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14842
a5ffe966 148432003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14844
14845 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14846 (setup): Configure the installed partition information and the
14847 dl prefix.
14848
14849 * loader/i386/pc/chainloader.c (my_mod): New variable.
14850 (pupa_chainloader_unload): New function.
14851 (pupa_rescue_cmd_chainloader): Refer itself.
14852 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14853
14854 * kern/i386/pc/startup.S (install_partition): Removed.
14855 (version_string): Likewise.
14856 (config_file): Likewise.
14857 (pupa_install_dos_part): New variable.
14858 (pupa_install_bsd_part): Likewise.
14859 (pupa_prefix): Likewise.
14860 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14861
14862 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14863 and pupa/misc.h.
14864 (make_install_device): New function.
14865 (pupa_machine_init): Set the dl prefix.
14866
14867 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14868 (buf): Renamed to ...
14869 (linebuf): ... this.
14870 (pupa_rescue_cmd_prefix): New function.
14871 (pupa_rescue_cmd_insmod): Likewise.
14872 (pupa_rescue_cmd_rmmod): Likewise.
14873 (pupa_rescue_cmd_lsmod): Likewise.
14874 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14875 rmmod and lsmod.
14876
14877 * kern/mm.c (pupa_memalign): If failed even after invalidating
14878 disk caches, unload unneeded modules and retry.
14879
14880 * kern/misc.c (pupa_memmove): New function.
14881 (pupa_memcpy): Removed.
14882 (pupa_strcpy): New function.
14883 (pupa_itoa): Made static.
14884
14885 * kern/dl.c (pupa_dl_iterate): New function.
14886 (pupa_dl_ref): Likewise.
14887 (pupa_dl_unref): Likewise.
14888 (pupa_dl_unload): Return if succeeded or not.
14889 (pupa_dl_unload_unneeded): New function.
14890 (pupa_dl_unload_all): Likewise.
14891 (pupa_dl_init): Renamed to ...
14892 (pupa_dl_set_prefix): ... this.
14893 (pupa_dl_get_prefix): New function.
14894
14895 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14896 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14897 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14898 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14899 (pupa_install_dos_part): Declared.
14900 (pupa_install_bsd_part): Likewise.
14901 (pupa_prefix): Likewise.
14902 (pupa_boot_drive): Likewise.
14903
14904 * include/pupa/types.h: Fix a typo.
14905
14906 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14907 pupa_memmove.
14908 (pupa_memmove): Declared.
14909 (pupa_strcpy): Likewise.
14910
14911 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14912 pupa_mod_init takes one argument, its own module.
14913 (pupa_dl_unload_unneeded): Declared.
14914 (pupa_dl_unload_all): Likewise.
14915 (pupa_dl_ref): Likewise.
14916 (pupa_dl_unref): Likewise.
14917 (pupa_dl_iterate): Likewise.
14918 (pupa_dl_init): Renamed to ...
14919 (pupa_dl_set_prefix): ... this.
14920 (pupa_dl_get_prefix): Declared.
14921
14922 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 14923 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 14924 unloaded.
14925 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14926 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14927
14928 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14929 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14930
012d7999 149312003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14932
14933 * util/i386/pc/pupa-setup.c (setup): Define the internal
14934 function find_first_partition_start at the top level, because GCC
14935 3.0.x cannot compile internal functions in deeper scopes
14936 correctly.
14937 (find_root_device): Use lstat instead of stat.
14938 Don't follow symbolic links.
14939 Fix the path-constructing code.
14940
14941 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14942 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14943 by a BLKGETSIZE ioctl first, because block devices don't fill
14944 the member st_mode of the structure stat on Linux.
14945 [__linux__] (linux_find_partition): Use a temporary buffer
14946 REAL_DEV for the working space. Copy it to DEV before returning.
14947 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14948 buffer cache consistent.
14949 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14950 strncmp. The previous value was merely wrong.
14951 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14952
14953 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14954 FAT size is 12. The previous value was merely wrong.
14955
14956 * kern/main.c (pupa_main): Don't split the starting message from
14957 newlines.
14958
14959 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14960 LF, because BIOS goes crazy about character attributes in this
14961 case.
14962
1cc73a62 149632003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14964
14965 * include/i386/pc/util/biosdisk.h: New file.
14966 * util/i386/pc/biosdisk.c: Likewise.
14967 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 14968
1cc73a62 14969 * Makefile.in (INCLUDE_DISTFILES): Added
14970 include/pupa/i386/pc/util/biosdisk.h.
14971 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14972 directory util/i386/pc.
14973 (install-local): Added a rule for sbin_UTILITIES.
14974 (uninstall): Likewise.
14975
14976 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14977
14978 * util/misc.c (xrealloc): New function.
14979 (pupa_malloc): Likewise.
14980 (pupa_free): Likewise.
14981 (pupa_realloc): Likewise.
14982 (pupa_stop): Likewise.
14983 (pupa_putchar): Likewise.
14984
14985 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14986
14987 * include/pupa/util/misc.h (xrealloc): Declared.
14988
14989 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14990 macro.
14991 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14992 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14993
14994 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14995 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14996
14997 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14998 way should be implemented.
14999 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15000
15001 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15002 the size of NAME for safety.
15003 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15004 0x88.
15005
15006 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15007 (pupa_setup_SOURCES): Likewise.
15008
15009 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15010
08b70fe8 150112002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15012
15013 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15014 bunch of pushl's from pusha, because this destroys the return
15015 value.
15016
62ddcc8f 150172002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15018
15019 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15020 This means that any missing prototypes could be fatal. Also, you
15021 must take care when writing assembly code. See the comments at
15022 the beginning of startup.S, for more details.
f19dbdb7 15023
62ddcc8f 15024 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15025 compilation mechanism.
15026 (pupa_chainloader_real_boot): Likewise.
15027 (pupa_biosdisk_rw_int13_extensions): Likewise.
15028 (pupa_biosdisk_rw_standard): Likewise.
15029 (pupa_biosdisk_check_int13_extensions): Likewise.
15030 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15031 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15032 (pupa_get_memsize): Likewise.
15033 (pupa_get_mmap_entry): Likewise.
15034 (pupa_console_putchar): Likewise.
15035 (pupa_console_setcursor): Likewise.
15036 (pupa_getrtsecs): Use pushl instead of push.
15037
15038 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15039 memory instead of the stack for a mmap entry, because some
15040 BIOSes may ignore the maximum size and overflow.
15041
15042 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15043
15044 * genmk.rb (PModule#rule): Compile automatically generated
15045 sources with module-specific CFLAGS as well as other sources.
15046
9962ed99 150472002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15048
15049 * configure.ac: Check ld.
15050 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15051 respectively, before checking endianness and sizes.
15052
15053 * Makefile.in (LD): New variable.
f19dbdb7 15054
abdfc3c5 150552002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15056
15057 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15058
6a161fa9 150592002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15060
15061 * Changelog: New file.
15062