1 2009-04-03 Robert Millan <rmh@aybabtu.com>
3 * loader/i386/linux.c (grub_linux_setup_video): Fill
4 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5 values from `mode info' structure instead of hardcoded
8 2009-04-01 Pavel Roskin <proski@gnu.org>
10 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
13 * configure.ac: Likewise.
15 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
17 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
18 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
20 2009-04-01 David S. Miller <davem@davemloft.net>
22 * normal/sparc64/setjmp.S: Fix setjmp implementation.
23 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
24 (grub_setjmp): Mark with 'returns_twice' attribute.
25 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
26 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
27 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
29 2009-04-01 Robert Millan <rmh@aybabtu.com>
31 Reapply fix from 2008-07-28 which was accidentally reverted; also
32 perform the same fix to a similar check in same function.
34 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
35 with the same number are found, just use issue a warning with
36 grub_dprintf(), as this error has been reported to be non-fatal.
38 2009-03-31 Pavel Roskin <proski@gnu.org>
40 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
41 for cross-compilation.
43 2009-03-30 Robert Millan <rmh@aybabtu.com>
45 Fix i386-ieee1275 build.
47 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
50 2009-03-30 Pavel Roskin <proski@gnu.org>
52 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
53 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
54 zero-terminated, rely only on the strlen value. Fix comparison
55 of strings differing in length.
57 2009-03-30 Robert Millan <rmh@aybabtu.com>
59 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
60 checking for abi version. Improve error messages on BIOS to notify
61 user about `linux16' command.
63 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
67 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
69 * disk/scsi.c (grub_scsi_open): free scsi in case of error
71 2009-03-29 Robert Millan <rmh@aybabtu.com>
73 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
74 set `vid_mode' accordingly.
75 (grub_linux_boot): Process `vid_mode' and set video mode.
77 2009-03-29 Robert Millan <rmh@aybabtu.com>
79 * util/grub.d/10_linux.in (linux_entry): New function.
80 Factorize generation of Linux boot entries.
82 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
84 Make the format of Environment Block plain text. The boot loader
85 part is not tested well yet.
87 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
90 (usage): Remove "info" and "clear". Add "unset". Update the
91 description of "set", as this does not delete variables any
93 (create_envblk_file): Complete rewrite.
94 (open_envblk_file): Likewise.
98 (cmd_clear): Likewise.
99 (list_variables): New function.
100 (write_envblk): Likewise.
101 (set_variables): Likewise.
102 (unset_variables): Likewise.
103 (main): Complete rewrite.
105 * commands/loadenv.c (buffer): Removed.
107 (open_envblk_file): New function.
108 (read_envblk_file): Complete rewrite.
109 (grub_cmd_load_env): Likewise.
110 (grub_cmd_list_env): Likewise.
111 (struct blocklist): New struct.
112 (free_blocklists): New function.
113 (check_blocklists): Likewise.
114 (write_blocklists): Likewise.
115 (grub_cmd_save_env): Complete rewrite.
117 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
118 a plain text signature.
119 (GRUB_ENVBLK_MAXLEN): Removed.
120 (struct grub_envblk): Complete rewrite.
121 (grub_envblk_find): Removed.
122 (grub_envblk_insert): Likewise.
123 (grub_envblk_open): New prototype.
124 (grub_envblk_set): Likewise.
125 (grub_envblk_delete): Put const to VALUE.
126 (grub_envblk_iterate): Put const to NAME and VALUE.
127 (grub_envblk_close): New prototype.
128 (grub_envblk_buffer): New inline function.
129 (grub_envblk_size): Likewise.
131 * lib/envblk.c: Include grub/mm.h.
132 (grub_env_find): Removed.
133 (grub_envblk_open): New function.
134 (grub_envblk_close): Likewise.
135 (escaped_value_len): Likewise.
136 (find_next_line): Likewise.
137 (grub_envblk_insert): Removed.
138 (grub_envblk_set): New function.
139 (grub_envblk_delete): Complete rewrite.
140 (grub_envblk_iterate): Likewise.
142 2009-03-28 Robert Millan <rmh@aybabtu.com>
144 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
145 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
146 variables. Use 16-bit loader.
147 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
149 * kern/i386/loader.S (grub_linux_boot): Rename to ...
150 (grub_linux16_boot): ... this. Update all users.
151 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
152 (grub_linux_boot): ... this. Update all users.
154 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
155 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
156 commands to `linux16' and `initrd16'.
157 (GRUB_MOD_FINI(linux)): Rename to ...
158 (GRUB_MOD_FINI(linux16)): ... this.
160 2009-03-24 Pavel Roskin <proski@gnu.org>
162 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
163 not just for compilation.
165 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
167 Move multiboot helper out of kernel
169 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
170 `loader/i386/multiboot_helper.S'.
171 * conf/i386-coreboot.rmk: Likewise
172 * conf/i386-ieee1275.rmk: Likewise
174 * kern/i386/loader.S: Move multiboot helpers from here...
175 * loader/i386/multiboot_helper.S: ...moved here
176 * include/grub/i386/loader.h: Move declarations of multiboot
178 * include/grub/i386/multiboot.h: ...moved here
179 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
181 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
183 * kern/env.c (grub_env_context_open): Added an argument to specify
184 whether a new context inherits exported variables from current
185 one. This is useful when making a sandbox to interpret a config
189 * include/grub/env.h (grub_env_context_open): Updated the prototype.
191 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
193 * kern/env.c (grub_env_context_close): Fix memory leaks.
195 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
197 * normal/main.c (grub_normal_execute): Added an argument
198 BATCH to specify if an interactive interface should be provided
199 after reading a config file.
201 (read_command_list): Prevent being executed twice.
202 (read_fs_list): Likewise.
204 * include/grub/normal.h (grub_normal_execute): Updated the
207 2009-03-22 Pavel Roskin <proski@gno.org>
209 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
211 * kern/i386/pc/startup.S: Likewise.
212 * kern/i386/efi/startup.S: Likewise.
213 * kern/i386/ieee1275/startup.S: Likewise.
214 * kern/i386/coreboot/startup.S: Likewise.
215 * kern/x86_64/efi/startup.S: Likewise.
217 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
218 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
219 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
221 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
223 Bugfixes in multiboot for bugs uncovered by solaris kernel.
225 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
227 Use vaddr of correct segment for entry_point.
229 2009-03-21 Bean <bean123ch@gmail.com>
231 * commands/blocklist.c: Add include file <grub/command.h>, remove
232 <grub/normal.h> and <grub/arg.h>.
233 (grub_cmd_blocklist): Use the new command interface.
234 (GRUB_MOD_INIT): Likewise.
235 (GRUB_MOD_FINI): Likewise.
236 * commands/boot.c: Likewise.
237 * commands/cat.c: Likewise.
238 * commands/cmp.c: Likewise.
239 * commands/configfile.c: Likewise.
240 * commands/crc.c: Likewise.
241 * commands/echo.c: Likewise.
242 * commands/halt.c: Likewise.
243 * commands/handler.c: Likewise.
244 * commands/hdparm.c: Likewise.
245 * commands/help.c: Likewise.
246 * commands/hexdump.c: Likewise.
247 * commands/loadenv.c: Likewise.
248 * commands/ls.c: Likewise.
249 * commands/lsmmap.c: Likewise.
250 * commands/lspci.c: Likewise.
251 * commands/loadenv.c: Likewise.
252 * commands/read.c: Likewise.
253 * commands/reboot.c: Likewise.
254 * commands/search.c: Likewise.
255 * commands/sleep.c: Likewise.
256 * commands/test.c: Likewise.
257 * commands/usbtest.c: Likewise.
258 * commands/videotest.c: Likewise.
259 * commands/i386/cpuid.c: Likewise.
260 * commands/i386/pc/halt.c: Likewise.
261 * commands/i386/pc/play.c: Likewise.
262 * commands/i386/pc/pxecmd.c: Likewise.
263 * commands/i386/pc/vbeinfo.c: Likewise.
264 * commands/i386/pc/vbetest.c: Likewise.
265 * commands/ieee1275/suspend.c: Likewise.
266 * disk/loopback.c: Likewise.
267 * font/font_cmd.c: Likewise.
268 * hello/hello.c: Likewise.
269 * loader/efi/appleloader.c: Likewise.
270 * loader/efi/chainloader.c: Likewise.
271 * loader/i386/bsd.c: Likewise.
272 * loader/i386/efi/linux.c: Likewise.
273 * loader/i386/ieee1275/linux.c: Likewise.
274 * loader/i386/linux.c: Likewise.
275 * loader/i386/pc/chainloader.c: Likewise.
276 * loader/i386/pc/linux.c: Likewise.
277 * loader/powerpc/ieee1275/linux.c: Likewise.
278 * loader/multiboot_loader.c: Likewise.
279 * term/gfxterm.c: Likewise.
280 * term/i386/pc/serial.c: Likewise.
281 * term/terminfo.c: Likewise.
283 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
284 * term/i386/pc/vga.c: Likewise.
285 * video/readers/jpeg.c: Likewise.
286 * video/readers/png.c: Likewise.
287 * video/readers/tga.c: Likewise.
289 * util/grub-fstest (cmd_loopback): Removed.
290 (cmd_blocklist): Likewise.
292 (grub_register_command): Likewise.
293 (grub_unregister_command): Likewise.
294 (execute_command): Use grub_command_find to locate command and execute
297 * include/grub/efi/chainloader.h: Removed.
298 * loader/efi/chainloader_normal.c: Likewise.
299 * loader/i386/bsd_normal.c: Likewise.
300 * loader/i386/pc/chainloader_normal.c: Likewise.
301 * loader/i386/pc/multiboot_normal.c: Likewise.
302 * loader/linux_normal.c: Likewise.
303 * loader/multiboot_loader_normal.c: Likewise.
304 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
306 * gencmdlist.sh: Scan new registration command grub_register_extcmd
307 and grub_register_command_p1.
309 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
310 kern/command.c, lib/arg.c and commands/extcmd.c.
311 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
312 (minicmd_mod_SOURCES): New variable.
313 (minicmd_mod_CFLAGS): Likewise.
314 (minicmd_mod_LDFLAGS): Likewise.
315 (extcmd_mod_SOURCES): Likewise.
316 (extcmd_mod_CFLAGS): Likewise.
317 (extcmd_mod_LDFLAGS): Likewise.
318 (boot_mod_SOURCES): Removed.
319 (boot_mod_CFLAGS): Likewise.
320 (boot_mod_LDFLAGS): Likewise.
322 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
324 (kernel_img_HEADERS): Add command.h.
325 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
326 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
328 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
329 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
330 remove the corresponding normal mode command.
331 (normal_mod_SOURCES): Remove normal/arg.c.
332 * conf/i386-coreboot.rmk: Likewise.
333 * conf/i386-efi.rmk: Likewise.
334 * conf/i386-ieee1275.rmk: Likewise.
335 * conf/powerpc-ieee1275.rmk: Likewise.
336 * conf/x86_64-efi.rmk: Likewise.
338 * include/grub/arg.h: Move from here ...
339 * include/grub/lib/arg.h: ... to here.
341 * normal/arg.c: Move from here ...
342 * lib/arg.c: ... to here.
344 * commands/extcmd.c: New file.
345 * commands/minicmd.c: Likewise.
346 * include/grub/command.h: Likewise.
347 * include/grub/extcmd.h: Likewise.
348 * kern/command.c: Likewise.
349 * kern/corecmd.c: Likewise.
351 * kern/list.c (grub_list_iterate): Return int instead of void.
352 (grub_list_insert): New function.
353 (grub_prio_list_insert): Likewise.
355 * kern/rescue.c (grub_rescue_command): Removed.
356 (grub_rescue_command_list): Likewise.
357 (grub_rescue_register_command): Likewise.
358 (grub_rescue_unregister_command): Likewise.
359 (grub_rescue_cmd_boot): Move to minicmd.c
360 (grub_rescue_cmd_help): Likewise.
361 (grub_rescue_cmd_info): Likewise.
362 (grub_rescue_cmd_boot): Likewise.
363 (grub_rescue_cmd_testload): Likewise.
364 (grub_rescue_cmd_dump): Likewise.
365 (grub_rescue_cmd_rmmod): Likewise.
366 (grub_rescue_cmd_lsmod): Likewise.
367 (grub_rescue_cmd_exit): Likewise.
368 (grub_rescue_print_devices): Moved to corecmd.c.
369 (grub_rescue_print_files): Likewise.
370 (grub_rescue_cmd_ls): Likewise.
371 (grub_rescue_cmd_insmod): Likewise.
372 (grub_rescue_cmd_set): Likewise.
373 (grub_rescue_cmd_unset): Likewise.
374 (attempt_normal_mode): Use grub_command_find to get normal module.
375 (grub_enter_rescue_mode): Use grub_register_core_commands to register
376 commands, remove grub_rescue_register_command calls.
378 * normal/command.c (grub_register_command): Removed.
379 (grub_unregister_command): Likewise.
380 (grub_command_find): Likewise.
381 (grub_iterate_commands): Likewise.
382 (rescue_command): Likewise.
383 (export_command): Moved to corecmd.c.
384 (set_command): Removed.
385 (unset_command): Likewise.
386 (insmod_command): Likewise.
387 (rmmod_command): Likewise.
388 (lsmod_command): Likewise.
389 (grub_command_init): Likewise.
391 * normal/completion.c (iterate_command): Use cmd->prio to check for
393 (complete_arguments): Use grub_extcmd_t structure to find options.
394 (grub_normal_do_completion): Change function grub_iterate_commands to
395 grub_command_iterate.
397 * normal/execute.c (grub_script_execute_cmd): No need to parse
400 * normal/main.c (grub_dyncmd_dispatcher): New function.
401 (read_command_list): Register unload commands as dyncmd.
402 (grub_cmd_normal): Use new command interface, register rescue,
403 unregister normal at entry, register normal, unregister rescue at exit.
405 * include/grub/list.h (grub_list_test_t): New type.
406 (grub_list_iterate): Return int instead of void.
407 (grub_list_insert): New function.
408 (GRUB_AS_NAMED_LIST_P): New macro.
409 (GRUB_AS_PRIO_LIST): Likewise.
410 (GRUB_AS_PRIO_LIST_P): Likewise.
411 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
412 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
413 (grub_prio_list): New structure.
414 (grub_prio_list_insert): New function.
415 (grub_prio_list_remove): New inline function.
417 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
418 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
419 (GRUB_COMMAND_FLAG_MENU): Likewise.
420 (GRUB_COMMAND_FLAG_BOTH): Likewise.
421 (GRUB_COMMAND_FLAG_TITLE): Likewise.
422 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
423 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
424 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
425 (grub_command): Likewise.
426 (grub_register_command): Likewise.
427 (grub_command_find): Likewise.
428 (grub_iterate_commands): Likewise.
429 (grub_command_init): Likewise.
430 (grub_arg_parse): Likewise.
431 (grub_arg_show_help): Likewise.
433 * include/grub/rescue.h (grub_rescue_register_command): Removed.
434 (grub_rescue_unregister_command): Likewise.
436 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
437 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
438 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
440 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
441 grub_rescue_cmd_initrd.
442 * include/grub/i386/loader.h: Likewise.
443 * include/grub/x86_64/loader.h: Likewise.
445 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
447 2009-03-21 Bean <bean123ch@gmail.com>
449 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
450 instead of stat in mingw environment.
452 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
454 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
456 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
459 2009-03-21 Bean <bean123ch@gmail.com>
461 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
464 2009-03-18 Michel Dänzer <michel@daenzer.net>
466 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
467 checking inode flags for EXT4_EXTENTS_FLAG.
469 2009-03-18 Robert Millan <rmh@aybabtu.com>
471 * loader/i386/linux.c: Include `<grub/video.h>' and
472 `<grub/i386/pc/vbe.h>'..
473 (grub_linux_setup_video): New function. Loosely based on the EFI one.
474 (grub_linux32_boot): Attempt to configure video settings with
475 grub_linux_setup_video().
476 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
477 to avoid grub_console_fini() which would step out of graphical mode
480 2009-03-14 Robert Millan <rmh@aybabtu.com>
482 Fix build on powerpc.
483 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
485 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
487 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
488 background image command.
490 2009-03-12 Colin D Bennett <colin@gibibit.com>
492 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
493 (grub_gfxterm_putchar): Extract pairs of identical calls to
494 draw_cursor out of conditional blocks.
496 2009-03-11 Pavel Roskin <proski@gnu.org>
498 * fs/hfs.c (grub_hfs_strncasecmp): New function.
499 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
501 2009-03-11 Robert Millan <rmh@aybabtu.com>
503 * loader/i386/multiboot_elfxx.c
504 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
506 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
508 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
511 2009-03-11 Robert Millan <rmh@aybabtu.com>
513 * loader/i386/multiboot.c (code_size): New variable.
514 (grub_multiboot): Define offsets by adding to `code_size' rather
515 than subtracting from `grub_multiboot_payload_size'. Provide
516 4-byte alignment to MBI and others by increasing
517 `boot_loader_name_length' appropriately.
519 * loader/i386/multiboot_elfxx.c
520 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
522 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
527 2009-03-08 Robert Millan <rmh@aybabtu.com>
529 Make loader/i386/linux.c usable on i386-pc again.
531 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
533 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
536 2009-03-07 Bean <bean123ch@gmail.com>
538 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
541 2009-03-06 Robert Millan <rmh@aybabtu.com>
543 Fix display issue on terminals with screen size other than 80x25
544 (e.g. gfxterm with resolution higher than 640x480).
546 * normal/main.c (grub_normal_init_page): Display title text in a
547 position relative to the center of the terminal instead of relying
548 on a hardcoded offset.
550 2009-03-04 Robert Millan <rmh@aybabtu.com>
552 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
555 * Makefile.in (host_kernel): New variable.
556 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
557 scripts instead of just the windows one.
558 * configure.ac: Initialize and AC_SUBST `host_kernel'.
560 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
562 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
564 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
565 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
566 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
567 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
568 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
569 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
571 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
573 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
574 or if there's no space for the disk label and print the partition number on a
577 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
579 * util/misc.c: Include <time.h>.
580 (grub_millisleep): New function.
582 2009-03-04 Bean <bean123ch@gmail.com>
584 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
585 another option -mno-red-zone.
587 * commands/handler.c: Change module description.
589 * kern/handler.c: Add missing space at the end of description line.
591 * kern/list.c: Likewise.
593 2009-03-03 Robert Millan <rmh@aybabtu.com>
595 Move more components to the relocation area, and fix mbi pointer
596 handling to use the destination rather than the origin (thanks to
597 Vladimir Serbinenko for spotting).
599 * loader/i386/multiboot.c (mbi_dest): New variable.
600 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
601 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
604 2009-03-01 Bean <bean123ch@gmail.com>
606 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
607 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
608 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
609 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
611 * loader/i386/efi/linux.c (acpi_guid): New variable.
612 (acpi_guid): Likewise.
613 (EBDA_SEG_ADDR): New constant.
614 (LOW_MEM_ADDR): Likewise.
615 (FAKE_EBDA_SEG): Likewise.
616 (fake_bios_data): New function.
617 (grub_linux_boot): Call fake_bios_data.
619 2009-03-01 Bean <bean123ch@gmail.com>
621 * commands/terminal.c: Removed.
623 * commands/handler.c: New file.
625 * include/grub/list.h: Likewise.
627 * include/grub/handler.h: Likewise.
629 * kern/list.c: Likewise.
631 * kern/handler.c: Likewise.
633 * kern/term.h: Include header file <grub/handler.h>.
634 (grub_term_input): Move next field to the beginning.
635 (grub_term_output): Likewise.
636 (grub_term_input_class): New variable.
637 (grub_term_output_class): Likewise.
638 (grub_term_register_input): Changed to inline function.
639 (grub_term_register_output): Likewise.
640 (grub_term_unregister_input): Likewise.
641 (grub_term_unregister_output): Likewise.
642 (grub_term_set_current_input): Likewise.
643 (grub_term_set_current_output): Likewise.
644 (grub_term_get_current_input): Likewise.
645 (grub_term_get_current_output): Likewise.
646 (grub_term_iterate_input): Removed.
647 (grub_term_iterate_output): Likewise.
649 * kern/term.c (grub_term_list_input): Removed.
650 (grub_term_list_output): Likewise.
651 (grub_term_input_class): New variable.
652 (grub_term_output_class): Likewise.
653 (grub_cur_term_input): Change variable as macro.
654 (grub_cur_term_output): Likewise.
655 (grub_term_register_input): Removed.
656 (grub_term_register_output): Likewise.
657 (grub_term_unregister_input): Likewise.
658 (grub_term_unregister_output): Likewise.
659 (grub_term_set_current_input): Likewise.
660 (grub_term_set_current_output): Likewise.
661 (grub_term_iterate_input): Likewise.
662 (grub_term_iterate_output): Likewise.
663 (grub_term_get_current_input): Likewise.
664 (grub_term_get_current_output): Likewise.
666 * util/grub-editenv.c: Include header file <grub/handler.h>.
667 (grub_term_get_current_input): Removed.
668 (grub_term_get_current_output): Likewise.
669 (grub_term_input_class): New variable.
670 (grub_term_output_class): Likewise.
672 * util/grub-fstest.c (grub_term_get_current_input): Removed.
673 (grub_term_get_current_output): Likewise.
674 (grub_term_input_class): New variable.
675 (grub_term_output_class): Likewise.
677 * util/grub-probe.c (grub_term_get_current_input): Removed.
678 (grub_term_get_current_output): Likewise.
679 (grub_term_input_class): New variable.
680 (grub_term_output_class): Likewise.
682 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
683 (grub_term_get_current_output): Likewise.
684 (grub_term_input_class): New variable.
685 (grub_term_output_class): Likewise.
687 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
688 (terminal_mod_SOURCES): Likewise.
689 (terminal_mod_CFLAGS): Likewise.
690 (terminal_mod_LDFLAGS): Likewise.
692 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
694 (kernel_img_SOURCES): Add list.c and handler.c.
695 (kernel_img_HEADERS): Add list.h and handler.h.
697 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
699 (kernel_mod_SOURCES): Add list.c and handler.c.
700 (kernel_mod_HEADERS): Add list.h and handler.h.
702 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
704 (kernel_elf_SOURCES): Add list.c and handler.c.
705 (kernel_elf_HEADERS): Add list.h and handler.h.
707 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
709 (kernel_elf_SOURCES): Add list.c and handler.c.
710 (kernel_elf_HEADERS): Add list.h and handler.h.
712 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
714 (kernel_mod_SOURCES): Add list.c and handler.c.
715 (kernel_mod_HEADERS): Add list.h and handler.h.
717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
719 (kernel_elf_SOURCES): Add list.c and handler.c.
720 (kernel_elf_HEADERS): Add list.h and handler.h.
722 2009-02-27 Robert Millan <rmh@aybabtu.com>
724 Factorize elf32 / elf64 code in Multiboot loader. This will
725 prevent it from getting out of sync again.
727 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
728 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
729 grub_multiboot_load_elf64): Move from here ...
730 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
731 grub_multiboot_load_elf): ... to here (new file).
733 2009-02-27 Robert Millan <rmh@aybabtu.com>
735 * util/grub.d/10_linux.in: Rename "single-user mode" to
738 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
740 Don't leak in SCSI code.
741 * disk/scsi.c (grub_scsi_close): free `scsi'.
743 2009-02-27 Robert Millan <rmh@aybabtu.com>
745 * loader/i386/pc/multiboot.c: Move from here ...
746 * loader/i386/multiboot.c: ... to here. Update all users.
748 2009-02-27 Robert Millan <rmh@aybabtu.com>
750 Patch from Alexandre Bique <bique.alexandre@gmail.com>
751 * util/i386/pc/grub-setup.c (setup): Fix directory path.
753 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
755 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
758 2009-02-27 Robert Millan <rmh@aybabtu.com>
760 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
761 `0x' qualifier as 0 when base is specified as parameter).
763 2009-02-24 Bean <bean123ch@gmail.com>
765 * configure.ac: Check for -mcmodel=large in x86_64 target.
767 * include/grub/efi/api.h (efi_call_10): New macro.
768 (efi_wrap_10): New function.
770 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
771 (GRUB_PE32_REL_BASED_HIGH): Likewise.
772 (GRUB_PE32_REL_BASED_LOW): Likewise.
773 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
774 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
775 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
776 (GRUB_PE32_REL_BASED_SECTION): Likewise.
777 (GRUB_PE32_REL_BASED_REL): Likewise.
778 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
779 (GRUB_PE32_REL_BASED_DIR64): Likewise.
780 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
782 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
785 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
786 (efi_wrap_10): New function.
788 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
790 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
791 MB/MBP model (NV chipset).
792 (devdata_devs): Add devpath_5 to the list.
794 * load/i386/efi/linux.c (video_base): Remove variable.
795 (RGB_MASK): New macro.
796 (RGB_MAGIC): Likewise.
797 (LINE_MIN): Likewise.
798 (LINE_MAX): Likewise.
799 (FBTEST_STEP): Likewise.
800 (FBTEST_COUNT): Likewise.
801 (fb_list): New variable.
802 (grub_find_video_card): Remove function.
803 (find_framebuf): New function.
804 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
807 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
810 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
812 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
814 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
817 2009-02-22 Robert Millan <rmh@aybabtu.com>
819 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
820 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
821 in our relocation, instead of using it directly from heap. Also
822 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
824 2009-02-21 Robert Millan <rmh@aybabtu.com>
826 Implement USB keyboard support (based on patch by Marco Gerards)
828 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
829 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
830 (usb_keyboard_mod_LDFLAGS): New variables.
832 * term/usb_keyboard.c: New file.
834 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
836 Corrected wrong declaration
838 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
840 2009-02-14 Christian Franke <franke@computer.org>
842 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
843 (grub_lspci_iter): Print class code and programming interface byte.
845 2009-02-14 Christian Franke <franke@computer.org>
847 * gendistlist.sh: Ignore `.svn' directories.
849 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
851 * fs/fat.c: Add 2009 to Copyright line.
853 2009-02-14 Christian Franke <franke@computer.org>
855 * commands/hdparm.c: New file. Provides `hdparm' command
856 which sends ATA commands via grub_disk_ata_pass_through ().
858 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
860 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
861 and <grub/cpu/io.h> to include/grub/ata.h.
862 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
863 (GRUB_CDROM_SECTOR_SIZE): Remove.
864 (GRUB_ATA_*): Move to include/grub/ata.h.
865 (GRUB_ATAPI_*): Likewise.
866 (enum grub_ata_commands): Likewise.
867 (enum grub_ata_timeout_milliseconds): Likewise.
868 (struct grub_ata_device): Likewise.
869 (grub_ata_regset): Likewise.
870 (grub_ata_regget): Likewise.
871 (grub_ata_regset2): Likewise.
872 (grub_ata_regget2): Likewise.
873 (grub_ata_check_ready): Likewise.
874 (grub_ata_wait_not_busy): Remove static, exported in
876 (grub_ata_wait_drq): Likewise.
877 (grub_ata_pio_read): Likewise.
879 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
880 function for hdparm.mod.
882 * include/grub/ata.h: New file, contains declarations from
884 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
886 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
887 (grub_disk_ata_pass_through): New exported variable.
889 * kern/disk.c (grub_disk_ata_pass_through): New variable.
891 2009-02-13 Colin D Bennett <colin@gibibit.com>
893 Support multiple fallback entries, and provide an API to support
894 executing default+fallback menu entries. Renamed the `terminal' menu
897 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
898 variable declaration.
899 (grub_menu_execute_callback): New structure declaration.
900 (grub_menu_execute_callback_t): New typedef.
901 (grub_menu_execute_with_fallback): New function declaration.
902 (grub_menu_get_entry): Likewise.
903 (grub_menu_get_timeout): Likewise.
904 (grub_menu_set_timeout): Likewise.
906 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
908 * normal/menu.c (grub_wait_after_message): Moved to
909 `normal/menu_text.c'.
910 (draw_border): Likewise.
911 (print_message): Likewise.
912 (print_entry): Likewise.
913 (print_entries): Likewise.
914 (grub_menu_init_page): Likewise.
915 (get_entry_number): Likewise.
916 (print_timeout): Likewise.
917 (run_menu): Likewise.
918 (grub_menu_execute_entry): Likewise.
919 (show_text_menu): Likewise.
920 (get_and_remove_first_entry_number): New function.
921 (grub_menu_execute_with_fallback): Likewise.
922 (get_entry): Renamed to ...
923 (grub_menu_get_entry): .. this and made it global.
924 (get_timeout): Renamed to ...
925 (grub_menu_get_timeout): ... this and made it global.
926 (set_timeout): Renamed to ...
927 (grub_menu_set_timeout): ... this and made it global.
928 (grub_normal_terminal_menu_viewer): Renamed to ...
929 (grub_normal_text_menu_viewer): ... this.
931 * normal/menu_text.c: New file. Extracted text-menu-specific code
934 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
935 (normal_mod_SOURCES): Likewise.
937 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
938 (normal_mod_SOURCES): Likewise.
940 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
941 (normal_mod_SOURCES): Likewise.
943 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
944 (normal_mod_SOURCES): Likewise.
946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
947 (normal_mod_SOURCES): Likewise.
949 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
950 (normal_mod_SOURCES): Likewise.
952 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
953 (normal_mod_SOURCES): Likewise.
955 2009-02-11 Robert Millan <rmh@aybabtu.com>
957 * util/grub.d/00_header.in: Update old reference to `font' command.
959 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
961 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
963 Based on patch from Javier MartÃn.
965 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
967 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
968 to avoid false positives with FAT.
969 (grub_fstest_SOURCES): Likewise.
970 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
971 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
973 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
974 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
975 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
977 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
979 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
980 bpb.version_specific.fat12_or_fat16.fstype and
981 bpb.version_specific.fat32.fstype.
983 2009-02-08 Robert Millan <rmh@aybabtu.com>
985 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
987 2009-02-08 Robert Millan <rmh@aybabtu.com>
989 * Makefile.in (host_os, host_cpu): New variables.
990 (target_os): Remove. Update all users.
992 2009-02-08 Marco Gerards <marco@gnu.org>
994 * Makefile.in (enable_grub_emu_usb): New variable.
995 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
996 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
997 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
998 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
999 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1000 `usbtest.mod' and `usbms.mod'.
1001 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1002 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1003 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1004 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1005 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1008 * disk/usbms.c: New file.
1010 * include/grub/usb.h: Likewise.
1012 * include/grub/usbtrans.h: Likewise.
1014 * include/grub/usbdesc.h: Likewise.
1016 * bus/usb/usbtrans.c: Likewise.
1018 * bus/usb/ohci.c: Likewise.
1020 * bus/usb/uhci.c: Likewise.
1022 * bus/usb/usbhub.c: Likewise.
1024 * bus/usb/usb.c: Likewise.
1026 * commands/usbtest.c: Likewise.
1028 * util/usb.c: Likewise.
1030 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1032 * configure.ac: Test for libusb presence.
1034 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1036 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1038 * kern/mm.c: Add more comments.
1040 2009-02-08 Robert Millan <rmh@aybabtu.com>
1042 Patch from Javier MartÃn.
1043 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1044 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1046 2009-02-08 Robert Millan <rmh@aybabtu.com>
1048 * fs/cpio.c: Split tar functionality to ...
1049 * fs/tar.c: ... here (new file). Update all users.
1051 2009-02-07 Robert Millan <rmh@aybabtu.com>
1053 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1054 backward-incompatible features.
1056 Based on patch from Javier MartÃn, with some adjustments.
1058 2009-02-07 Michael Scherer <misc@mandriva.org>
1060 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1062 2009-02-07 Robert Millan <rmh@aybabtu.com>
1064 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1065 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1066 after the RAID stuff.
1068 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1070 Fixes problem when running vbetest command as reported by
1071 Vladimir Serbinenko <phcoder@gmail.com>.
1073 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1075 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1077 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1078 /dev/md/NpN style mdraid devices.
1080 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1082 * util/unifont2pff.rb: Remove.
1084 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1086 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1089 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1091 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1092 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1093 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1094 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1095 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1096 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1097 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1099 2009-02-02 Christian Franke <franke@computer.org>
1101 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1103 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1105 * INSTALL: Note that we now require at least autoconf 2.59 and
1106 that LZO is optional.
1108 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1110 Base on patch on bug #24154 created by Tomas Tintera
1113 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1115 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1117 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1118 <bero@arklinux.org>.
1120 * normal/parser.y (script_init): Add missing semicolon.
1122 2009-01-31 Colin D Bennett <colin@gibibit.com>
1124 * normal/main.c: Add include to grub/menu_viewer.h.
1125 (free_menu_entry_classes): Added.
1126 (grub_normal_menu_addentry): Added class property handling.
1127 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1128 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1130 * normal/menu_viewer.c: New file.
1132 * normal/menu.c (run_menu_entry): Renamed to ...
1133 (grub_menu_execute_entry): ... this and made it as global.
1134 (grub_menu_run): Renamed to ...
1135 (show_text_menu): ... this and made it local.
1136 (show_text_menu): Adapt to new function names.
1137 (grub_normal_terminal_menu_viewer): New global variable.
1139 * include/grub/menu.h: New file.
1141 * include/grub/menu_viewer.h: New file.
1143 * include/grub/normal.h: Added include to grub/menu.h.
1144 (grub_menu_entry): Moved to include/grub/menu.h.
1145 (grub_menu_entry_t): Likewise.
1146 (grub_menu): Likewise.
1147 (grub_menu_t): Likewise.
1148 (grub_normal_terminal_menu_viewer): Added.
1149 (grub_menu_execute_entry): Likewise.
1150 (grub_menu_run): Removed.
1152 * DISTLIST: Added include/grub/menu.h.
1153 Added include/grub/menu_viewer.h.
1154 Added normal/menu_viewer.c.
1156 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1158 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1159 arglist for menutitle arguments.
1161 * normal/main.c (grub_normal_menu_addentry): Likewise.
1163 * normal/parser.y (menuentry): Likewise.
1165 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1167 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1168 (grub_script_create_cmdmenu): Likewise.
1170 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1172 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1175 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1177 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1179 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1181 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1183 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1185 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1187 2009-01-30 Christian Franke <franke@computer.org>
1189 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1190 in option help text.
1192 2009-01-27 Pavel Roskin <proski@gnu.org>
1194 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1196 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1198 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1200 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1202 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1203 unregister function.
1205 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1207 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1209 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1211 * util/grub-mkfont.c (usage): Fix typo.
1213 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1215 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1217 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1219 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1221 * kern/misc.c (grub_strcasecmp): New function.
1222 (grub_strcasecmp): Use grub_size_t instead of int for length.
1224 * include/grub/misc.h: Update function prototypes.
1226 2009-01-26 Robert Millan <rmh@aybabtu.com>
1228 * configure.ac: Fix cross-compilation check.
1230 2009-01-22 Christian Franke <franke@computer.org>
1232 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1233 (precision) digit string. Allow `.format2' without `format1' (width).
1234 Limit input chars for `%s' output to `format2' if specified. This is
1235 compatible with standard printf ().
1237 2009-01-22 Christian Franke <franke@computer.org>
1239 * disk/ata.c (grub_ata_wait_status): Replace by ...
1240 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1241 other status bits may be invalid while BSY is asserted.
1242 (grub_ata_check_ready): New function.
1243 (grub_ata_cmd): Removed.
1244 (grub_ata_wait_drq): New function.
1245 (grub_ata_strncpy): Remove inline.
1246 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1247 and error check now done by grub_ata_wait_drq ().
1248 (grub_ata_pio_write): Likewise.
1249 (grub_atapi_identify): Set DEV before check for !BSY. Use
1250 grub_ata_wait_drq () to wait for data.
1251 (grub_ata_device_initialize): Add status register check to
1252 detect missing SATA slave devices. Add debug messages.
1253 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1254 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1255 transfer loop by grub_ata_pio_write ().
1256 (grub_ata_identify): Set DEV before check for !BSY. Use
1257 grub_ata_wait_drq () to wait for data.
1258 (grub_ata_setaddress): Set DEV before check for !BSY.
1259 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1260 read/write in one loop. Fix invalid command on write. Fix incomplete
1261 command on (size % batch) == 0. Add missing error check after write of
1262 last block. Add debug messages.
1263 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1265 2009-01-19 Christian Franke <franke@computer.org>
1267 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1268 (GRUB_ATAPI_IREASON_*): Likewise.
1269 (grub_ata_pio_write): Fix timeout error return.
1270 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1271 (grub_atapi_wait_drq): New function.
1272 (grub_atapi_packet): New parameter `size'.
1273 Use grub_atapi_wait_drq () and direct write instead of
1274 grub_ata_pio_write ().
1275 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1276 reads the number of bytes requested by the device for each DRQ
1278 (grub_atapi_write): Remove old implementation, return not
1279 implemented instead.
1281 2009-01-19 Christian Franke <franke@computer.org>
1283 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1284 of 512 to calculate data size.
1285 (grub_scsi_read12): Likewise.
1286 (grub_scsi_write10): Likewise.
1287 (grub_scsi_write12): Likewise.
1288 (grub_scsi_read): Adjust size according to blocksize.
1289 Add checks for invalid blocksize and unaligned transfer.
1291 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1293 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1295 * term/gfxterm.c (write_char): Fix background rendering for wide
1298 2009-01-19 Robert Millan <rmh@aybabtu.com>
1300 * config.guess: Update to latest version from config git.
1301 * config.sub: Likewise.
1303 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1305 * Makefile.in: Change font compilation to use new grub-mkfont instead
1308 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1309 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1310 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1311 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1312 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1313 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1314 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1315 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1316 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1318 2009-01-16 Christian Franke <franke@computer.org>
1320 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1321 (enum grub_ata_timeout_milliseconds): New enum.
1322 (grub_ata_wait_status): Add parameter milliseconds.
1323 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1324 recovery from timed-out commands.
1325 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1326 return grub_errno instead of REG_ERROR.
1327 (grub_ata_pio_write): Add parameter milliseconds.
1328 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1329 Pass milliseconds to grub_ata_wait_status () and
1330 grub_ata_pio_read ().
1331 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1332 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1333 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1334 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1335 It is not suitable for device detection, because DEV bit is ignored,
1336 the command may run too long, and not all devices set the signature
1338 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1339 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1340 Fix device selection, DEV bit must be set first to address the registers
1341 of the correct device.
1342 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1343 grub_ata_pio_read/write ().
1344 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1345 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1347 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1349 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1351 2009-01-13 Bean <bean123ch@gmail.com>
1353 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1355 2009-01-13 Bean <bean123ch@gmail.com>
1357 * Makefile.in: (enable_grub_mkfont): New variable.
1358 (freetype_cflags): Likewise.
1359 (freetype_libs): Likewise.
1361 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1362 (grub_mkfont_SOURCES): New variable.
1363 (grub_mkfont_CFLAGS): Likewise.
1364 (grub_mkfont_LDFLAGS): Likewise.
1366 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1367 library if `--enable-grub-mkfont' is requested.
1368 (enable_grub_mkfont): New variable.
1369 (freetype_cflags): Likewise.
1370 (freetype_libs): Likewise.
1372 * util/grub-mkfont.c: New file.
1374 2009-01-12 Christian Franke <franke@computer.org>
1376 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1377 mode check. Fix setting of compat_use[].
1379 2009-01-10 Robert Millan <rmh@aybabtu.com>
1381 Update a few copyright years which we forgot to do in 2008 (only for
1382 files whose changes made in 2008 were copyright-significant)
1384 * Makefile.in: Add 2008 to Copyright line.
1385 * disk/ieee1275/ofdisk.c: Likewise.
1386 * disk/efi/efidisk.c: Likewise.
1387 * kern/dl.c: Likewise.
1388 * kern/sparc64/ieee1275/init.c: Likewise.
1389 * kern/mm.c: Likewise.
1390 * kern/efi/mm.c: Likewise.
1391 * boot/i386/pc/boot.S: Likewise.
1392 * genfslist.sh: Likewise.
1393 * fs/iso9660.c: Likewise.
1394 * fs/hfs.c: Likewise.
1395 * fs/jfs.c: Likewise.
1396 * fs/minix.c: Likewise.
1397 * fs/ufs.c: Likewise.
1398 * gensymlist.sh.in: Likewise.
1399 * genkernsyms.sh.in: Likewise.
1400 * include/grub/misc.h: Likewise.
1401 * include/grub/types.h: Likewise.
1402 * include/grub/symbol.h: Likewise.
1403 * include/grub/elf.h: Likewise.
1404 * include/grub/kernel.h: Likewise.
1405 * include/grub/disk.h: Likewise.
1406 * include/grub/dl.h: Likewise.
1407 * include/grub/i386/linux.h: Likewise.
1408 * include/grub/i386/pc/biosdisk.h: Likewise.
1409 * include/grub/efi/api.h: Likewise.
1410 * include/grub/efi/pe32.h: Likewise.
1411 * include/grub/util/misc.h: Likewise.
1412 * normal/execute.c: Likewise.
1413 * normal/arg.c: Likewise.
1414 * normal/completion.c: Likewise.
1415 * normal/lexer.c: Likewise.
1416 * normal/parser.y: Likewise.
1417 * normal/misc.c: Likewise.
1418 * commands/i386/pc/vbeinfo.c: Likewise.
1419 * commands/hexdump.c: Likewise.
1420 * commands/terminal.c: Likewise.
1421 * commands/ls.c: Likewise.
1422 * commands/help.c: Likewise.
1423 * partmap/pc.c: Likewise.
1424 * loader/efi/chainloader.c: Likewise.
1425 * loader/multiboot_loader.c: Likewise.
1426 * loader/i386/pc/multiboot2.c: Likewise.
1427 * term/efi/console.c: Likewise.
1428 * term/i386/pc/serial.c: Likewise.
1429 * util/lvm.c: Likewise.
1430 * util/console.c: Likewise.
1431 * util/i386/efi/grub-mkimage.c: Likewise.
1432 * util/raid.c: Likewise.
1434 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1436 * commands/videotest.c: Removed include to grub/machine/memory.h.
1438 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1439 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1440 (video_mod_SOURCES): Removed.
1441 (video_mod_CFLAGS): Likewise.
1442 (video_mod_LDFLAGS): Likewise.
1443 (gfxterm_mod_SOURCES): Likewise.
1444 (gfxterm_mod_CFLAGS): Likewise.
1445 (gfxterm_mod_LDFLAGS): Likewise.
1446 (videotest_mod_SOURCES): Likewise.
1447 (videotest_mod_CFLAGS): Likewise.
1448 (videotest_mod_LDFLAGS): Likewise.
1449 (bitmap_mod_SOURCES): Likewise.
1450 (bitmap_mod_CFLAGS): Likewise.
1451 (bitmap_mod_LDFLAGS): Likewise.
1452 (tga_mod_SOURCES): Likewise.
1453 (tga_mod_CFLAGS): Likewise.
1454 (tga_mod_LDFLAGS): Likewise.
1455 (jpeg_mod_SOURCES): Likewise.
1456 (jpeg_mod_CFLAGS): Likewise.
1457 (jpeg_mod_LDFLAGS): Likewise.
1458 (png_mod_SOURCES): Likewise.
1459 (png_mod_CFLAGS): Likewise.
1460 (png_mod_LDFLAGS): Likewise.
1462 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1463 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1464 (video_mod_SOURCES): Added.
1465 (video_mod_CFLAGS): Likewise.
1466 (video_mod_LDFLAGS): Likewise.
1467 (videotest_mod_SOURCES): Likewise.
1468 (videotest_mod_CFLAGS): Likewise.
1469 (videotest_mod_LDFLAGS): Likewise.
1470 (bitmap_mod_SOURCES): Likewise.
1471 (bitmap_mod_CFLAGS): Likewise.
1472 (bitmap_mod_LDFLAGS): Likewise.
1473 (tga_mod_SOURCES): Likewise.
1474 (tga_mod_CFLAGS): Likewise.
1475 (tga_mod_LDFLAGS): Likewise.
1476 (jpeg_mod_SOURCES): Likewise.
1477 (jpeg_mod_CFLAGS): Likewise.
1478 (jpeg_mod_LDFLAGS): Likewise.
1479 (png_mod_SOURCES): Likewise.
1480 (png_mod_CFLAGS): Likewise.
1481 (png_mod_LDFLAGS): Likewise.
1482 (gfxterm_mod_SOURCES): Likewise.
1483 (gfxterm_mod_CFLAGS): Likewise.
1484 (gfxterm_mod_LDFLAGS): Likewise.
1486 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1487 grub/machine/console.h.
1489 2009-01-04 Jerone Young <jerone@gmail.com>
1491 Make on screen instructions clearer
1493 Based on patch created by Jidanni <jidanni@jidanni.org>
1495 * normal/menu.c: print clearer instructions on the screen
1497 2009-01-02 Colin D Bennett <colin@gibibit.com>
1501 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1502 build system and fixed gfxterm.c to work with different sized fonts.
1504 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1506 * configure: Re-generated.
1508 * DISTLIST: Removed font/manager.c.
1510 Added font/font_cmd.c.
1512 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1515 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
1517 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1519 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1521 * normal/menu.c: Likewise.
1523 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1524 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1526 * include/grub/font.h: Replaced with new file.
1528 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1529 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1530 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1531 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1532 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1533 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1534 fg_red, fg_green, fg_blue, fg_alpha.
1535 (grub_video_adapter): Removed blit_glyph.
1536 (grub_video_blit_glyph): Removed.
1538 * font/manager.c: Removed file.
1540 * font/font.c: New file.
1542 * font/font_cmd.c: Likewise.
1544 * video/video.c (grub_video_blit_glyph): Removed.
1546 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1547 (grub_video_vbe_map_rgba): Likewise.
1548 (grub_video_vbe_unmap_color_int): Likewise.
1549 (grub_video_vbe_blit_glyph): Removed.
1550 (grub_video_vbe_adapter): Removed blit_glyph.
1552 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1553 (get_pixel): Likewise.
1554 (set_pixel): Likewise.
1556 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1558 * term/gfxterm.c: Adapted to new font engine.
1560 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
1562 * term/i386/pc/vga.c: Likewise.
1564 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1566 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1568 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1570 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1572 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1574 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1576 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1578 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1580 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1582 * util/grub.d/00_header.in: Changed to use new loadfont command.
1584 * util/grub-mkconfig_lib.in: Changed font extension.
1586 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
1588 * util/getroot.c (grub_util_get_grub_dev): Add support for
1589 /dev/md/dNNpNN style partitionable mdraid devices.
1591 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
1593 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1594 at a time limit of the PXE TFTP API correctly.
1595 (grub_pxefs_close): Likewise.
1597 2008-11-29 Robert Millan <rmh@aybabtu.com>
1599 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1600 grub_ata_device_initialize() calls.
1602 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
1604 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1606 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1608 2008-11-28 Robert Millan <rmh@aybabtu.com>
1610 Fix build on powerpc-ieee1275. Based on patch created by
1611 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1612 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1613 `kern/ieee1275/mmap.c'.
1614 * include/grub/powerpc/ieee1275/memory.h: New file.
1616 Provide grub-install on coreboot.
1617 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1618 (grub_install_SOURCES): New variable.
1619 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1622 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
1624 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1625 to `grub_term_input_t'.
1626 (grub_term_get_current_output): Change return type to
1627 `grub_term_output_t'.
1629 2008-11-22 Robert Millan <rmh@aybabtu.com>
1631 Fix breakage on coreboot due to declaration mismatch.
1632 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1633 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1634 grub_vga_text_cls().
1636 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1637 comments. Avoid copying one more byte than necessary (just in case).
1639 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1640 to 0x200000 (avoids trouble with some OFW implementations, and matches
1641 with the one in Yaboot).
1642 Reported by Manoel Abranches
1644 2008-11-20 Robert Millan <rmh@aybabtu.com>
1646 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1647 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1649 * util/grub-mkconfig_lib.in (grub_warn): New function.
1650 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1651 warnings, to obtain consistent formatting.
1652 * util/grub.d/00_header.in: Likewise.
1653 * util/update-grub_lib.in: Likewise.
1655 * loader/i386/linux.c (allocate_pages): Fix a warning.
1656 Move comment text to `#error' stanza.
1658 Harmonize ieee1275's grub_available_iterate() with the generic
1659 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1660 build problem on i386-ieee1275):
1661 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1662 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1663 parameter `type'. Update all users of this function.
1664 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1665 `kern/ieee1275/mmap.c'.
1666 * kern/ieee1275/init.c
1667 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1669 (grub_machine_mmap_iterate): ... this.
1670 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1671 return type to `grub_err_t'. Update all implementations of this
1673 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1676 Add `lsmmap' command (lists firmware-provided memory map):
1677 * commands/lsmmap.c: New file.
1678 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1679 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1681 * conf/powerpc-ieee1275.rmk: Likewise.
1682 * conf/i386-coreboot.rmk: Likewise.
1683 * conf/i386-ieee1275.rmk: Likewise.
1685 2008-11-19 Robert Millan <rmh@aybabtu.com>
1687 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
1688 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1689 constraints to initrd allocation (based on code from
1690 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1691 for Linux to find it.
1693 2008-11-14 Robert Millan <rmh@aybabtu.com>
1695 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1696 order to cope with duplicate slashes.
1698 2008-11-14 Robert Millan <rmh@aybabtu.com>
1700 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1701 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1702 don't want to mess with lower memory, because it is used in the Linux
1705 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
1706 an appropriate place in lower memory, between 0x10000 and 0x90000,
1707 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1708 is in our heap (probably as a result of it being corrupted during
1709 decompression). Add #error instance with comment to explain why this
1710 loader isn't currently usable on PC/BIOS.
1712 2008-11-14 Robert Millan <rmh@aybabtu.com>
1714 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
1715 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
1717 2008-11-12 Robert Millan <rmh@aybabtu.com>
1719 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1721 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1722 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1724 * include/grub/i386/pc/memory.h: ... to here.
1726 2008-11-12 Robert Millan <rmh@aybabtu.com>
1728 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1731 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1732 (grub_console_cur_color, grub_console_real_putchar)
1733 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1734 (grub_console_setcolorstate, grub_console_setcolor)
1735 (grub_console_getcolor): Move from here ...
1736 * include/grub/i386/vga_common.h: ... to here (new file).
1738 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1739 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1741 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1742 `<grub/i386/vga_common.h>'.
1744 2008-11-12 Robert Millan <rmh@aybabtu.com>
1746 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1747 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1748 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1750 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1751 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1753 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1754 grub_console_init() with call to grub_vga_text_init().
1755 (grub_machine_fini): Replace call to
1756 grub_console_fini() with call to grub_vga_text_fini() and
1757 grub_at_keyboard_fini().
1759 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1760 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1761 (grub_console_setcolorstate, grub_console_setcolor)
1762 (grub_console_getcolor): New function prototypes.
1764 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1765 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1766 (grub_vga_text_setcursor): Static-ize.
1767 (grub_vga_text_term): New structure.
1768 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1770 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1771 (grub_console_cur_color, grub_console_standard_color)
1772 (grub_console_normal_color, grub_console_highlight_color)
1773 (map_char, grub_console_putchar, grub_console_getcharwidth)
1774 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1775 (grub_console_getcolor): Move from here ...
1776 * term/i386/vga_common.c: ... to here (same function names).
1778 2008-11-12 Robert Millan <rmh@aybabtu.com>
1780 Use newly-added Multiboot support in coreboot.
1782 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1783 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1785 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1786 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1787 (codestart): Store the MBI in `startup_multiboot_info' when we're
1788 being loaded using Multiboot.
1790 * kern/i386/coreboot/init.c (grub_machine_init): Move
1791 grub_at_keyboard_init() call to beginning of function (useful for
1792 debugging). Call grub_machine_mmap_init() before attempting to use
1793 grub_machine_mmap_iterate().
1794 (grub_lower_mem, grub_upper_mem): Move from here ...
1795 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1798 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1801 2008-11-12 Robert Millan <rmh@aybabtu.com>
1803 Fix a regression introduced by the at_keyboard.mod split. Because
1804 some terminals are default on some platforms and non-default on
1805 others, the first terminal being registered determines which is
1806 going to be default.
1808 * kern/term.c (grub_term_register_input): If this is the first
1809 terminal being registered, set it as the current one.
1810 (grub_term_register_output): Likewise.
1812 * term/efi/console.c (grub_console_init): Do not call
1813 grub_term_set_current_output() or grub_term_set_current_input().
1814 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1815 * term/i386/pc/console.c (grub_console_init): Likewise.
1816 (grub_console_fini): Do not call grub_term_set_current_input()
1817 (but leave grub_term_set_current_output() to restore text mode).
1819 2008-11-10 Robert Millan <rmh@aybabtu.com>
1821 * util/grub.d/00_header.in: Add backward compatibility check for
1822 versions of terminal.mod that don't understand `terminal_input' or
1825 2008-11-09 Robert Millan <rmh@aybabtu.com>
1827 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1828 `terminal_input' / `terminal_output', not `terminal'.
1830 2008-11-08 Robert Millan <rmh@aybabtu.com>
1832 * Makefile.in (include_DATA): Fix srcdir=. assumption.
1833 (DISTCLEANFILES): Add `build_env.mk'.
1835 2008-11-08 Robert Millan <rmh@aybabtu.com>
1837 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
1838 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1839 members. Update all users.
1840 * util/console.c (grub_ncurses_term): Split in ...
1841 (grub_ncurses_term_input): ... this, and ...
1842 (grub_ncurses_term_output): ... this. Update all users.
1843 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
1845 2008-11-08 Robert Millan <rmh@aybabtu.com>
1847 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1848 (PKGDATA): Add $(pkgdata_SRCDIR).
1849 (pkglib_BUILDDIR): New variable.
1850 (pkgdata_SRCDIR): New variable.
1851 (build_env.mk): New target.
1852 (include_DATA): New variable.
1853 (install-local): Install $(include_DATA) files in $(includedir).
1855 2008-11-07 Pavel Roskin <proski@gnu.org>
1857 * gendistlist.sh: Use C locale for sorting to ensure consistent
1858 output on all systems.
1860 * util/grub.d/00_header.in: Remove incorrect space before
1863 2008-11-07 Robert Millan <rmh@aybabtu.com>
1865 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1867 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1868 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1869 (based on find_multi_boot1_header).
1870 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1871 using find_multi_boot2_header(), and abort if neither Multiboot or
1872 Multiboot headers were found.
1874 2008-11-07 Robert Millan <rmh@aybabtu.com>
1876 Modularize at_keyboard.mod:
1878 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1879 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1880 (at_keyboard_mod_LDFLAGS): New variables.
1882 Actual terminal split:
1884 * include/grub/term.h (struct grub_term): Split in ...
1885 (struct grub_term_input): ... this, and ...
1886 (struct grub_term_output): ... this. Update all users.
1887 (grub_term_set_current): Split in ...
1888 (grub_term_set_current_input): ... this, and ...
1889 (grub_term_set_current_output): ... this.
1890 (grub_term_get_current): Split in ...
1891 (grub_term_get_current_input): ... this, and ...
1892 (grub_term_get_current_output): ... this.
1893 (grub_term_register): Split in ...
1894 (grub_term_register_input): ... this, and ...
1895 (grub_term_register_output): ... this.
1896 (grub_term_unregister): Split in ...
1897 (grub_term_unregister_input): ... this, and ...
1898 (grub_term_unregister_output): ... this.
1899 (grub_term_iterate): Split in ...
1900 (grub_term_iterate_input): ... this, and ...
1901 (grub_term_iterate_output): ... this.
1903 * kern/term.c (grub_term_list): Split in ...
1904 (grub_term_list_input): ... this, and ...
1905 (grub_term_list_output): ... this. Update all users.
1906 (grub_cur_term): Split in ...
1907 (grub_cur_term_input): ... this, and ...
1908 (grub_cur_term_output): ... this. Update all users.
1909 (grub_term_set_current): Split in ...
1910 (grub_term_set_current_input): ... this, and ...
1911 (grub_term_set_current_output): ... this.
1912 (grub_term_get_current): Split in ...
1913 (grub_term_get_current_input): ... this, and ...
1914 (grub_term_get_current_output): ... this.
1915 (grub_term_register): Split in ...
1916 (grub_term_register_input): ... this, and ...
1917 (grub_term_register_output): ... this.
1918 (grub_term_unregister): Split in ...
1919 (grub_term_unregister_input): ... this, and ...
1920 (grub_term_unregister_output): ... this.
1921 (grub_term_iterate): Split in ...
1922 (grub_term_iterate_input): ... this, and ...
1923 (grub_term_iterate_output): ... this.
1925 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1926 a check for input and one for output (and only attempt to get keys
1927 from user when input works).
1929 * util/grub-probe.c (grub_term_get_current): Split in ...
1930 (grub_term_get_current_input): ... this, and ...
1931 (grub_term_get_current_output): ... this.
1932 * util/grub-fstest.c: Likewise.
1933 * util/i386/pc/grub-setup.c: Likewise.
1934 * util/grub-editenv.c: Likewise.
1936 Portability adjustments:
1938 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1939 `term/i386/pc/at_keyboard.c'.
1940 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1941 grub_keyboard_controller_init() (now handled by terminal .init).
1942 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1943 grub_at_keyboard_init().
1944 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1945 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1946 at_keyboard.mod via input terminal interface).
1947 * include/grub/i386/coreboot/console.h: Convert into a stub for
1948 `<grub/i386/pc/console.h>'.
1950 Migrate full terminals to new API:
1952 * term/efi/console.c (grub_console_term): Split into ...
1953 (grub_console_term_input): ... this, and ...
1954 (grub_console_term_output): ... this. Update all users.
1955 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1956 (grub_ofconsole_init): Split into ...
1957 (grub_ofconsole_init_input): ... this, and ...
1958 (grub_ofconsole_init_output): ... this.
1959 (grub_ofconsole_term): Split into ...
1960 (grub_ofconsole_term_input): ... this, and ...
1961 (grub_ofconsole_term_output): ... this. Update all users.
1962 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1963 (grub_serial_term_input): ... this, and ...
1964 (grub_serial_term_output): ... this. Update all users.
1965 * term/i386/pc/console.c (grub_console_term): Split into ...
1966 (grub_console_term_input): ... this, and ...
1967 (grub_console_term_output): ... this. Update all users.
1968 (grub_console_term_input): Only enable it on PC/BIOS platform.
1969 (grub_console_init): Remove grub_keyboard_controller_init() call.
1971 Migrate input terminals to new API:
1973 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1974 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1975 i386-specific anyway).
1976 (grub_console_checkkey): Rename to ...
1977 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1979 (grub_keyboard_controller_orig): New variable.
1980 (grub_console_getkey): Rename to ...
1981 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1983 (grub_keyboard_controller_init): Static-ize. Save original
1984 controller value so that it can be restored ...
1985 (grub_keyboard_controller_fini): ... here (new function).
1986 (grub_at_keyboard_term): New structure.
1987 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1990 Migrate output terminals to new API:
1992 * term/i386/pc/vga.c (grub_vga_term): Change type to
1993 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1994 members. Update all users.
1995 * term/gfxterm.c (grub_video_term): Change type to
1996 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1997 members. Update all users.
1998 * include/grub/i386/pc/console.h (grub_console_checkkey)
1999 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2002 Migrate `terminal' command and userland tools to new API:
2004 * commands/terminal.c (grub_cmd_terminal): Split into ...
2005 (grub_cmd_terminal_input): ... this, and ...
2006 (grub_cmd_terminal_output): ... this.
2007 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2008 `terminal_input' and `terminal_output'.
2009 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2010 `terminal_input' / `terminal_output' API.
2011 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2012 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2013 provided ${GRUB_TERMINAL}, convert it).
2015 2008-11-04 Robert Millan <rmh@aybabtu.com>
2017 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2019 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2021 2008-11-03 Bean <bean123ch@gmail.com>
2023 * kern/elf.c (grub_elf32_load): Revert to previous code.
2024 (grub_elf64_load): Likewise.
2026 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2028 2008-11-01 Robert Millan <rmh@aybabtu.com>
2030 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2031 (TARGET_CPPFLAGS): Likewise.
2032 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2034 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2036 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2038 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2040 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2041 addition of objects until the code is not going to be able to fail.
2043 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2045 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2046 (add a missing NULL check, and correct them by moving the pointer
2047 operations after the actual check).
2049 2008-10-29 Robert Millan <rmh@aybabtu.com>
2051 * util/i386/pc/grub-install.in: Handle empty string as output from
2052 make_system_path_relative_to_its_root().
2054 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2056 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2057 circular metadata worst case scenario. If the metadata is circular
2058 then copy the wrap in place.
2059 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2060 project lib/format_text/layout.h
2061 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2063 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2065 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2067 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2069 * util/update-grub_lib.in: Mention filename in warning message.
2071 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2073 * NEWS: Update for rename of update-grub to grub-mkconfig.
2075 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2077 * util/update-grub_lib.in: Copy to ...
2078 * util/grub-mkconfig_lib.in: ... this. Update all users.
2079 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2080 * util/update-grub.in: Rename to ...
2081 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2082 option. Add `--output' option to allow users to specify the generated
2083 configuration file. Default to stdout.
2084 (update_grub_dir): Rename to ...
2085 (grub_mkconfig_dir): ... this.
2086 (grub_cfg): Default to an empty string.
2087 * conf/common.rmk (update-grub): Rename to ...
2088 (grub-mkconfig): ... this.
2089 (update-grub_lib): Copy to ...
2090 (grub-mkconfig_lib): ... this.
2091 (update-grub_SCRIPTS): Copy to ...
2092 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2093 (update-grub_DATA): Rename to ...
2094 (grub-mkconfig_DATA): ... this.
2096 2008-09-28 Robert Millan <rmh@aybabtu.com>
2098 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2099 to `modified'. Add the real `created' field.
2100 (grub_iso9660_uuid): Use `modified' rather than `created' for
2101 constructing the UUID.
2103 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2105 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2106 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2108 2008-09-28 Bean <bean123ch@gmail.com>
2110 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2111 Thanks to Christian Franke for finding this bug.
2113 2008-09-25 Robert Millan <rmh@aybabtu.com>
2115 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2116 instances of grub_util_get_disk_name() (see previous commit).
2118 2008-09-25 Robert Millan <rmh@aybabtu.com>
2120 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2121 `util/i386/get_disk_name.c'.
2122 * conf/i386-efi.rmk: Likewise.
2123 * conf/x86_64-efi.rmk: Likewise.
2124 * conf/i386-coreboot.rmk: Likewise.
2125 * conf/i386-ieee1275.rmk: Likewise.
2126 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2127 `util/ieee1275/get_disk_name.c'.
2128 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2129 * util/ieee1275/get_disk_name.c: Remove file.
2130 * util/i386/get_disk_name.c: Remove file.
2131 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2132 "hd%d" for device.map entries, rather than using
2133 grub_util_get_disk_name().
2135 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2137 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2139 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2141 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2143 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2145 (GRUB_TERM_PPAGE): Changed to 0x4900.
2147 2008-09-24 Robert Millan <rmh@aybabtu.com>
2149 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2150 macros (they were i386-pc specific).
2151 * include/grub/sparc64/ieee1275/console.h: Likewise.
2152 * include/grub/efi/console.h: Likewise.
2154 2008-09-22 Bean <bean123ch@gmail.com>
2156 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2157 resident and in attribute list.
2159 * include/grub/ntfs.h (BMP_LEN): Removed.
2161 2008-09-22 Bean <bean123ch@gmail.com>
2163 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2164 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2166 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2167 error occurs, as grub_disk_open will call grub_disk_close, which will
2168 call p->close (scsi).
2170 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2172 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2173 (AC_PREREQ): Bumped to 2.59.
2174 (AC_TRY_COMPILE): Replace obsolete macro with ...
2175 (AC_COMPILE_IFELSE): ... this.
2176 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2177 (AC_LINK_IFELSE): ... this.
2179 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2181 * autogen.sh: Add a call to `gendistlist.sh'.
2183 2008-09-19 Christian Franke <franke@computer.org>
2185 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2186 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2187 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2188 Export __enable_execute_stack() to modules.
2189 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2192 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2194 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2197 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2199 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2200 #include <grub/util/hostdisk.h>.
2202 2008-09-08 Robert Millan <rmh@aybabtu.com>
2204 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2205 segments when their filesz is zero (grub_file_read() interprets
2206 zero-size as "read until EOF", which results in memory corruption).
2207 Use `lowest_segment' rather than 0 for calculating the current
2208 segment load address.
2210 2008-09-08 Robert Millan <rmh@aybabtu.com>
2212 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2213 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2214 clobbered useful information.
2216 2008-09-08 Robert Millan <rmh@aybabtu.com>
2218 * include/grub/util/biosdisk.h: Move to ...
2219 * include/grub/util/hostdisk.h: ... here. Update all users.
2220 * util/biosdisk.c: Move to ...
2221 * util/hostdisk.c: ... here. Update all users.
2223 2008-09-07 Robert Millan <rmh@aybabtu.com>
2225 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2227 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2228 and length can be stored directly in the `mbi->mmap_addr' and
2229 `mbi->mmap_length' struct fields.
2231 2008-09-07 Robert Millan <rmh@aybabtu.com>
2233 * conf/i386.rmk: New file. Provides declaration for building
2235 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2236 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2238 Include `conf/i386.mk'.
2239 * conf/i386-efi.rmk: Likewise.
2240 * conf/x86_64-efi.rmk: Likewise.
2241 * conf/i386-coreboot.rmk: Likewise.
2242 * conf/i386-ieee1275.rmk: Likewise.
2244 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2246 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2247 Adds optimization support for BGR based modes.
2249 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2250 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2251 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2252 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2253 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2254 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2255 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2256 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2257 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2258 (grub_video_i386_vbeblit_index_index): Likewise.
2259 (grub_video_i386_vbeblit_replace_directN): Added.
2260 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2261 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2262 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2263 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2264 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2265 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2266 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2267 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2268 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2269 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2270 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2271 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2272 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2274 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2275 (grub_video_i386_vbefill_R8G8B8): Likewise.
2276 (grub_video_i386_vbefill_index): Likewise.
2277 (grub_video_i386_vbefill_direct32): Added.
2278 (grub_video_i386_vbefill_direct24): Likewise.
2279 (grub_video_i386_vbefill_direct16): Likewise.
2280 (grub_video_i386_vbefill_direct8): Likewise.
2282 * include/grub/video.h (grub_video_blit_format): Removed
2283 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2284 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2285 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2286 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2287 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2289 * video/video.c (grub_video_get_blit_format): Updated to use new
2290 blit formats. Added handling for 16 bit color modes.
2292 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2294 (common_blitter): Updated to use new blitters.
2296 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2298 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2299 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2300 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2301 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2302 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2303 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2304 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2305 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2306 (grub_video_i386_vbeblit_index_index): Likewise.
2307 (grub_video_i386_vbeblit_replace_directN): Added.
2308 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2309 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2310 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2311 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2312 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2313 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2314 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2315 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2316 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2317 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2318 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2319 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2320 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2322 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2323 (grub_video_i386_vbefill_R8G8B8): Likewise.
2324 (grub_video_i386_vbefill_index): Likewise.
2325 (grub_video_i386_vbefill_direct32): Added.
2326 (grub_video_i386_vbefill_direct24): Likewise.
2327 (grub_video_i386_vbefill_direct16): Likewise.
2328 (grub_video_i386_vbefill_direct8): Likewise.
2330 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2333 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2336 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2339 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2342 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2344 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2347 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2349 * fs/iso9660.c (grub_iso9660_date): New structure.
2350 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2351 (grub_iso9660_uuid): New function.
2353 2008-09-05 Bean <bean123ch@gmail.com>
2355 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2357 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2358 insensitive bit for names in Win32 and Win32 & DOS namespace.
2360 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2362 * include/grub/types.h (LONG_MAX): Likewise.
2364 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2366 * util/getroot.c: Include <config.h>.
2367 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2368 add support for /dev/md/N devices and handle LVM double dash escaping.
2370 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2372 * config.guess: Update to latest version from config git.
2373 * config.sub: Likewise.
2375 2008-09-03 Robert Millan <rmh@aybabtu.com>
2377 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2378 `disk->total_sectors'.
2380 2008-09-01 Colin D Bennett <colin@gibibit.com>
2382 * include/grub/normal.h: Fixed incorrect comment for
2383 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2385 2008-09-01 Colin D Bennett <colin@gibibit.com>
2387 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2388 values with defines.
2390 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2391 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2392 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2393 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2394 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2395 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2396 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2397 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2398 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2399 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2400 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2401 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2402 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2403 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2404 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2405 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2406 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2407 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2408 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2410 2008-08-31 Robert Millan <rmh@aybabtu.com>
2412 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2414 (grub_multiboot): Fix a few warnings.
2416 2008-08-31 Robert Millan <rmh@aybabtu.com>
2418 * loader/i386/pc/multiboot.c: Update comment not to say that
2419 boot_device support is unimplemented.
2421 2008-08-31 Robert Millan <rmh@aybabtu.com>
2423 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2424 or memory map support are unimplemented.
2426 2008-08-31 Colin D Bennett <colin@gibibit.com>
2428 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2430 2008-08-31 Colin D Bennett <colin@gibibit.com>
2432 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2433 total video memory in 'vbeinfo' output; show color format details for
2436 2008-08-30 Pavel Roskin <proski@gnu.org>
2438 * util/genmoddep.c: Remove for real this time.
2439 * DISTLIST: Remove util/genmoddep.c.
2441 2008-08-30 Robert Millan <rmh@aybabtu.com>
2443 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2444 as required by Multiboot spec (it was already 4-byte aligned, but
2447 2008-08-29 Pavel Roskin <proski@gnu.org>
2449 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2450 * kern/powerpc/ieee1275/startup.S: ... this.
2451 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2452 * DISTLIST: Likewise.
2454 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2455 grub/cpu/kernel.h. Add start label for consistency with other
2456 platforms. Add grub_prefix immediately after start. Add jump
2457 to the code after grub_prefix.
2458 * include/grub/powerpc/kernel.h: Provide valid values for
2459 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2461 2008-08-29 Bean <bean123ch@gmail.com>
2463 * configure.ac: Change host_os to cygwin for mingw.
2464 (asprintf): New check for function.
2466 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2467 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2469 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2470 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2471 sync, sleep and grub_util_get_disk_size for mingw.
2473 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2474 to get size in mingw.
2475 (open_device): Use flag O_BINARY if it's defined.
2476 (find_root_device): Add dummy code for mingw.
2478 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2479 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2480 (get_scsi_disk_name): Return 0 for mingw.
2482 * util/hostfs.c: #include <grub/util/misc.h>.
2483 (grub_hostfs_open): Use "rb" flag to open file, use
2484 grub_util_get_disk_size to get disk size for mingw.
2486 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2487 (asprintf): New function if HAVE_ASPRINTF is not set.
2488 (sync): New function for mingw.
2490 (grub_util_get_disk_size): Likewise.
2492 2008-08-28 Pavel Roskin <proski@gnu.org>
2494 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2497 2008-08-28 Robert Millan <rmh@aybabtu.com>
2499 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2501 2008-08-28 Robert Millan <rmh@aybabtu.com>
2503 Change find_grub_drive() syntax so it doesn't prevent it from
2504 detecting NULL names as errors.
2506 * util/biosdisk.c (find_grub_drive): Move free slot search code
2508 (find_free_slot): ... to here.
2509 (read_device_map): Use find_free_slot() to search for free slots.
2511 2008-08-27 Marco Gerards <marco@gnu.org>
2513 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2514 (scsi_mod_SOURCES): New variable.
2515 (scsi_mod_CFLAGS): Likewise
2516 (scsi_mod_LDFLAGS): Likewise.
2518 * disk/scsi.c: New file.
2520 * include/grub/scsi.h: Likewise.
2522 * include/grub/scsicmd.h: Likewise.
2524 * disk/ata.c: Include <grub/scsi.h>.
2525 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2527 (grub_ata_iterate): Skip ATAPI devices.
2528 (grub_ata_open): Only handle ATAPI devices.
2529 (struct grub_atapi_read): Removed.
2530 (grub_atapi_readsector): Likewise.
2531 (grub_ata_read): No longer handle ATAPI devices.
2532 (grub_ata_write): Likewise.
2533 (grub_atapi_iterate): New function.
2534 (grub_atapi_read): Likewise.
2535 (grub_atapi_write): Likewise.
2536 (grub_atapi_open): Likewise.
2537 (grub_atapi_close): Likewise.
2538 (grub_atapi_dev): New variable.
2539 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2540 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2542 * include/grub/disk.h (enum grub_disk_dev_id): Add
2543 `GRUB_DISK_DEVICE_SCSI_ID'.
2545 2008-08-26 Robert Millan <rmh@aybabtu.com>
2547 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2548 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2551 2008-08-23 Bean <bean123ch@gmail.com>
2553 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2554 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2555 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2556 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2558 (raid5rec_mod_SOURCES): New macro.
2559 (raid5rec_mod_CFLAGS): Likewise.
2560 (raid5rec_mod_LDFLAGS): Likewise.
2561 (raid6rec_mod_SOURCES): Likewise.
2562 (raid6rec_mod_CFLAGS): Likewise.
2563 (raid6rec_mod_LDFLAGS): Likewise.
2564 (mdraid_mod_SOURCES): Likewise.
2565 (mdraid_mod_CFLAGS): Likewise.
2566 (mdraid_mod_LDFLAGS): Likewise.
2567 (dm_nv_mod_SOURCES): Likewise.
2568 (dm_nv_mod_CFLAGS): Likewise.
2569 (dm_nv_mod_LDFLAGS): Likewise.
2571 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2572 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2573 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2575 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2576 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2578 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2580 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2582 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2586 * disk/raid5_recover.c: New file.
2588 * disk/raid6_recover.c: Likewise.
2590 * disk/mdraid_linux.c: Likewise.
2592 * disk/dmraid_nvidia.c: Likewise.
2594 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2597 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2598 calculate the size of raid device.
2599 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2600 different layout of raid5.
2601 (grub_raid_scan_device): Remove code specific to mdraid.
2602 (grub_raid_list): New variable.
2603 (free_array): New function.
2604 (grub_raid_register): Likewise.
2605 (grub_raid_unregister): Likewise.
2606 (grub_raid_rescan): Likewise.
2607 (GRUB_MOD_INIT): Don't iterate device here.
2608 (GRUB_MOD_FINI): Use free_array to release resource.
2610 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2611 (grub_raid5_recover_func_t): New function variable type.
2612 (grub_raid6_recover_func_t): Likewise.
2613 (grub_raid5_recover_func): New variable.
2614 (grub_raid6_recover_func): Likewise.
2615 (grub_raid_register): New function.
2616 (grub_raid_unregister): Likewise.
2617 (grub_raid_rescan): Likewise.
2618 (grub_raid_block_xor): Likewise.
2620 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2621 (CMD_CRC): New macro.
2623 (read_file): Handle device as well as file.
2624 (cmd_crc): New function.
2625 (fstest): Handle multiple disks.
2626 (options): Remove part, raw and long, add root and diskcount.
2627 (usage): Add crc, remove -p, -r, -l, add -r and -c.
2628 (main): Find the first non option entry and ignore subsequent options,
2629 add handling for the new options, support multiple disks.
2631 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2633 2008-08-23 Bean <bean123ch@gmail.com>
2635 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2637 * genfslist.sh: Ignore kernel.mod.
2639 * genpartmaplist.sh: Likewise.
2641 2008-08-23 Robert Millan <rmh@aybabtu.com>
2643 * util/getroot.c (find_root_device): Skip anything that starts with
2644 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2646 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
2648 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2649 * util/grub.d/00_header.in: Allow the administrator to change default
2650 gfxmode via ${GRUB_GFXMODE}.
2652 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
2654 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2656 2008-08-21 Robert Millan <rmh@aybabtu.com>
2658 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2660 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2661 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2663 2008-08-20 Carles Pina i Estany <carles@pina.cat>
2665 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2666 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2668 2008-08-19 Robert Millan <rmh@aybabtu.com>
2670 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2671 (struct grub_virtual_screen): Remove `cursor_color'.
2672 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2674 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2676 2008-08-18 Robert Millan <rmh@aybabtu.com>
2678 Unify (identical) linux_normal.c files.
2679 * loader/i386/efi/linux_normal.c: Move from here ...
2680 * loader/linux_normal.c: ... to here. Update all users.
2681 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2682 * loader/i386/ieee1275/linux_normal.c: Likewise.
2684 2008-08-18 Robert Millan <rmh@aybabtu.com>
2686 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2687 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2688 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2689 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2690 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2692 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2693 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2694 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2695 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2696 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2697 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2698 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2699 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2700 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2701 portably using grub_getxy().
2702 Replace `-EFI' with `-bzImage' in boot message.
2704 2008-08-17 Robert Millan <rmh@aybabtu.com>
2706 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2708 2008-08-17 Robert Millan <rmh@aybabtu.com>
2710 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2712 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2713 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2714 (grub_machine_mmap_iterate): New function declaration.
2715 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2717 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2720 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2721 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2722 Move e820 parsing from here ...
2723 * kern/i386/pc/mmap.c: New file.
2724 (grub_machine_mmap_iterate): ... to here.
2726 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2727 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2728 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2729 (grub_available_iterate): Redeclare to return `void', and redeclare
2730 its hook to use grub_uint64_t as addr and size parameters, and rename
2732 (grub_machine_mmap_iterate): ... this. Update all users.
2734 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2735 to make it more readable. Rename to ...
2736 (grub_machine_mmap_iterate): ... this.
2738 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2739 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2740 (grub_multiboot): Allocate an extra region after the payload, and fill
2741 it with a Multiboot memory map. Adjust a.out loader to calculate size
2742 with the extra space.
2743 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2744 with the extra space.
2746 2008-08-17 Carles Pina i Estany <carles@pina.cat>
2748 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
2750 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
2752 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2753 mdate-sh to the list `find' searches for.
2754 * DISTLIST: Regenerated.
2756 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
2758 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2759 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
2760 genmoddep.awk, gensymlist.sh.in.
2761 (DISTDIRS): Add bus, docs, hook, lib.
2762 * DISTLIST: Regenerated.
2763 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
2765 2008-08-16 Robert Millan <rmh@aybabtu.com>
2767 * disk/raid.c (grub_raid_init): Handle/report errors set by
2768 grub_device_iterate().
2769 * disk/lvm.c (grub_lvm_init): Likewise.
2771 2008-08-15 Bean <bean123ch@gmail.com>
2773 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2775 (datetime_mod_SOURCES): New macro.
2776 (datetime_mod_CFLAGS): Likewise.
2777 (datetime_mod_LDFLAGS): Likewise.
2778 (date_mod_SOURCES): Likewise.
2779 (date_mod_CFLAGS): Likewise.
2780 (date_mod_LDFLAGS): Likewise.
2781 (datehook_mod_SOURCES): Likewise.
2782 (datehook_mod_CFLAGS): Likewise.
2783 (datehook_mod_LDFLAGS): Likewise.
2785 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2787 (datetime_mod_SOURCES): New macro.
2788 (datetime_mod_CFLAGS): Likewise.
2789 (datetime_mod_LDFLAGS): Likewise.
2790 (date_mod_SOURCES): Likewise.
2791 (date_mod_CFLAGS): Likewise.
2792 (date_mod_LDFLAGS): Likewise.
2793 (datehook_mod_SOURCES): Likewise.
2794 (datehook_mod_CFLAGS): Likewise.
2795 (datehook_mod_LDFLAGS): Likewise.
2797 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2799 (datetime_mod_SOURCES): New macro.
2800 (datetime_mod_CFLAGS): Likewise.
2801 (datetime_mod_LDFLAGS): Likewise.
2802 (date_mod_SOURCES): Likewise.
2803 (date_mod_CFLAGS): Likewise.
2804 (date_mod_LDFLAGS): Likewise.
2805 (datehook_mod_SOURCES): Likewise.
2806 (datehook_mod_CFLAGS): Likewise.
2807 (datehook_mod_LDFLAGS): Likewise.
2809 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2811 (datetime_mod_SOURCES): New macro.
2812 (datetime_mod_CFLAGS): Likewise.
2813 (datetime_mod_LDFLAGS): Likewise.
2814 (date_mod_SOURCES): Likewise.
2815 (date_mod_CFLAGS): Likewise.
2816 (date_mod_LDFLAGS): Likewise.
2817 (datehook_mod_SOURCES): Likewise.
2818 (datehook_mod_CFLAGS): Likewise.
2819 (datehook_mod_LDFLAGS): Likewise.
2821 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2823 (datetime_mod_SOURCES): New macro.
2824 (datetime_mod_CFLAGS): Likewise.
2825 (datetime_mod_LDFLAGS): Likewise.
2826 (date_mod_SOURCES): Likewise.
2827 (date_mod_CFLAGS): Likewise.
2828 (date_mod_LDFLAGS): Likewise.
2829 (datehook_mod_SOURCES): Likewise.
2830 (datehook_mod_CFLAGS): Likewise.
2831 (datehook_mod_LDFLAGS): Likewise.
2833 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2835 * commands/date.c: New file.
2837 * hook/datehook.c: Likewise.
2839 * include/grub/lib/datetime.h: Likewise.
2841 * include/grub/i386/cmos.h: Likewise.
2843 * lib/datetime.c: Likewise.
2845 * lib/i386/datetime.c: Likewise.
2847 * lib/efi/datetime.c: Likewise.
2849 2008-08-14 Robert Millan <rmh@aybabtu.com>
2851 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2852 (grub_mkelfimage_SOURCES): New variable.
2853 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2855 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2856 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2857 * conf/powerpc-ieee1275.rmk: Likewise.
2858 * conf/i386-ieee1275.rmk: Likewise.
2860 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2861 * kern/i386/coreboot/init.c: Likewise.
2863 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2864 with `<grub/cpu/kernel.h>'.
2865 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2867 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2868 * kern/i386/coreboot/startup.S: Likewise.
2870 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2871 (GRUB_MOD_GAP): Remove.
2872 * include/grub/powerpc/kernel.h: New file.
2873 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2874 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2875 * include/grub/i386/kernel.h: New file.
2876 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2877 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2878 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2880 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2882 Use --directory when invoking grub_mkimage.
2884 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2885 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2886 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2887 and GRUB_KERNEL_CPU_PREFIX.
2889 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
2891 * include/grub/err.h (grub_err_printf): New function prototype.
2892 * util/misc.c (grub_err_printf): New function.
2893 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2895 * kern/err.c (grub_print_error): Use grub_err_printf.
2897 2008-08-13 Robert Millan <rmh@aybabtu.com>
2899 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2901 2008-08-13 Robert Millan <rmh@aybabtu.com>
2903 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2906 2008-08-12 Robert Millan <rmh@aybabtu.com>
2908 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2909 of the relocation code from here ...
2910 (grub_multiboot): ... to here.
2911 (forward_relocator, backward_relocator): Move from here ...
2912 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2913 (grub_multiboot_backward_relocator): ... to here.
2914 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2915 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2916 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2917 (grub_multiboot_forward_relocator_end)
2918 (grub_multiboot_backward_relocator)
2919 (grub_multiboot_backward_relocator_end): New variables.
2921 2008-08-12 Bean <bean123ch@gmail.com>
2923 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2925 2008-08-11 Robert Millan <rmh@aybabtu.com>
2927 * kern/i386/linuxbios/startup.S: Move from here ...
2928 * kern/i386/coreboot/startup.S: ... to here.
2930 * kern/i386/linuxbios/init.c: Move from here ...
2931 * kern/i386/coreboot/init.c: ... to here.
2933 * kern/i386/linuxbios/table.c: Move from here ...
2934 * kern/i386/coreboot/mmap.c: ... to here.
2936 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2938 2008-08-11 Robert Millan <rmh@aybabtu.com>
2940 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2941 errors. Leave it to the upper layer to handle them.
2943 2008-08-09 Christian Franke <franke@computer.org>
2945 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2946 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2947 Install `grub.d/10_windows' only on Cygwin.
2948 * configure.ac: Add subst of `target_os'.
2949 Check `target_os' also before setting TARGET_OBJ2ELF.
2950 Add `--enable-grub-pe2elf'.
2952 2008-08-08 Robert Millan <rmh@aybabtu.com>
2954 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2955 (grub_last_time): Change type to grub_uint64_t.
2956 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2957 (grub_disk_close): Likewise.
2959 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2960 (run_menu): Migrate code from to using grub_get_time_ms().
2962 * util/misc.c (grub_get_time_ms): New function.
2964 2008-08-08 Marco Gerards <marco@gnu.org>
2966 * disk/ata.c (grub_ata_regget): Change return type to
2968 (grub_ata_regget2): Likewise.
2969 (grub_ata_wait_status): New function.
2970 (grub_ata_wait_busy): Removed function, updated all users to use
2971 `grub_ata_wait_status'.
2972 (grub_ata_wait_drq): Likewise.
2973 (grub_ata_cmd): New function.
2974 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2976 (grub_ata_pio_write): Add error handling.
2977 (grub_atapi_identify): Likewise.
2978 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2980 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2981 handling. Actually use the detected registers. Reorder the
2982 detection logic such that it is easier to read.
2983 (grub_ata_pciinit): Do not assign the same ID to each controller.
2984 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2986 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2988 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2990 2008-08-08 Marco Gerards <marco@gnu.org>
2994 2008-08-07 Bean <bean123ch@gmail.com>
2996 * include/grub/x86_64/pci.h: New file.
2998 2008-08-07 Christian Franke <franke@computer.org>
3000 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3001 (TIMER2_GATE): Likewise.
3002 (grub_pit_wait): Add enable/disable of the timer2 gate
3003 bit of port 0x61. This fixes a possible infinite loop.
3005 2008-08-07 Bean <bean123ch@gmail.com>
3007 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3008 kern/i386/tsc.c and kern/i386/pit.c.
3010 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3013 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3016 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3018 2008-08-07 Bean <bean123ch@gmail.com>
3020 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3022 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3024 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3025 multiple inclusion. Add #include <grub/types.h>.
3027 2008-08-06 Christian Franke <franke@computer.org>
3029 * conf/common.rmk: Build and install `10_windows'.
3030 * util/grub.d/10_windows.in: New script.
3032 2008-08-06 Pavel Roskin <proski@gnu.org>
3034 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3036 2008-08-06 Robert Millan <rmh@aybabtu.com>
3038 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3039 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3041 2008-08-06 Bean <bean123ch@gmail.com>
3043 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3044 (grub_pxefs_fs_int): Remove dummy definition.
3045 (grub_pxefs_open): Use data->block_size to store the current block
3047 (grub_pxefs_read): Use block size stored in data->block_size. As the
3048 value of grub_pxe_blksize can be changed after the file is opened.
3050 2008-08-06 Bean <bean123ch@gmail.com>
3052 * fs/i386/pc/pxe.c (curr_file): new variable.
3053 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3054 require the dummy internal file system anymore.
3055 (grub_pxefs_read): Removed.
3056 (grub_pxefs_close): Likewise.
3057 (grub_pxefs_fs_int): Likewise.
3058 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3059 connection when we switch file.
3060 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3062 2008-08-06 Robert Millan <rmh@aybabtu.com>
3064 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3066 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3067 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3069 * kern/i386/halt.c: New file.
3070 * kern/i386/reboot.c: Likewise.
3071 * include/grub/i386/reboot.h: Likewise.
3072 * include/grub/i386/halt.h: Likewise.
3074 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3075 Include `<grub/cpu/halt.h>'.
3076 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3077 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3079 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3080 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3081 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3082 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3083 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3084 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3086 * include/grub/i386/at_keyboard.h: ... to here.
3088 2008-08-05 Robert Millan <rmh@aybabtu.com>
3090 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3091 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3092 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3093 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3094 `kern/generic/millisleep.c'.
3096 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3097 instead of grub_get_rtc().
3098 (grub_tsc_init): Initialize `tsc_boot_time'.
3100 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3101 (grub_machine_init): Use grub_tsc_init() rather than
3102 installing an RTC-based handler via grub_install_get_time_ms().
3104 * kern/i386/pit.c: New file.
3105 * include/grub/i386/pit.h: Likewise.
3107 2008-08-05 Bean <bean123ch@gmail.com>
3109 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3111 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3112 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3113 (pxe_mod_SOURCES): New macro.
3114 (pxe_mod_CFLAGS): Likewise.
3115 (pxe_mod_LDFLAGS): Likewise.
3116 (pxecmd_mod_SOURCES): Likewise.
3117 (pxecmd_mod_CFLAGS): Likewise.
3118 (pxecmd_mod_LDFLAGS): Likewise.
3120 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3121 (grub_pxe_call): Likewise.
3123 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3125 * commands/i386/pc/pxecmd.c: New file.
3127 * fs/i386/pc/pxe.c: Likewise.
3129 * include/grub/i386/pc/pxe.h: Likewise.
3131 2008-08-05 Bean <bean123ch@gmail.com>
3133 * util/console.c (grub_console_cur_color): New variable.
3134 (grub_console_standard_color): Likewise.
3135 (grub_console_normal_color): Likewise.
3136 (grub_console_highlight_color): Likewise.
3137 (color_map): Likewise.
3138 (use_color): Likewise.
3139 (NUM_COLORS): New macro.
3140 (grub_ncurses_setcolorstate): Handle color properly.
3141 (grub_ncurses_setcolor): Don't change color here, just remember the
3142 settings, color will be set in grub_ncurses_setcolorstate.
3143 (grub_ncurses_getcolor): New function.
3144 (grub_ncurses_init): Initialize color pairs.
3145 (grub_ncurses_term): New member grub_ncurses_getcolor.
3147 2008-08-05 Colin D Bennett <colin@gibibit.com>
3149 High resolution timer support. Implemented for x86 CPUs using TSC.
3150 Extracted generic grub_millisleep() so it's linked in only as needed.
3151 This requires a Pentium compatible CPU; if the RDTSC instruction is
3152 not supported, then it falls back on the generic grub_get_time_ms()
3153 implementation that uses the machine's RTC.
3155 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3156 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3157 `kern/generic/millisleep.c'.
3159 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3160 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3162 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3163 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3165 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3167 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3168 `kern/generic/millisleep.c'.
3170 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3172 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3174 * kern/generic/rtc_get_time_ms.c: New file.
3176 * kern/generic/millisleep.c: New file.
3178 * kern/misc.c: Don't include
3179 <kern/time.h> anymore.
3180 (grub_millisleep_generic): Removed.
3182 * commands/sleep.c (grub_interruptible_millisleep): Uses
3183 grub_get_time_ms() instead of grub_get_rtc().
3185 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3187 (grub_cpu_is_cpuid_supported): New inline function.
3188 (grub_cpu_is_tsc_supported): New inline function.
3189 (grub_tsc_init): New function prototype.
3190 (grub_tsc_get_time_ms): New function prototype.
3192 * kern/i386/tsc.c (grub_get_time_ms): New file.
3194 * include/grub/time.h: Include <grub/types.h.
3195 (grub_millisleep_generic): Removed.
3196 (grub_get_time_ms): New prototype.
3197 (grub_install_get_time_ms): New prototype.
3198 (grub_rtc_get_time_ms): New prototype.
3200 * kern/time.c (grub_get_time_ms): New function.
3201 (grub_install_get_time_ms): New function.
3203 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3204 <grub/time.h> anymore.
3205 (grub_millisleep): Removed.
3206 (grub_machine_init): Call grub_tsc_init.
3208 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3209 get_time_ms() implementation.
3211 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3212 (ieee1275_get_time_ms): New function.
3213 (grub_machine_init): Install get_time_ms() implementation.
3215 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3216 (grub_machine_init): Call grub_tsc_init().
3217 (grub_millisleep): Removed.
3219 * kern/ieee1275/init.c (grub_millisleep): Removed.
3220 (grub_machine_init): Install ieee1275_get_time_ms()
3222 (ieee1275_get_time_ms): New function.
3223 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3226 2008-08-05 Marco Gerards <marco@gnu.org>
3228 * disk/ata.c: Include <grub/pci.h>.
3229 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3230 (grub_ata_initialize): Rewritten.
3231 (grub_ata_device_initialize): New function.
3233 2008-08-04 Pavel Roskin <proski@gnu.org>
3235 * kern/main.c: Include grub/mm.h.
3237 2008-08-04 Robert Millan <rmh@aybabtu.com>
3239 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3240 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3241 corruption problem).
3243 2008-08-04 Robert Millan <rmh@aybabtu.com>
3245 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3246 warnings introduced in my last commit.
3248 2008-08-03 Robert Millan <rmh@aybabtu.com>
3250 Make PCI available on all i386 architectures.
3252 * include/grub/i386/pc/pci.h: Move from here ...
3253 * include/grub/i386/pci.h: ... to here.
3255 * include/grub/i386/pc/pci.h: Remove.
3256 * include/grub/i386/efi/pci.h: Remove.
3257 * include/grub/x86_64/efi/pci.h: Remove.
3259 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3262 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3263 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3264 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3266 * conf/i386-ieee1275.rmk: Likewise.
3268 2008-08-03 Robert Millan <rmh@aybabtu.com>
3270 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3271 (grub_console_setcursor): Make it possible to set cursor off.
3273 2008-08-03 Robert Millan <rmh@aybabtu.com>
3275 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3276 of modules instead of assuming which platform provides what.
3277 * util/update-grub.in: Likewise.
3279 2008-08-03 Robert Millan <rmh@aybabtu.com>
3281 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3282 instead of `grub_install_dos_part' to determine whether a drive needs
3283 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3284 because it can be overridden when loading GRUB via Multiboot).
3286 2008-08-02 Robert Millan <rmh@aybabtu.com>
3288 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3290 2008-08-02 Robert Millan <rmh@aybabtu.com>
3292 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3293 of informational grub_dprintf() calls.
3295 2008-08-02 Robert Millan <rmh@aybabtu.com>
3297 * disk/memdisk.c (memdisk_size): Don't initialize.
3298 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3300 * include/grub/i386/pc/kernel.h
3301 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3302 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3303 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3304 (grub_arch_memdisk_size): Remove.
3306 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3307 field (was only used to transfer a constant). Add `type' field to
3308 support multiple module types.
3309 (grub_module_iterate): New function.
3311 * kern/device.c (grub_device_open): Do not hide error messages
3312 when grub_disk_open() fails. Use grub_print_error() instead.
3314 * kern/i386/pc/init.c (grub_arch_modules_addr)
3315 (grub_arch_memdisk_size): Remove functions.
3316 (grub_arch_modules_addr): Return the module address in high memory
3317 (now that it isn't copied anymore).
3319 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3320 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3321 decompression routine (grub_total_module_size already includes that
3322 now). Don't copy modules back to low memory.
3324 * kern/main.c: Include `<grub/mm.h>'.
3325 (grub_load_modules): Split out (and use) ...
3326 (grub_module_iterate): ... this function, which iterates through
3327 module objects and runs a hook.
3328 Comment out grub_mm_init_region() call, as it would cause non-ELF
3329 modules to be overwritten.
3331 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3332 the memdisk image in its own region, make it part of the module list.
3333 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3334 (main): Parse --memdisk|-m option, and pass user-provided path as
3335 parameter to generate_image().
3336 (add_segments): Pass `memdisk_path' down to load_modules().
3337 (load_modules): Embed memdisk image in module section when requested.
3338 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3339 `header.type' instead of `header.offset'.
3341 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3342 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3343 (memdisk_mod_LDFLAGS): New variables.
3344 * conf/i386-coreboot.rmk: Likewise.
3345 * conf/i386-ieee1275.rmk: Likewise.
3347 2008-08-02 Robert Millan <rmh@aybabtu.com>
3349 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3350 (backward_relocator): New variables. Used to allocate and relocate
3351 the payload, respectively.
3352 (grub_multiboot_load_elf32): Load into heap instead of requested
3353 address, install the appropriate relocator code in each bound of
3354 the payload, and set the entry point such that
3355 grub_multiboot_real_boot() will jump to one of them.
3357 * kern/i386/loader.S (grub_multiboot_payload_size)
3358 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3359 (grub_multiboot_payload_entry_offset): New variables.
3360 (grub_multiboot_real_boot): Set cpu context to what the relocator
3361 expects, and jump to the relocator instead of the payload.
3363 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3364 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3365 (grub_multiboot_payload_entry_offset): Export.
3367 2008-08-01 Bean <bean123ch@gmail.com>
3369 * normal/menu_entry.c (editor_getline): Don't return the original
3370 string as result, as it will be released by lexer once it has done
3373 2008-08-01 Robert Millan <rmh@aybabtu.com>
3375 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3376 within menuentries, not before them.
3377 util/grub.d/10_hurd.in: Likewise.
3379 2008-08-01 Bean <bean123ch@gmail.com>
3381 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3382 (bufio_mod_SOURCES): New macro.
3383 (bufio_mod_CFLAGS): Likewise.
3384 (bufio_mod_LDFLAGS): Likewise.
3386 * include/grub/bufio.h: New file.
3388 * io/bufio.c: Likewise.
3390 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3391 (grub_video_reader_png): Use grub_buffile_open to open file.
3393 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3394 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3396 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3397 (grub_video_reader_tga): Use grub_buffile_open to open file.
3399 * font/manager.c: Include <grub/bufio.h>.
3400 (add_font): Use grub_buffile_open to open file.
3402 2008-07-31 Robert Millan <rmh@aybabtu.com>
3404 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3405 ELF segments, use a macro for arbitrarily accessing any of them instead
3406 of preparing a pointer that allows access to one at a time.
3407 (grub_multiboot_load_elf64): Likewise.
3409 2008-07-31 Bean <bean123ch@gmail.com>
3411 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3412 GRUB_KERNEL_MACHINE_DATA_END.
3414 2008-07-30 Robert Millan <rmh@aybabtu.com>
3416 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3417 Increase from 0x50 to 0x60.
3418 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3419 use UUIDs to identify the root drive for them. If that's not
3421 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3422 check, for cross-disk installs.
3424 2008-07-30 Robert Millan <rmh@aybabtu.com>
3426 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3427 is non-empty, use it to set the `prefix' environment variable instead
3428 of the usual approach.
3429 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3430 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3431 environment variable instead of dummy make_install_device().
3433 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3434 (start): Insert a data section, with `grub_prefix' variable.
3435 * kern/i386/linuxbios/startup.S: Likewise.
3437 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3438 New variable reference.
3439 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3440 New macro. Defines offset of `grub_prefix' within startup.S (relative
3442 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3443 section within startup.S (relative to `start').
3444 * include/grub/i386/coreboot/kernel.h: Likewise.
3446 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3447 Overwrite grub_prefix with its contents, at the beginning of the
3449 (main): Understand -p|--prefix.
3451 2008-07-30 Robert Millan <rmh@aybabtu.com>
3453 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3455 2008-07-30 Robert Millan <rmh@aybabtu.com>
3457 * term/i386/pc/vga_text.c (grub_console_cls): Use
3458 grub_console_gotoxy() to go back to beginning of the screen.
3459 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3461 2008-07-29 Christian Franke <franke@computer.org>
3463 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3464 Add conversion of emulated mount points on Cygwin.
3466 2008-07-29 Christian Franke <franke@computer.org>
3468 * util/update-grub.in: Add a check for admin
3470 Remove old `grub.cfg.new' before creation.
3471 Add `-f' to `mv' to handle the different filesystem
3472 semantics of Windows.
3474 2008-07-29 Bean <bean123ch@gmail.com>
3476 * normal/main.c (get_line): Fix buffer overflow bug.
3478 2008-07-28 Robert Millan <rmh@aybabtu.com>
3480 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3481 (struct grub_apple_header): New struct. Describes the layout of
3483 (apple_partition_map_iterate): Check the header magic as well as the
3484 partition magic (which was already being checked).
3486 2008-07-28 Pavel Roskin <proski@gnu.org>
3488 * genmk.rb: Add a warning to the beginning of the output that
3489 it's a generated file and should not be edited.
3491 2008-07-28 Robert Millan <rmh@aybabtu.com>
3493 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3494 with the same number are found, just use issue a warning with
3495 grub_dprintf(), as this error has been reported to be non-fatal.
3497 2008-07-27 Robert Millan <rmh@aybabtu.com>
3499 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3502 2008-07-27 Bean <bean123ch@gmail.com>
3504 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3505 (grub_fat_find_dir): Ignore case when comparing filename.
3507 2008-07-27 Bean <bean123ch@gmail.com>
3509 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3510 smallino, as it's more descriptive, and i8count can be confused with
3511 the other field count.
3512 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3515 2008-07-27 Bean <bean123ch@gmail.com>
3517 * commands/crc.c: New file.
3519 * lib/crc.c: Likewise.
3521 * include/grub/lib/crc.h: Likewise.
3523 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3525 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3526 (hexdump): Move this function to ...
3528 * lib/hexdump.c: ... here.
3530 * include/grub/hexdump.h: Renamed to ...
3532 * include/grub/lib/hexdump.h: ... this.
3534 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3536 * util/grub-editenv.c: Likewise.
3538 * include/envblk.h: Renamed to ...
3540 * include/lib/envblk.h: ... this.
3542 * util/envblk.c: Renamed to ...
3544 * lib/envblk.c: ... this.
3546 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3548 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3549 (pkglib_MODULES): Add crc.mod.
3550 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3551 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3552 (crc_mod_SOURCES): New macro.
3553 (crc_mod_CFLAGS): Likewise.
3554 (crc_mod_LDFLAGS): Likewise.
3556 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3558 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3560 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3562 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3564 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3566 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
3568 * commands/help.c: Include <grub/term.h>.
3569 (TERM_WIDTH): Removed. Updated all users.
3571 2008-07-27 Pavel Roskin <proski@gnu.org>
3573 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3574 spurious warnings about a comment within a comment.
3576 2008-07-25 Robert Millan <rmh@aybabtu.com>
3578 * util/getroot.c (find_root_device): Skip devices that match
3579 /dev/dm-[0-9]. This lets the real device be found for any type of
3580 abstraction (LVM, EVMS, RAID..).
3581 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3582 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3583 device is found first, find_root_device() will now skip it.
3585 2008-07-24 Pavel Roskin <proski@gnu.org>
3587 * include/grub/types.h: Use __builtin_bswap32() and
3588 __builtin_bswap64() with gcc 4.3 and newer.
3590 2008-07-24 Christian Franke <franke@computer.org>
3592 * util/i386/pc/grub-install.in: If `--debug' is specified,
3593 pass `--verbose' to grub-setup.
3594 Abort script if make_system_path_relative_to_its_root() fails.
3596 2008-07-24 Bean <bean123ch@gmail.com>
3598 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3599 variable `target_platform' should be `platform'.
3601 2008-07-24 Bean <bean123ch@gmail.com>
3603 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3604 (grub_png_init_fixed_block): New function.
3605 (grub_png_decode_image_data): Handle fixed huffman code compression.
3607 2008-07-24 Bean <bean123ch@gmail.com>
3609 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3610 (grub_pe2elf_SOURCES): New macro.
3611 (CLEANFILES): Add grub-pe2elf.
3613 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3614 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3615 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3616 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3617 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3618 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3619 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3620 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3621 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3622 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3623 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3624 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3625 (GRUB_PE32_DT_FUNCTION): Likewise.
3626 (GRUB_PE32_REL_I386_DIR32): Likewise.
3627 (GRUB_PE32_REL_I386_REL32): Likewise.
3628 (grub_pe32_symbol): New structure.
3629 (grub_pe32_reloc): Likewise.
3631 * util/grub-pe2elf.c: New file.
3633 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3634 start symbol in non pc platform.
3636 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3638 The following patches are from Christian Franke.
3640 * include/grub/dl.h: Remove .previous, gas supports this only
3643 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3644 Remove .type, gas supports this only for ELF format.
3646 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3647 nullbytes in symbol table. This fixes an infinite loop if table is
3650 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3651 TARGET_IMG_LDFLAGS and EXEEXT.
3653 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3654 TARGET_IMG_LDFLAGS_AC.
3655 (grub_CHECK_STACK_ARG_PROBE): New function.
3657 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3659 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3661 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3662 to set TARGET_IMG_LD* accordingly.
3663 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3664 Add call to grub_CHECK_STACK_ARG_PROBE.
3665 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3667 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3669 * genmk.rb: Add EXEEXT to CLEANFILES.
3671 2008-07-23 Robert Millan <rmh@aybabtu.com>
3673 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3674 define the codes for arrows and lines used for the menu).
3675 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3678 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3679 fonts, because the latter are too slow.
3681 2008-07-21 Bean <bean123ch@gmail.com>
3683 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3684 a20. Run keyboard test last, as it will cause macbook to halt.
3686 2008-07-18 Pavel Roskin <proski@gnu.org>
3688 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3689 load foreign architecture modules correctly anyway. Keep
3690 support for loading host architecture modules, whether we
3691 compile them or not.
3693 2008-07-17 Pavel Roskin <proski@gnu.org>
3695 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3696 change target_cpu. The compiler default can mismatch target_cpu
3699 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3700 * kern/efi/efi.c: Likewise.
3702 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3703 target compiler is functional.
3704 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3707 * configure.ac: Default to efi platform for x86_64-apple. Allow
3708 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3709 adjustments from the rest, only do them if target is not
3710 explicitly given. Merge other adjustments with the final sanity
3711 check. Remove an extraneous check for supported CPU. Be
3712 specific which CPU and which platform is not supported.
3714 * configure.ac: Default to pc platform for x86_64.
3716 2008-07-17 Robert Millan <rmh@aybabtu.com>
3718 Partial LinuxBIOS -> Coreboot rename.
3720 * conf/i386-linuxbios.rmk: Renamed to ...
3721 * conf/i386-coreboot.rmk: ... this.
3722 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3723 * configure.ac: Accept "coreboot" as input platform (but maintain
3724 compatibility with "linuxbios").
3725 * include/grub/i386/linuxbios: Renamed to ...
3726 * include/grub/i386/coreboot: ... this.
3728 2008-07-17 Bean <bean123ch@gmail.com>
3730 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
3731 (appleldr_mod_SOURCE): New variable.
3732 (appleldr_mod_CFLAGS): Likewise.
3733 (appleldr_mod_LDFLAGS): Likewise.
3734 (pci_mod_SOURCES): Likewise.
3735 (pci_mod_CFLAGS): Likewise.
3736 (pci_mod_LDFLAGS): Likewise.
3737 (lspci_mod_SOURCES): Likewise.
3738 (lspci_mod_CFLAGS): Likewise.
3739 (lspci_mod_LDFLAGS): Likewise.
3741 * conf/x86_64-efi.rmk: New file.
3743 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3745 (grub_efidisk_write): Likewise.
3747 * include/efi/api.h (efi_call_0): New macro.
3748 (efi_call_1): Likewise.
3749 (efi_call_2): Likewise.
3750 (efi_call_3): Likewise.
3751 (efi_call_4): Likewise.
3752 (efi_call_5): Likewise.
3753 (efi_call_6): Likewise.
3755 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3756 grub_rescue_cmd_chainloader.
3758 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3759 (grub_pe32_optional_header): Change some fields based on i386 or
3761 (GRUB_PE32_PE32_MAGIC): Likewise.
3763 * include/grub/efi/uga_draw.h: New file.
3765 * include/grub/elf.h (STN_ABS): New constant.
3766 (R_X86_64_NONE): Relocation constant for x86_64.
3767 (R_X86_64_64): Likewise.
3768 (R_X86_64_PC32): Likewise.
3769 (R_X86_64_GOT32): Likewise.
3770 (R_X86_64_PLT32): Likewise.
3771 (R_X86_64_COPY): Likewise.
3772 (R_X86_64_GLOB_DAT): Likewise.
3773 (R_X86_64_JUMP_SLOT): Likewise.
3774 (R_X86_64_RELATIVE): Likewise.
3775 (R_X86_64_GOTPCREL): Likewise.
3776 (R_X86_64_32): Likewise.
3777 (R_X86_64_32S): Likewise.
3778 (R_X86_64_16): Likewise.
3779 (R_X86_64_PC16): Likewise.
3780 (R_X86_64_8): Likewise.
3781 (R_X86_64_PC8): Likewise.
3783 * include/grub/i386/efi/pci.h: New file.
3785 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3786 Change it value based on platform.
3787 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3788 (GRUB_E820_RAM): Likewise.
3789 (GRUB_E820_RESERVED): Likewise.
3790 (GRUB_E820_ACPI): Likewise.
3791 (GRUB_E820_NVS): Likewise.
3792 (GRUB_E820_EXEC_CODE): Likewise.
3793 (GRUB_E820_MAX_ENTRY): Likewise.
3794 (grub_e820_mmap): New structure.
3795 (linux_kernel_header): Change the efi field according to different
3796 kernel version, also field from linux_kernel_header.
3798 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3800 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3801 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3802 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3803 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3804 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3805 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3806 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3807 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3808 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3809 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3811 * include/grub/x86_64/efi/kernel.h: New file.
3813 * include/grub/x86_64/efi/loader.h: Likewise.
3815 * include/grub/x86_64/efi/machine.h: Likewise.
3817 * include/grub/x86_64/efi/pci.h: Likewise.
3819 * include/grub/x86_64/efi/time.h: Likewise.
3821 * include/grub/x86_64/linux.h: Likewise.
3823 * include/grub/x86_64/setjmp.h: Likewise.
3825 * include/grub/x86_64/time.h: Likewise.
3827 * include/grub/x86_64/types.h: Likewise.
3829 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3830 GRUB_TARGET_SIZEOF_VOID_P.
3832 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3833 (grub_efi_locate_handle): Likewise.
3834 (grub_efi_open_protocol): Likewise.
3835 (grub_efi_set_text_mode): Likewise.
3836 (grub_efi_stall): Likewise.
3837 (grub_exit): Likewise.
3838 (grub_reboot): Likewise.
3839 (grub_halt): Likewise.
3840 (grub_efi_exit_boot_services): Likewise.
3841 (grub_get_rtc): Likewise.
3843 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3844 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3845 (grub_efi_allocate_pages): Wrap efi calls.
3846 (grub_efi_free_pages): Wrap efi calls.
3847 (grub_efi_get_memory_map): Wrap efi calls.
3849 * kern/x86_64/dl.c: New file.
3851 * kern/x86_64/efi/callwrap.S: Likewise.
3853 * kern/x86_64/efi/startup.S: Likewise.
3855 * loader/efi/appleloader.c: Likewise.
3857 * loader/efi/chainloader.c (cmdline): New variable.
3858 (grub_chainloader_unload): Wrap efi calls.
3859 (grub_chainloader_boot): Likewise.
3860 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3863 * loader/efi/chainloader_normal.c (chainloader_command):
3864 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3867 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3869 (grub_e820_add_region): New function.
3870 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3872 (grub_find_video_card): New function.
3873 (grub_linux_setup_video): New function.
3874 (grub_rescue_cmd_linux): Probe for video information.
3876 * normal/x86_64/setjmp.S: New file.
3878 * term/efi/console.c (map_char): New function.
3879 (grub_console_putchar): Map unicode char.
3880 (grub_console_checkkey): Wrap efi calls.
3881 (grub_console_getkey): Likewise.
3882 (grub_console_getwh): Likewise.
3883 (grub_console_gotoxy): Likewise.
3884 (grub_console_cls): Likewise.
3885 (grub_console_setcolorstate): Likewise.
3886 (grub_console_setcursor): Likewise.
3888 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3890 2008-07-16 Pavel Roskin <proski@gnu.org>
3892 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3895 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3896 pointer, not an integer. This fixes a warning and prevents
3897 precision loss on 64-bit systems.
3898 (relocate_addresses): Remove unneeded cast.
3900 2008-07-15 Pavel Roskin <proski@gnu.org>
3902 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3904 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3906 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3907 Fix comparison between signed and unsigned.
3909 * include/grub/i386/ieee1275/console.h: Declare
3910 grub_console_init() and grub_console_fini().
3912 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3913 It's empty and unused.
3915 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3916 beginning to avoid warnings with some compilers.
3918 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3919 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3921 2008-07-14 Pavel Roskin <proski@gnu.org>
3923 * kern/env.c (grub_register_variable_hook): Don't copy empty
3924 string, it leaks memory. Pass "" to grub_env_set(), it should
3925 handle constant strings.
3927 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3928 * commands/cmp.c (grub_cmd_cmp): Likewise.
3929 * kern/dl.c (grub_dl_flush_cache): Likewise.
3930 (grub_dl_load_core): Likewise.
3931 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3932 (grub_elf64_load_phdrs): Likewise.
3934 2008-07-13 Pavel Roskin <proski@gnu.org>
3936 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3937 between signed and unsigned.
3938 (LzmaEnc_Finish): Fix warning about an unused parameter.
3940 2008-07-13 Bean <bean123ch@gmail.com>
3942 * Makefile.in (enable_lzo): New rule.
3944 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3946 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3948 * boot/i386/pc/lnxboot.S: #include <config.h>.
3950 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
3951 its value according to the compression algorithm used, lzo or lzma.
3953 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3954 compression algorithm according to configure macro.
3956 * kern/i386/pc/startup.S (codestart): Likewise.
3958 * kern/i386/pc/lzma_decode.S: New file.
3960 * include/grub/lib/LzFind.h: Likewise.
3962 * include/grub/lib/LzHash.h: Likewise.
3964 * include/grub/lib/LzmaDec.h: Likewise.
3966 * include/grub/lib/LzmaEnc.h: Likewise.
3968 * include/grub/lib/LzmaTypes.h: Likewise.
3970 * lib/LzFind.c: Likewise.
3972 * lib/LzmaDec.c: Likewise.
3974 * lib/LzmaEnc.c: Likewise.
3976 2008-07-13 Bean <bean123ch@gmail.com>
3978 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3979 (grub_ext4_extent_header): New structure.
3980 (grub_ext4_extent): Likewise.
3981 (grub_ext4_extent_idx): Likewise.
3982 (grub_ext4_find_leaf): New function.
3983 (grub_ext2_read_block): Handle extents.
3985 2008-07-12 Robert Millan <rmh@aybabtu.com>
3987 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3989 2008-07-11 Robert Millan <rmh@aybabtu.com>
3991 * util/grub.d/40_custom.in: New file. Example on how to add custom
3992 entries to /etc/grub.d.
3993 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3994 40_custom (implicitly, by merging all the grub.d rules).
3996 2008-07-11 Pavel Roskin <proski@gnu.org>
3998 * commands/read.c (grub_getline): Fix invalid memory access.
3999 Don't add newline to the variable value.
4001 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4002 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4003 (serial_hw_get_port): Check validity of the port number.
4004 (grub_cmd_serial): Check return value of serial_hw_get_port().
4006 2008-07-07 Pavel Roskin <proski@gnu.org>
4008 * boot/i386/pc/diskboot.S (notification_string): Replace
4009 "Loading kernel" with just "loading". This is shorter, less
4010 confusing and saves a few bytes for possible future changes.
4012 2008-07-05 Pavel Roskin <proski@gnu.org>
4014 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4015 size for ATAPI devices, they are undefined. Output sector
4016 number in decimal form.
4018 * disk/ata.c: Use named constants for status bits.
4020 2008-07-04 Pavel Roskin <proski@gnu.org>
4022 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4023 grub_addr_t before casting it to the void pointer to fix a
4024 warning. Non-addressable regions are discarded earlier.
4025 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4026 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4027 (check_signature): Don't shadow table_header.
4028 (grub_linuxbios_table_iterate): Cast numeric constants to
4029 grub_linuxbios_table_header_t.
4030 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4033 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4036 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4037 pointer, which can cause warnings. Support 64-bit addresses.
4039 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4040 of sizeof(long). This fixes PowerPC image generation on x86_64.
4042 2008-07-04 Robert Millan <rmh@aybabtu.com>
4044 This fixes a performance issue when pc & gpt partmap iterators
4045 didn't abort iteration even after our hook found what it was
4046 looking for (often causing expensive probes of non-existent drives).
4048 Some callers relied on previous buggy behaviour, since they would
4049 raise an error when their own hooks caused early abortion of its
4052 * kern/device.c (grub_device_open): Improve error message.
4053 * disk/lvm.c (grub_lvm_open): Likewise.
4054 * disk/raid.c (grub_raid_open): Likewise.
4056 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4057 when hook requests it, independently of grub_errno.
4058 (pc_partition_map_probe): Do not fail when find_func() caused
4059 early abortion of pc_partition_map_iterate().
4061 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4062 when hook requests it, independently of grub_errno.
4063 (gpt_partition_map_probe): Do not fail when find_func() caused
4064 early abortion of gpt_partition_map_iterate().
4066 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4067 when hook requests it, independently of grub_errno. Do not fail when
4068 part_map_iterate_hook() caused early abortion of p->iterate().
4070 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4071 when grub_partition_iterate() returned with non-zero.
4073 2008-07-03 Pavel Roskin <proski@gnu.org>
4075 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4076 like we do in grub_ata_pio_read().
4077 (grub_ata_readwrite): Always write individual sectors. Fix the
4078 sector count for the remainder.
4079 (grub_ata_write): Enable writing to ATA devices. Correctly
4080 report error for ATAPI devices.
4082 2008-07-02 Pavel Roskin <proski@gnu.org>
4084 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4087 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4088 for every read sector, we already increment it for the whole
4089 batch. This fixes reading more than 256 sectors at once.
4091 * util/grub-editenv.c (cmd_info): Cast argument to long
4092 explicitly. ptrdiff_t reduces to int on i386.
4094 * util/grub-editenv.c (main): Be specific which parameter is
4097 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4098 (memdisk): Make memdisk_orig_addr a pointer.
4100 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4101 for file offsets, use grub_off_t instead. Fix printf format
4104 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4105 there. Real unexpected warnings should not drown in the noise
4106 about known problems.
4108 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4109 grub_disk_addr_t for memory addresses.
4111 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4112 explicitly to fix a warning.
4114 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4116 * Makefile.in (MODULE_LDFLAGS): New variable.
4117 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4118 the linker accepts --build-id=none.
4119 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4121 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4123 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4124 those in Linux XFS code. Provide a way to access 64-bit parent
4126 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4127 the end of struct grub_xfs_dir_header.
4129 2008-07-02 Bean <bean123ch@gmail.com>
4131 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4132 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4133 and GRUB_IEEE1275_FLAG_NO_ANSI.
4135 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4136 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4137 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4139 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4140 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4142 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4143 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4145 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4146 esc sequence on non ANSI terminal.
4147 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4149 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4152 2008-07-02 Bean <bean123ch@gmail.com>
4154 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4155 (grub_editenv_SOURCES): New variable.
4156 (pkglib_MODULES): Add loadenv.mod.
4157 (loadenv_mod_SOURCES): New variable.
4158 (loadenv_mod_CFLAGS): Likewise.
4159 (loadenv_mod_LDFLAGS): Likewise.
4161 * include/grub/envblk.h: New file.
4163 * util/envblk.c: New file.
4165 * util/grub-editenv.c: New file.
4167 * commands/loadenv.c: New file.
4169 2008-07-01 Pavel Roskin <proski@gnu.org>
4171 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4172 not unsigned char. This fixes warnings and is consistent with
4175 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4177 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4179 * term/tparm.c (analyze): Always set *popcount.
4181 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4182 cast to fix a warning.
4184 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4185 cast to suppress a warning.
4187 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4188 grub_fshelp_read_file() expects.
4190 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4191 write uuid as a 32-bit value in CPU byte order, so declare and
4194 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4195 long if the format specifier expects it.
4196 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4197 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4198 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4199 long to fix a warning.
4200 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4201 grub_dprintf() arguments to fix warnings.
4203 2008-06-30 Pavel Roskin <proski@gnu.org>
4205 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4206 install_bsd_part immediately before core.img is embedded or
4207 modified on disk. This fixes core.img verification if core.img
4210 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4211 core_path to calculate the blocklist.
4212 Patch from Javier MartÃn <lordhabbit@gmail.com>
4214 2008-06-29 Robert Millan <rmh@aybabtu.com>
4216 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4217 block to disk block.
4218 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4219 Patch from Niels Böhm <bitbucket@arcor.de>
4221 2008-06-29 Robert Millan <rmh@aybabtu.com>
4223 * util/update-grub_lib.in (font_path): Search for fonts in
4224 /boot/grub first, which is more likely to be readable (we aren't
4225 deciding where fonts live, just looking for them).
4227 2008-06-26 Pavel Roskin <proski@gnu.org>
4229 * util/biosdisk.c (read_device_map): Don't leave dead map
4230 entries for devices failing stat() check.
4232 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4233 core_path_dev for the core.img path on the target device.
4235 2008-06-26 Robert Millan <rmh@aybabtu.com>
4237 * disk/fs_uuid.c: New file.
4238 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4239 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4240 (fs_uuid_mod_LDFLAGS): New variables.
4241 * include/grub/disk.h (grub_disk_dev_id): Add
4242 `GRUB_DISK_DEVICE_UUID_ID'.
4243 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4244 implement iterate().
4246 2008-06-26 Robert Millan <rmh@aybabtu.com>
4248 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4249 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4250 Linux image includes no initrd.
4252 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4254 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4255 call to resolve the core image location that effectively appended the
4258 2008-06-21 Robert Millan <rmh@aybabtu.com>
4260 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4263 * util/grub.d/10_hurd.in: ... to here ...
4264 * util/grub.d/10_linux.in: ... and here.
4266 2008-06-19 Robert Millan <rmh@aybabtu.com>
4268 * kern/main.c (grub_main): Export `prefix' variable immediately
4269 after it has been set by grub_machine_set_prefix().
4271 2008-06-19 Robert Millan <rmh@aybabtu.com>
4273 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4274 search result when not saving to variable, not the other way around.
4275 When saving to variable, abort iteration as soon as a match is found.
4277 2008-06-19 Robert Millan <rmh@aybabtu.com>
4279 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4280 check for partition that provides /boot/grub. Its logic is flawed,
4281 as it prevents prepare_grub_to_access_device() from being called
4284 2008-06-19 Robert Millan <rmh@aybabtu.com>
4286 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4287 "insmod" command directly when abstraction modules are needed,
4288 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4289 since it had already been processed).
4291 2008-06-19 Pavel Roskin <proski@gnu.org>
4293 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4294 changed. This is needed in case GRUB_LIBDIR changes.
4295 * conf/i386-ieee1275.rmk: Likewise.
4296 * conf/i386-linuxbios.rmk: Likewise.
4297 * conf/i386-pc.rmk: Likewise.
4298 * conf/powerpc-ieee1275.rmk: Likewise.
4300 2008-06-18 Pavel Roskin <proski@gnu.org>
4302 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4303 kernel_elf_symlist.c to symlist.c for consistency with other
4304 architectures. Update all users.
4305 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4307 2008-06-18 Robert Millan <rmh@aybabtu.com>
4309 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4312 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4313 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4314 a RAID device, run setup() for all members independently on whether
4315 LVM abstraction is being used.
4316 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4317 If grub-mkimage has set `*install_dos_part == -2', don't override this
4319 Perform *install_dos_part adjustments independently on whether
4320 we're embedding or not.
4321 Clarify error message when image is too big for embedding.
4322 Remove duplicate *install_dos_part stanza.
4324 2008-06-17 Robert Millan <rmh@aybabtu.com>
4326 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4327 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4329 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4330 values in grub_ofconsole_normal_color and
4331 grub_ofconsole_highlight_color (they're not directly related to
4332 background and foreground).
4333 (grub_ofconsole_setcolorstate): Extract background and foreground
4334 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4336 2008-06-17 Robert Millan <rmh@aybabtu.com>
4338 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4339 /boot/grub for the check in last commit, not /boot (they could be
4340 different partitions).
4342 2008-06-16 Robert Millan <rmh@aybabtu.com>
4344 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4345 asked to setup access for the same partition that provides /boot,
4346 don't bother using UUIDs since our root already has the value we
4349 2008-06-16 Robert Millan <rmh@aybabtu.com>
4351 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4353 Patch from Sven Mueller <sven@debian.org>.
4355 2008-06-16 Robert Millan <rmh@aybabtu.com>
4357 * util/update-grub.in: Check for $EUID instead of $UID.
4358 Reported by Vincent Zweije.
4360 2008-06-16 Bean <bean123ch@gmail.com>
4362 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4363 (grub_ext2_read_block): Likewise.
4364 (grub_ext2_read_inode): Likewise.
4365 (grub_ext2_mount): Likewise.
4366 (grub_ext2_close): Likewise.
4367 (grub_ext3_get_journal): Removed.
4369 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4370 (grub_reiserfs_read_symlink): Likewise.
4371 (grub_reiserfs_mount): Likewise.
4372 (grub_reiserfs_open): Likewise.
4373 (grub_reiserfs_read): Likewise.
4374 (grub_reiserfs_close): Likewise.
4375 (grub_reiserfs_get_journal): Removed.
4377 * fs/fshelp.c (grub_fshelp_read): Removed.
4378 (grub_fshelp_map_block): Likewise.
4380 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4381 (grub_fshelp_journal): Likewise.
4382 (grub_fshelp_read): Likewise.
4383 (grub_fshelp_map_block): Likewise.
4385 2008-06-16 Pavel Roskin <proski@gnu.org>
4387 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4388 floating point anymore.
4389 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4391 2008-06-15 Pavel Roskin <proski@gnu.org>
4393 * commands/ls.c (grub_ls_list_files): Use integer calculations
4394 for human readable format, avoid floating point use.
4395 * kern/misc.c (grub_ftoa): Remove.
4396 (grub_vsprintf): Remove floating point support.
4398 2008-06-15 Robert Millan <rmh@aybabtu.com>
4400 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4402 Reported by Max Vozeler.
4404 2008-06-15 Robert Millan <rmh@aybabtu.com>
4406 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4407 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4409 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4410 the beginning of the prefix.
4412 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4413 It is assumed that if we have a memdisk, grub-mkimage has set
4414 grub_prefix to include the "(memdisk)" drive in it.
4416 2008-06-15 Robert Millan <rmh@aybabtu.com>
4418 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4419 Initialize keyboard controller after registering the terminal, so that
4420 grub_printf() can be called from grub_keyboard_controller_init().
4422 2008-06-15 Robert Millan <rmh@aybabtu.com>
4424 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4425 extent-btree which is written as big endian on disk.
4426 Reported by Alain Greppin <al@chilibi.org>.
4428 2008-06-14 Robert Millan <rmh@aybabtu.com>
4430 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4431 * util/i386/pc/grub-install.in (modules): Likewise.
4433 2008-06-13 Pavel Roskin <proski@gnu.org>
4435 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4437 2008-06-13 Bean <bean123ch@gmail.com>
4439 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4441 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4443 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4444 to indicate sparse block.
4446 2008-06-12 Pavel Roskin <proski@gnu.org>
4448 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4449 number, grub_fshelp_read() does it for us.
4451 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4452 linear disk read with journal translation.
4453 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4454 * include/grub/fshelp.h: Declare grub_fshelp_read().
4456 2008-06-09 Pavel Roskin <proski@gnu.org>
4458 * fs/minix.c (grub_minix_mount): Handle error reading
4461 2008-06-08 Robert Millan <rmh@aybabtu.com>
4463 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4464 don't append the RAID prefix afterwards.
4465 Reported by Clint Adams.
4467 2008-06-08 Robert Millan <rmh@aybabtu.com>
4469 Based on description from Pavel:
4470 * kern/disk.c (grub_disk_check_range): Rename to ...
4471 (grub_disk_adjust_range): ... this. Add a comment explaining the
4472 tasks performed by this function.
4474 2008-06-08 Robert Millan <rmh@aybabtu.com>
4476 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4477 `num_serial' (for consistency with other variables).
4478 (struct grub_ntfs_data): Add `uuid' member.
4479 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4480 (grub_ntfs_uuid): New function.
4481 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4483 2008-06-07 Pavel Roskin <proski@gnu.org>
4485 * util/biosdisk.c (open_device): Revert last change to the
4486 function, it broke installation. The sector needs to be
4487 different dependent on which device is opened.
4489 2008-06-06 Robert Millan <rmh@aybabtu.com>
4491 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4492 rest of GRUB, and breakage doesn't happen if its value were modified.
4494 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4495 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4496 a constant (same value).
4497 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4498 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4500 2008-06-06 Robert Millan <rmh@aybabtu.com>
4502 * util/biosdisk.c (open_device): Do not modify sector offset when
4503 accessing a partition. kern/disk.c already handles this for us.
4505 2008-06-06 Robert Millan <rmh@aybabtu.com>
4507 * util/grub-emu.c (grub_machine_init): Move code in this function from
4509 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4510 segfault in case grub_printf() is called).
4512 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4513 grub_probe. Update all users not to explicitly add it again.
4514 (grub_device): New variable; contains corresponding device for grubdir.
4515 (fs_module, partmap_module, devabstraction_module): Pass
4516 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4519 2008-06-05 Robert Millan <rmh@aybabtu.com>
4521 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4522 is found, print it (same layout as with labels).
4524 2008-06-04 Robert Millan <rmh@aybabtu.com>
4526 * util/biosdisk.c (get_drive): Rename to ...
4527 (find_grub_drive): ... this. Update all users.
4529 (get_os_disk): Rename to ...
4530 (convert_system_partition_to_system_disk): ... this. Update all users.
4532 (find_drive): Rename to ...
4533 (find_system_device): ... this. Update all users.
4535 2008-06-04 Robert Millan <rmh@aybabtu.com>
4537 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4538 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4539 (make_device_map): Likewise.
4541 2008-06-01 Robert Millan <rmh@aybabtu.com>
4543 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4544 before dereferencing it.
4546 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4547 union with fat12/fat16-specific ones. Add some new fields, including
4548 `num_serial' for both versions.
4549 (struct grub_fat_data): Add `uuid' member.
4550 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4551 names. Initialize `data->uuid' using `num_serial'.
4552 (grub_fat_uuid): New function.
4553 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4555 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4556 (grub_reiserfs_uuid): New function.
4557 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4560 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4561 (grub_xfs_uuid): New function.
4562 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4564 2008-06-01 Robert Millan <rmh@aybabtu.com>
4566 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4567 code that is backward compatible with pre-uuid search command.
4569 2008-05-31 Robert Millan <rmh@aybabtu.com>
4571 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4572 floppies after everything else, to ensure floppy drive isn't accessed
4573 unnecessarily (patch from Bean).
4575 2008-05-31 Robert Millan <rmh@aybabtu.com>
4577 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4578 not print device names when we were asked to set a variable.
4580 2008-05-31 Robert Millan <rmh@aybabtu.com>
4582 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4583 using "cursor-on" and "cursor-off" commands (understood at least by
4584 the Open Firmware flavour on OLPC).
4586 2008-05-31 Michael Gorven <michael@gorven.za.net>
4588 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4589 on and off sequences.
4591 2008-05-31 Robert Millan <rmh@aybabtu.com>
4593 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4594 * util/update-grub.in: Likewise.
4596 2008-05-30 Pavel Roskin <proski@gnu.org>
4598 * util/biosdisk.c (linux_find_partition): Simplify logic and
4599 make the code more universal. Keep special processing for
4600 devfs, but use a simple rule for all other devices. If the
4601 device ends with a number, append 'p' and the partition number.
4602 Otherwise, append only the partition number.
4604 2008-05-30 Robert Millan <rmh@aybabtu.com>
4606 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4607 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4608 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4609 the `root' parameter to Linux.
4611 2008-05-30 Robert Millan <rmh@aybabtu.com>
4613 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4614 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4615 --fs_uuid with --fs-uuid.
4616 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4617 all filesystems support them).
4619 2008-05-30 Robert Millan <rmh@aybabtu.com>
4621 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4622 grub_printf() flags, since we're printing in units of 2 bytes.
4624 2008-05-30 Robert Millan <rmh@aybabtu.com>
4626 * util/grub.d/00_header.in: Remove obsolete comment referencing
4627 convert_system_path_to_grub_path().
4628 * util/update-grub.in: Likewise.
4629 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4630 (convert_system_path_to_grub_path): Add a warning message explaining
4631 that this function is deprecated. Rely on is_path_readable_by_grub()
4632 for the readability checks.
4633 (font_path): Use is_path_readable_by_grub() for the readability
4634 check rather than convert_system_path_to_grub_path().
4636 2008-05-30 Robert Millan <rmh@aybabtu.com>
4638 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4639 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4640 converting it first.
4641 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4642 grub.cfg for access to font file, and afterwards call it again to set
4645 2008-05-30 Robert Millan <rmh@aybabtu.com>
4647 * commands/search.c (options): Add --fs_uuid option.
4648 (search_fs_uuid): New function.
4649 (grub_cmd_search): Fix --set argument passing.
4650 Use search_fs_uuid() when requested via --fs_uuid.
4651 (grub_search_init): Update help message.
4652 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4653 and redeclare it as an array of 16-bit words.
4654 (grub_ext2_uuid): New function.
4655 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4656 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4657 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4658 (GRUB_DEVICE_BOOT_UUID): New variables.
4659 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4660 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4662 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4663 just assume `root' variable has the right value.
4664 * util/grub.d/10_linux.in: Likewise.
4665 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4667 (main): Recognise `-t fs_uuid' argument.
4669 2008-05-30 Robert Millan <rmh@aybabtu.com>
4671 * util/biosdisk.c (map): Redefine structure to hold information
4672 about GRUB drive name.
4673 (get_drive): Reimplement without assuming (and verifying) BIOS-like
4675 (call_hook): Remove.
4676 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4677 member. Assume drive has partitions.
4678 (grub_util_biosdisk_open): Access device names via `.device' struct
4680 (open_device): Likewise.
4681 (find_drive): Likewise.
4682 (read_device_map): Adjust map[] usage to match the new struct
4683 definition. Don't check for duplicates (still possible, but not cheap
4685 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4686 (make_device_name): Remove assumption of BIOS-like drive names.
4688 2008-05-30 Pavel Roskin <proski@gnu.org>
4690 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4691 compiling execute.c doesn't need grub_script.tab.h anymore.
4692 (normal/command.c_DEPENDENCIES): Likewise.
4693 (normal/function.c_DEPENDENCIES): Likewise.
4694 * conf/i386-ieee1275.rmk: Likewise.
4695 * conf/i386-linuxbios.rmk: Likewise.
4696 * conf/i386-pc.rmk: Likewise.
4697 * conf/powerpc-ieee1275.rmk: Likewise.
4698 * conf/sparc64-ieee1275.rmk: Likewise.
4700 2008-05-29 Pavel Roskin <proski@gnu.org>
4702 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4703 when scanning metadata for volume group name.
4705 * include/grub/script.h: Don't include grub_script.tab.h. It's
4706 a generated file, which may only be included from the files with
4707 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4708 use union YYSTYPE, as the later allows forward declaration.
4709 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4711 2008-05-29 Robert Millan <rmh@aybabtu.com>
4713 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4714 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4715 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4716 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4719 2008-05-29 Robert Millan <rmh@aybabtu.com>
4721 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4722 control key combinations.
4724 2008-05-29 Robert Millan <rmh@aybabtu.com>
4726 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4727 * util/ieee1275/grub-install.in: ... to here.
4728 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4729 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4730 (grub_install_SOURCES): Likewise.
4732 2008-05-29 Robert Millan <rmh@aybabtu.com>
4734 * fs/affs.c: Update copyright year.
4735 * fs/ext2.c: Likewise.
4736 * fs/fshelp.c: Likewise.
4737 * fs/hfsplus.c: Likewise.
4738 * fs/ntfs.c: Likewise.
4739 * fs/xfs.c: Likewise.
4740 * include/grub/fshelp.h: Likewise.
4741 * util/grub-mkdevicemap.c: Likewise.
4743 2008-05-28 Robert Millan <rmh@aybabtu.com>
4745 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4746 might need to be fatfs to support some firmware implementations
4749 2008-05-28 Robert Millan <rmh@aybabtu.com>
4751 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4753 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4754 (make_device_map): Likewise.
4756 2008-05-20 Bean <bean123ch@gmail.com>
4758 * fs/fshelp.c (grub_fshelp_map_block): New function.
4759 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4760 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4762 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4763 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4764 (grub_fshelp_journal): New structure.
4765 (grub_fshelp_map_block): New function prototype.
4766 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4767 (grub_fshelp_map_block): Likewise.
4769 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4770 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4771 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4772 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4773 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4774 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4775 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4776 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4777 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4778 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4779 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4780 (grub_ext2_sblock): New members for journal support.
4781 (grub_ext3_journal_header): New structure.
4782 (grub_ext3_journal_revoke_header): Likewise.
4783 (grub_ext3_journal_block_tag): Likewise.
4784 (grub_ext3_journal_sblock): Likewise.
4785 (grub_fshelp_node): New members logfile and journal.
4786 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4787 grub_fshelp_map_block to get real block number.
4788 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4790 (grub_ext2_read_inode): Likewise.
4791 (grub_ext3_get_journal): New function.
4792 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4793 (grub_ext2_close): Release memory used by journal.
4795 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4796 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4797 (grub_reiserfs_transaction_header): Renamed to
4798 grub_reiserfs_description_block, replace field data with real_blocks.
4799 (grub_reiserfs_commit_block): New structure.
4800 (grub_reiserfs_data): New member journal.
4801 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4803 (grub_reiserfs_read_symlink): Likewise.
4804 (grub_reiserfs_iterate_dir): Likewise.
4805 (grub_reiserfs_open): Likewise.
4806 (grub_reiserfs_read): Likewise.
4807 (grub_reiserfs_get_journal): New function.
4808 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4809 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4810 using grub_reiserfs_get_journal.
4811 (grub_reiserfs_close): Release memory used by journal.
4813 * fs/affs.c (grub_affs_read_block): Change block type to
4814 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4816 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4818 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4820 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4822 * fs/udf.c (grub_udf_read_block): Change block type to
4823 grub_disk_addr_t. Use type cast to avoid warning.
4825 * fs/xfs.c (grub_xfs_read_block): Likewise.
4827 2008-05-16 Christian Franke <franke@computer.org>
4829 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4830 to ensure that break with ESC will always work.
4831 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4832 Remove ESC from keyboard queue.
4834 2008-05-16 Christian Franke <franke@computer.org>
4836 * util/biosdisk.c: [__CYGWIN__] Add includes.
4837 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4838 (get_os_disk): Move variable declarations to OS specific
4839 parts to avoid warning.
4840 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4841 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4842 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4844 * util/getroot.c: [__CYGWIN__] Add includes.
4845 (strip_extra_slashes): Fix "/" case.
4846 [__CYGWIN__] (get_win32_path): New function.
4847 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4848 [__CYGWIN__] (find_root_device): Disable.
4849 [__CYGWIN__] (get_bootsec_serial): New function.
4850 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4851 [__linux__] (grub_guess_root_device): Add early returns to simplify
4853 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4854 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4855 check for Linux only.
4857 2008-05-15 Bean <bean123ch@gmail.com>
4859 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4860 keyboard hang problem in apple's intel mac.
4862 2008-05-09 Robert Millan <rmh@aybabtu.com>
4864 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4866 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4867 (make_device_map): Likewise.
4868 Reported by Aurelien Jarno <aurel32@debian.org>
4870 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
4872 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4873 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4874 (make_device_map): Output entries for xvd type disks.
4876 2008-05-07 Robert Millan <rmh@aybabtu.com>
4878 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4880 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4881 (make_device_map): Likewise.
4882 Reported by Roland Dreier <rdreier@cisco.com>
4884 2008-05-07 Robert Millan <rmh@aybabtu.com>
4886 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4887 grub_strstr() call. Correct a few mistakes in failure path handling.
4889 2008-05-06 Robert Millan <rmh@aybabtu.com>
4891 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4892 Do not print a trailing slash (therefore, the root directory is an
4894 (convert_system_path_to_grub_path): Do not remove trailing slash
4895 from make_system_path_relative_to_its_root() output.
4897 * util/i386/pc/grub-install.in: Add trailing slash to output from
4898 make_system_path_relative_to_its_root().
4900 2008-05-06 Robert Millan <rmh@aybabtu.com>
4902 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4903 ensures that output lines aren't intermangled with those sent to
4904 stderr (via grub_util_info()).
4905 * util/grub-probe.c (grub_refresh): Likewise.
4906 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4908 2008-05-05 Christian Franke <franke@computer.org>
4910 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4911 Add Cygwin device names.
4912 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4913 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4914 (check_device): Return error instead of success on empty name.
4915 (make_device_map): Move label inside linux specific code to
4916 prevent compiler warning.
4918 2008-04-30 Robert Millan <rmh@aybabtu.com>
4920 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4921 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4923 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4925 2008-04-29 Robert Millan <rmh@aybabtu.com>
4927 * docs/grub.cfg: New file (example GRUB configuration).
4929 2008-04-26 Robert Millan <rmh@aybabtu.com>
4931 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4932 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4933 and `disk/ieee1275/nand.c'.
4935 2008-04-25 Bean <bean123ch@gmail.com>
4937 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4940 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4941 change the buffer size to 4096 for cdrom device.
4943 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4945 (_linux_mod_SOURCES): New variable.
4946 (_linux_mod_CFLAGS): Likewise.
4947 (_linux_mod_LDFLAGS): Likewise.
4948 (linux_mod_SOURCES): Likewise.
4949 (linux_mod_CFLAGS): Likewise.
4950 (linux_mod_LDFLAGS): Likewise.
4951 (nand_mod_SOURCES): Likewise.
4952 (nand_mod_CFLAGS): Likewise.
4953 (nand_mod_LDFLAGS): Likewise.
4955 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4956 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4957 type property. (nand device in olpc don't have this property)
4959 * include/grub/disk.h (grub_disk_dev_id): New macro
4960 GRUB_DISK_DEVICE_NAND_ID.
4962 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4964 (grub_rescue_cmd_initrd): Likewise.
4966 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4967 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4968 ofw_cif_handler and ofw_idt, adjust padding number.
4970 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4971 GRUB_MACHINE_IEEE1275 is defined.
4973 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4974 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4976 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4977 on nested function heap_init.
4978 (grub_upper_mem): New variable for i386-ieee1275.
4979 (grub_get_extended_memory): New function for i386-ieee1275.
4980 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4982 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4983 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4986 * loader/i386/ieee1275/linux.c: New file.
4988 * loader/i386/ieee1275/linux_normal.c: New file.
4990 * disk/ieee1275/nand.c: New file.
4992 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4994 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4996 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4998 2008-04-18 Robert Millan <rmh@aybabtu.com>
5000 Restructures early code path on ieee1275 to unify grub_main() as
5001 the first C function that is executed in every platform.
5003 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5004 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5006 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5007 * kern/ieee1275/cmain.c (cmain): Rename to ...
5008 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5009 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5012 2008-04-18 Robert Millan <rmh@aybabtu.com>
5014 * util/update-grub.in: Fix syntax error when setting
5015 `GRUB_PRELOAD_MODULES'.
5016 Reported by Stephane Chazelas <stephane@artesyncp.com>
5018 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5020 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5021 section into account, newer toolchains generate unique build ids
5022 * configure.ac: remove the test for --build-id=none acceptance,
5023 we want build ids to be preserved
5024 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5025 far from other sections don't cause the raw binary images grow
5028 2008-04-15 Robert Millan <rmh@aybabtu.com>
5030 * disk/lvm.c: Update copyright year.
5031 * kern/misc.c: Likewise.
5033 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5035 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5036 there is no memory left for physical volume name.
5038 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5040 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5041 volume name mapping to support bigger than 9 character names properly.
5043 2008-04-13 Robert Millan <rmh@aybabtu.com>
5045 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5046 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5048 2008-04-13 Christian Franke <franke@computer.org>
5050 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5051 to create a floppy emulation boot CD when non emulation mode
5053 Enable Joliet CD filesystem extension.
5055 2008-04-13 Robert Millan <rmh@aybabtu.com>
5057 * kern/misc.c (grub_strncat): Fix off-by-one error.
5058 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5060 * kern/env.c (grub_env_context_close): Clear current context, not
5062 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5064 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5066 2008-04-13 Robert Millan <rmh@aybabtu.com>
5068 Improve robustness when handling LVM.
5070 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5071 (and leave `*p' unmodified).
5072 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5074 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5075 iterating through it.
5076 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5078 (grub_lvm_scan_device): Check the return value (and fail gracefully
5079 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5080 Don't assume `vg->pvs != NULL' when iterating through it.
5082 2008-04-13 Robert Millan <rmh@aybabtu.com>
5084 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5085 * genmk.rb (partmap): New variable.
5086 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5087 (#{partmap}): New target rule.
5088 * genpartmaplist.sh: New file.
5089 * Makefile.in (pkglib_DATA): Add partmap.lst.
5090 (partmap.lst): New target rule.
5091 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5092 modules (including all partition maps), instead of preloading them.
5094 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5096 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5097 `linux-boot-prober' (if installed) to detect other operating
5098 systems which are installed on the computer and add them to
5100 * conf/common.rmk: Build and install 30_os-prober.
5102 2008-04-12 Robert Millan <rmh@aybabtu.com>
5104 * kern/powerpc/ieee1275/init.c: Move from here ...
5105 * kern/ieee1275/init.c: ... to here. Update all users.
5107 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5108 * kern/ieee1275/cmain.c: ... to here. Update all users.
5110 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5111 * kern/ieee1275/openfw.c: ... to here. Update all users.
5113 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5114 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5116 2008-04-10 Pavel Roskin <proski@gnu.org>
5118 * configure.ac: Always use "_cv_" in cache variables for
5119 compatibility with Autoconf 2.62.
5121 2008-04-07 Robert Millan <rmh@aybabtu.com>
5123 Revert grub/machine/init.h addition by Pavel (since it breaks on
5124 i386-ieee1275 and others):
5125 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5126 * util/powerpc/ieee1275/misc.c: Likewise.
5128 2008-04-07 Robert Millan <rmh@aybabtu.com>
5130 * util/grub-probe.c (probe): Improve error message.
5132 2008-04-07 Robert Millan <rmh@aybabtu.com>
5134 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5135 (this prevents the presence of a bogus entry from ruining the whole
5138 2008-04-06 Pavel Roskin <proski@gnu.org>
5140 * util/biosdisk.c: Include grub/util/biosdisk.h.
5141 * util/grub-fstest.c (execute_command): Make static.
5142 * util/grub-mkdevicemap.c (check_device): Likewise.
5143 * util/i386/pc/misc.c: Include grub/machine/init.h.
5144 * util/powerpc/ieee1275/misc.c: Likewise.
5145 * util/lvm.c: Include grub/util/lvm.h.
5146 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5148 * util/raid.c: Include grub/util/raid.h.
5149 (grub_util_getdiskname): Make static.
5151 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5152 grub_hostfs_fini(), as they are called from grub_init_all() and
5153 grub_fini_all() respectively. This fixes an infinite loop in
5154 grub-fstest due to double registration of hostfs.
5155 Reported by Christian Franke <Christian.Franke@t-online.de>
5157 2008-04-05 Pavel Roskin <proski@gnu.org>
5159 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5160 all 8 functions. Otherwise, probe function 0 only.
5162 2008-04-04 Pavel Roskin <proski@gnu.org>
5164 * commands/lspci.c (grub_lspci_iter): Print the bus number
5167 * commands/lspci.c (grub_pci_classes): Fix typos.
5168 (grub_lspci_iter): Don't print func twice. Print vendor ID
5169 before device ID, as it's normally done.
5171 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5172 Fix signedness warnings.
5173 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5175 * util/ieee1275/get_disk_name.c: Include config.h so that
5176 _GNU_SOURCE is defined and getline() is declared. Mark an
5177 unused argument as such. Fix a signedness warning.
5179 2008-04-02 Pavel Roskin <proski@gnu.org>
5181 * genkernsyms.sh.in: Use more robust assignments for CC and
5182 srcdir. Quote srcdir.
5183 * gensymlist.sh.in: Likewise. Assert at the compile time that
5184 the symbol table is not empty.
5186 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5187 * fs/cpio.c (grub_cpio_read): Likewise.
5189 2008-04-01 Pavel Roskin <proski@gnu.org>
5191 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5192 * disk/host.c (grub_host_open): Likewise.
5193 * disk/loopback.c (grub_loopback_open): Likewise.
5194 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5195 disk->id as in disk/host.c, not a multi-character constant.
5197 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5198 later is obsolete, potentially dangerous and sets a bad example.
5199 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5200 * util/misc.c (grub_util_get_image_size): Likewise.
5202 * disk/loopback.c (options): Improve help for "--partitions".
5204 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5205 options to align them with the short options, e.g. "echo -e".
5207 2008-03-31 Bean <bean123ch@gmail.com>
5209 * video/reader/png.c (grub_png_data): New member is_16bit and
5211 (grub_png_decode_image_header): Detect 16 bit png image.
5212 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5213 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5214 (grub_video_reader_png): Release memory occupied by image_data.
5216 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5218 (grub_nfs_mount): Skip the test for sector per cluster.
5220 * include/grub/ntfs.h (MAX_SPC): Removed.
5222 2008-03-31 Bean <bean123ch@gmail.com>
5224 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5225 (grub_probe_SOURCES): Add fs/afs.c.
5226 (grub_fstest_SOURCES): Likewise.
5227 (afs_mod_SOURCES): New variable.
5228 (afs_mod_CFLAGS): Likewise.
5229 (afs_mod_LDFLAGS): Likewise.
5231 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5232 (grub_emu_SOURCES): Likewise.
5234 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5236 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5238 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5240 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5242 * fs/afs.c: New file.
5244 2008-03-30 Pavel Roskin <proski@gnu.org>
5246 * disk/host.c: Include grub/misc.h to fix a warning.
5247 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5248 warnings about implicit declarations.
5250 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5252 * include/grub/i386/loader.h: Change declaration of
5253 grub_linux_boot() to match what grub_loader_set() expects.
5254 * util/getroot.c (grub_guess_root_device): Return const char* to
5256 * util/grub-probe.c (probe): Fix a warning about uninitialized
5257 abstraction_name variable.
5258 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5259 second argument as unused to fix a warning.
5261 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5262 missing grub_error() call.
5264 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5265 2.60 and newer uses it to define datadir.
5267 * commands/sleep.c: Fix warning about implicit declaration.
5268 * disk/memdisk.c: Likewise.
5269 * loader/aout.c: Likewise.
5270 * loader/i386/bsd_normal.c: Likewise.
5271 * util/grub-probe.c: Likewise.
5273 * commands/i386/cpuid.c (has_longmode): Make static.
5274 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5275 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5277 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5278 GDT. This is more robust, as %ds can change.
5279 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5280 calling real_to_prot().
5281 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5283 2008-03-28 Pavel Roskin <proski@gnu.org>
5285 * kern/i386/pc/startup.S: Assert that uncompressed functions
5286 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5287 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5288 code, as they push parts of the code (error handlers) beyond
5289 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5290 code as correctness and size.
5292 2008-03-28 Pavel Roskin <proski@gnu.org>
5294 * kern/i386/pc/startup.S
5295 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5296 data block address to the real mode, keep offset minimal. This
5297 works around a bug in AWARD BIOS on old Athlon systems, which
5298 makes CD detection hang.
5300 2008-03-26 Pavel Roskin <proski@gnu.org>
5302 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5304 * include/grub/normal.h: Add grub_parse_color_name_pair()
5307 2008-03-24 Bean <bean123ch@gmail.com>
5309 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5310 (cd_count): Removed.
5311 (cd_drive): New variable.
5312 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5313 (grub_biosdisk_call_hook): Likewise.
5314 (grub_biosdisk_iterate): Change cdrom detection method.
5315 (grub_biosdisk_open): Replace cd_start with cd_drive.
5316 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5317 detect cdrom device.
5319 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5321 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5322 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5323 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5324 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5325 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5326 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5327 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5328 (grub_biosdisk_cdrp): New structure.
5329 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5331 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5333 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5336 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5339 2008-03-20 Robert Millan <rmh@aybabtu.com>
5341 Remove 2 TiB limit in ata.mod.
5342 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5343 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5344 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5345 grub_uint64_t instead of grub_uint32_t.
5347 2008-03-05 Bean <bean123ch@gmail.com>
5349 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5350 (grub_multiboot): Set boot device.
5352 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5354 2008-03-02 Bean <bean123ch@gmail.com>
5356 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5359 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5361 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5364 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5367 * docs/fdl.texi: New file.
5369 * docs/mdate-sh: New file. Copied from gnulib.
5370 * docs/texinfo.tex: Likewise.
5372 * config.guess: Updated from gnulib.
5373 * install-sh: Likewise.
5375 2008-02-28 Robert Millan <rmh@aybabtu.com>
5377 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5378 (aout_mod_SOURCES): New variable.
5379 (aout_mod_CFLAGS): Likewise.
5380 (aout_mod_LDFLAGS): Likewise.
5382 * conf/i386-ieee1275.rmk: Likewise.
5384 2008-02-28 Robert Millan <rmh@aybabtu.com>
5386 * util/update-grub.in: Reorganise terminal validity check. Accept
5387 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5388 Based on suggestion by Franklin PIAT.
5390 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5392 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5394 * util/getroot.c (grub_util_check_block_device): New function that
5395 returns the given argument if it is a block device and returns NULL else.
5396 * util/grub-probe.c (argument_is_device): New variable.
5397 (probe): Promote device_name from a variable to an argument. Receive
5398 device_name from grub_util_check_block_device() if path is NULL and from
5399 grub_guess_root_device() else. Do not free() device_name anymore.
5400 (options): Introduce new parameter '-d, --device'.
5401 (main): Add description of the new parameter to the help screen.
5402 Rename path variable to argument. Set argument_is_device if the '-d'
5403 option is given. Pass argument to probe() depending on
5406 2008-02-24 Bean <bean123ch@gmail.com>
5408 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5409 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5410 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5411 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5412 (GRUB_ISO9660_VOLDESC_END): Likewise.
5413 (grub_iso9660_primary_voldesc): New member escape.
5414 (grub_iso9660_data): New member joliet.
5415 (grub_iso9660_convert_string): New function.
5416 (grub_iso9660_mount): Detect joliet extension.
5417 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5418 (grub_iso9660_iso9660_label): Likewise.
5420 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5421 (grub_setup_SOURCES): Add fs/udf.c.
5422 (grub_fstest_SOURCES): Likewise.
5423 (udf_mod_SOURCES): New variable.
5424 (udf_mod_CFLAGS): Likewise.
5425 (udf_mod_LDFLAGS): Likewise.
5427 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5428 (grub_emu_SOURCES): Likewise.
5430 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5432 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5434 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5436 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5438 * fs/udf.c: New file.
5440 2008-02-24 Robert Millan <rmh@aybabtu.com>
5442 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5443 (normal/lexer.c_DEPENDENCIES): New variables.
5444 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5445 (normal/lexer.c_DEPENDENCIES): Likewise.
5446 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5447 (normal/lexer.c_DEPENDENCIES): Likewise.
5448 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5449 (normal/lexer.c_DEPENDENCIES): Likewise.
5450 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5451 (normal/lexer.c_DEPENDENCIES): Likewise.
5452 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5453 (normal/lexer.c_DEPENDENCIES): Likewise.
5455 2008-02-23 Robert Millan <rmh@aybabtu.com>
5457 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5458 since they were intended to be in hex. This didn't break previously
5459 because of a bug in gpt_partition_map_iterate() (see below).
5461 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5462 when checking the validity of GPT header.
5463 Remove `partno', since it always provides the same information as `i'.
5465 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5467 * include/grub/efi/time.h: Fix a wrong comment.
5469 2008-02-19 Pavel Roskin <proski@gnu.org>
5471 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5474 2008-02-19 Bean <bean123ch@gmail.com>
5476 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5477 (aout_mod_SOURCES): New variable.
5478 (aout_mod_CFLAGS): Likewise.
5479 (aout_mod_LDFLAGS): Likewise.
5480 (_bsd_mod_SOURCES): New variable.
5481 (_bsd_mod_CFLAGS): Likewise.
5482 (_bsd_mod_LDFLAGS): Likewise.
5483 (bsd_mod_SOURCES): New variable.
5484 (bsd_mod_CFLAGS): Likewise.
5485 (bsd_mod_LDFLAGS): Likewise.
5487 * include/grub/aout.h: New file.
5489 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5491 * include/grub/i386/bsd.h: New file.
5493 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5496 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5497 function is called, so that it's possible to change it inside the hook.
5498 (grub_elf64_load): Likewise.
5499 (grub_elf_file): Don't close the file if elf header is not found.
5500 (grub_elf_close): Close the file if grub_elf_file fails (The new
5501 grub_elf_file won't close it).
5502 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5503 (grub_elf64_size): Likewise.
5505 * kern/i386/loader.S (grub_unix_real_boot): New function.
5507 * loader/aout.c: New file.
5509 * loader/i386/bsd.c: New file.
5511 * loader/i386/bsd_normal.c: New file.
5513 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5515 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5516 can test other formats.
5518 2008-02-19 Robert Millan <rmh@aybabtu.com>
5520 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5521 (grub_gpt_partition_type_empty): Redefine with macro from
5522 `<grub/gpt_partition.h>'.
5523 (gpt_partition_map_iterate): Adjust partition type comparison.
5525 Export `entry' as partmap-specific `part.data' struct.
5526 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5528 * include/grub/gpt_partition.h (grub_gpt_header)
5529 (grub_gpt_partentry): ... to here (new file).
5531 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5533 (grub_gpt_partition_type_bios_boot): New const variable, defined
5534 with macro from `<grub/gpt_partition.h>'.
5536 (setup): Replace `first_start' with `embed_region', which keeps
5537 track of the embed region (and is partmap-agnostic).
5539 Replace find_first_partition_start() with find_usable_region(),
5540 which finds a usable region for embedding using partmap-specific
5541 knowledge (supports PC/MSDOS and GPT).
5543 Fix all assumptions that the embed region start at sector 1, using
5544 `embed_region.start' from now on. Similarly, use `embed_region.end'
5545 rather than `first_start' to calculate available size.
5547 In grub_util_info() message, replace "into after the MBR" with an
5548 indication of the specific sector our embed region starts at.
5550 2008-02-19 Robert Millan <rmh@aybabtu.com>
5552 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5553 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5554 `commands/reboot.c'.
5555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5556 (halt_mod_SOURCES): Likewise.
5557 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5558 (halt_mod_SOURCES): Likewise.
5560 2008-02-17 Christian Franke <franke@computer.org>
5562 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5564 2008-02-17 Robert Millan <rmh@aybabtu.com>
5566 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5567 set `first_start' to 0 for non-PC/MSDOS partition maps.
5569 2008-02-16 Robert Millan <rmh@aybabtu.com>
5571 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5572 do not assume partition map is PC/MSDOS before performing checks that
5573 are specific to that layout.
5575 2008-02-13 Robert Millan <rmh@aybabtu.com>
5577 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5578 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5579 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5581 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5583 * configure.ac: Only a cosmetic change on the handling of
5584 -fno-stack-protector.
5586 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
5588 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5589 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5591 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5592 (halt_mod_SOURCES): New variable.
5593 (halt_mod_CFLAGS): Likewise.
5594 (halt_mod_LDFLAGS): Likewise.
5595 (reboot_mod_SOURCES): Likewise.
5596 (reboot_mod_CFLAGS): Likewise.
5597 (reboot_mod_LDFLAGS): Likewise.
5599 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5600 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5602 (halt_mod_SOURCES): Likewise.
5603 (reboot_mod_SOURCES): Likewise.
5605 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5606 commands/i386/pc/reboot.c by commands/reboot.c.
5607 (reboot_mod_SOURCES): Likewise.
5609 * commands/i386/pc/reboot.c: merge this file ...
5611 * commands/ieee1275/reboot.c: ... and this file ...
5613 * commands/reboot.c: ... to this file.
5614 Add some precompiler directive to include the correct header for
5617 * commands/ieee1275/halt.c: move this file ...
5619 * commands/halt.c: ... to here.
5620 Add some precompiler directive to include the correct header for
5623 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5624 (grub_halt): Likewise.
5626 * kern/efi/efi.c (grub_reboot): New function.
5627 (grub_halt): Likewise.
5629 2008-02-12 Robert Millan <rmh@aybabtu.com>
5631 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5632 /dev (like it is done for /dev/mapper). This doesn't provide support
5633 for EVMS, but at least it is now easy to identify the problem when it
5636 2008-02-11 Robert Millan <rmh@aybabtu.com>
5638 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5639 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5640 comparing it with -1, not 0.
5642 2008-02-10 Robert Millan <rmh@aybabtu.com>
5644 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5646 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5647 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5649 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5650 `disk/lvm.c' to the end of the list.
5651 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5652 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5654 2008-02-10 Robert Millan <rmh@aybabtu.com>
5656 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5657 grub_print_error() instead. This will let user know why we're entering
5659 Based on suggestions from Sam Morris.
5661 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
5663 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5664 on remaining N args, instead of "--" arg N times.
5666 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5668 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5669 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5670 pattern for unknown glyphs.
5672 2008-02-09 Robert Millan <rmh@aybabtu.com>
5674 * configure.ac: Probe for `help2man'.
5675 * Makefile.in (builddir): New variable.
5676 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5677 or otherwise add a few flags/options to it.
5678 (install-local): For every executable utility or script that is
5679 installed, invoke $(HELP2MAN) to install a manpage based on --help
5682 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5683 that it doesn't prevent --help from working in build tree.
5685 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5686 with `bug-grub@gnu.org'.
5687 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5688 * util/update-grub.in (usage): New function.
5689 Implement proper argument check, with support for --help and --version
5690 (as well as existing -y).
5692 2008-02-09 Christian Franke <franke@computer.org>
5694 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5695 avoid overwriting previous output.
5696 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5698 2008-02-09 Robert Millan <rmh@aybabtu.com>
5700 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5703 2008-02-09 Robert Millan <rmh@aybabtu.com>
5705 * commands/sleep.c: New file.
5706 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5707 (sleep_mod_SOURCES): New variable.
5708 (sleep_mod_CFLAGS): Likewise.
5709 (sleep_mod_LDFLAGS): Likewise.
5711 2008-02-09 Robert Millan <rmh@aybabtu.com>
5713 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5714 situations in which we can deduce the RAID size and the superblock
5717 2008-02-09 Robert Millan <rmh@aybabtu.com>
5719 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5720 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5721 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5723 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5724 and return a grub_diskmemberlist_t composed of physical array members.
5725 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5727 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5729 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5730 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5731 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5733 * util/grub-probe.c (probe): Move partmap probing code from here ...
5734 (probe_partmap): ... to here.
5735 (probe): Use probe_partmap() once for the disk we're probing, and
5736 additionally, when such disk contains a memberlist() struct member,
5737 once for each disk that is contained in the structure returned by
5740 2008-02-09 Robert Millan <rmh@aybabtu.com>
5742 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5743 environment variable to 'all' in order to obtain debug output from
5745 * util/i386/pc/grub-setup.c (main): Likewise.
5747 2008-02-08 Robert Millan <rmh@aybabtu.com>
5749 * disk/raid.c (grub_raid_scan_device): Check for
5750 `array->device[sb.this_disk.number]' rather than for
5751 `array->device[sb.this_disk.number]->name', since the latter is not
5752 guaranteed to be accessible.
5754 2008-02-08 Robert Millan <rmh@aybabtu.com>
5756 * disk/raid.c: Update copyright.
5757 * fs/cpio.c: Likewise.
5758 * include/grub/raid.h: Likewise.
5759 * loader/i386/pc/multiboot.c: Likewise.
5760 * util/hostfs.c: Likewise.
5762 2008-02-08 Robert Millan <rmh@aybabtu.com>
5764 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5765 to a grub_disk_t array.
5766 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5768 (grub_raid_scan_device): Replace `device[x].name' accesses with
5769 `device[x]->name'. Simplify initialization of `array->device[x]'.
5771 2008-02-08 Robert Millan <rmh@aybabtu.com>
5773 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5774 grub_dprintf() calls.
5775 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5778 2008-02-07 Christian Franke <franke@computer.org>
5780 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5781 instead of fseek and ftell to support large files.
5782 (grub_hostfs_read): Likewise.
5784 2008-02-07 Robert Millan <rmh@aybabtu.com>
5786 Patch from Jeroen Dekkers.
5787 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
5788 failure, since successfully reading all array members might not be
5791 2008-02-06 Robert Millan <rmh@aybabtu.com>
5793 * util/grub-probe.c (probe): Simplify partmap probing (with the
5794 assumption that the first word up to the underscore equals to
5797 2008-02-06 Christian Franke <franke@computer.org>
5799 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5800 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5801 last block of a cpio or tar stream.
5802 Check for "TRAILER!!!" instead of any empty data
5803 block to detect last block of a cpio stream.
5804 (grub_cpio_dir): Fix constness of variable np.
5805 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5806 cpio or tar trailer is detected. This fixes a crash
5807 on open of a non existing file.
5809 2008-02-05 Bean <bean123ch@gmail.com>
5811 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5813 (grub_multiboot_load_elf64): Likewise.
5814 (grub_multiboot): Initialize mbi structure.
5816 * util/grub-fstest.c: Don't include unused header file script.h.
5818 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
5820 (grub_fstest_SOURCES): Likewise.
5822 2008-02-05 Robert Millan <rmh@aybabtu.com>
5824 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5825 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5826 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5827 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5829 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5830 (translation_table): Replace hardcoded values with macros
5831 provided by `<grub/term.h>'.
5833 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5834 (keyboard_map): Correct/add a few values, with macros provided
5836 (keyboard_map_shift): Zero values that don't differ from their
5837 `keyboard_map' equivalents.
5838 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5839 Discard the second scan code that is always sent by Caps lock.
5840 Only use `keyboard_map_shift' when it provides a non-zero value,
5841 otherwise fallback to `keyboard_map'.
5843 2008-02-04 Bean <bean123ch@gmail.com>
5845 * Makefile.in (enable_grub_fstest): New variable.
5847 * conf/common.rmk (grub_fstest_init.lst): New rule.
5848 (grub_fstest_init.h): Likewise.
5849 (grub_fstest_init.c): Likewise.
5850 (util/grub-fstest.c_DEPENDENCIES): New variable.
5851 (grub_fstest_SOURCES): Likewise.
5853 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5855 * util/grub-fstest.c: New file.
5857 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5859 Make grub-setup handle a separate root device.
5861 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5862 so that the root device can be compared with the destination
5864 When embedding the core image, if the root and destination devices
5865 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5867 When not embedding, set ROOT_DRIVE to 0xFF.
5869 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5871 Add support for having a grub directory in a different drive. This
5872 is still only the data handling part.
5874 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5875 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5876 (grub_root_drive): New variable.
5878 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5879 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5880 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5883 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5885 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5887 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5889 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5890 is bogus, because PXE booting does not specify any drive
5893 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5894 am not sure if this is really correct.
5896 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5897 is always identical to the boot drive when booting from a CD.
5899 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5901 (root_drive): New variable.
5902 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5903 (setup_sectors): Push %dx right after popping it, because %dh will
5905 (copy_buffer): Restore %dx.
5907 2008-02-03 Robert Millan <rmh@aybabtu.com>
5909 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5910 use `cdboot.img' for cdrom images.
5912 2008-02-03 Robert Millan <rmh@aybabtu.com>
5914 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5915 only setup gfxterm when `font' command has succeeded.
5917 2008-02-03 Robert Millan <rmh@aybabtu.com>
5919 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5920 (grub_rescue_cmd_multiboot_loader)
5921 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5923 2008-02-03 Pavel Roskin <proski@gnu.org>
5925 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
5926 %edx and %esi from stack only after grub_gate_a20() is called.
5927 grub_gate_a20() clobbers %edx.
5929 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5931 * configure.ac (AC_INIT): Bumped to 1.96.
5933 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5934 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5935 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5936 video/readers/png.c.
5938 2008-02-03 Bean <bean123ch@gmail.com>
5940 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5941 (cdboot_img_SOURCES): New variable.
5942 (cdboot_img_ASFLAGS): New variable.
5943 (cdboot_img_LDFLAGS): New variable.
5945 * boot/i386/pc/cdboot.S: New file.
5947 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5948 (cd_count): Likewise.
5949 (grub_biosdisk_get_drive): Add support for cd device.
5950 (grub_biosdisk_call_hook): Likewise.
5951 (grub_biosdisk_iterate): Likewise.
5952 (grub_biosdisk_open): Likewise.
5953 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5954 (grub_biosdisk_rw): Support reading from cd device.
5955 (GRUB_MOD_INIT): Iterate cd devices.
5957 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5958 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5959 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5961 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5963 2008-02-02 Robert Millan <rmh@aybabtu.com>
5965 * commands/read.c: New file.
5966 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5967 (read_mod_SOURCES): New variable.
5968 (read_mod_CFLAGS): Likewise.
5969 (read_mod_LDFLAGS): Likewise.
5971 2008-02-02 Robert Millan <rmh@aybabtu.com>
5973 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5974 determining whether menu has to be displayed.
5976 2008-02-02 Marco Gerards <marco@gnu.org>
5978 * bus/pci.c: New file.
5980 * include/grub/pci.h: Likewise.
5982 * include/grub/i386/pc/pci.h: Likewise.
5984 * commands/lspci.c: Likewise.
5986 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5988 (pci_mod_SOURCES): New variable.
5989 (pci_mod_CFLAGS): Likewise.
5990 (pci_mod_LDFLAGS): Likewise.
5991 (lspci_mod_SOURCES): Likewise.
5992 (lspci_mod_CFLAGS): Likewise.
5993 (lspci_mod_LDFLAGS): Likewise.
5995 2008-02-02 Bean <bean123ch@gmail.com>
5997 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5998 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6000 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6001 (grub_xfs_btree_node): New structure.
6002 (grub_xfs_btree_root): New structure.
6003 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6004 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6005 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6006 (GRUB_XFS_EXTENT_SIZE): Likewise.
6007 (grub_xfs_read_block): Support btree format type.
6008 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6009 Use directory block as basic unit.
6011 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6013 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6014 __attribute__ ((__regparm__ (1))).
6016 2008-02-01 Robert Millan <rmh@aybabtu.com>
6018 Correct a mistake in previous commit.
6020 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6022 (normal/command.c_DEPENDENCIES): New variable.
6024 2008-02-01 Robert Millan <rmh@aybabtu.com>
6026 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6028 (normal/command.c_DEPENDENCIES): New variable.
6029 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6030 * conf/i386-ieee1275.rmk: Likewise.
6031 * conf/i386-linuxbios.rmk: Likewise.
6032 * conf/i386-pc.rmk: Likewise.
6033 * conf/sparc64-ieee1275.rmk: Likewise.
6034 * conf/powerpc-ieee1275.rmk: Likewise.
6035 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6037 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6039 2008-02-01 Robert Millan <rmh@aybabtu.com>
6041 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6042 call at beginning of function.
6044 2008-01-31 Pavel Roskin <proski@gnu.org>
6046 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6047 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6048 (grub_mkrescue_SOURCES): Likewise.
6049 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6051 2008-01-30 Robert Millan <rmh@aybabtu.com>
6053 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6054 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6055 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6056 (grub_probe_SOURCES): ... to here.
6058 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6059 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6060 * conf/i386-ieee1275.rmk: Likewise.
6061 * conf/i386-linuxbios.rmk: Likewise.
6062 * conf/powerpc-ieee1275.rmk: Likewise.
6064 2008-01-30 Tristan Gingold <gingold@free.fr>
6066 * kern/rescue.c: Silently accept empty lines.
6068 2008-01-29 Bean <bean123ch@gmail.com>
6070 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6071 (real_code_2): Code cleanup and change comment style.
6072 (move_memory): Avoid using 32-bit address mode.
6074 2008-01-29 Bean <bean123ch@gmail.com>
6076 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6077 (png_mod_SOURCES): New variable.
6078 (png_mod_CFLAGS): Likewise.
6079 (png_mod_LDFLAGS): Likewise.
6081 * video/readers/png.c: New file.
6083 2008-01-28 Robert Millan <rmh@aybabtu.com>
6085 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6086 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6087 `ifndef GRUB_MOD_GAP' hack.
6088 * util/elf/grub-mkimage.c (add_segments): Likewise.
6090 2008-01-27 Robert Millan <rmh@aybabtu.com>
6092 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6093 `GRUB_MOD_GAP' for platforms in which it's not defined.
6094 * util/elf/grub-mkimage.c (add_segments): Likewise.
6096 2008-01-27 Robert Millan <rmh@aybabtu.com>
6098 Get grub-emu to build again (including parallel builds).
6100 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6102 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6103 (normal/execute.c_DEPENDENCIES): ... this, ...
6104 (grub-emu_DEPENDENCIES): ... and this.
6106 * conf/i386-efi.rmk: Likewise.
6107 * conf/i386-linuxbios.rmk: Likewise.
6108 * conf/i386-ieee1275.rmk: Likewise.
6109 * conf/powerpc-ieee1275.rmk: Likewise.
6110 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6112 2008-01-27 Robert Millan <rmh@aybabtu.com>
6114 * NEWS: Add a few items.
6116 2008-01-27 Robert Millan <rmh@aybabtu.com>
6118 Fix parallel builds with grub-emu. Based on earlier commit for
6119 grub-probe and grub-setup.
6121 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6122 (util/grub-emu.c_DEPENDENCIES): ... this.
6123 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6124 (util/grub-emu.c_DEPENDENCIES): ... this.
6125 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6126 (util/grub-emu.c_DEPENDENCIES): ... this.
6127 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6128 (util/grub-emu.c_DEPENDENCIES): ... this.
6129 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6130 (util/grub-emu.c_DEPENDENCIES): ... this.
6132 2008-01-27 Pavel Roskin <proski@gnu.org>
6134 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6135 to create a gap between _end and the modules added to the image
6136 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6137 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6138 * util/elf/grub-mkimage.c (add_segments): Likewise.
6140 2008-01-26 Pavel Roskin <proski@gnu.org>
6142 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6143 just return an error.
6145 2008-01-26 Bean <bean123ch@gmail.com>
6147 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6148 (grub_reiserfs_get_item): Save offset of the next item.
6149 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6151 2008-01-25 Robert Millan <rmh@aybabtu.com>
6153 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6154 make all filesystem sources appear together (possibly fixing omissions
6156 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6157 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6158 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6161 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6163 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6164 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6165 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6166 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6168 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6169 (probe): Add a sanity check to make sure of our ability to read
6170 requested files when probing for filesystem type.
6172 * genmk.rb: Update copyright year (2007).
6174 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6175 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6176 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6177 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6178 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6179 : Remove function prototypes.
6181 2008-01-25 Robert Millan <rmh@aybabtu.com>
6183 Revert my previous commits (based on wrong assumption of how grub_errno
6186 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6187 * kern/file.c (grub_file_open): Likewise.
6189 2008-01-24 Pavel Roskin <proski@gnu.org>
6191 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6192 that hang if GRUB tries to setup colors.
6193 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6194 colors for firmwares that don't support it.
6195 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6196 Recognize Open Hack'Ware, set flags to work around its
6199 2008-01-24 Robert Millan <rmh@aybabtu.com>
6201 * kern/file.c (grub_file_open): Do not account previous failures of
6202 unrelated functions when grub_errno is checked for.
6203 Reported by Oleg Strikov.
6205 2008-01-24 Bean <bean123ch@gmail.com>
6207 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6208 (grub_ufs_sblock): New member volume name.
6209 (grub_ufs_find_file): Fix string copy bug.
6210 (grub_ufs_label): Implement this function properly.
6212 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6213 (grub_hfs_iterate_records): Use the correct file number for extents
6214 and catalog file. Fix problem in next index calculation.
6215 (grub_hfs_find_node): Replace recursive function call with loop.
6216 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6218 2008-01-23 Robert Millan <rmh@aybabtu.com>
6220 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6221 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6222 (grub_multiboot2_real_boot): New function prototype.
6224 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6225 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6227 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6228 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6230 2008-01-23 Robert Millan <rmh@aybabtu.com>
6232 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6233 #ifdef'ed out grub_printf().
6235 2008-01-23 Robert Millan <rmh@aybabtu.com>
6237 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6238 grub_dprintf calls, since they make "debug=all" mode unusable.
6239 (grub_console_checkkey): Likewise.
6241 2008-01-23 Robert Millan <rmh@aybabtu.com>
6243 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6244 `term/i386/pc/at_keyboard.c'.
6245 (pkglib_MODULES): Add `serial.mod'.
6246 (serial_mod_SOURCES): New variable.
6247 (serial_mod_CFLAGS): Likewise.
6248 (serial_mod_LDFLAGS): Likewise.
6250 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6251 `<grub/powerpc/ieee1275/console.h>'.
6252 (grub_keyboard_controller_init): New function prototype.
6253 (grub_console_checkkey): Likewise.
6254 (grub_console_getkey): Likewise.
6256 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6259 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6260 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6262 2008-01-23 Robert Millan <rmh@aybabtu.com>
6264 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6265 present, "(memdisk)/boot/grub" becomes the default prefix.
6267 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6268 a memdisk tarball with all the modules. Add --overlay=DIR option that
6269 allows users to overlay additional files into the image.
6271 2008-01-23 Robert Millan <rmh@aybabtu.com>
6273 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6274 and `machine/memory.h'.
6275 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6276 (_multiboot_mod_SOURCES): New variable.
6277 (_multiboot_mod_CFLAGS): Likewise.
6278 (_multiboot_mod_LDFLAGS): Likewise.
6279 (multiboot_mod_SOURCES): Likewise.
6280 (multiboot_mod_CFLAGS): Likewise.
6281 (multiboot_mod_LDFLAGS): Likewise.
6283 * include/grub/i386/ieee1275/loader.h: New file.
6285 * include/grub/i386/ieee1275/machine.h: Likewise.
6287 * include/grub/i386/ieee1275/memory.h: Likewise.
6289 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6290 variable declaration.
6291 (grub_os_area_size): Likewise.
6293 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6294 (grub_lower_mem, grub_upper_mem): New variables.
6295 (grub_stop_floppy): New function (just to make
6296 grub_multiboot2_real_boot() happy).
6298 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6299 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6300 (grub_stop): New function.
6301 Include `"../realmode.S"' and `"../loader.S"'.
6303 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6304 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6306 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6307 rely on grub_multiboot2_real_boot() for final boot.
6309 2008-01-22 Robert Millan <rmh@aybabtu.com>
6311 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6312 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6313 device that doesn't look like an SD card.
6314 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6315 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6316 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6317 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6320 2008-01-22 Robert Millan <rmh@aybabtu.com>
6322 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6323 avoid claiming over our own code.
6325 2008-01-22 Bean <bean123ch@gmail.com>
6327 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6328 (jpeg_mod_SOURCES): New variable.
6329 (jpeg_mod_CFLAGS): Likewise.
6330 (jpeg_mod_LDFLAGS): Likewise.
6332 * video/readers/jpeg.c : New file.
6334 2008-01-22 Bean <bean123ch@gmail.com>
6336 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6337 there are no more items.
6339 2008-01-21 Robert Millan <rmh@aybabtu.com>
6341 * kern/mm.c (grub_mm_init_region): Improve debug message.
6343 2008-01-21 Robert Millan <rmh@aybabtu.com>
6345 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6346 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6348 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6350 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6351 Indicates start of upper memory.
6352 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6353 (generate_image): Abort when image size is big enough to corrupt
6356 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6357 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6358 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6359 instead of hardcoding 0xA0000.
6360 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6361 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6362 instead of hardcoding 0xA0000.
6364 2008-01-21 Robert Millan <rmh@aybabtu.com>
6366 * disk/memdisk.c (memdisk_size): New variable.
6367 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6369 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6370 image to dynamic memory.
6371 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6372 `memdisk_size'. Free memdisk block.
6374 2008-01-21 Robert Millan <rmh@aybabtu.com>
6376 Fix detection of very small filesystems (like tar).
6378 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6379 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6380 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6381 a problem with this disk).
6383 2008-01-21 Robert Millan <rmh@aybabtu.com>
6385 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6386 on grub_biosdisk_rw_standard() error.
6388 2008-01-21 Robert Millan <rmh@aybabtu.com>
6390 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6392 * kern/elf.c: Likewise.
6393 * kern/ieee1275/ieee1275.c: Likewise.
6394 * kern/powerpc/ieee1275/openfw.c: Likewise.
6395 * term/ieee1275/ofconsole.c: Likewise.
6397 2008-01-21 Robert Millan <rmh@aybabtu.com>
6399 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6401 * include/grub/kernel.h (grub_arch_memdisk_addr)
6402 (grub_arch_memdisk_size): Moved from here ...
6404 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6405 (grub_arch_memdisk_size): ... to here.
6407 2008-01-21 Robert Millan <rmh@aybabtu.com>
6409 Mostly based on bugfix from Bean.
6411 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6412 attribute with hook() parameter.
6413 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6415 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6416 attribute with hook() parameter.
6417 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6420 2008-01-21 Robert Millan <rmh@aybabtu.com>
6422 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6423 (pkglib_MODULES): Add `memdisk.mod'.
6424 (memdisk_mod_SOURCES): New variable.
6425 (memdisk_mod_CFLAGS): Likewise.
6426 (memdisk_mod_LDFLAGS): Likewise.
6428 * disk/memdisk.c: New file.
6430 * include/grub/disk.h (grub_disk_dev_id): Add
6431 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6433 * include/grub/i386/pc/kernel.h
6434 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6435 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6436 (grub_kernel_image_size): New variable declaration.
6437 (grub_total_module_size): Likewise.
6438 (grub_memdisk_image_size): Likewise.
6440 * include/grub/i386/pc/memory.h
6441 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6443 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6444 (grub_arch_memdisk_addr): New variable declaration.
6445 (grub_arch_memdisk_size): Likewise.
6447 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6448 (grub_arch_memdisk_size): Likewise.
6450 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6451 (codestart): Replace hardcoded `0x100000' with
6452 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6454 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6455 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6456 not NULL, append the contents of the file it refers to, at the end of
6457 the compressed kernel image. Initialize `grub_memdisk_image_size'
6458 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6459 (options): Add "memdisk"|'m' option.
6460 (main): Parse --memdisk|-m option, and pass user-provided path as
6461 parameter to generate_image().
6463 2008-01-20 Robert Millan <rmh@aybabtu.com>
6465 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6466 grub_dprintf() calls from here ...
6467 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6469 2008-01-20 Robert Millan <rmh@aybabtu.com>
6471 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6473 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6475 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6476 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6477 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6478 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6480 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6481 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6483 2008-01-19 Robert Millan <rmh@aybabtu.com>
6485 Get rid of confusing function (superseded by
6486 `grub_ieee1275_get_integer_property')
6487 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6489 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6491 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6492 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6493 in native endianness from grub_ieee1275_get_integer_property().
6495 2008-01-19 Robert Millan <rmh@aybabtu.com>
6497 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6498 command after "shut-down", since implementations differ on which
6499 the command for halt is.
6501 2008-01-19 Robert Millan <rmh@aybabtu.com>
6503 * include/grub/i386/linuxbios/console.h: Add header protection.
6504 (grub_keyboard_controller_init): New function prototype.
6505 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6506 (KEYBOARD_COMMAND_READ): Likewise.
6507 (KEYBOARD_COMMAND_WRITE): Likewise.
6508 (KEYBOARD_SCANCODE_SET1): Likewise.
6509 (grub_keyboard_controller_write): New function.
6510 (grub_keyboard_controller_read): Likewise.
6511 (grub_keyboard_controller_init): Likewise.
6513 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6514 (grub_console_init): On coreboot/LinuxBIOS, call
6515 grub_keyboard_controller_init().
6517 2008-01-19 Robert Millan <rmh@aybabtu.com>
6519 PowerPC changes provided by Pavel Roskin.
6521 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6522 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6523 don't rely on cmain() doing it.
6524 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6525 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6527 2008-01-16 Robert Millan <rmh@aybabtu.com>
6529 * include/grub/i386/linuxbios/memory.h
6530 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6531 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6532 receive `table_header' as argument. Instead, probe for it in the
6533 known memory ranges where it can be present.
6534 (grub_available_iterate): Do not pass a fixed `table_header' address
6535 to grub_linuxbios_table_iterate().
6537 2008-01-15 Robert Millan <rmh@aybabtu.com>
6539 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6540 * conf/i386-ieee1275.rmk: New file.
6541 * include/grub/i386/ieee1275/console.h: Likewise.
6542 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6543 * include/grub/i386/ieee1275/kernel.h: Likewise.
6544 * include/grub/i386/ieee1275/time.h: Likewise.
6545 * kern/i386/ieee1275/init.c: Likewise.
6546 * kern/i386/ieee1275/startup.S: Likewise.
6548 2008-01-15 Robert Millan <rmh@aybabtu.com>
6550 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6551 when pointers are 32-bit (but still do set it to one when they are
6554 2008-01-15 Robert Millan <rmh@aybabtu.com>
6556 * include/grub/ieee1275/ieee1275.h
6557 (grub_ieee1275_get_integer_property): New function prototype.
6559 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6560 (grub_ieee1275_get_integer_property): New function. Wraps around
6561 grub_ieee1275_get_property() to handle endianness.
6563 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6564 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6566 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6567 (grub_map): Likewise.
6568 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6570 2008-01-15 Bean <bean123ch@gmail.com>
6572 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6573 (grub_script_execute_cmdline): Reset grub_errno.
6575 * normal/main.c (read_config_file): Reset grub_errno.
6577 * normal/parse.y (script_init): New.
6578 (script): Move function and menuentry here.
6580 (command): Add delimiter at the end of command.
6581 (commands): Adjust to match the new command.
6582 (commandblock): Remove grub_script_lexer_record_start.
6583 (menuentry): Add grub_script_lexer_record_start, use the new commands.
6584 (if): Use the new commands.
6586 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6588 2008-01-15 Robert Millan <rmh@aybabtu.com>
6590 * normal/menu.c (run_menu): Move timeout message from here ...
6591 (print_timeout): ... to here.
6592 (run_menu): Use print_timeout() once during initial draw to print
6593 the whole message, and again in every clock tick to update only
6594 the number of seconds.
6596 2008-01-15 Robert Millan <rmh@aybabtu.com>
6598 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6599 actual size of `available' from grub_ieee1275_get_property(), and
6600 restrict parsing to that bound.
6602 2008-01-15 Christian Franke <franke@computer.org>
6604 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6605 (argp_program_version): Remove variable.
6606 (argp_program_bug_address): Likewise.
6607 (options): Convert from struct argp_option to struct option.
6608 (struct arguments): Remove.
6609 (parse_opt): Remove.
6610 (usage): New function.
6611 (main): Replace struct args members by simple variables.
6612 Replace argp_parse() by getopt_long().
6613 Add switch to evaluate options.
6614 Add missing "(...)" around root_dev in prefix string.
6616 2008-01-14 Robert Millan <rmh@aybabtu.com>
6618 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6619 for grub_ieee1275_exit(), in order to improve portability.
6621 2008-01-14 Robert Millan <rmh@aybabtu.com>
6623 * util/grub.d/10_linux.in (prefix): Define.
6624 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6626 2008-01-13 Pavel Roskin <proski@gnu.org>
6628 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6629 grub_errno if no errors have been detected.
6631 2008-01-12 Robert Millan <rmh@aybabtu.com>
6633 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6634 (grub_util_get_dev_abstraction): New function prototype.
6636 * util/getroot.c: Include `<grub/util/getroot.h>'
6637 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6638 (grub_util_get_dev_abstraction): ... here (new function).
6640 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6641 `PRINT_ABSTRACTION'.
6642 (probe): Probe for abstraction type when requested.
6643 (main): Understand `--target=abstraction'.
6645 * util/i386/efi/grub-install.in: Add abstraction module to core
6646 image when it is found to be necessary.
6647 * util/i386/pc/grub-install.in: Likewise.
6648 * util/powerpc/ieee1275/grub-install.in: Likewise.
6650 * util/update-grub_lib.in (font_path): Return system path without
6651 converting to GRUB path.
6652 * util/update-grub.in: Convert system path returned by font_path()
6653 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6654 abstraction module is needed for loading fonts (if any). Export
6655 that as `GRUB_PRELOAD_MODULES'.
6656 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6659 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6661 Remove some unused code from reiserfs.
6663 * fs/reiserfs.c (struct grub_reiserfs_key)
6664 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6665 (struct grub_reiserfs_node_body): Removed.
6666 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6668 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6670 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6672 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6674 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6676 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6678 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6679 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6680 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6682 2008-01-10 Robert Millan <rmh@aybabtu.com>
6684 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6685 Determines if a file is garbage left by packaging systems, etc.
6686 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6687 for processing /etc/grub.d scripts.
6688 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6689 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6690 as a condition for processing Linux images.
6692 2008-01-10 Pavel Roskin <proski@gnu.org>
6694 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6695 to compile reiserfs.c on PowerPC.
6697 2008-01-10 Robert Millan <rmh@aybabtu.com>
6699 * kern/device.c (grub_device_iterate): Do not abort device iteration
6700 when one of the devices cannot be opened.
6701 * kern/disk.c (grub_disk_open): Do not account previous failures of
6702 unrelated functions when grub_errno is checked for.
6704 2008-01-08 Robert Millan <rmh@aybabtu.com>
6706 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6707 `! grub_linux_is_bzimage', change order of address comparison to make
6708 it more intuitive, and improve "too big zImage" error message.
6710 2008-01-08 Robert Millan <rmh@aybabtu.com>
6712 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6713 `$(update-grub_DATA)'.
6714 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6717 2008-01-07 Robert Millan <rmh@aybabtu.com>
6719 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6720 which instruction is modified by grub-setup during installation
6721 (since it wasn't obvious by only looking at this file).
6723 2008-01-07 Robert Millan <rmh@aybabtu.com>
6725 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6726 listing actual TODO items.
6728 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6730 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6732 (grub_reiserfs_get_key_offset): Likewise.
6733 (grub_reiserfs_set_key_offset): Likewise.
6734 (grub_reiserfs_set_key_type): Likewise.
6735 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
6737 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6738 better to remove the bitfield version completely.
6740 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6742 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6743 allocated from the heap, due to the fshelp implementation.
6744 (grub_reiserfs_dir): Free NODE, due to the same reason.
6746 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6748 Mostly from Vincent Pelletier:
6750 * fs/reiserfs.c: New file.
6752 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6753 (reiserfs_mod_SOURCES): New variable.
6754 (reiserfs_mod_CFLAGS): Likewise.
6755 (reiserfs_mod_LDFLAGS): Likewise.
6757 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6758 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6759 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6762 2008-01-06 Robert Millan <rmh@aybabtu.com>
6764 * normal/color.c: Remove `<grub/env.h>'.
6766 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6768 * include/grub/normal.h: Include <grub/env.h>.
6770 2008-01-05 Robert Millan <rmh@aybabtu.com>
6772 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6773 usage example with `(hd0,1)'.
6774 Reported by Samuel Thibault.
6776 2008-01-05 Robert Millan <rmh@aybabtu.com>
6778 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6779 (grub_linux_boot_zimage): Rename to ...
6780 (grub_linux_boot): ... this.
6781 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6782 (grub_linux_boot_zimage): Conditionalize zImage copy.
6784 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6785 (grub_linux_boot_bzimage): Remove prototype.
6786 (grub_linux_boot_zimage): Rename to ...
6787 (grub_linux_boot): ... this.
6789 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6790 (grub_linux_boot): Remove function.
6792 2008-01-05 Robert Millan <rmh@aybabtu.com>
6794 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6795 (grub_env_write_color_highlight): Likewise.
6796 (grub_wait_after_message): Likewise.
6798 * normal/color.c: New file.
6800 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6801 (normal_mod_DEPENDENCIES): Likewise.
6803 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6804 (normal_mod_DEPENDENCIES): Likewise.
6806 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6807 (normal_mod_DEPENDENCIES): Likewise.
6809 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6810 (normal_mod_DEPENDENCIES): Likewise.
6812 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6813 for waiting after a message is printed.
6814 * normal/main.c (read_config_file): Likewise.
6815 (grub_normal_init): Register grub_env_write_color_normal() and
6816 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6817 `color_highlight' variables as global.
6819 * normal/menu.c (grub_wait_after_message): New function.
6820 (grub_color_menu_normal): New variable. Replaces ...
6821 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6822 (grub_color_menu_highlight): New variable. Replaces ...
6823 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6824 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6825 `GRUB_TERM_COLOR_STANDARD'.
6826 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6827 `normal_code' and `highlight_code' to `old_color_normal' and
6828 `old_color_highlight', respectively.
6829 (grub_menu_init_page): Update colors when drawing the menu, based on
6830 `menu_color_normal' and `menu_color_highlight' variables.
6831 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6832 a message is printed.
6834 2008-01-05 Robert Millan <rmh@aybabtu.com>
6836 * kern/env.c (grub_env_context_open): Propagate hooks for global
6837 variables to new context.
6839 * kern/main.c (grub_set_root_dev): Export `root' variable.
6841 2008-01-05 Robert Millan <rmh@aybabtu.com>
6843 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
6844 discs unconditionally, since udev and others have options to provide
6847 2008-01-05 Robert Millan <rmh@aybabtu.com>
6849 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6851 2008-01-04 Christian Franke <franke@computer.org>
6853 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6856 2008-01-03 Pavel Roskin <proski@gnu.org>
6858 * kern/i386/linuxbios/init.c: Put "void" to all function
6859 declarations with no arguments.
6860 * kern/powerpc/ieee1275/init.c: Likewise.
6861 * term/i386/pc/at_keyboard.c: Likewise.
6862 * term/i386/pc/vga_text.c: Likewise.
6863 * util/grub-mkdevicemap.c: Likewise.
6865 2008-01-02 Robert Millan <rmh@aybabtu.com>
6867 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6868 message when loaded image is out of bounds.
6869 (grub_multiboot_load_elf64): Likewise.
6871 2008-01-02 Pavel Roskin <proski@gnu.org>
6873 * util/grub.d/10_linux.in: Try version without ".old" when
6874 looking for initrd. It's better to use initrd from the newer
6875 kernel of the same version than no initrd at all.
6877 2008-01-01 Robert Millan <rmh@aybabtu.com>
6879 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6881 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6883 * include/grub/video.h: Added grub_video_unmap_color and
6884 grub_video_get_active_render_target.
6885 (grub_video_adapter): Added unmap_color and get_active_render_target.
6887 * video/video.c: Added grub_video_unmap_color and
6888 grub_video_get_active_render_target.
6889 (grub_video_get_info): Changed method to accept NULL pointer as an
6890 argument to allow detection of active video adapter.
6892 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6893 grub_video_vbe_unmap_color_int.
6894 Added grub_video_vbe_unmap_color and
6895 grub_video_vbe_get_active_render_target.
6896 (grub_video_vbe_adapter): Added unmap_color and
6897 get_active_render_target.
6899 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
6900 with grub_video_vbe_unmap_color_int.
6902 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6903 (DEFAULT_NORMAL_COLOR): Likewise.
6904 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6905 (DEFAULT_FG_COLOR): Removed.
6906 (DEFAULT_BG_COLOR): Likewise.
6907 (DEFAULT_CURSOR_COLOR): Changed value.
6908 (grub_virtual_screen): Added standard_color_setting,
6909 normal_color_setting, highlight_color_setting and term_color.
6910 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6911 (bitmap_width): Added.
6912 (bitmap_height): Likewise.
6914 (set_term_color): Likewise.
6915 (grub_virtual_screen_setup): Changed to use new terminal coloring
6917 (grub_gfxterm_init): Added init for bitmap.
6918 (grub_gfxterm_fini): Added destroy for bitmap.
6919 (redraw_screen_rect): Updated to use background bitmap and new
6921 (scroll_up): Added optimization for case when there is no bitmap.
6922 (grub_gfxterm_cls): Fixed to use correct background color.
6923 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6925 (grub_virtual_screen_setcolor): Likewise.
6926 (grub_virtual_screen_getcolor): Added.
6927 (grub_gfxterm_background_image_cmd): Likewise.
6928 (grub_video_term): Added setcolor and getcolor.
6929 (MOD_INIT): Added registration of background_image command.
6930 (MOD_TERM): Added unregistration for background_image command.
6932 2007-12-30 Pavel Roskin <proski@gnu.org>
6934 * loader/multiboot_loader.c: Fix multiboot command
6935 unregistration. Fix all typos in the word "multiboot".
6937 2007-12-29 Pavel Roskin <proski@gnu.org>
6939 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6940 support for initrd names used in Fedora.
6942 2007-12-26 Bean <bean123ch@gmail.com>
6944 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6945 (cpio_mod_SOURCES): New variable.
6946 (cpio_mod_CFLAGS): Likewise.
6947 (cpio_mod_LDFLAGS): Likewise.
6949 * fs/cpio.c: New file.
6951 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6953 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6955 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6957 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6959 2007-12-25 Robert Millan <rmh@aybabtu.com>
6961 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6962 (grub_getcolor): New function.
6964 * kern/term.c (grub_getcolor): New function.
6965 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6966 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6967 (print_entry): Set normal and highlight colors to
6968 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6969 respectively, before printing and restore them to old
6971 (grub_menu_init_page): Likewise. Fill an additional colored space
6972 that would otherwise be left blank.
6974 * term/efi/console.c (grub_console_getcolor): New function.
6975 (struct grub_console_term.getcolor): New variable.
6976 * term/i386/pc/console.c (grub_console_getcolor): New function.
6977 (struct grub_console_term.getcolor): New variable.
6978 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6979 (struct grub_console_term.getcolor): New variable.
6981 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6982 (struct grub_console_term.setcolor): Remove variable.
6983 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6984 (struct grub_console_term.setcolor): Remove variable.
6985 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6986 (struct grub_console_term.setcolor): Remove variable.
6987 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6988 (struct grub_console_term.setcolor): Remove variable.
6990 2007-12-25 Robert Millan <rmh@aybabtu.com>
6992 * configure.ac: Search for possible unifont.hex locations, and
6993 define UNIFONT_HEX if found.
6995 * Makefile.in (UNIFONT_HEX): Define variable.
6996 (DATA): Rename to ...
6997 (PKGLIB): ... this. Update all users.
6998 (PKGDATA): New variable.
6999 (pkgdata_IMAGES): Rename to ...
7000 (pkglib_IMAGES): ... this. Update all users.
7001 (pkgdata_MODULES): Rename to ...
7002 (pkglib_MODULES): ... this. Update all users.
7003 (pkgdata_PROGRAMS): Rename to ...
7004 (pkglib_PROGRAMS): ... this. Update all users.
7005 (pkgdata_DATA): Rename to ...
7006 (pkglib_DATA): ... this. Update all users.
7007 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7008 (unicode.pff, ascii.pff): New rules.
7009 (all-local): Add `$(PKGDATA)' dependency.
7010 (install-local): Process `$(PKGDATA)'.
7012 * util/update-grub_lib.in (font_path): Search for *.pff files in
7013 a few more locations, including `${pkgdata}'.
7015 2007-12-23 Robert Millan <rmh@aybabtu.com>
7017 Patch from Bean <bean123ch@gmail.com>:
7018 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7021 2007-12-21 Bean <bean123ch@gmail.com>
7023 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7024 (ntfscomp_mod_SOURCES): New variable.
7025 (ntfscomp_mod_CFLAGS): Likewise.
7026 (ntfscomp_mod_LDFLAGS): Likewise.
7028 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7029 (grub_probe_SOURCES): Likewise.
7030 (grub_emu_SOURCES): Likewise.
7032 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7033 (grub_emu_SOURCES): Likewise.
7035 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7036 (grub_emu_SOURCES): Likewise.
7038 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7039 (grub_emu_SOURCES): Likewise.
7041 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7042 (read_run_list): Renamed to grub_ntfs_read_run_list.
7043 (decomp_nextvcn): Moved to ntfscomp.c.
7044 (decomp_getch): Likewise.
7045 (decomp_get16): Likewise.
7046 (decomp_block): Likewise.
7047 (read_block): Likewise.
7048 (read_data): Partially moved to ntfscomp.c.
7049 (fixup): Change unsigned to grub_uint16_t.
7050 (read_mft): Change unsigned long to grub_uint32_t.
7051 (read_attr): Likewise.
7052 (read_data): Likewise.
7053 (read_run_data): Likewise.
7054 (read_run_list): Likewise.
7055 (read_mft): Likewise.
7057 * fs/ntfscomp.c: New file.
7059 * include/grub/ntfs.h: New file.
7061 2007-12-16 Robert Millan <rmh@aybabtu.com>
7063 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7064 IDE disk check, since Linux is known to support 20 IDE disks.
7065 Reported by Colin Watson.
7067 2007-12-15 Bean <bean123ch@gmail.com>
7069 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7070 (lnxboot_img_SOURCES): New variable.
7071 (lnxboot_img_ASFLAGS): Likewise.
7072 (lnxboot_img_LDFLAGS): Likewise.
7074 * boot/i386/pc/lnxboot.S: New file.
7076 2007-11-24 Pavel Roskin <proski@gnu.org>
7078 * configure.ac: Test if '--build-id=none' is supported by the
7079 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7080 objcopy to generate incorrect binary files (binutils
7081 2.17.50.0.18-1 as shipped by Fedora 8).
7082 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7083 linking, so that build ID doesn't break the test.
7085 2007-11-24 Pavel Roskin <proski@gnu.org>
7087 * include/grub/i386/time.h: use "void" in the argument list
7089 * include/grub/powerpc/time.h: Likewise.
7090 * include/grub/sparc64/time.h: Likewise.
7092 2007-11-18 Christian Franke <franke@computer.org>
7094 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7095 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7096 This fixes the problem that function keys did not work in grub-emu.
7098 2007-11-18 Christian Franke <franke@computer.org>
7100 * disk/host.c (grub_host_open): Remove attribute unused from
7101 name parameter. Add check for "host". This fixes the problem
7102 that grub-emu does not find partitions.
7104 2007-11-18 Christian Franke <franke@computer.org>
7106 * util/hostfs.c (is_dir): New function.
7107 (grub_hostfs_dir): Handle missing dirent.d_type case.
7108 (grub_hostfs_read): Add missing fseek().
7109 (grub_hostfs_label): Clear label pointer. This fixes a crash
7110 of grub-emu on "ls (host)".
7112 2007-11-18 Christian Franke <franke@computer.org>
7114 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7115 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7116 to 64 bit boundary by default.
7118 2007-11-18 Bean <bean123ch@gmail.com>
7120 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7121 (hexdump_mod_SOURCES): New variable.
7122 (hexdump_mod_CFLAGS): Likewise.
7123 (hexdump_mod_LDFLAGS): Likewise.
7125 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7127 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7129 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7131 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7133 * include/grub/hexdump.h: New file.
7135 * commands/hexdump.c: New file.
7137 2007-11-10 Robert Millan <rmh@aybabtu.com>
7139 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7140 in grub_outb() calls.
7141 (beep_on): Likewise.
7143 2007-11-10 Christian Franke <franke@computer.org>
7145 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7146 (grub_menu_run): Likewise.
7148 2007-11-10 Robert Millan <rmh@aybabtu.com>
7150 * include/grub/i386/efi/machine.h: New file.
7151 * include/grub/i386/linuxbios/machine.h: Likewise.
7152 * include/grub/i386/pc/machine.h: Likewise.
7153 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7154 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7156 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7157 (serial_hw_io_addr): New variable.
7158 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7159 instead of `(unsigned short *) 0x400'.
7161 2007-11-10 Bean <bean123ch@gmail.com>
7163 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7165 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7167 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7168 (vga_mod_SOURCES): Added.
7169 (vga_mod_CFLAGS): Likewise.
7170 (vga_mod_LDFLAGS): Likewise.
7172 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7174 (set_map_mask): Likewise.
7175 (set_read_map): Likewise.
7176 (set_read_address): Likewise.
7177 (vga_font): Removed variable.
7178 (get_vga_glyph): Removed function.
7179 (invalidate_char): Likewise.
7180 (write_char): Changed to use grub_font_get_glyph() for font
7182 (grub_vga_putchar): Likewise.
7183 (grub_vga_getcharwidth): Likewise.
7185 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7187 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7189 (pxeboot_img_LDFLAGS): Likewise.
7190 (diskboot_img_LDFLAGS): Likewise.
7191 (kernel_img_LDFLAGS): Likewise.
7193 2007-11-06 Robert Millan <rmh@aybabtu.com>
7195 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7196 in grub_outb() calls.
7197 (serial_hw_init): Likewise.
7199 2007-11-05 Robert Millan <rmh@aybabtu.com>
7201 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7202 spaces. Skip non-regular files.
7204 2007-11-05 Robert Millan <rmh@aybabtu.com>
7206 * kern/disk.c (grub_disk_firmware_fini)
7207 (grub_disk_firmware_is_tainted): New variables.
7209 * include/grub/disk.h (grub_disk_firmware_fini)
7210 (grub_disk_firmware_is_tainted): Likewise.
7212 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7213 (grub_disk_biosdisk_fini): ... to here.
7214 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7215 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7216 is set. Register grub_disk_biosdisk_fini() in
7217 `grub_disk_firmware_fini'.
7219 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7220 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7221 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7222 to finish existing firmware disk interface.
7224 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7225 (ata_mod_SOURCES): New variable.
7226 (ata_mod_CFLAGS): Likewise.
7227 (ata_mod_LDFLAGS): Likewise.
7229 2007-11-05 Robert Millan <rmh@aybabtu.com>
7231 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7232 (grub_ata_wait): Reimplement using grub_millisleep().
7234 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7235 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7237 2007-11-03 Marco Gerards <marco@gnu.org>
7239 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7240 (CRTC_ADDR_PORT): New macro.
7241 (CRTC_DATA_PORT): Likewise.
7242 (CRTC_CURSOR): Likewise.
7243 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7244 (CRTC_CURSOR_ADDR_LOW): Likewise.
7245 (update_cursor): New function.
7246 (grub_console_real_putchar): Call `update_cursor'.
7247 (grub_console_gotoxy): Likewise.
7248 (grub_console_cls): Set the default color when clearing the
7250 (grub_console_setcursor): Implemented.
7252 2007-11-03 Marco Gerards <marco@gnu.org>
7254 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7256 (grub_ata_pio_write): Likewise.
7258 (grub_atapi_identify): Wait after issuing an ATA command.
7259 (grub_atapi_packet): Likewise.
7260 (grub_ata_identify): Likewise.
7261 (grub_ata_readwrite): Likewise.
7263 2007-11-03 Marco Gerards <marco@gnu.org>
7265 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7266 (grub_ata_pio_write): Likewise.
7267 (grub_ata_readwrite): Use `grub_error', instead of
7268 returning `grub_errno'.
7270 2007-11-03 Marco Gerards <marco@gnu.org>
7272 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7273 grub_ata_pio_write once for every single sector, instead of for
7276 2007-10-31 Robert Millan <rmh@aybabtu.com>
7278 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7280 * conf/i386-linuxbios.rmk: New file.
7282 * kern/i386/pc/hardware.c: Likewise.
7283 * term/i386/pc/at_keyboard.c: Likewise.
7284 * term/i386/pc/vga_text.c: Likewise.
7286 * include/grub/i386/linuxbios/boot.h: Likewise.
7287 * include/grub/i386/linuxbios/console.h: Likewise.
7288 * include/grub/i386/linuxbios/init.h: Likewise.
7289 * include/grub/i386/linuxbios/kernel.h: Likewise.
7290 * include/grub/i386/linuxbios/loader.h: Likewise.
7291 * include/grub/i386/linuxbios/memory.h: Likewise.
7292 * include/grub/i386/linuxbios/serial.h: Likewise.
7293 * include/grub/i386/linuxbios/time.h: Likewise.
7295 * kern/i386/linuxbios/init.c: Likewise.
7296 * kern/i386/linuxbios/startup.S: Likewise.
7297 * kern/i386/linuxbios/table.c: Likewise.
7299 2007-10-31 Marco Gerards <marco@gnu.org>
7301 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7302 (ata_mod_SOURCES): New variable.
7303 (ata_mod_CFLAGS): Likewise.
7304 (ata_mod_LDFLAGS): Likewise.
7306 * disk/ata.c: New file.
7308 * include/grub/disk.h (grub_disk_dev_id): Add
7309 `GRUB_DISK_DEV_ATA_ID'.
7311 2007-10-31 Robert Millan <rmh@aybabtu.com>
7313 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7314 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7316 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7317 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7319 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7322 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7324 2007-10-27 Robert Millan <rmh@aybabtu.com>
7326 * include/grub/types.h (ULONG_MAX): Define macro.
7328 2007-10-22 Robert Millan <rmh@aybabtu.com>
7330 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7332 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7334 2007-10-22 Robert Millan <rmh@aybabtu.com>
7336 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7337 (pkgdata_MODULES): Add `biosdisk.mod'.
7338 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7341 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7342 (grub_biosdisk_init): Replace with ...
7343 (GRUB_MOD_INIT(biosdisk)): ... this.
7344 (grub_biosdisk_fini): Replace with ...
7345 (GRUB_MOD_FINI(biosdisk)): ... this.
7347 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7348 (grub_machine_init): Remove call to grub_biosdisk_init().
7349 (grub_machine_fini): Remove call to grub_machine_fini().
7351 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7353 2007-10-22 Robert Millan <rmh@aybabtu.com>
7355 * include/grub/time.h: New file.
7356 * include/grub/i386/time.h: Likewise.
7357 * include/grub/powerpc/time.h: Likewise.
7358 * include/grub/sparc64/time.h: Likewise.
7360 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7362 (KERNEL_MACHINE_TIME_HEADER): ... this.
7363 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7365 (KERNEL_MACHINE_TIME_HEADER): ... this.
7366 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7368 (KERNEL_MACHINE_TIME_HEADER): ... this.
7370 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7371 (grub_millisleep): New function.
7372 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7373 (grub_millisleep): New function.
7374 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7375 Remove `grub/machine/time.h' include.
7376 (grub_millisleep): New function.
7377 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7378 Remove `grub/machine/time.h' include.
7379 (grub_millisleep): New function.
7381 * include/grub/misc.h (grub_div_roundup): New function.
7383 * kern/misc.c: Include `<grub/time.h>'.
7384 (grub_millisleep_generic): New function.
7386 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7388 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7390 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7391 `machine/time.h'. Add `time.h'.
7392 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7394 2007-10-21 Robert Millan <rmh@aybabtu.com>
7396 * include/grub/misc.h (grub_max): New function.
7398 2007-10-21 Robert Millan <rmh@aybabtu.com>
7400 * util/misc.c (grub_util_info): Call fflush() before returning.
7402 2007-10-20 Robert Millan <rmh@aybabtu.com>
7404 * genmk.rb (Image): Copy `extra_flags' from here ...
7405 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7407 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7408 to `argc' and `args' arguments.
7410 2007-10-17 Robert Millan <rmh@aybabtu.com>
7412 * kern/i386/loader.S: New file.
7414 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7415 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7416 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7417 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7418 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7419 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7420 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7421 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7422 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7423 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7424 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7425 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7426 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7427 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7429 * kern/i386/realmode.S: New file.
7431 * kern/i386/pc/startup.S (protstack): Moved from here ...
7432 * kern/i386/realmode.S (protstack)... to here.
7433 * kern/i386/pc/startup.S (gdt): Moved from here ...
7434 * kern/i386/realmode.S (gdt)... to here.
7435 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7436 * kern/i386/realmode.S (prot_to_real)... to here.
7438 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7439 `kern/i386/realmode.S'.
7441 2007-10-17 Robert Millan <rmh@aybabtu.com>
7443 * include/grub/i386/loader.h: New file.
7445 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7446 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7447 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7448 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7449 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7450 * include/grub/i386/loader.h (grub_linux_prot_size)
7451 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7452 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7453 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7454 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7456 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7458 2007-10-15 Robert Millan <rmh@aybabtu.com>
7460 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7461 filesystem when dev->disk is unset.
7462 Do probe for filesystem even when dev->disk->has_partitions is set.
7463 In case a filesystem is found, always report it.
7464 In case it isn't, if dev->disk->has_partitions is set, report that
7465 a partition table was found instead of reporting that no filesystem
7466 could be identified.
7468 2007-10-12 Robert Millan <rmh@aybabtu.com>
7470 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7471 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7473 * include/grub/types.h (grub_host_to_target16): New macro.
7474 (grub_host_to_target32): Likewise.
7475 (grub_host_to_target64): Likewise.
7476 (grub_target_to_host16): Likewise.
7477 (grub_target_to_host32): Likewise.
7478 (grub_target_to_host64): Likewise.
7480 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7482 (GRUB_MOD_ALIGN): ...this. Update all users.
7484 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7485 grub_host_to_target32.
7486 Replace grub_be_to_cpu32 with grub_target_to_host32.
7487 (load_modules): Likewise.
7488 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7489 Replace grub_be_to_cpu32 with grub_target_to_host32.
7490 Replace grub_cpu_to_be16 with grub_host_to_target16.
7491 Replace grub_cpu_to_be32 grub_host_to_target32.
7493 2007-10-12 Robert Millan <rmh@aybabtu.com>
7495 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7496 * util/elf/grub-mkimage.c: ... here.
7498 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7499 `util/powerpc/ieee1275/grub-mkimage.c'.
7501 2007-10-07 Robert Millan <rmh@aybabtu.com>
7503 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7504 and make it easier to figure out.
7505 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7506 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7507 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7508 leave us with less than HEAP_MIN_SIZE total heap.
7509 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7511 2007-10-03 Robert Millan <rmh@aybabtu.com>
7513 * include/grub/i386/io.h: New file.
7514 * commands/i386/pc/play.c (inb): Removed.
7516 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7518 * term/i386/pc/serial.c (inb): Removed.
7520 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7522 * term/i386/pc/vga.c (inb): Removed.
7524 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7527 2007-10-02 Robert Millan <rmh@aybabtu.com>
7529 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7530 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7531 Reported by Marcin Kurek.
7533 2007-09-07 Robert Millan <rmh@aybabtu.com>
7535 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7536 SmartFirmware version updates (as released by Sven Luther), and avoid
7537 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7538 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7541 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7544 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7545 when merging two regions.
7547 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7549 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7550 * normal/completion.c (grub_normal_do_completion): Likewise.
7551 Reported by Hitoshi Ozeki.
7553 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7555 Do not use devices at boot in chainloading.
7557 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7558 (boot_part_addr): Likewise.
7559 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7560 with BOOT_DRIVE and BOOT_PART_ADDR.
7561 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7562 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7564 2007-08-29 Robert Millan <rmh@aybabtu.com>
7566 Patch from Simon Peter <dn.tlp@gmx.net>:
7567 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7568 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7569 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7570 util/i386/pc/grub-setup.c_DEPENDENCIES.
7571 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7572 util/grub-probe.c_DEPENDENCIES.
7573 * conf/powerpc-ieee1275.rmk: Likewise.
7575 2007-08-28 Robert Millan <rmh@aybabtu.com>
7577 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7578 to tell grub-mkdevicemap how to name devices.
7579 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7582 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7583 util/i386/get_disk_name.c.
7584 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7585 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7586 util/ieee1275/get_disk_name.c.
7588 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7590 * DISTLIST: Add util/i386/get_disk_name.c and
7591 util/ieee1275/get_disk_name.c.
7593 * util/grub-mkdevicemap.c: Replace device naming logic with
7594 grub_util_get_disk_name() calls.
7596 2007-08-20 Robert Millan <rmh@aybabtu.com>
7598 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7599 (so that it works for both plural and singular quantities).
7601 2007-08-05 Robert Millan <rmh@aybabtu.com>
7603 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7604 so that [xz] isn't taken into account when determining order.
7606 2007-08-02 Marco Gerards <marco@gnu.org>
7608 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7609 `include/multiboot2.h', `include/grub/elfload.h',
7610 `include/multiboot.h', `include/grub/multiboot.h',
7611 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7612 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7613 `kern/elf.c', `loader/multiboot_loader.c',
7614 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7615 `loader/i386/pc/multiboot2.c',
7616 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7617 `util/i386/pc/grub-mkrescue.in'. Remove
7618 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7619 `include/grub/i386/pc/util/biosdisk.h' and
7620 `include/grub/powerpc/ieee1275/multiboot.h'.
7622 2007-08-02 Bean <bean123ch@gmail.com>
7624 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7625 (ntfs_mod_SOURCES): New variable.
7626 (ntfs_mod_CFLAGS): Likewise.
7627 (ntfs_mod_LDFLAGS): Likewise.
7629 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7630 (grub_probe_SOURCES): Likewise.
7631 (grub_emu_SOURCES): Likewise.
7633 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7634 (grub_emu_SOURCES): Likewise.
7636 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7637 (grub_emu_SOURCES): Likewise.
7639 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7641 * fs/ntfs.c: New file.
7643 2007-08-02 Bean <bean123ch@gmail.com>
7645 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7647 * file.h (grub_file): Likewise.
7649 * fshelp.h (grub_fshelp_read_file): Likewise.
7651 * util/i386/pc/grub-setup.c (setup): Likewise.
7652 (save_first_sector): Likewise.
7653 (save_blocklists): Likewise.
7655 * fs/affs.c (grub_affs_read_file): Likewise.
7657 * fs/ext2.c (grub_ext2_read_file): Likewise.
7659 * fs/fat.c (grub_fat_read_data): Likewise.
7661 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7663 * fs/hfs.c (grub_hfs_read_file): Likewise.
7665 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7667 * fs/jfs.c (grub_jfs_read_file): Likewise.
7669 * fs/minix.c (grub_minix_read_file): Likewise.
7671 * fs/sfs.c (grub_sfs_read_file): Likewise.
7673 * fs/ufs.c (grub_ufs_read_file): Likewise.
7675 * fs/xfs.c (grub_xfs_read_file): Likewise.
7677 * command/blocklist.c (read_blocklist): Likewise.
7678 (print_blocklist): Likewise.
7680 2007-08-02 Marco Gerards <marco@gnu.org>
7682 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7685 * disk/host.c: New file.
7687 * util/hostfs.c: Likewise.
7689 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7690 return `GRUB_ERR_BAD_FS'.
7691 * fs/sfs.c (grub_sfs_mount): Likewise.
7692 * fs/xfs.c (grub_xfs_mount): Likewise.
7694 * include/grub/disk.h (enum grub_disk_dev_id): Add
7695 `GRUB_DISK_DEVICE_HOST_ID'.
7697 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7699 2007-07-24 Jerone Young <jerone@gmail.com>
7701 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
7702 modules for compilation.
7703 * conf/powerpc-ieee1275.rmk: Likewise.
7705 * include/multiboot.h: Move multiboot definitions to one file. Rename
7706 many definitions to not get grub specific.
7707 * include/multiboot2.h: Create header with multiboot 2 definitions.
7708 * include/grub/multiboot.h: Header for grub specific function
7709 prototypes and definitions.
7710 * include/grub/multiboot2.h: Likewise.
7711 * include/grub/multiboot_loader.h: Likewise.
7712 * include/grub/i386/pc/multiboot.h: Removed.
7713 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7715 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7716 and 2 to allow for one multiboot and module commands.
7717 * loader/multiboot2.c: Add multiboot2 functionality.
7718 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7719 and definition names.
7720 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7722 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7723 ieee1275 specific multiboot2 code.
7725 * kern/i386/pc/startup.S: Change headers and definition names for
7726 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7728 2007-07-22 Robert Millan <rmh@aybabtu.com>
7730 * geninitheader.sh: Process file specified in first parameter rather
7731 than hardcoding grub_modules_init.lst.
7732 * geninit.sh: Likewise. Also, construct header name dynamically rather
7733 than hardcoding grub_modules_init.h.
7735 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7736 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7737 grub_probe_init.[ch] and grub_setup_init.[ch].
7739 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7740 grub_modules_init.h with grub_emu_init.h.
7741 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7742 grub_probe_init.[ch] files.
7743 * conf/i386-efi.rmk: Likewise.
7744 * conf/i386-pc.rmk: Likewise.
7745 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7746 grub_setup_init.[ch] files.
7748 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7749 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7750 to initialize modules rather than a list of hardcoded functions.
7751 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7752 grub_init_all() to initialize modules rather than a list of hardcoded
7755 2007-07-22 Robert Millan <rmh@aybabtu.com>
7757 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7758 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7760 2007-07-22 Robert Millan <rmh@aybabtu.com>
7762 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7763 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7764 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7765 flag when running on SmartFirmware.
7766 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7767 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7770 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7771 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7772 rather than decreasing it.
7774 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7775 there's not enough space to do it, fail in the same way as when it
7776 can't be done because there are no partitions.
7778 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7779 when nvsetenv failed.
7781 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7783 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7784 because this rule is automatically generated.
7785 (grub-mkrescue): Removed for the same reason as above.
7787 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7789 Migrate to GNU General Public License Version 3.
7791 * COPYING: Replaced with the plain text version of GPLv3.
7793 * config.guess: Updated from gnulib.
7794 * config.sub: Likewise.
7796 * geninit.sh: Output a GPLv3 copyright notice.
7797 * geninitheader.sh: Likewise.
7798 * genmodsrc.sh: Likewise.
7799 * gensymlist.sh.in: Likewise.
7801 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7802 * boot/i386/pc/diskboot.S: Likewise.
7803 * boot/i386/pc/pxeboot.S: Likewise.
7804 * commands/blocklist.c: Likewise.
7805 * commands/boot.c: Likewise.
7806 * commands/cat.c: Likewise.
7807 * commands/cmp.c: Likewise.
7808 * commands/configfile.c: Likewise.
7809 * commands/echo.c: Likewise.
7810 * commands/help.c: Likewise.
7811 * commands/ls.c: Likewise.
7812 * commands/search.c: Likewise.
7813 * commands/terminal.c: Likewise.
7814 * commands/test.c: Likewise.
7815 * commands/videotest.c: Likewise.
7816 * commands/i386/cpuid.c: Likewise.
7817 * commands/i386/pc/halt.c: Likewise.
7818 * commands/i386/pc/play.c: Likewise.
7819 * commands/i386/pc/reboot.c: Likewise.
7820 * commands/i386/pc/vbeinfo.c: Likewise.
7821 * commands/i386/pc/vbetest.c: Likewise.
7822 * commands/ieee1275/halt.c: Likewise.
7823 * commands/ieee1275/reboot.c: Likewise.
7824 * commands/ieee1275/suspend.c: Likewise.
7825 * disk/loopback.c: Likewise.
7826 * disk/lvm.c: Likewise.
7827 * disk/raid.c: Likewise.
7828 * disk/efi/efidisk.c: Likewise.
7829 * disk/i386/pc/biosdisk.c: Likewise.
7830 * disk/ieee1275/ofdisk.c: Likewise.
7831 * font/manager.c: Likewise.
7832 * fs/affs.c: Likewise.
7833 * fs/ext2.c: Likewise.
7834 * fs/fat.c: Likewise.
7835 * fs/fshelp.c: Likewise.
7836 * fs/hfs.c: Likewise.
7837 * fs/hfsplus.c: Likewise.
7838 * fs/iso9660.c: Likewise.
7839 * fs/jfs.c: Likewise.
7840 * fs/minix.c: Likewise.
7841 * fs/sfs.c: Likewise.
7842 * fs/ufs.c: Likewise.
7843 * fs/xfs.c: Likewise.
7844 * hello/hello.c: Likewise.
7845 * include/grub/acorn_filecore.h: Likewise.
7846 * include/grub/arg.h: Likewise.
7847 * include/grub/bitmap.h: Likewise.
7848 * include/grub/boot.h: Likewise.
7849 * include/grub/cache.h: Likewise.
7850 * include/grub/device.h: Likewise.
7851 * include/grub/disk.h: Likewise.
7852 * include/grub/dl.h: Likewise.
7853 * include/grub/elfload.h: Likewise.
7854 * include/grub/env.h: Likewise.
7855 * include/grub/err.h: Likewise.
7856 * include/grub/file.h: Likewise.
7857 * include/grub/font.h: Likewise.
7858 * include/grub/fs.h: Likewise.
7859 * include/grub/fshelp.h: Likewise.
7860 * include/grub/gzio.h: Likewise.
7861 * include/grub/hfs.h: Likewise.
7862 * include/grub/kernel.h: Likewise.
7863 * include/grub/loader.h: Likewise.
7864 * include/grub/lvm.h: Likewise.
7865 * include/grub/misc.h: Likewise.
7866 * include/grub/mm.h: Likewise.
7867 * include/grub/net.h: Likewise.
7868 * include/grub/normal.h: Likewise.
7869 * include/grub/parser.h: Likewise.
7870 * include/grub/partition.h: Likewise.
7871 * include/grub/pc_partition.h: Likewise.
7872 * include/grub/raid.h: Likewise.
7873 * include/grub/rescue.h: Likewise.
7874 * include/grub/script.h: Likewise.
7875 * include/grub/setjmp.h: Likewise.
7876 * include/grub/symbol.h: Likewise.
7877 * include/grub/term.h: Likewise.
7878 * include/grub/terminfo.h: Likewise.
7879 * include/grub/tparm.h: Likewise.
7880 * include/grub/types.h: Likewise.
7881 * include/grub/video.h: Likewise.
7882 * include/grub/efi/api.h: Likewise.
7883 * include/grub/efi/chainloader.h: Likewise.
7884 * include/grub/efi/console.h: Likewise.
7885 * include/grub/efi/console_control.h: Likewise.
7886 * include/grub/efi/disk.h: Likewise.
7887 * include/grub/efi/efi.h: Likewise.
7888 * include/grub/efi/pe32.h: Likewise.
7889 * include/grub/efi/time.h: Likewise.
7890 * include/grub/i386/linux.h: Likewise.
7891 * include/grub/i386/setjmp.h: Likewise.
7892 * include/grub/i386/types.h: Likewise.
7893 * include/grub/i386/efi/kernel.h: Likewise.
7894 * include/grub/i386/efi/loader.h: Likewise.
7895 * include/grub/i386/efi/time.h: Likewise.
7896 * include/grub/i386/pc/biosdisk.h: Likewise.
7897 * include/grub/i386/pc/boot.h: Likewise.
7898 * include/grub/i386/pc/chainloader.h: Likewise.
7899 * include/grub/i386/pc/console.h: Likewise.
7900 * include/grub/i386/pc/init.h: Likewise.
7901 * include/grub/i386/pc/kernel.h: Likewise.
7902 * include/grub/i386/pc/loader.h: Likewise.
7903 * include/grub/i386/pc/memory.h: Likewise.
7904 * include/grub/i386/pc/multiboot.h: Likewise.
7905 * include/grub/i386/pc/serial.h: Likewise.
7906 * include/grub/i386/pc/time.h: Likewise.
7907 * include/grub/i386/pc/vbe.h: Likewise.
7908 * include/grub/i386/pc/vbeblit.h: Likewise.
7909 * include/grub/i386/pc/vbefill.h: Likewise.
7910 * include/grub/i386/pc/vbeutil.h: Likewise.
7911 * include/grub/i386/pc/vga.h: Likewise.
7912 * include/grub/ieee1275/ieee1275.h: Likewise.
7913 * include/grub/ieee1275/ofdisk.h: Likewise.
7914 * include/grub/powerpc/libgcc.h: Likewise.
7915 * include/grub/powerpc/setjmp.h: Likewise.
7916 * include/grub/powerpc/types.h: Likewise.
7917 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7918 * include/grub/powerpc/ieee1275/console.h: Likewise.
7919 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7920 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7921 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7922 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7923 * include/grub/powerpc/ieee1275/time.h: Likewise.
7924 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7925 * include/grub/sparc64/libgcc.h: Likewise.
7926 * include/grub/sparc64/setjmp.h: Likewise.
7927 * include/grub/sparc64/types.h: Likewise.
7928 * include/grub/sparc64/ieee1275/console.h: Likewise.
7929 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7930 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7931 * include/grub/sparc64/ieee1275/time.h: Likewise.
7932 * include/grub/util/biosdisk.h: Likewise.
7933 * include/grub/util/getroot.h: Likewise.
7934 * include/grub/util/lvm.h: Likewise.
7935 * include/grub/util/misc.h: Likewise.
7936 * include/grub/util/raid.h: Likewise.
7937 * include/grub/util/resolve.h: Likewise.
7938 * io/gzio.c: Likewise.
7939 * kern/device.c: Likewise.
7940 * kern/disk.c: Likewise.
7941 * kern/dl.c: Likewise.
7942 * kern/elf.c: Likewise.
7943 * kern/env.c: Likewise.
7944 * kern/err.c: Likewise.
7945 * kern/file.c: Likewise.
7946 * kern/fs.c: Likewise.
7947 * kern/loader.c: Likewise.
7948 * kern/main.c: Likewise.
7949 * kern/misc.c: Likewise.
7950 * kern/mm.c: Likewise.
7951 * kern/parser.c: Likewise.
7952 * kern/partition.c: Likewise.
7953 * kern/rescue.c: Likewise.
7954 * kern/term.c: Likewise.
7955 * kern/efi/efi.c: Likewise.
7956 * kern/efi/init.c: Likewise.
7957 * kern/efi/mm.c: Likewise.
7958 * kern/i386/dl.c: Likewise.
7959 * kern/i386/efi/init.c: Likewise.
7960 * kern/i386/efi/startup.S: Likewise.
7961 * kern/i386/pc/init.c: Likewise.
7962 * kern/i386/pc/lzo1x.S: Likewise.
7963 * kern/i386/pc/startup.S: Likewise.
7964 * kern/ieee1275/ieee1275.c: Likewise.
7965 * kern/powerpc/cache.S: Likewise.
7966 * kern/powerpc/dl.c: Likewise.
7967 * kern/powerpc/ieee1275/cmain.c: Likewise.
7968 * kern/powerpc/ieee1275/crt0.S: Likewise.
7969 * kern/powerpc/ieee1275/init.c: Likewise.
7970 * kern/powerpc/ieee1275/openfw.c: Likewise.
7971 * kern/sparc64/cache.S: Likewise.
7972 * kern/sparc64/dl.c: Likewise.
7973 * kern/sparc64/ieee1275/init.c: Likewise.
7974 * kern/sparc64/ieee1275/openfw.c: Likewise.
7975 * loader/efi/chainloader.c: Likewise.
7976 * loader/efi/chainloader_normal.c: Likewise.
7977 * loader/i386/efi/linux.c: Likewise.
7978 * loader/i386/efi/linux_normal.c: Likewise.
7979 * loader/i386/pc/chainloader.c: Likewise.
7980 * loader/i386/pc/chainloader_normal.c: Likewise.
7981 * loader/i386/pc/linux.c: Likewise.
7982 * loader/i386/pc/linux_normal.c: Likewise.
7983 * loader/i386/pc/multiboot.c: Likewise.
7984 * loader/i386/pc/multiboot_normal.c: Likewise.
7985 * loader/powerpc/ieee1275/linux.c: Likewise.
7986 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7987 * normal/arg.c: Likewise.
7988 * normal/cmdline.c: Likewise.
7989 * normal/command.c: Likewise.
7990 * normal/completion.c: Likewise.
7991 * normal/execute.c: Likewise.
7992 * normal/function.c: Likewise.
7993 * normal/lexer.c: Likewise.
7994 * normal/main.c: Likewise.
7995 * normal/menu.c: Likewise.
7996 * normal/menu_entry.c: Likewise.
7997 * normal/misc.c: Likewise.
7998 * normal/parser.y: Likewise.
7999 * normal/script.c: Likewise.
8000 * normal/i386/setjmp.S: Likewise.
8001 * normal/powerpc/setjmp.S: Likewise.
8002 * normal/sparc64/setjmp.S: Likewise.
8003 * partmap/acorn.c: Likewise.
8004 * partmap/amiga.c: Likewise.
8005 * partmap/apple.c: Likewise.
8006 * partmap/gpt.c: Likewise.
8007 * partmap/pc.c: Likewise.
8008 * partmap/sun.c: Likewise.
8009 * term/gfxterm.c: Likewise.
8010 * term/terminfo.c: Likewise.
8011 * term/efi/console.c: Likewise.
8012 * term/i386/pc/console.c: Likewise.
8013 * term/i386/pc/serial.c: Likewise.
8014 * term/i386/pc/vesafb.c: Likewise.
8015 * term/i386/pc/vga.c: Likewise.
8016 * term/ieee1275/ofconsole.c: Likewise.
8017 * util/biosdisk.c: Likewise.
8018 * util/console.c: Likewise.
8019 * util/genmoddep.c: Likewise.
8020 * util/getroot.c: Likewise.
8021 * util/grub-emu.c: Likewise.
8022 * util/grub-mkdevicemap.c: Likewise.
8023 * util/grub-probe.c: Likewise.
8024 * util/lvm.c: Likewise.
8025 * util/misc.c: Likewise.
8026 * util/raid.c: Likewise.
8027 * util/resolve.c: Likewise.
8028 * util/update-grub.in: Likewise.
8029 * util/update-grub_lib.in: Likewise.
8030 * util/grub.d/00_header.in: Likewise.
8031 * util/grub.d/10_hurd.in: Likewise.
8032 * util/grub.d/10_linux.in: Likewise.
8033 * util/i386/efi/grub-install.in: Likewise.
8034 * util/i386/efi/grub-mkimage.c: Likewise.
8035 * util/i386/pc/grub-install.in: Likewise.
8036 * util/i386/pc/grub-mkimage.c: Likewise.
8037 * util/i386/pc/grub-mkrescue.in: Likewise.
8038 * util/i386/pc/grub-setup.c: Likewise.
8039 * util/i386/pc/misc.c: Likewise.
8040 * util/powerpc/ieee1275/grub-install.in: Likewise.
8041 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8042 * util/powerpc/ieee1275/misc.c: Likewise.
8043 * video/bitmap.c: Likewise.
8044 * video/video.c: Likewise.
8045 * video/i386/pc/vbe.c: Likewise.
8046 * video/i386/pc/vbeblit.c: Likewise.
8047 * video/i386/pc/vbefill.c: Likewise.
8048 * video/i386/pc/vbeutil.c: Likewise.
8049 * video/readers/tga.c: Likewise.
8051 2007-07-02 Robert Millan <rmh@aybabtu.com>
8053 * conf/i386-efi.rmk: Replace obsolete reference to
8054 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8055 with util/getroot.c.
8056 * conf/powerpc-ieee1275.rmk: Likewise.
8057 * conf/sparc64-ieee1275.rmk: Likewise.
8059 * util/grub-emu.c (main): Fix unchecked pointer handling.
8061 2007-07-02 Robert Millan <rmh@aybabtu.com>
8063 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8064 invocation to fail, in order to support partition-less media.
8066 * util/i386/pc/grub-install.in: Likewise.
8068 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8069 which fs or partmap modules are needed (akin to its sister scripts).
8071 Also use grub-probe to get rid of unportable /proc/mounts check.
8073 Print the same informational message that the other scripts do, before
8076 2007-06-23 Robert Millan <rmh@aybabtu.com>
8078 * util/update-grub_lib.in (font_path): New function. Determine whether
8079 a font file can be found and, if so, echo the GRUB path to it.
8081 * util/update-grub.in: Handle multiple terminals depending on user
8082 input, platform availability and font file presence. Propagate
8083 variables of our findings to /etc/grub.d/ children.
8085 * util/grub.d/00_header.in: Handle multiple terminals, based on
8086 environment setup by update-grub.
8088 2007-06-23 Robert Millan <rmh@aybabtu.com>
8090 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8092 2007-06-21 Robert Millan <rmh@aybabtu.com>
8094 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8095 indicate end of data section in kernel image.
8096 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8097 GRUB_KERNEL_MACHINE_DATA_END.
8099 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8101 * kern/i386/efi/startup.S: Likewise.
8103 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8104 during image generation. Implement --prefix option to override this
8106 * util/i386/efi/grub-mkimage.c: Likewise.
8108 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8109 code to make path relative to its root into a separate function.
8111 * util/i386/pc/grub-install.in: Use newly provided
8112 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8113 pass the result to grub-install --prefix.
8115 2007-06-13 Robert Millan <rmh@aybabtu.com>
8117 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8119 * util/grub-emu.c: Use above definitions from misc.h instead of
8121 * util/grub-mkdevicemap.c: Likewise.
8122 * util/i386/pc/grub-setup.c: Likewise.
8123 * util/grub-probe.c: Likewise.
8124 (probe): Abort with grub_util_error() when either
8125 grub_guess_root_device or grub_util_get_grub_dev fails.
8127 2007-06-12 Robert Millan <rmh@aybabtu.com>
8129 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8131 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8133 * util/grub-probe.c (probe): Likewise for "drive_name".
8135 2007-06-11 Robert Millan <rmh@aybabtu.com>
8137 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8138 not just the cdrom one.
8140 2007-06-11 Robert Millan <rmh@aybabtu.com>
8142 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8143 Add --pkglibdir=DIR option to override pkglibdir.
8144 Mention --image-type=TYPE in help output.
8145 Fix --grub-mkimage (it was a no-op).
8146 Abort gracefully when no parameter is given.
8148 2007-06-11 Robert Millan <rmh@aybabtu.com>
8150 * util/i386/pc/grub-mkrescue.in: New file.
8151 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8152 * Makefile.in: Handle bin_SCRIPTS.
8154 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8156 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8157 list of video modes.
8159 2007-06-06 Robert Millan <rmh@aybabtu.com>
8161 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8162 file doesn't exist, or if it is in a filesystem grub can't read.
8164 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8165 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8166 header comment to fit in 80 columns when the variables are resolved.
8168 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8169 could be identified by update-grub. Remove redundant check for
8170 unifont.pff existence (since convert_system_path_to_grub_path now
8173 2007-06-04 Robert Millan <rmh@aybabtu.com>
8175 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8177 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8179 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8181 2007-06-04 Robert Millan <rmh@aybabtu.com>
8183 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8185 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8186 grub_apple_partition_map_fini.
8189 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8190 to access >2 TiB disks).
8192 Print disk->total_sectors with %llu instead of %lu, since this
8193 variable is always 64-bit (prevents wrong disk size from being displayed
8194 on either >2 TiB disk or big-endian CPU).
8196 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8197 into a generic case that supports all (sane) partition maps.
8199 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8202 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8203 and grub_apple_partition_map_fini() after that.
8205 2007-06-01 Robert Millan <rmh@aybabtu.com>
8207 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8209 * util/grub.d/00_header.in: Only enable gfxterm when
8210 convert_system_path_to_grub_path() succeeds.
8212 2007-05-20 Robert Millan <rmh@aybabtu.com>
8214 * util/update-grub_lib.in: New file.
8215 * DISTLIST: Add update-grub_lib.in.
8216 * conf/common.rmk: Generate update-grub_lib and install it in
8218 * Makefile.in: Add install routine for $(lib_DATA).
8220 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8221 function provided by update-grub_lib to support arbitrary paths of
8223 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8224 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8226 2007-05-19 Robert Millan <rmh@aybabtu.com>
8228 * commands/i386/cpuid.c: New module.
8230 * conf/i386-efi.rmk: Enable cpuid.mod.
8231 * conf/i386-pc.rmk: Likewise.
8233 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8235 * kern/disk.c (grub_disk_read): Check return value of
8238 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8240 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8242 * disk/raid.c (grub_raid_open): Likewise.
8244 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8246 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8247 stack instead of on the heap.
8249 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8250 before doing a read on it.
8252 * configure.ac: Only use -fno-stack-protector for the target
8255 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8257 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8258 __attribute_ ((unused)) to mode_type argument.
8260 * util/getroot.c (grub_guess_root_device): Fix #endif.
8262 * kern/misc.c (memcmp): Fix prototype.
8264 * include/grub/partition.h [GRUB_UTIL]
8265 (grub_gpt_partition_map_init): Add prototype.
8266 (grub_gpt_partition_map_fini): Likewise.
8268 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8271 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8272 (grub_fat_read_data): Likewise.
8273 (grub_fat_find_dir): Likewise.
8275 * font/manager.c (find_glyph): Make table a const.
8276 (grub_font_get_glyph): Remove bitmap from if statement.
8278 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8280 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8281 code, first search for device in /dev/mapper, then in /dev.
8282 (grub_util_get_grub_dev): New function.
8283 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8285 * util/grub-probe.c (probe): Remove check for RAID, call
8286 grub_util_get_grub_dev() instead of
8287 grub_util_biosdisk_get_grub_dev().
8288 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8289 grub_util_biosdisk_get_grub_dev().
8290 * util/i386/pc/grub-setup.c (main): Likewise.
8292 2007-05-16 Robert Millan <rmh@aybabtu.com>
8294 * DISTLIST: Update for the latest changes.
8295 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8296 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8297 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8298 grub/util/biosdisk.h.
8299 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8300 grub/util/biosdisk.h.
8302 2007-05-16 Robert Millan <rmh@aybabtu.com>
8304 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8306 2007-05-16 Robert Millan <rmh@aybabtu.com>
8308 * util/i386/efi/grub-install.in: New.
8309 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8310 newly added grub-install.
8311 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8313 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8314 grub/util/biosdisk.h.
8315 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8316 grub/util/biosdisk.h.
8318 2007-05-16 Robert Millan <rmh@aybabtu.com>
8320 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8321 * include/grub/util/biosdisk.h: ... here.
8322 * util/i386/pc/biosdisk.c: Moved to ...
8323 * util/biosdisk.c: ... here.
8324 * util/i386/pc/getroot.c: Moved to ...
8325 * util/getroot.c: ... here.
8326 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8327 * util/grub-mkdevicemap.c: ... here.
8328 * util/i386/pc/grub-probe.c: Moved to ...
8329 * util/grub-probe.c: ... here.
8331 2007-05-15 Robert Millan <rmh@aybabtu.com>
8333 * util/update-grub.in: Remove duplicated line in grub.cfg header
8336 2007-05-13 Robert Millan <rmh@aybabtu.com>
8338 * util/update-grub.in: Fix a few assumptions about the devices holding
8339 /, /boot and /boot/grub being the same.
8340 * util/grub.d/00_header.in: Likewise.
8341 * util/grub.d/10_hurd.in: Likewise.
8342 * util/grub.d/10_linux.in: Likewise.
8344 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8345 patterns. Use that to define the `.old' suffix as older than `'.
8347 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8349 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8350 the grub.cfg header message.
8352 2007-05-11 Robert Millan <rmh@aybabtu.com>
8354 * util/update-grub.in: Create device.map if it doesn't already exist,
8355 before attempting to run grub-probe.
8356 Check for grub-probe and grub-mkdevicemap with the same code
8357 grub-install is using.
8360 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8362 * Makefile.in: Add the datarootdir autoconf variable.
8364 2007-05-09 Robert Millan <rmh@aybabtu.com>
8366 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8367 fail gracefully if dev->disk->partition == NULL.
8369 2007-05-07 Robert Millan <rmh@aybabtu.com>
8371 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8372 determine partition map module.
8373 * util/i386/pc/grub-install.in: Use this feature to decide which
8374 partition module to load, instead of hardcoding pc and gpt.
8376 2007-05-07 Robert Millan <rmh@aybabtu.com>
8378 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8379 source directory differs from build directory.
8381 2007-05-05 Robert Millan <rmh@aybabtu.com>
8383 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8386 2007-05-05 Robert Millan <rmh@aybabtu.com>
8388 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8390 2007-05-05 Robert Millan <rmh@aybabtu.com>
8392 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8393 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8395 2007-05-05 Robert Millan <rmh@aybabtu.com>
8397 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8398 (grub_probe_SOURCES): Likewise.
8399 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8400 GPT and initialize dos_part and bsd_part accordingly.
8401 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8403 (main): Activate gpt module for use during partition identification,
8404 and deactivate it afterwards.
8405 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8406 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8407 partition identification, and deactivate it afterwards.
8409 2007-05-05 Robert Millan <rmh@aybabtu.com>
8411 * term/i386/pc/console.c (grub_console_fini): Call
8412 grub_term_set_current() before grub_term_unregister().
8414 2007-05-04 Robert Millan <rmh@aybabtu.com>
8416 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8417 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8418 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8419 and update-grub_DATA.
8420 * conf/common.rmk: Build and install update-grub components.
8421 * conf/common.mk: Regenerate.
8422 * util/update-grub.in: New. Core of update-grub.
8423 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8424 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8425 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8426 * util/grub.d/README: New. Document grub.d directory layout.
8428 2007-05-01 Robert Millan <rmh@aybabtu.com>
8430 * util/grub-emu.c: Move initialization functions
8431 grub_util_biosdisk_init() and grub_init_all() before
8432 grub_util_biosdisk_get_grub_dev(), which relies on them.
8434 2007-04-19 Robert Millan <rmh@aybabtu.com>
8436 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8439 2007-04-18 Jerone Young <jerone@gmail.com>
8441 * kernel/elf.c: Add missing parenthesis for conditional statement
8444 2007-04-10 Jerone Young <jerone@gmail.com>
8446 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8447 continue on and look for device node with real device name.
8449 2007-04-10 Jerone Young <jerone@gmail.com>
8451 * configure.ac: Add argument for autoconf to use transformation
8453 * Makefile.in: Add autoconf package transformation code.
8454 * util/i386/pc/grub-install.in: Likewise.
8455 * util/powerpc/ieee1275/grub-install.in: Likewise.
8457 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8459 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8460 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8461 (EXT2_REVISION): Likewise.
8462 (EXT2_INODE_SIZE): Likewise.
8463 (struct grub_ext2_block_group): Added a missing member
8465 (grub_ext2_read_inode): Divide by the inode size in a superblock
8466 instead of 128 to obtain INODES_PER_BLOCK.
8467 Use the macro EXT2_INODE_SIZE instead of directly using
8470 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8472 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8473 superblock instead of the structure size to compute an
8474 offset. This fixes the problem that GRUB could not read a
8475 filesystem when inode size is different from 128-byte.
8477 2007-03-05 Marco Gerards <marco@gnu.org>
8479 * normal/main.c (read_config_file): When "menu" is not set, create
8482 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8484 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8485 (HEAP_LIMIT): New macro.
8486 (grub_claim_heap): Claim memory up to `heaplimit'.
8488 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8490 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8491 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8493 (grub_arch_modules_addr): Return address after `_end'.
8494 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8495 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8496 (add_segments): Calculate `_end' from phdr size and location.
8497 (ALIGN_UP): Moved to ...
8498 * include/grub/misc.h: here.
8499 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8501 (GRUB_IEEE1275_MODULE_BASE): Removed.
8503 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8505 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8508 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8510 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8512 (grub_elf64_load_hook_t): Likewise.
8513 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8516 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8518 * kern/mm.c: Update copyright.
8519 (grub_mm_debug): Correct syntax error.
8520 (grub_mm_dump_free): New function.
8521 (grub_debug_free): Call `grub_free'.
8522 * include/grub/mm.h: Update copyright.
8523 (grub_mm_dump_free): Add declaration.
8525 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8527 * include/grub/ieee1275/ieee1275.h: Update copyright.
8528 * kern/powerpc/ieee1275/init.c: Likewise.
8529 * kern/powerpc/ieee1275/openfw.c: Likewise.
8531 * loader/powerpc/ieee1275/linux.c: Likewise.
8532 * include/grub/elfload.h: Likewise.
8533 * kern/elf.c: Likewise.
8534 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8536 (grub_elf64_load): Likewise.
8537 (grub_elf32_load_segment): Move to a nested function.
8538 (grub_elf64_load_segment): Likewise.
8540 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8542 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8544 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8545 (grub_heap_len): Likewise.
8546 (HEAP_SIZE): New macro.
8547 (grub_claim_heap): New function.
8548 (grub_machine_init): Don't claim heap directly. Call
8550 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8551 (grub_available_iterate): New function.
8553 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8555 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8556 * configure.ac: Use it for testing the HOST and TARGET compilers.
8558 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8560 * Makefile.in (enable_grub_emu): New variable.
8561 * configure.ac (--enable-grub-emu): New option.
8562 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8563 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8564 * conf/i386-pc.rmk: Likewise.
8565 * conf/powerpc-ieee1275.rmk: Likewise.
8566 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8568 2006-12-12 Marco Gerards <marco@gnu.org>
8570 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8572 * kern/env.c (grub_env_unset): Don't free the member `value' when
8573 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8576 * normal/main.c (current_menu): Removed.
8577 (free_menu): Unset the `menu' environment variable.
8578 (grub_normal_menu_addentry): Make use of the environment variable
8579 `menu', instead of using the global `current_menu'. Allocate
8580 memory for the sourcecode of this entry.
8581 (read_config_file): New argument `nested', changed all callers.
8582 Only in the case of a new context, initialize a new menu. Set the
8583 `menu' environment variable.
8584 (grub_normal_execute): Don't set and unset the environment
8585 variable `menu' here anymore. Only free the menu when leaving the
8588 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8591 2006-12-11 Marco Gerards <marco@gnu.org>
8593 * normal/menu_entry.c (run): Fix off by one bug so the last line
8594 is executed. Move the loader check to outside the loop.
8596 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8598 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8600 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8602 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8603 the number of sectors. Reported by Andrey Shuvikov
8604 <mr_hyro@yahoo.com>.
8606 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8608 * kern/disk.c (grub_disk_read): When there is a read error, always
8609 try to read only the necessary data.
8611 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8613 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8615 [GRUB_UTIL] (grub_raid_fini): Likewise.
8616 [GRUB_UTIL] (grub_lvm_init): Likewise.
8617 [GRUB_UTIL] (grub_lvm_fini): Likewise.
8618 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8619 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8620 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8621 and grub_raid_fini().
8623 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8625 * include/grub/types.h (__unused): Rename to UNUSED.
8626 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8627 (grub_elf64_size): Likewise.
8629 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8631 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8632 grub_error_push and grub_error_pop in the error-handling path.
8633 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8636 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8638 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8639 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8640 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8641 (kernel_elf_SOURCES): Likewise.
8642 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8643 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8644 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8645 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8646 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8647 (elf_mod_SOURCES): New variable.
8648 (elf_mod_CFLAGS): Likewise.
8649 (elf_mod_LDFLAGS): Likewise.
8650 * include/grub/types.h (__unused): New macro.
8651 * include/grub/elfload.h: New file.
8652 * kern/elf.c: Likewise.
8653 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8654 (ELF32_LOADMASK): New macro.
8655 (ELF64_LOADMASK): Likewise.
8657 (grub_linux_load32): New function.
8658 (grub_linux_load64): Likewise.
8659 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8660 Use grub_elf_t instead of grub_file_t.
8662 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8664 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8665 `catch_result' to struct set_color_args.
8667 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8669 * normal/menu.c: Include grub/script.h.
8670 * normal/menu_entry.c: Likewise.
8671 * include/grub/normal.h: Do not include grub/script.h.
8673 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8675 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8677 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8679 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8681 (grub_disk_close): Print debug messages when closing a disk.
8682 (grub_disk_read): Print debug messages when disk read fails.
8683 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8685 * kern/partition.c: Include misc.h.
8686 (grub_partition_iterate): Print debug messages when detecting
8689 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8691 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8693 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8695 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8697 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8698 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8700 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8702 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8703 instead of sizeof(lv). Patch by Michael Guntsche.
8705 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8707 * disk/lvm.c: Rename VGS to VG_LIST.
8708 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8709 (grub_lvm_open): Likewise.
8710 Thanks to Michael Guntsche for finding this bug.
8712 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8714 * configure.ac (AC_INIT): Bumped to 1.95.
8716 2006-10-14 Robert Millan <rmh@aybabtu.com>
8718 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8719 with "/dev/.static/dev/md".
8721 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8723 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8724 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8725 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8726 DRIVE_NAME are always freed.
8728 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8729 DOS_PART, as a DOS partition is counted from one instead of zero
8730 now. Reported by Robert Millan.
8732 2006-10-14 Robert Millan <rmh@aybabtu.com>
8734 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8735 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8736 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8737 string returned by grub_guess_root_device.
8738 * util/i386/pc/grub-setup.c: Likewise.
8739 * util/i386/pc/grub-probefs.c: Likewise.
8741 * util/i386/pc/grub-probefs.c: Rename to ...
8742 * util/i386/pc/grub-probe.c: ... this.
8743 * DISTLIST: Remove grub-probefs, add grub-probe.
8744 * conf/i386-efi.rmk: Likewise.
8745 * conf/i386-pc.rmk: Likewise.
8746 * util/i386/pc/grub-install.in: Likewise.
8748 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8749 choose which information we want to print.
8751 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8753 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8754 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8755 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8756 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8757 video/readers/tga.c and video/i386/pc/vbeutil.c.
8759 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8761 Added support for RAID and LVM.
8763 * disk/lvm.c: New file.
8764 * disk/raid.c: Likewise.
8765 * include/grub/lvm.h: Likewise.
8766 * include/grub/raid.h: Likewise.
8767 * include/grub/util/lvm.h: Likewise.
8768 * include/grub/util/raid.h: Likewise.
8769 * util/lvm.c: Likewise.
8770 * util/raid.c: Likewise.
8772 * include/grub/disk.h (grub_disk_dev_id): Add
8773 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8774 (grub_disk_get_size): New prototype.
8775 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8776 returns a partition.
8777 (grub_disk_get_size): New function.
8779 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8780 verbatim if grub_install_dos_part is -2.
8782 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8785 * util/i386/pc/grub-setup.c (setup): New argument
8786 MUST_EMBED. Force embedding of GRUB when the argument is
8787 true. Close FILE before returning.
8788 (main): Add support for RAID and LVM.
8790 * conf/common.rmk: Add RAID and LVM modules.
8791 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8793 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8795 * kern/misc.c (grub_strstr): New function.
8796 * include/grub/misc.h (grub_strstr): New prototype.
8798 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8800 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8802 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8804 * kern/misc.c (grub_strtoull): Guess the base only if not
8807 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8809 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8812 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8814 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8816 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8817 Remove `flags' argument. All callers changed.
8818 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8819 (IEEE1275_IHANDLE_INVALID): New variable.
8820 (IEEE1275_CELL_INVALID): New variable.
8821 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8822 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8823 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8824 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8825 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8826 codes from Open Firmware. All callers updated.
8827 (grub_ieee1275_next_property): Directly return Open Firmware return
8829 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8830 Standardize error checking from `grub_ieee1275_get_property'.
8831 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8832 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8834 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8836 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8837 `instance_to_package_args' to `instance_to_path_args'.
8839 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8840 `grub_ieee1275_chosen'.
8842 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8843 `grub_ieee1275_interpret'.
8845 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
8847 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8849 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
8851 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8852 (__cmpdi): Likewise.
8854 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8855 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8858 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
8860 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8861 to type `grub_ssize_t'.
8862 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8864 2006-09-22 Marco Gerards <marco@gnu.org>
8866 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8869 2006-09-22 Marco Gerards <marco@gnu.org>
8871 * commands/echo.c: New file.
8873 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8875 * conf/common.rmk (echo_mod_SOURCES): New variable.
8876 (echo_mod_CFLAGS): Likewise.
8877 (echo_mod_LDFLAGS): Likewise.
8879 2006-09-22 Marco Gerards <marco@gnu.org>
8881 * normal/main.c (get_line): Malloc memory instead of using
8882 preallocated memory. Removed the arguments `cmdline' and
8883 `max_len'. Updated all callers.
8885 2006-09-22 Marco Gerards <marco@gnu.org>
8887 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8888 (normal_mod_DEPENDENCIES): Likewise.
8890 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8891 (normal_mod_DEPENDENCIES): Likewise.
8893 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8895 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
8897 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8899 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8900 (normal_mod_DEPENDENCIES): Likewise.
8901 * conf/i386-pc.mk: Regenerate.
8902 * conf/i386-efi.mk: Likewise
8903 * conf/common.mk: Likewise.
8904 * conf/powerpc-ieee1275.mk: Likewise.
8905 * conf/sparc64-ieee1275.mk: Likewise.
8907 2006-09-22 Robert Millan <rmh@aybabtu.com>
8909 Sync with i386 version.
8910 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8911 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8913 2006-09-21 Robert Millan <rmh@aybabtu.com>
8915 Import from GRUB Legacy (lib/device.c):
8916 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8917 (init_device_map) [__linux__]: Add support for I2O devices.
8919 2006-09-14 Marco Gerards <marco@gnu.org>
8921 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8924 2006-09-14 Robert Millan <rmh@aybabtu.com>
8926 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8929 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
8931 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8932 before adding it to device.map.
8934 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
8936 * genmk.rb: Let GCC generate dependencies the first time it
8937 compiles a file; using the -MD option.
8938 * conf/common.mk: Regenerate.
8939 * conf/i386-pc.mk: Likewise.
8940 * conf/i386-efi.mk: Likewise.
8941 * conf/powerpc-ieee1275.mk: Likewise.
8942 * conf/sparc64-ieee1275.mk: Likewise.
8944 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8946 Move the prototypes of grub_setjmp and grub_longjmp to
8947 cpu/setjmp.h, so that each architecture may specify different
8950 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8951 (grub_longjmp): Likewise.
8952 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8953 (grub_longjmp): Likewise.
8954 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8955 (grub_longjmp): Likewise.
8957 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8958 [!GRUB_UTIL] (grub_longjmp): Removed.
8960 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8962 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8963 "color!" method does not return any value.
8965 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8967 * include/grub/bitmap.h: New file.
8969 * include/grub/i386/pc/vbeutil.h: Likewise.
8971 * video/bitmap.c: Likewise.
8973 * video/readers/tga.c: Likewise.
8975 * video/i386/pc/vbeutil.c: Likewise.
8977 * commands/videotest.c: Code cleanup and updated to reflect to new
8980 * term/gfxterm.c: Likewise.
8982 * video/video.c: Likewise.
8984 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8985 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8986 (bitmap_mod_SOURCES): New entry.
8987 (bitmap_mod_CFLAGS): Likewise.
8988 (bitmap_mod_LDFLAGS): Likewise.
8989 (tga_mod_SOURCES): Likewise.
8990 (tga_mod_CFLAGS): Likewise.
8991 (tga_mod_LDFLAGS): Likewise.
8993 * include/grub/video.h (grub_video_blit_operators): New enum type.
8994 (grub_video_render_target): Changed as forward declaration and moved
8995 actual definition to be video driver specific.
8996 (grub_video_adapter.blit_bitmap): Added blitting operator.
8997 (grub_video_adapter.blit_render_target): Likewise.
8998 (grub_video_blit_bitmap): Likewise.
8999 (grub_video_blit_render_target): Likewise.
9001 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9002 driver specific render target definition.
9003 (grub_video_vbe_map_rgba): Added driver internal helper.
9004 (grub_video_vbe_unmap_color): Updated to use
9005 grub_video_i386_vbeblit_info.
9006 (grub_video_vbe_get_video_ptr): Likewise.
9008 * include/grub/i386/pc/vbeblit.h
9009 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9010 grub_video_i386_vbeblit_info.
9011 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9012 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9013 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9014 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9015 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9016 (grub_video_i386_vbeblit_index_index): Likewise.
9017 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9018 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9019 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9020 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9022 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9025 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9026 include/grub/i386/pc/vbeblit.h.
9028 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9029 Updated to use grub_video_i386_vbeblit_info.
9030 (grub_video_i386_vbefill_R8G8B8): Likewise.
9031 (grub_video_i386_vbefill_index): Likewise.
9032 (grub_video_i386_vbefill): Added generic filler.
9034 * video/i386/pc/vbefill.c: Updated to reflect changes on
9035 include/grub/i386/pc/vbefill.h.
9037 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9038 grub_video_i386_vbeblit_info.
9039 (grub_video_vbe_unmap_color): Likewise.
9040 (grub_video_vbe_blit_glyph): Likewise.
9041 (grub_video_vbe_scroll): Likewise.
9042 (grub_video_vbe_draw_pixel): Removed function.
9043 (grub_video_vbe_get_pixel): Likewise.
9044 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9045 updated code to use it.
9046 (common_blitter): Added common blitter for render target and bitmap.
9047 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9048 (grub_video_vbe_blit_render_target): Likewise.
9050 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9052 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9053 is in text mode if there is no console control protocol instance
9056 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9058 * include/grub/video.h: Code cleanup.
9060 * include/grub/i386/pc/vbe.h: Likewise.
9062 * video/i386/pc/vbe.c: Likewise.
9064 * video/i386/pc/vbeblit.c: Likewise.
9066 * video/i386/pc/vbefill.c: Likewise.
9068 * video/video.c: Likewise. Also added more comments.
9070 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9072 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9073 (struct grub_biosdisk_dap): Likewise.
9075 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9076 linkage settings for all functions.
9078 2006-07-12 Marco Gerards <marco@gnu.org>
9080 * configure.ac (--enable-mm-debug): Fix typo.
9082 * genkernsyms.sh.in: Use proper quoting for `CC'.
9084 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9086 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9087 (normal_mod_ASFLAGS): Remove "-m32".
9089 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9091 * util/misc.c: Include config.h.
9092 [!HAVE_MEMALIGN]: Do not include malloc.h.
9093 (grub_memalign): Use posix_memalign, if present. Then, use
9094 memalign, if present. Otherwise, emit an error.
9096 * util/grub-emu.c: Do not include malloc.h.
9098 * include/grub/util/misc.h: Include unistd.h. This is required for
9099 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9100 D. Eades III <hde@foobar-qux.org>.
9102 * configure.ac (AC_GNU_SOURCE): Added.
9103 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9106 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9108 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9109 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9111 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9113 * include/grub/types.h (grub_host_addr_t): Rename to
9115 (grub_host_off_t): Rename to grub_target_off_t.
9116 (grub_host_size_t): Rename to grub_target_size_t.
9117 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9118 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9120 * include/grub/kernel.h (struct grub_module_header): Change type
9121 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9122 (grub_module_info): Likewise.
9124 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9126 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9127 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9128 Velazquez <jesus.velazquez@gmail.com>.
9130 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9132 Count partitions from 1 instead of 0 in the string representation
9133 of partitions. Still use 0-based internally.
9135 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9136 (sun_partition_map_iterate): Use grub_partition_t instead of
9137 struct grub_partition *. Cast DESC->START_CYLINDER to
9138 grub_uint64_t after converting the endian.
9139 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9140 (sun_partition_map_get_name): Add 1 to P->INDEX.
9142 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9144 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9146 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9147 zero instead of one.
9148 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9149 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9151 * partmap/apple.c (apple_partition_map_iterate): Change the type
9153 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9154 (apple_partition_map_get_name): Add 1 into P->INDEX.
9156 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9158 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9159 calculate the offset of a partition.
9160 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9161 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9163 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9164 SECTOR to grub_disk_addr_t.
9165 (acorn_partition_map_iterate): Likewise.
9166 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9167 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9169 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9171 * kern/i386/pc/init.c (make_install_device): Add 1 into
9172 GRUB_INSTALL_DOS_PART.
9174 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9177 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9179 Clean up the code to support 64-bit addressing in disks and
9180 files. This change is not enough for filesystems yet.
9182 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9183 type of "start" to grub_uint64_t.
9184 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9185 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9186 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9189 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9190 to grub_disk_addr_t.
9192 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9195 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9197 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9200 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9202 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9204 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9206 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9207 to grub_off_t, to detect an error from grub_file_seek.
9208 (grub_multiboot_load_elf32): Likewise.
9210 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9211 maximum unsigned long value when an overflow is detected.
9212 (grub_strtoull): New function.
9213 (grub_divmod64): Likewise.
9214 (grub_lltoa): use grub_divmod64.
9216 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9218 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9219 the pointer to next character. Use grub_strtoull instead of
9221 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9222 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9225 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9226 return value is signed.
9227 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9228 test if OFFSET is less than zero, as OFFSET is unsigned now.
9230 * kern/disk.c (struct grub_disk_cache): Change the type of
9231 "sector" to grub_disk_addr_t.
9232 (grub_disk_cache_get_index): Change the type of SECTOR to
9233 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9234 unsigned after shifting.
9235 (grub_disk_cache_invalidate): Change the type of SECTOR to
9237 (grub_disk_cache_unlock): Likewise.
9238 (grub_disk_cache_store): Likewise.
9239 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9240 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9241 grub_disk_addr_t and grub_uint64_t, respectively.
9242 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9243 body, as the value of OFFSET is tweaked by
9244 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9245 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9247 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9248 body, as the value of OFFSET is tweaked by
9249 grub_disk_check_range. Change the types of LEN and N to
9252 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9253 and "saved_offset" to grub_off_t.
9254 (test_header): Cast BUF to char *.
9255 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9257 (grub_gzio_read): Change the types of OFFSET and SIZE to
9258 grub_off_t and grub_size_t, respectively.
9260 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9262 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9263 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9264 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9265 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9266 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9268 * include/grub/types.h (grub_off_t): Unconditionally set to
9270 (grub_disk_addr_t): Changed to grub_uint64_t.
9272 * include/grub/partition.h (struct grub_partition): Change the
9273 types of "start", "len" and "offset" to grub_disk_addr_t,
9274 grub_uint64_t and grub_disk_addr_t, respectively.
9275 (grub_partition_get_start): Return grub_disk_addr_t.
9276 (grub_partition_get_len): Return grub_uint64_t.
9278 * include/grub/misc.h (grub_strtoull): New prototype.
9279 (grub_divmod64): Likewise.
9281 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9282 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9283 grub_off_t, respectively.
9284 All callers and references changed.
9286 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9287 grub_size_t in "read".
9288 All callers and references changed.
9290 * include/grub/file.h (struct grub_file): Change the types of
9291 "offset" and "size" to grub_off_t and grub_off_t,
9292 respectively. Change the type of SECTOR to grub_disk_addr_t in
9294 (grub_file_read): Change the type of LEN to grub_size_t.
9295 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9297 (grub_file_size): Return grub_off_t.
9298 (grub_file_tell): Likewise.
9299 All callers and references changed.
9301 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9302 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9304 (struct grub_disk): Change the type of "total_sectors" to
9305 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9307 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9308 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9309 (grub_disk_write): Likewise.
9310 All callers and references changed.
9312 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9313 char * for grub_strncmp to silence gcc.
9314 (grub_iso9660_mount): Likewise.
9315 (grub_iso9660_mount): Likewise.
9316 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9318 (grub_iso9660_iterate_dir): Likewise.
9319 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9321 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9322 LEN to grub_disk_addr_t and grub_size_t, respectively.
9324 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9326 * fs/jfs.c (grub_jfs_read_file): Likewise.
9328 * fs/minix.c (grub_jfs_read_file): Likewise.
9330 * fs/sfs.c (grub_jfs_read_file): Likewise.
9332 * fs/ufs.c (grub_jfs_read_file): Likewise.
9334 * fs/xfs.c (grub_jfs_read_file): Likewise.
9336 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9337 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9340 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9341 BLKNR to -1 instead of returning GRUB_ERRNO.
9342 (grub_ext2_read_file): Change the types of SECTOR and
9343 LEN to grub_disk_addr_t and grub_size_t, respectively.
9345 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9346 LEN to grub_disk_addr_t and grub_size_t, respectively.
9348 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9351 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9352 string. Do not cast SECTOR explicitly.
9354 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9355 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9356 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9357 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9358 over 2TB and LBA mode is not supported, raise an error.
9359 (get_safe_sectors): New function.
9360 (grub_biosdisk_read): Use get_safe_sectors.
9361 (grub_biosdisk_write): Likewise.
9363 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9364 (grub_efidisk_write): Likewise.
9366 * disk/loopback.c (delete_loopback): Cosmetic changes.
9367 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9369 (grub_loopback_open): Likewise.
9370 (grub_loopback_read): Likewise. Also, change the type of POS to
9371 grub_off_t, and fix the usage of grub_memset.
9373 * commands/i386/pc/play.c: Include grub/machine/time.h.
9375 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9378 * commands/configfile.c: Include grub/env.h.
9380 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9381 GRUB_ERRNO directly instead. Change the type of POS to
9382 grub_off_t. Follow the coding standard.
9384 * commands/blocklist.c: Include grub/partition.h.
9385 (grub_cmd_blocklist): Return an error if the underlying device is
9386 not a disk. Take the starting sector of a partition into account,
9387 if a partition is used.
9389 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9391 (lba_mode): Support 64-bit addresses.
9392 (chs_mode): Likewise.
9393 (copy_buffer): Adapted to the new offsets of a length field and a
9395 (blocklist_default_start): Allocate 64-bit space.
9397 * boot/i386/pc/boot.S (force_lba): Removed.
9398 (boot_drive): Moved to under KERNEL_SECTOR.
9399 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9401 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9403 (lba_mode): Refactored to support a 64-bit address. More size
9405 (setup_sectors): Likewise.
9407 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9409 * DISTLIST: Added include/grub/i386/linux.h. Removed
9410 include/grub/i386/pc/linux.h
9412 * configure.ac (AC_INIT): Bumped to 1.94.
9414 * config.guess: Updated from gnulib.
9415 * config.sub: Likewise.
9416 * install-sh: Likewise.
9417 * mkinstalldirs: Likewise.
9419 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9421 * conf/common.rmk (grub_modules_init.lst): Depended on
9422 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9425 * genmk.rb (PModule::rule): Reverted the previous change.
9427 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9429 * conf/common.rmk (grub_modules_init.lst): Depends on
9430 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9431 that the target does not exist before producing.
9432 (grub_modules_init.h): Remove the target before generating.
9433 (grub_emu_init.c): Likewise.
9435 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9437 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9439 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9440 for the target-specific tests. Make sure that we also have the
9441 up-to-date target variables for those tests.
9443 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9445 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9446 (PModule::rule): Likewise.
9448 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9450 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9451 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9452 target-specific flags should be prefixed.
9453 (PModule::rule): Likewise.
9455 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9457 * configure.ac (CMP): Check if cmp is available explicitly.
9459 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9461 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9462 (target_cpu): New variable.
9463 (pkglibdir): Use target_cpu instead of host_cpu.
9465 * util/i386/pc/grub-install.in (host_cpu): Removed.
9466 (target_cpu): New variable.
9467 (pkglibdir): Use target_cpu instead of host_cpu.
9469 * util/genmoddep.c: Removed.
9471 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9472 instead of GRUB_HOST_SIZEOF_VOID_P.
9473 * kern/dl.c: Likewise.
9475 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9477 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9478 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9479 (GRUB_TARGET_SIZEOF_LONG): ... this.
9480 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9481 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9482 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9484 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9485 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9486 (GRUB_TARGET_SIZEOF_LONG): ... this.
9487 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9488 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9489 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9491 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9492 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9493 (GRUB_TARGET_SIZEOF_LONG): ... this.
9494 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9495 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9497 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9498 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9499 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9500 instead of GRUB_HOST_SIZEOF_LONG.
9501 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9502 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9503 GRUB_CPU_WORDS_BIGENDIAN.
9504 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9505 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9508 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9509 (genmoddep_SOURCES): Likewise.
9510 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9511 (genmoddep_SOURCES): Likewise.
9512 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9513 (genmoddep_SOURCES): Likewise.
9514 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9516 (genmoddep_SOURCES): Likewise.
9518 * genmoddep.awk: New file.
9520 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9521 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9522 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9523 (PModule::rule): Likewise.
9524 (Program::rule): Likewise.
9525 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9526 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9529 * configure.ac: Rewritten intensively to use host and target
9530 instead of build and host, respectively.
9532 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9533 (host_cpu): Removed.
9534 (target_cpu): New variable.
9535 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9536 (BUILD_CC): Removed.
9537 (BUILD_CFLAGS): Likewise.
9538 (BUILD_CPPFLAGS): Likewise.
9539 (TARGET_CC): New variable.
9540 (TARGET_CFLAGS): Likewise.
9541 (TARGET_CPPFLAGS): Likewise.
9542 (TARGET_LDFLAGS): Likewise.
9544 (include): Use target_cpu instead of host_cpu.
9545 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9547 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9549 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9551 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9552 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9553 field 'false' to 'exec_on_false'.
9554 (grub_script_create_cmdif): Renamed argument names to reflect above
9557 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9559 * normal/script.c (grub_script_create_cmdif): Likewise.
9561 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9563 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9565 (grub_hfsplus_btree_recptr): Likewise.
9566 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9567 FILEBLOCK both to pass a block number and store next block
9569 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9570 overflow file correctly. Specify errors appropriately, because
9571 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9572 grub_hfsplus_btree_recptr to get the pointer to a found key.
9573 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9576 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9578 (_linux_mod_SOURCES): New variable.
9579 (_linux_mod_CFLAGS): Likewise.
9580 (_linux_mod_LDFLAGS): Likewise.
9581 (linux_mod_SOURCES): Likewise.
9582 (linux_mod_CFLAGS): Likewise.
9583 (linux_mod_LDFLAGS): Likewise.
9585 * DISTLIST: Added loader/i386/efi/linux.c,
9586 loader/i386/efi/linux_normal.c and
9587 include/grub/i386/efi/loader.h.
9589 * loader/i386/efi/linux.c: New file.
9590 * loader/i386/efi/linux_normal.c: Likewise.
9591 * include/grub/i386/efi/loader.h: Likewise.
9593 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9595 * commands/blocklist.c: New file.
9597 * DISTLIST: Added commands/blocklist.c.
9599 * term/efi/console.c (grub_console_highlight_color): Use a lighter
9600 color for the background, and a darker color for the foreground.
9601 (grub_console_checkkey): Return READ_KEY.
9602 (grub_console_cls): Set the background to
9603 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9605 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9607 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9608 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9610 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9613 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9614 BG. The spec is wrong again.
9616 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9618 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9620 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9621 commands/blocklist.c.
9622 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9624 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9625 (blocklist_mod_SOURCES): New variable.
9626 (blocklist_mod_CFLAGS): Likewise.
9627 (blocklist_mod_LDFLAGS): Likewise.
9629 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9631 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9633 (lba_mode): Use %eax more intensively to reduce the code size.
9635 2006-05-20 Marco Gerards <marco@gnu.org>
9637 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9639 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9641 (script): Accept leading newlines.
9642 (newlines): New rule to describe 0 or more newlines.
9643 (commands): Accept `command' with trailing newline. Fixed the
9644 order in which arguments were passed to `grub_script_add_cmd'.
9645 Accept commands separated by newlines.
9646 (function): Changed to accept newlines.
9647 (menuentry) Rewritten.
9649 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9650 front of the list, instead of to the end.
9652 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9654 * util/i386/pc/grub-install.in (bindir): New variable.
9655 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9656 Shaver <lbgwjl@gmail.com>.
9658 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9660 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9661 grub/machine/linux.h
9662 * loader/i386/pc/linux.c: Likewise.
9664 * include/grub/i386/pc/linux.h: Moved to ...
9665 * include/grub/i386/linux.h: ... here.
9667 * include/grub/i386/linux.h (struct linux_kernel_params): New
9670 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9672 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9674 (grub_video_vbe_blit_glyph): Likewise.
9675 (grub_video_vbe_blit_bitmap): Likewise.
9676 (grub_video_vbe_blit_render_target): Likewise.
9678 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9680 * configure.ac (--with-platform): Properly quote the square
9683 2006-05-08 Marco Gerards <marco@gnu.org>
9685 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9687 (kernel_elf_HEADERS): ...to this. Updated all users.
9688 (grubof_symlist.c): Renamed from this...
9689 (kernel_elf_symlist.c): ...to this. Updated all users.
9690 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9691 (grubof_SOURCES): Renamed from this...
9692 (kernel_elf_SOURCES): ...to this.
9693 (grubof_HEADERS): Renamed from this...
9694 (kernel_elf_HEADERS): ...to this.
9695 (grubof_CFLAGS): Renamed from this...
9696 (kernel_elf_CFLAGS): ...to this.
9697 (grubof_ASFLAGS): Renamed from this...
9698 (kernel_elf_ASFLAGS): ...to this.
9699 (grubof_LDFLAGS): Renamed from this...
9700 (kernel_elf_LDFLAGS): ...to this.
9702 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9704 (kernel_elf_HEADERS): ...to this. Updated all users.
9705 (grubof_symlist.c): Renamed from this...
9706 (kernel_elf_symlist.c): ...to this. Updated all users.
9707 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9708 (grubof_SOURCES): Renamed from this...
9709 (kernel_elf_SOURCES): ...to this.
9710 (grubof_HEADERS): Renamed from this...
9711 (kernel_elf_HEADERS): ...to this.
9712 (grubof_CFLAGS): Renamed from this...
9713 (kernel_elf_CFLAGS): ...to this.
9714 (grubof_ASFLAGS): Renamed from this...
9715 (kernel_elf_ASFLAGS): ...to this.
9716 (grubof_LDFLAGS): Renamed from this...
9717 (kernel_elf_LDFLAGS): ...to this.
9719 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9720 `kernel.elf' instead of `grubof'.
9722 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9724 Add --with-platform to configure. Use pkglibdir instead of
9725 pkgdatadir. This is reported by Roger Leigh.
9727 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9728 (host_vendor): Likewise.
9729 (host_os): Likewise.
9730 (pkgdatadir): Likewise.
9731 (platform): New variable.
9732 (pkglibdir): Likewise.
9733 Use PKGLIBDIR instead of PKGDATADIR.
9735 * util/i386/pc/grub-install.in (datadir): Removed.
9736 (host_vendor): Likewise.
9737 (host_os): Likewise.
9738 (pkgdatadir): Likewise.
9739 (platform): New variable.
9740 (pkglibdir): Likewise.
9741 Use PKGLIBDIR instead of PKGDATADIR.
9743 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9744 instead of GRUB_DATADIR.
9746 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9748 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9751 * configure.ac (--with-platform): New option.
9752 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9754 * Makefile.in: Include a makefile based on PLATFORM instead of
9756 (pkgdatadir): Not appended by the machine type.
9757 (pkglibdir): Appended by the machine type.
9758 (host_vendor): Removed.
9759 (platform): New variable.
9760 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9761 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9762 (uninstall): Likewise.
9764 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9766 Use the environment context in the menu. Remove the commands
9767 "default" and "timeout", and use variables instead.
9769 * normal/menu.c: Include grub/env.h.
9770 (print_entry): Cast TITLE to silence gcc.
9771 (get_timeout): New function.
9772 (set_timeout): Likewise.
9773 (get_entry_number): Likewise.
9774 (run_menu): Use a default entry, a fallback entry and a timeout
9775 in the environment variables "default", "fallback" and
9776 "timeout". Also, tweak the default entry if it is not within the
9777 current menu entries.
9778 (grub_menu_run): Use a fallback entry in the environment variable
9781 * normal/main.c (read_config_file): Do not initialize
9782 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9784 (grub_normal_execute): Use a data slot to store the menu.
9786 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9787 fallback_entry and timeout.
9788 (struct grub_menu_list): Removed.
9789 (grub_menu_list_t): Likewise.
9790 (struct grub_context): Likewise.
9791 (grub_context_t): Likewise.
9792 (grub_context_get): Likewise.
9793 (grub_context_get_current_menu): Likewise.
9794 (grub_context_push_menu): Likewise.
9795 (grub_context_pop_menu): Likewise.
9796 (grub_default_init): Likewise.
9797 (grub_default_fini): Likewise.
9798 (grub_timeout_init): Likewise.
9799 (grub_timeout_fini): Likewise.
9801 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9803 (normal_mod_SOURCES): Removed normal/context.c.
9805 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9806 commands/default.c, commands/timeout.c and normal/context.c.
9807 (normal_mod_SOURCES): Removed normal/context.c.
9809 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9810 commands/timeout.c and normal/context.c.
9811 (normal_mod_SOURCES): Removed normal/context.c.
9813 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9814 commands/default.c, commands/timeout.c and normal/context.c.
9815 (normal_mod_SOURCES): Removed normal/context.c.
9817 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9819 (default_mod_SOURCES): Removed.
9820 (default_mod_CFLAGS): Likewise.
9821 (default_mod_LDFLAGS): Likewise.
9822 (timeout_mod_SOURCES): Removed.
9823 (timeout_mod_CFLAGS): Likewise.
9824 (timeout_mod_LDFLAGS): Likewise.
9826 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9829 * commands/default.c: Removed.
9830 * commands/timeout.c: Likewise.
9831 * normal/context.c: Likewise.
9833 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9835 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9837 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9839 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9840 "next" to "prev" for readability.
9841 (struct grub_env_sorted_var): New struct.
9842 (grub_env_context): Renamed to ...
9843 (initial_context): ... this.
9844 (grub_env_var_context): Renamed to ...
9845 (current_context): ... this.
9846 (grub_env_find): Look only at CURRENT_CONTEXT.
9847 (grub_env_context_open): Rewritten to copy exported variables from
9849 (grub_env_context_close): Rewritten according to the new
9850 scheme. Also, add an assertion to prevent the initial context from
9852 (grub_env_insert): Removed the code for the sorted list.
9853 (grub_env_remove): Likewise.
9854 (grub_env_export): Simply mark the variable with
9855 GRUB_ENV_VAR_GLOBAL.
9856 (grub_env_set): A cosmetic change for naming consistency.
9857 (grub_env_get): Likewise.
9858 (grub_env_unset): Likewise.
9859 (grub_env_iterate): Rewritten to sort variables within this
9861 (grub_register_variable_hook): Fixed for naming consistency. Call
9862 grub_env_find again, only if NAME is not found at the first time.
9863 (mangle_data_slot_name): New function.
9864 (grub_env_set_data_slot): Likewise.
9865 (grub_env_get_data_slot): Likewise.
9866 (grub_env_unset_data_slot): Likewise.
9868 * include/grub/env.h (grub_env_var_type): New enum.
9869 (GRUB_ENV_VAR_LOCAL): New constant.
9870 (GRUB_ENV_VAR_GLOBAL): Likewise.
9871 (GRUB_ENV_VAR_DATA): Likewise.
9872 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9874 (grub_env_set): Replace VAR with NAME for consistency.
9875 (grub_register_variable_hook): Likewise.
9876 (grub_env_export): Specify the name of the argument.
9877 (grub_env_set_data_slot): New prototype.
9878 (grub_env_get_data_slot): Likewise.
9879 (grub_env_unset_data_slot): Likewise.
9881 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9883 Extend the loader so that GRUB can accept a loader which comes
9884 back to GRUB when a loaded image exits. Also, this change adds
9885 support for a chainloader on EFI.
9887 * term/efi/console.c: Include grub/misc.h.
9888 (grub_console_checkkey): Display a scan code on the top for
9889 debugging. This will be removed once the EFI port gets stable.
9890 Correct the scan code mapping.
9892 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9893 allocate memory from larger regions, in order to reduce the number
9894 of allocated regions. Otherwise, the MacOSX loader panics.
9895 (filter_memory_map): Avoid less than 1MB for compatibility with
9897 (add_memory_regions): Allocate from the tail of a region, if
9898 possible, to avoid allocating a region near to 1MB, for the MacOSX
9901 * kern/efi/init.c (grub_efi_set_prefix): Specify
9902 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9904 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9905 argument IMAGE_HANDLE and specify it to get a loaded image.
9906 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9907 grub_efi_get_loaded_image.
9908 (grub_efi_get_filename): Divide the length by the size of
9910 (grub_efi_get_device_path): New function.
9911 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9912 the length by the size of grub_efi_char16_t for a file path device
9915 * kern/loader.c (grub_loader_noreturn): New variable.
9916 (grub_loader_set): Accept a new argument NORETURN. Set
9917 GRUB_LOADER_NORETURN to NORETURN.
9918 All callers changed.
9919 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9922 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9924 (grub_efi_get_loaded_image): Take an argument to specify an image
9927 * include/grub/loader.h (grub_loader_set): Added one more argument
9930 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9931 instead of grub_efi_open_protocol.
9932 (grub_efidisk_get_device_name): Likewise.
9933 (grub_efidisk_close): Print a newline.
9934 (grub_efidisk_get_device_handle): Fixed to use
9935 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9936 GRUB_EFI_DEVICE_PATH_TYPE.
9938 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9939 * kern/efi/efi.c (device_path_guid): ... here.
9941 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9943 (kernel_mod_HEADERS): Added efi/disk.h.
9944 (_chain_mod_SOURCES): New variable.
9945 (_chain_mod_CFLAGS): Likewise.
9946 (_chain_mod_LDFLAGS): Likewise.
9947 (chain_mod_SOURCES): Likewise.
9948 (chain_mod_CFLAGS): Likewise.
9949 (chain_mod_LDFLAGS): Likewise.
9951 * DISTLIST: Added include/grub/efi/chainloader.h,
9952 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9954 * include/grub/efi/chainloader.h: New file.
9955 * loader/efi/chainloader.c: Likewise.
9956 * loader/efi/chainloader_normal.c: Likewise.
9958 2006-04-30 Marco Gerards <marco@gnu.org>
9960 * commands/configfile.c (grub_cmd_source): New function.
9961 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9962 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9964 2006-04-30 Marco Gerards <marco@gnu.org>
9966 * normal/execute.c (grub_script_execute_cmd): Change the return
9967 type to `grub_err_t'. Correctly return the error.
9968 (grub_script_execute_cmdline): In case a command line is not a
9969 command or a function, try to interpret it as an assignment.
9971 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9973 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9974 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9975 skip a node whose name is obviously invalid as UTF-16,
9976 i.e. contains a NUL character. Stop the iteration when the last
9977 directory entry is found. Instead of using the return value of
9978 grub_hfsplus_btree_iterate_node, store the value in RET and use
9979 it, because the iterator can be stopped by the last directory
9982 2006-04-30 Marco Gerards <marco@gnu.org>
9984 * include/grub/env.h (grub_env_export): New prototype. Reported
9985 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9987 2006-04-30 Marco Gerards <marco@gnu.org>
9989 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9990 size of the extents in a catalog file record.
9992 2006-04-29 Marco Gerards <marco@gnu.org>
9994 * commands/configfile.c (grub_cmd_configfile): Execute the
9995 configfile within its own context.
9997 * include/grub/env.h (grub_env_context_open): New prototype.
9998 (grub_env_context_close): Likewise.
10000 * kern/env.c (grub_env): Removed.
10001 (grub_env_sorted): Likewise.
10002 (grub_env_context): New variable.
10003 (grub_env_var_context): Likewise.
10004 (grub_env_find): Search both the active context and the global
10006 (grub_env_context_open): New function.
10007 (grub_env_context_close): Likewise.
10008 (grub_env_insert): Likewise.
10009 (grub_env_remove): Likewise.
10010 (grub_env_export): Likewise.
10011 (grub_env_set): Changed to use helper functions to avoid code
10013 (grub_env_iterate): Rewritten so both the current context and the
10014 global context are being used.
10016 * normal/command.c (export_command): New function.
10017 (grub_command_init): Register the `export' function.
10019 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10021 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10022 explicitly to suppress gcc's warnings.
10023 * fs/fat.c (grub_fat_find_dir): Likewise.
10024 (grub_fat_label): Likewise.
10025 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10026 (grub_xfs_mount): Likewise.
10027 (grub_xfs_label): Likewise.
10028 * fs/affs.c (grub_affs_mount): Likewise.
10029 (grub_affs_label): Likewise.
10030 (grub_affs_iterate_dir): Likewise.
10031 * fs/sfs.c (grub_sfs_mount): Likewise.
10032 (grub_sfs_iterate_dir): Likewise.
10033 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10034 * fs/hfs.c (grub_hfs_mount): Likewise.
10035 (grub_hfs_cmp_catkeys): Likewise.
10036 (grub_hfs_find_dir): Likewise.
10037 (grub_hfs_dir): Likewise.
10038 (grub_hfs_label): Likewise.
10039 * fs/jfs.c (grub_jfs_mount): Likewise.
10040 (grub_jfs_opendir): Likewise.
10041 (grub_jfs_getent): Likewise.
10042 (grub_jfs_lookup_symlink): Likewise.
10043 (grub_jfs_label): Likewise.
10044 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10045 (grub_hfsplus_iterate_dir): Likewise.
10046 (grub_hfsplus_btree_iterate_node): Made static.
10048 * util/grub-emu.c (prefix): New variable.
10049 (grub_machine_set_prefix): New function.
10050 (main): Do not set the environment variable "prefix" here. Only
10051 set PREFIX, which is used later by grub_machine_set_prefix.
10053 * include/grub/video.h: Do not include grub/symbol.h.
10054 (grub_video_register): Not exported. This symbol is not defined in
10056 (grub_video_unregister): Likewise.
10057 (grub_video_iterate): Likewise.
10058 (grub_video_setup): Likewise.
10059 (grub_video_restore): Likewise.
10060 (grub_video_get_info): Likewise.
10061 (grub_video_get_blit_format): Likewise.
10062 (grub_video_set_palette): Likewise.
10063 (grub_video_get_palette): Likewise.
10064 (grub_video_set_viewport): Likewise.
10065 (grub_video_get_viewport): Likewise.
10066 (grub_video_map_color): Likewise.
10067 (grub_video_map_rgb): Likewise.
10068 (grub_video_map_rgba): Likewise.
10069 (grub_video_fill_rect): Likewise.
10070 (grub_video_blit_glyph): Likewise.
10071 (grub_video_blit_bitmap): Likewise.
10072 (grub_video_blit_render_target): Likewise.
10073 (grub_video_scroll): Likewise.
10074 (grub_video_swap_buffers): Likewise.
10075 (grub_video_create_render_target): Likewise.
10076 (grub_video_delete_render_target): Likewise.
10077 (grub_video_set_active_render_target): Likewise.
10079 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10081 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10083 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10084 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10085 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10086 instead of $(srcdir)/genkernsyms.sh.
10088 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10089 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10090 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10091 instead of $(srcdir)/genkernsyms.sh.
10093 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10094 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10095 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10096 instead of $(srcdir)/genkernsyms.sh.
10098 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10099 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10100 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10101 instead of $(srcdir)/genkernsyms.sh.
10103 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10106 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10108 (gensymlist.sh): New target.
10109 (genkernsyms.sh): Likewise.
10111 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10112 genkernsyms.sh.in and gensymlist.sh.in.
10114 * genkernsyms.sh: Removed.
10115 * gensymlist.sh: Likewise.
10117 * genkernsyms.sh.in: New file.
10118 * gensymlist.sh.in: Likewise.
10120 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10122 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10123 clobber "prefix", since we may have already set it manually.
10125 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10127 * kern/misc.c (abort): New alias for grub_abort.
10129 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10131 A new machine-specific function "grub_machine_set_prefix" is
10132 defined. This is called after loading modules, so that a prefix
10133 initialization can use modules. Also, this change adds an
10134 intensive debugging feature for the memory manager via the
10135 configure option "--enable-mm-debug".
10137 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10140 * kern/sparc64/ieee1275/init.c (abort): Removed.
10141 (grub_stop): Likewise.
10142 (grub_exit): New function.
10143 (grub_set_prefix): Renamed to ...
10144 (grub_machine_set_prefix): ... this.
10145 (grub_machine_init): Do not call grub_set_prefix.
10147 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10148 (grub_machine_set_prefix): ... this.
10149 (grub_machine_init): Do not call grub_set_prefix.
10151 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10152 (grub_machine_init): Do not set the prefix here.
10154 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10156 * kern/efi/init.c: Include grub/mm.h.
10157 (grub_efi_set_prefix): New function.
10159 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10160 (grub_efi_get_filename): New function.
10161 (grub_print_device_path): Renamed to ...
10162 (grub_efi_print_device_path): ... this.
10164 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10165 [MM_DEBUG] (grub_realloc): Likewise.
10166 [MM_DEBUG] (grub_free): Likewise.
10167 [MM_DEBUG] (grub_memalign): Likewise.
10168 [MM_DEBUG] (grub_mm_debug): New variable.
10169 [MM_DEBUG] (grub_debug_malloc): New function.
10170 [MM_DEBUG] (grub_debug_free): New function.
10171 [MM_DEBUG] (grub_debug_realloc): New function.
10172 [MM_DEBUG] (grub_debug_memalign): New function.
10174 * kern/misc.c (grub_abort): Print a newline to distinguish
10177 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10178 grub_set_root_dev after loading modules. This is necessary when
10179 setting a prefix depends on modules.
10181 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10182 (grub_efi_print_device_path): ... this.
10183 (grub_efi_get_filename): New prototype.
10184 (grub_efi_set_prefix): Likewise.
10186 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10188 (grub_efidisk_get_device_handle): New prototype.
10189 (grub_efidisk_get_device_name): Likewise.
10191 * include/grub/mm.h: Include config.h.
10192 (MM_DEBUG): Removed.
10193 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10194 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10195 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10196 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10197 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10198 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10199 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10200 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10201 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10203 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10205 * disk/efi/efidisk.c: Include grub/partition.h.
10206 (iterate_child_devices): New function.
10207 (add_device): First, compare only last device path nodes, so that
10208 devices are sorted by the types.
10209 (grub_efidisk_get_device_handle): New function.
10210 (grub_efidisk_get_device_name): Likewise.
10212 * configure.ac (--enable-mm-debug): New option to enable the
10213 memory manager debugging feature. This makes the binary much
10214 bigger, so is disabled by default.
10216 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10218 Use grub_abort instead of grub_stop, and grub_exit must be
10219 define in each architecture now. Also, this change adds support
10222 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10223 (grub_getkey): New function.
10224 (grub_term_get_current): Likewise.
10226 * util/i386/pc/grub-setup.c: Include grub/term.h.
10227 (grub_getkey): New function.
10228 (grub_term_get_current): Likewise.
10230 * util/misc.c (grub_stop): Renamed to ...
10231 (grub_exit): ... this.
10233 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10234 (grub_exit): ... this.
10235 (grub_machine_init): Use grub_abort instead of abort.
10236 (grub_stop): Removed.
10238 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10241 * kern/i386/pc/startup.S (grub_exit): New function.
10242 (cold_reboot): New label.
10244 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10245 (grub_efi_init): Call grub_efidisk_init.
10246 (grub_efi_fini): Call grub_efidisk_fini.
10248 * kern/efi/efi.c: Include grub/mm.h.
10249 (grub_efi_console_control_guid): Renamed to ...
10250 (console_control_guid): ... this.
10251 (grub_efi_loaded_image_guid): Renamed to ...
10252 (loaded_image_guid): ... this.
10253 (grub_efi_locate_handle): New function.
10254 (grub_efi_open_protocol): Likewise.
10255 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10256 GRUB_EFI_CONSOLE_CONTROL_GUID.
10257 (grub_efi_exit): Removed.
10258 (grub_stop): Likewise.
10259 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10260 (grub_exit): New function.
10261 (grub_print_device_path): Likewise.
10263 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10264 (grub_enter_rescue_mode): Register "exit".
10266 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10267 (grub_abort): New function.
10269 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10271 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10273 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10275 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10276 (grub_print_device_path): New prototype.
10277 (grub_efi_locate_handle): Likewise.
10278 (grub_efi_open_protocol): Likewise.
10280 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10281 * disk/efi/efidisk.c: Likewise.
10283 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10285 * include/grub/efi/console_control.h
10286 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10288 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10289 last 8 bytes as an array.
10290 (GRUB_EFI_DISK_IO_GUID): New macro.
10291 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10292 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10293 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10295 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10296 (struct grub_efi_device_path): Rename the member "sub_type" to
10298 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10299 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10300 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10301 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10302 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10303 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10304 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10305 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10306 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10307 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10308 (struct grub_efi_pci_device_path): New structure.
10309 (grub_efi_pci_device_path_t): New type.
10310 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10311 (struct grub_efi_pccard_device_path): New structure.
10312 (grub_efi_pccard_device_path_t): New type.
10313 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10314 (struct grub_efi_memory_mapped_device_path): New structure.
10315 (grub_efi_memory_mapped_device_path_t): New type.
10316 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10317 (struct grub_efi_vendor_device_path): New structure.
10318 (grub_efi_vendor_device_path_t): New type.
10319 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10320 (struct grub_efi_controller_device_path): New structure.
10321 (grub_efi_controller_device_path_t): New type.
10322 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10323 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10324 (struct grub_efi_acpi_device_path): New structure.
10325 (grub_efi_acpi_device_path_t): New type.
10326 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10327 (struct grub_efi_expanded_acpi_device_path): New structure.
10328 (grub_efi_expanded_acpi_device_path_t): New type.
10329 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10330 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10331 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10332 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10333 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10334 (struct grub_efi_atapi_device_path): New structure.
10335 (grub_efi_atapi_device_path_t): New type.
10336 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10337 (struct grub_efi_fibre_channel_device_path): New structure.
10338 (grub_efi_fibre_channel_device_path_t): New type.
10339 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10340 (struct grub_efi_1394_device_path): New structure.
10341 (grub_efi_1394_device_path_t): New type.
10342 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10343 (struct grub_efi_usb_device_path): New structure.
10344 (grub_efi_usb_device_path_t): New type.
10345 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10346 (struct grub_efi_usb_class_device_path): New structure.
10347 (grub_efi_usb_class_device_path_t): New type.
10348 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10349 (struct grub_efi_i2o_device_path): New structure.
10350 (grub_efi_i2o_device_path_t): New type.
10351 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10352 (struct grub_efi_mac_address_device_path): New structure.
10353 (grub_efi_mac_address_device_path_t): New type.
10354 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10355 (struct grub_efi_ipv4_device_path): New structure.
10356 (grub_efi_ipv4_device_path_t): New type.
10357 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10358 (struct grub_efi_ipv6_device_path): New structure.
10359 (grub_efi_ipv6_device_path_t): New type.
10360 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10361 (struct grub_efi_infiniband_device_path): New structure.
10362 (grub_efi_infiniband_device_path_t): New type.
10363 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10364 (struct grub_efi_uart_device_path): New structure.
10365 (grub_efi_uart_device_path_t): New type.
10366 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10367 (struct grub_efi_vendor_messaging_device_path): New structure.
10368 (grub_efi_vendor_messaging_device_path_t): New type.
10369 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10370 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10371 (struct grub_efi_hard_drive_device_path): New structure.
10372 (grub_efi_hard_drive_device_path_t): New type.
10373 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10374 (struct grub_efi_cdrom_device_path): New structure.
10375 (grub_efi_cdrom_device_path_t): New type.
10376 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10377 (struct grub_efi_vendor_media_device_path): New structure.
10378 (grub_efi_vendor_media_device_path_t): New type.
10379 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10380 (struct grub_efi_file_path_device_path): New structure.
10381 (grub_efi_file_path_device_path_t): New type.
10382 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10383 (struct grub_efi_protocol_device_path): New structure.
10384 (grub_efi_protocol_device_path_t): New type.
10385 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10386 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10387 (struct grub_efi_bios_device_path): New structure.
10388 (grub_efi_bios_device_path_t): New type.
10389 (struct grub_efi_disk_io): New structure.
10390 (grub_efi_disk_io_t): New type.
10391 (struct grub_efi_block_io_media): New structure.
10392 (grub_efi_block_io_media_t): New type.
10393 (struct grub_efi_block_io): New structure.
10394 (grub_efi_block_io_t): New type.
10396 * include/grub/misc.h (grub_stop): Removed.
10397 (grub_exit): New prototype.
10398 (grub_abort): Likewise.
10400 * include/grub/disk.h (enum grub_disk_dev_id): Added
10401 GRUB_DISK_DEVICE_EFIDISK_ID.
10403 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10404 disk/efi/efidisk.c.
10405 (kernel_syms.lst): Remove the target if an error occurs.
10407 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10409 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10410 as it was simply too buggy.
10412 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10414 * kern/misc.c (grub_lltoa): New function.
10415 (grub_vsprintf): Added support for the long long suffix,
10418 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10420 * Makefile.in (LDFLAGS): Add variable.
10421 (LD): Remove variable.
10422 * configure.ac: Add -m32 to LDFLAGS.
10423 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10424 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10425 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10426 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10427 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10429 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10430 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10431 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10433 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10435 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10436 length for unknown glyph.
10438 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10440 Add support for pre-loaded modules into the EFI port.
10442 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10443 completely. Accept one more argument DIR. The caller has changed.
10445 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10447 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10448 (grub_efi_loaded_image_guid): New variable.
10449 (grub_efi_get_loaded_image): New function.
10450 (grub_arch_modules_addr): Likewise.
10452 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10455 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10456 (struct grub_efi_loaded_image): New structure.
10457 (grub_efi_loaded_image_t): New type.
10459 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10461 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10462 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10463 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10465 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10467 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10469 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10471 * DISTLIST: Added include/grub/efi/console.h,
10472 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10473 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10475 * include/grub/efi/console.h: New file.
10476 * include/grub/efi/time.h: Likewise.
10477 * include/grub/i386/efi/kernel.h: Likewise.
10478 * kern/efi/init.c: Likewise.
10479 * kern/efi/mm.c: Likewise.
10480 * term/efi/console.c: Likewise.
10482 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10483 (grub_stop): Removed.
10484 (grub_get_rtc): Likewise.
10485 (grub_machine_init): Simply call grub_efi_init.
10486 (grub_machine_fini): Call grub_efi_fini.
10488 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10489 (grub_efi_output_string): Removed.
10490 (grub_efi_stall): New function.
10491 (grub_stop): Likewise.
10492 (grub_get_rtc): Likewise.
10494 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10495 (grub_efi_stall): New prototype.
10496 (grub_efi_allocate_pages): Likewise.
10497 (grub_efi_free_pages): Likewise.
10498 (grub_efi_get_memory_map): Likewise.
10499 (grub_efi_mm_init): Likewise.
10500 (grub_efi_mm_fini): Likewise.
10501 (grub_efi_init): Likewise.
10502 (grub_efi_fini): Likewise.
10504 * include/grub/i386/efi/time.h: Do not include
10505 grub/symbol.h. Include grub/efi/time.h.
10506 (GRUB_TICKS_PER_SECOND): Removed.
10507 (grub_get_rtc): Likewise.
10509 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10510 Added padding. The EFI spec is buggy.
10511 (GRUB_EFI_BLACK): New macro.
10512 (GRUB_EFI_BLUE): Likewise.
10513 (GRUB_EFI_GREEN): Likewise.
10514 (GRUB_EFI_CYAN): Likewise.
10515 (GRUB_EFI_RED): Likewise.
10516 (GRUB_EFI_MAGENTA): Likewise.
10517 (GRUB_EFI_BROWN): Likewise.
10518 (GRUB_EFI_LIGHTGRAY): Likewise.
10519 (GRUB_EFI_BRIGHT): Likewise.
10520 (GRUB_EFI_DARKGRAY): Likewise.
10521 (GRUB_EFI_LIGHTBLUE): Likewise.
10522 (GRUB_EFI_LIGHTGREEN): Likewise.
10523 (GRUB_EFI_LIGHTCYAN): Likewise.
10524 (GRUB_EFI_LIGHTRED): Likewise.
10525 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10526 (GRUB_EFI_YELLOW): Likewise.
10527 (GRUB_EFI_WHITE): Likewise.
10528 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10529 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10530 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10531 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10532 (GRUB_EFI_BACKGROUND_RED): Likewise.
10533 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10534 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10535 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10536 (GRUB_EFI_TEXT_ATTR): Likewise.
10538 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10539 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10540 (kernel_mod_HEADERS): Added efi/time.h.
10542 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10544 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10545 include/grub/efi/api.h, include/grub/efi/console_control.h,
10546 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10547 include/grub/i386/efi/time.h, kern/efi/efi.c,
10548 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10549 and util/i386/efi/grub-mkimage.c.
10551 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10553 * genmk.rb (PModule#rule): Do not export symbols if
10554 #{prefix}_EXPORTS is set to "no".
10556 * conf/i386-efi.mk: New file.
10557 * conf/i386-efi.rmk: Likewise.
10558 * include/grub/efi/api.h: Likewise.
10559 * include/grub/efi/console_control.h: Likewise.
10560 * include/grub/efi/efi.h: Likewise.
10561 * include/grub/efi/pe32.h: Likewise.
10562 * include/grub/i386/efi/time.h: Likewise.
10563 * kern/efi/efi.c: Likewise.
10564 * kern/i386/efi/init.c: Likewise.
10565 * kern/i386/efi/startup.S: Likewise.
10566 * util/i386/efi/grub-mkimage.c: Likewise.
10568 2006-04-17 Marco Gerards <marco@gnu.org>
10570 * include/grub/script.h: Include <grub/parser.h> and
10571 "grub_script.tab.h".
10572 (struct grub_lexer_param): New struct.
10573 (struct grub_parser_param): Likewise.
10574 (grub_script_create_arglist): Pass the state in an argument.
10575 (grub_script_add_arglist): Likewise.
10576 (grub_script_create_cmdline): Likewise.
10577 (grub_script_create_cmdblock): Likewise.
10578 (grub_script_create_cmdif): Likewise.
10579 (grub_script_create_cmdmenu): Likewise.
10580 (grub_script_add_cmd): Likewise.
10581 (grub_script_arg_add): Likewise.
10582 (grub_script_lexer_ref): Likewise.
10583 (grub_script_lexer_deref): Likewise.
10584 (grub_script_lexer_record_start): Likewise.
10585 (grub_script_lexer_record_stop): Likewise.
10586 (grub_script_mem_record): Likewise.
10587 (grub_script_mem_record_stop): Likewise.
10588 (grub_script_malloc): Likewise.
10589 (grub_script_yylex): Likewise.
10590 (grub_script_yyparse): Likewise.
10591 (grub_script_yyerror): Likewise.
10592 (grub_script_yylex): Likewise.
10593 (grub_script_lexer_init): Return the state.
10595 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10596 (grub_script_lexer_done): Likewise.
10597 (grub_script_lexer_getline): Likewise.
10598 (grub_script_lexer_refs): Likewise.
10599 (script): Likewise.
10600 (newscript): Likewise.
10601 (record): Likewise.
10602 (recording): Likewise.
10603 (recordpos): Likewise.
10604 (recordlen): Likewise.
10605 (grub_script_lexer_init): Return the state instead of setting
10607 (grub_script_lexer_ref): Use the newly added argument for state
10608 instead of globals.
10609 (grub_script_lexer_deref): Likewise.
10610 (grub_script_lexer_record_start): Likewise.
10611 (grub_script_lexer_record_stop): Likewise.
10612 (recordchar): Likewise.
10613 (nextchar): Likewise.
10614 (grub_script_yylex2): Likewise.
10615 (grub_script_yylex): Likewise.
10616 (grub_script_yyerror): Likewise.
10618 * normal/parser.y (func_mem): Removed variable.
10619 (menu_entry): Likewise.
10621 (%lex-param): New parser option.
10622 (%parse-param): Likewise.
10623 (script): Always return the AST.
10624 (argument): Pass the state around.
10625 (arguments): Likewise.
10626 (grubcmd): Likewise.
10627 (commands): Likewise.
10628 (function): Likewise.
10629 (menuentry): Likewise.
10630 (if_statement): Likewise.
10633 * normal/script.c (grub_script_memused): Removed variable.
10634 (grub_script_parsed): Likewise.
10635 (grub_script_malloc): Added a state argument. Use that instead of
10637 (grub_script_mem_record): Likewise.
10638 (grub_script_mem_record_stop): Likewise.
10639 (grub_script_arg_add): Likewise.
10640 (grub_script_add_arglist): Likewise.
10641 (grub_script_create_cmdline): Likewise.
10642 (grub_script_create_cmdif): Likewise.
10643 (grub_script_create_cmdmenu): Likewise.
10644 (grub_script_add_cmd): Likewise.
10645 (grub_script_parse): Setup the state before calling the parser.
10647 2006-04-16 Marco Gerards <marco@gnu.org>
10649 * normal/command.c (grub_command_init): Remove the title command.
10651 * normal/lexer.c (grub_script_yylex): Renamed from this...
10652 (grub_script_yylex2): ... to this.
10653 (grub_script_yylex): New function. Temporary
10654 introduced to filter some tokens.
10655 (grub_script_yyerror): Print a newline.
10657 * normal/main.c (read_config_file): Output information about the
10658 lines that contain errors. Wait for a key after all lines have
10659 been processed. Don't return an empty menu.
10661 * normal/parser.y (func_mem): Don't initialize.
10662 (menu_entry): Likewise.
10663 (err): New variable.
10664 (script): Don't return anything when an error was encountered.
10665 (ws, returns): Removed rules.
10666 (argument): Disabled concatenated variable support.
10667 (arguments): Remove explicit separators.
10668 (grubcmd): Likewise.
10669 (function): Likewise.
10670 (menuentry): Likewise.
10672 (commands): Likewise. Add error handling.
10674 * normal/script.c (grub_script_create_cmdline): If
10675 `grub_script_parsed' is 0, assume the parser encountered an error.
10677 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10679 * configure.ac: Add support for EFI. Fix the typo
10680 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10682 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10684 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10685 foreign multibyte characters should be shown correctly.
10687 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10689 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10691 (read_config_file): Made it to close file before returning.
10693 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10695 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10696 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10697 video/i386/pc/vbefill.c.
10699 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10700 video/i386/pc/vbefill.c.
10702 * include/grub/video.h (grub_video_blit_format): New enum.
10703 (grub_video_mode_info): Added new member blit_format.
10704 (grub_video_get_blit_format): New function prototype.
10706 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10707 function prototype.
10708 (grub_video_vbe_map_rgb): Likewise.
10709 (grub_video_vbe_unmap_color): Likewise.
10711 * include/grub/i386/pc/vbeblit.h: New file.
10713 * include/grub/i386/pc/vbefill.h: New file.
10715 * video/video.c (grub_video_get_blit_format): New function.
10716 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10717 (grub_video_vbe_map_rgb): Likewise.
10718 (grub_video_vbe_unmap_color): Likewise.
10720 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10722 (grub_video_vbe_blit_render_target): Changed to use more optimized
10724 (grub_video_vbe_setup): Added detection for optimized settings.
10725 (grub_video_vbe_create_render_target): Likewise.
10727 * video/i386/pc/vbeblit.c: New file.
10729 * video/i386/pc/vbefill.c: New file.
10731 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10733 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10736 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10737 parsing to support both hex and dec ranges. If filename was missing
10738 show usage information.
10740 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10742 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10743 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10745 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10746 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10747 (video_mod_SOURCES): Added.
10748 (video_mod_CFLAGS): Likewise.
10749 (video_mod_LDFLAGS): Likewise.
10750 (gfxterm_mod_SOURCES): Likewise.
10751 (gfxterm_mod_CFLAGS): Likewise.
10752 (gfxterm_mod_LDFLAGS): Likewise.
10753 (videotest_mod_SOURCES): Likewise.
10754 (videotest_mod_CFLAGS): Likewise.
10755 (videotest_mod_LDFLAGS): Likewise.
10756 (vesafb_mod_SOURCES): Removed.
10757 (vesafb_mod_CFLAGS): Likewise.
10758 (vesafb_mod_LDFLAGS): Likewise.
10759 (vga_mod_SOURCES): Likewise.
10760 (vga_mod_CFLAGS): Likewise.
10761 (vga_mod_LDFLAGS): Likewise.
10763 * commands/videotest.c: New file.
10765 * font/manager.c (fill_with_default_glyph): Modified to use
10767 (grub_font_get_glyph): Likewise.
10768 (fontmanager): Renamed from this...
10769 (font_manager): ... to this.
10771 * include/grub/font.h (grub_font_glyph): Added new structure.
10772 (grub_font_get_glyph): Modified to use grub_font_glyph.
10774 * include/grub/misc.h (grub_abs): Added as inline function.
10776 * include/grub/video.h: New file.
10778 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10779 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10780 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10781 (grub_vbe_get_controller_info): Renamed from this...
10782 (grub_vbe_bios_get_controller_info): ... to this.
10783 (grub_vbe_get_mode_info): Renamed from this...
10784 (grub_vbe_bios_get_mode_info): ... to this.
10785 (grub_vbe_set_mode): Renamed from this...
10786 (grub_vbe_bios_set_mode): ... to this.
10787 (grub_vbe_get_mode): Renamed from this...
10788 (grub_vbe_bios_get_mode): ... to this.
10789 (grub_vbe_set_memory_window): Renamed from this...
10790 (grub_vbe_bios_set_memory_window): ... to this.
10791 (grub_vbe_get_memory_window): Renamed from this...
10792 (grub_vbe_bios_get_memory_window): ... to this.
10793 (grub_vbe_set_scanline_length): Renamed from this...
10794 (grub_vbe_set_scanline_length): ... to this.
10795 (grub_vbe_get_scanline_length): Renamed from this...
10796 (grub_vbe_bios_get_scanline_length): ... to this.
10797 (grub_vbe_set_display_start): Renamed from this...
10798 (grub_vbe_bios_set_display_start): ... to this.
10799 (grub_vbe_get_display_start): Renamed from this...
10800 (grub_vbe_bios_get_display_start): ... to this.
10801 (grub_vbe_set_palette_data): Renamed from this...
10802 (grub_vbe_bios_set_palette_data): ... to this.
10803 (grub_vbe_set_pixel_rgb): Removed.
10804 (grub_vbe_set_pixel_index): Likewise.
10806 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10808 (grub_vbe_bios_get_controller_info): ... to this.
10809 (grub_vbe_get_mode_info): Renamed from this...
10810 (grub_vbe_bios_get_mode_info): ... to this.
10811 (grub_vbe_set_mode): Renamed from this...
10812 (grub_vbe_bios_set_mode): ... to this.
10813 (grub_vbe_get_mode): Renamed from this...
10814 (grub_vbe_bios_get_mode): ... to this.
10815 (grub_vbe_set_memory_window): Renamed from this...
10816 (grub_vbe_bios_set_memory_window): ... to this.
10817 (grub_vbe_get_memory_window): Renamed from this...
10818 (grub_vbe_bios_get_memory_window): ... to this.
10819 (grub_vbe_set_scanline_length): Renamed from this...
10820 (grub_vbe_set_scanline_length): ... to this.
10821 (grub_vbe_get_scanline_length): Renamed from this...
10822 (grub_vbe_bios_get_scanline_length): ... to this.
10823 (grub_vbe_set_display_start): Renamed from this...
10824 (grub_vbe_bios_set_display_start): ... to this.
10825 (grub_vbe_get_display_start): Renamed from this...
10826 (grub_vbe_bios_get_display_start): ... to this.
10827 (grub_vbe_set_palette_data): Renamed from this...
10828 (grub_vbe_bios_set_palette_data): ... to this.
10829 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10830 getting corrupted after calling it. Added more pushes and pops.
10831 (grub_vbe_bios_set_mode): Likewise.
10832 (grub_vbe_bios_get_mode): Likewise.
10833 (grub_vbe_bios_get_memory_window): Likewise.
10834 (grub_vbe_bios_set_scanline_length): Likewise.
10835 (grub_vbe_bios_get_scanline_length): Likewise.
10836 (grub_vbe_bios_get_display_start): Likewise.
10837 (grub_vbe_bios_set_palette_data): Likewise.
10839 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10840 (cl_insert): Likewise.
10841 (cl_delete): Likewise.
10843 * term/gfxterm.c: New file.
10845 * term/i386/pc/vesafb.c: Removed file.
10847 * video/video.c: New file.
10849 * video/i386/pc/vbe.c (real2pm): Added new function.
10850 (grub_video_vbe_draw_pixel): Likewise.
10851 (grub_video_vbe_get_video_ptr): Likewise.
10852 (grub_video_vbe_get_pixel): Likewise
10853 (grub_video_vbe_init): Likewise.
10854 (grub_video_vbe_fini): Likewise.
10855 (grub_video_vbe_setup): Likewise.
10856 (grub_video_vbe_get_info): Likewise.
10857 (grub_video_vbe_set_palette): Likewise.
10858 (grub_video_vbe_get_palette): Likewise.
10859 (grub_video_vbe_set_viewport): Likewise.
10860 (grub_video_vbe_get_viewport): Likewise.
10861 (grub_video_vbe_map_color): Likewise.
10862 (grub_video_vbe_map_rgb): Likewise.
10863 (grub_video_vbe_map_rgba): Likewise.
10864 (grub_video_vbe_unmap_color): Likewise.
10865 (grub_video_vbe_fill_rect): Likewise.
10866 (grub_video_vbe_blit_glyph): Likewise.
10867 (grub_video_vbe_blit_bitmap): Likewise.
10868 (grub_video_vbe_blit_render_target): Likewise.
10869 (grub_video_vbe_scroll): Likewise.
10870 (grub_video_vbe_swap_buffers): Likewise.
10871 (grub_video_vbe_create_render_target): Likewise.
10872 (grub_video_vbe_delete_render_target): Likewise.
10873 (grub_video_vbe_set_active_render_target): Likewise.
10874 (grub_vbe_set_pixel_rgb): Remove function.
10875 (grub_vbe_set_pixel_index): Likewise.
10876 (index_color_mode): Remove static variable.
10877 (active_mode): Likewise.
10878 (framebuffer): Likewise.
10879 (bytes_per_scan_line): Likewise.
10880 (grub_video_vbe_adapter): Added new static variable.
10881 (framebuffer): Likewise.
10882 (render_target): Likewise.
10883 (initial_mode): Likewise.
10884 (mode_in_use): Likewise.
10885 (mode_list): Likewise.
10887 2006-03-10 Marco Gerards <marco@gnu.org>
10889 * configure.ac (AC_INIT): Bumped to 1.93.
10891 * DISTLIST: Added `include/grub/hfs.h'.
10893 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10895 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10896 18H, which might help the BIOS falling back to next boot media.
10898 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10900 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10901 Poe Chen <poe.poechen@gmail.com>.
10903 2006-01-17 Marco Gerards <marco@gnu.org>
10905 * include/grub/normal.h: Include <grub/script.h>.
10906 (grub_command_list): Removed struct.
10907 (grub_command_list_t): Removed type.
10908 (grub_menu_entry): Remove members `num' and `command_list'. Add
10909 members `commands' and `sourcecode'.
10910 * include/grub/script.h: Add inclusion guards.
10911 (grub_script_cmd_menuentry): New struct.
10912 (grub_script_execute_menuentry): New prototype.
10913 (grub_script_lexer_record_start): Likewise.
10914 (grub_script_lexer_record_stop): Likewise.
10915 * normal/execute.c (grub_script_execute_menuentry): New function.
10916 * normal/lexer.c (record, recording, recordpos, recordlen): New
10918 (grub_script_lexer_record_start): New function.
10919 (grub_script_lexer_record_stop): Likewise.
10920 (recordchar): Likewise.
10921 (nextchar): Likewise.
10922 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10923 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10924 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10925 (current_menu): New variable.
10926 (free_menu): Mainly rewritten.
10927 (grub_normal_menu_addentry): New function.
10928 (read_config_file): Rewritten.
10929 * normal/menu.c (run_menu_entry): Mainly rewritten.
10930 * normal/menu_entry.c (make_screen): Rewritten the code to insert
10932 (run): Mainly rewritten.
10933 * normal/parser.y (menu_entry): New variable.
10934 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10935 (menuentry): New rule.
10936 (command): Add `menuentry'.
10937 (if_statement): Allow additional returns before `fi'.
10938 * normal/script.c (grub_script_create_cmdmenu): New function.
10940 2006-01-03 Marco Gerards <marco@gnu.org>
10942 * INSTALL: GNU Bison is required.
10943 * configure.ac: Rewritten the test to detect Bison.
10944 * Makefile.in (YACC): New variable. Reported by Xun Sun
10945 <xun.sun.cn@gmail.com>.
10947 2006-01-03 Marco Gerards <marco@gnu.org>
10949 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10950 the HFS+ filesystem to filesystem blocks.
10951 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10952 GCC warning is silenced.
10954 2006-01-03 Marco Gerards <marco@gnu.org>
10956 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10957 read from disk from big endian to host byte order.
10959 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10961 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10963 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10964 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10965 embedded HFS+ filesystem.
10966 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10967 (grub_hfs_sblock): Move from here...
10968 * include/grub/hfs.h: To here... New file.
10969 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10971 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10973 (grub_hfsplus_volheader): Change type of member `magic' to
10975 (grub_hfsplus_data): Add new member `embedded_offset'.
10976 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10978 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10979 Calculate the offset.
10981 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10983 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10985 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10987 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10989 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10990 ENV->NAME is NULL after allocating ENV->VALUE.
10992 2005-12-25 Marco Gerards <marco@gnu.org>
10994 * kern/env.c (grub_env_set): Rewritten the error handling code.
10996 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10998 * geninit.sh: Made more robust, and more portable.
11000 2005-12-25 Marco Gerards <marco@gnu.org>
11002 Add support for Apple HFS+ filesystems.
11004 * fs/hfsplus.c: New file.
11006 * DISTLIST: Added `fs/hfsplus.c'.
11008 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11009 (hfsplus_mod_SOURCES): New variable.
11010 (hfsplus_mod_CFLAGS): Likewise.
11011 (hfsplus_mod_LDFLAGS): Likewise.
11012 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11013 (grub_setup_SOURCES): Likewise.
11014 (grub_mkdevicemap_SOURCES): Likewise.
11015 (grub_emu_SOURCES): Likewise.
11016 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11018 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11020 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11022 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11024 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11025 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11026 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11027 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11028 normal/lexer.c, normal/parser.y, normal/script.c, and
11030 Removed kern/sparc64/cache.c.
11032 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11033 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11036 * configure.ac (AC_INIT): Bumped to 1.92.
11038 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11040 * kern/err.c (grub_error_push): Added new function to support error
11042 (grub_error_pop): Likewise.
11043 (grub_error_stack_items): New local variable to support error stacks.
11044 (grub_error_stack_pos): Likewise.
11045 (grub_error_stack_assert): Likewise.
11046 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11048 (grub_print_error): Added support to print errors from error stack.
11050 * include/grub/err.h (grub_error_push): Added function prototype.
11051 (grub_error_pop): Likewise.
11053 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11055 * configure.ac: Accept `powerpc64' as host_cpu.
11056 (amd64): Rename to `biarch32'.
11058 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11059 non-cacheline-aligned addresses.
11061 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11062 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11063 if `size' is non-zero.
11065 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11067 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11068 and `cd' to make sure the filename is not prefixed with a
11070 (pkgdata_MODULES): Add `gpt.mod'.
11071 (gpt_mod_SOURCES): New variable.
11072 (gpt_mod_CFLAGS): Likewise.
11073 (gpt_mod_LDFLAGS): Likewise.
11075 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11077 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11080 * partmap/gpt.c: New file.
11082 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11083 GPT partition map is detected.
11085 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11087 * commands/i386/pc/play.c: New file.
11088 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11089 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11092 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11094 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11095 ((unused))' to silence gcc warning.
11097 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11099 * configure.ac: Correct `AC_PROG_YACC' test.
11101 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11103 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11104 check before installing files.
11106 2005-11-22 Mike Small <smallm@panix.com>
11108 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11109 number regex so multidigit numbers are recognized correctly.
11111 2005-11-22 Mike Small <smallm@panix.com>
11113 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11114 debugging message before attempting to claim memory.
11115 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11116 multiple addresses in case of failure.
11118 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11120 * term/tparm.c (get_space): Remove empty `if' statement.
11122 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11124 * kern/parser.c (check_varstate): Rename `state' to 's'.
11126 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11128 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11129 variable definitions to the beginning of each function. Sort stack
11131 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11132 `buf' argument to `char *'.
11134 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11136 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11137 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11138 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11139 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11140 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11141 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11142 configfile.mod, search.mod, gzio.mod and test.mod.
11143 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11144 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11145 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11146 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11147 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11148 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11149 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11150 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11151 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11152 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11153 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11154 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11155 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11156 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11157 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11158 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11159 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11160 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11161 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11162 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11163 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11164 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11165 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11167 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11169 (pkgdata_MODULES): Add test.mod.
11171 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11173 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11174 appending to variables with "+=".
11175 (PModule): Use full pathname to generate *.lst filenames.
11177 * Makefile.in: Fixed list rules moved from genmk.rb.
11178 (.DELETE_ON_ERROR): New special target.
11179 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11181 * conf/i386-pc.rmk: Include conf/common.mk.
11182 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11183 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11184 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11185 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11186 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11187 configfile.mod, search.mod, gzio.mod and test.mod.
11188 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11189 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11190 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11191 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11192 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11193 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11194 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11195 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11196 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11197 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11198 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11199 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11200 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11201 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11202 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11203 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11204 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11205 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11206 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11207 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11208 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11209 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11210 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11212 * conf/common.rmk: ... to here. New file.
11214 * conf/common.mk: New file.
11216 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11218 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11219 (grub_script.tab.c): ... here.
11221 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11222 (grub_script.tab.c): ... here.
11224 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11225 (grub_script.tab.c): ... here.
11227 * normal/command.c (grub_command_find): Fixed a memory leak of
11228 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11230 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11232 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11233 "@" which marks the start of a comment on ARM.
11234 (VARIABLE): Likewise.
11236 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11238 Add support for Linux/ADFS partition tables.
11240 * partmap/acorn.c: New file.
11242 * include/grub/acorn_filecore.h: Likewise.
11244 * DISTLIST: Added `partmap/acorn.c' and
11245 `include/grub/acorn_filecore.h'.
11247 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11249 (pkgdata_MODULES): Add `acorn.mod'.
11250 (acorn_mod_SOURCES): New variable.
11251 (acorn_mod_CFLAGS): Likewise.
11253 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11255 (pkgdata_MODULES): Add `acorn.mod'.
11256 (acorn_mod_SOURCES): New variable.
11257 (acorn_mod_CFLAGS): Likewise.
11259 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11260 (pkgdata_MODULES): Add `acorn.mod'.
11261 (acorn_mod_SOURCES): New variable.
11262 (acorn_mod_CFLAGS): Likewise.
11263 (acorn_mod_LDFLAGS): Likewise.
11265 * include/types.h (grub_disk_addr_t): New typedef.
11267 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11269 * geninit.sh: New file.
11271 * geninitheader.sh: Likewise.
11273 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11274 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11275 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11276 * commands/configfile.c (grub_configfile_init)
11277 (grub_configfile_fini): Likewise.
11278 * commands/default.c (grub_default_init, grub_default_fini):
11280 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11281 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11282 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11283 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11285 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11286 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11288 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11289 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11291 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11293 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11295 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11296 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11297 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11298 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11299 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11300 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11301 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11302 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11303 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11304 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11305 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11306 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11307 * partmap/amiga.c (grub_amiga_partition_map_init)
11308 (grub_amiga_partition_map_fini): Likewise.
11309 * partmap/apple.c (grub_apple_partition_map_init)
11310 (grub_apple_partition_map_fini): Likewise.
11311 * partmap/pc.c (grub_pc_partition_map_init)
11312 (grub_pc_partition_map_fini): Likewise.
11313 * partmap/sun.c (grub_sun_partition_map_init,
11314 grub_sun_partition_map_fini): Likewise.
11315 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11318 * util/grub-emu.c: Include <grub_modules_init.h>.
11319 (main): Don't initialize and de-initialize any modules directly,
11320 use `grub_init_all' and `grub_fini_all' instead.
11322 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11323 `grub_vesafb_mod_init'.
11324 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11326 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11327 `grub_vga_mod_init'. Updated all users.
11328 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11330 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11331 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11334 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11335 Generate a function to initialize the module in utilities.
11336 Updated all callers.
11337 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11338 initialize the module in utilities. Updated all callers.
11340 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11342 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11343 escape sequence and a literal ^L to clear the screen.
11345 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11346 when returning from Open Firmware.
11348 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11350 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11351 (grub_ofconsole_height): Likewise.
11352 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11353 manually insert a '\n'.
11354 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11355 `grub_ofconsole_height'. Return early if these are already set.
11357 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11359 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11360 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11361 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11362 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11363 and `normal/script.c'.
11364 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11365 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11366 (test_mod_SOURCES): New variable.
11367 (test_mod_CFLAGS): Likewise.
11368 (test_mod_LDFLAGS): Likewise.
11369 (pkgdata_MODULES): Add `test.mod'.
11370 (grub_script.tab.c): New rule.
11371 (grub_script.tab.h): Likewise.
11373 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11376 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11377 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11378 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11379 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11380 (test_mod_SOURCES): New variable.
11381 (test_mod_CFLAGS): Likewise.
11382 (pkgdata_MODULES): Add `test.mod'.
11383 (grub_script.tab.c): New rule.
11384 (grub_script.tab.h): Likewise.
11386 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11388 Add initial scripting support.
11390 * commands/test.c: New file.
11391 * include/grub/script.h: Likewise.
11392 * normal/execute.c: Likewise.
11393 * normal/function.c: Likewise.
11394 * normal/lexer.c: Likewise.
11395 * normal/parser.y: Likewise.
11396 * normal/script.c: Likewise.
11398 * configure.ac: Add `AC_PROG_YACC' test.
11400 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11401 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11402 `normal/function.c' and `normal/script.c'.
11403 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11404 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11405 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11407 (pkgdata_MODULES): Add `test.mod'.
11408 (grub_script.tab.c): New rule.
11409 (grub_script.tab.h): Likewise.
11411 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11413 * include/grub/normal.h (grub_test_init): New prototype.
11414 (grub_test_fini): Likewise.
11416 * normal/command.c: Include <grub/script.h>.
11417 (grub_command_execute): Rewritten.
11419 * util/grub-emu.c (main): Call `grub_test_init' and
11422 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11424 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11426 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11427 there are no pending characters.
11429 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11431 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11432 `grub_strndup' to drop device arguments. Replace unnecessary
11433 `grub_strndup' with `grub_strdup'.
11435 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11437 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11438 `debug' environment variable has been set.
11440 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11442 * Makefile.in (install-local): Use $(DATA).
11443 (uninstall): Likewise.
11444 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11445 (sbin_UTILITIES): ... to here.
11446 (sbin_SCRIPTS): New variable.
11447 (grub_install_SOURCES): New variable.
11448 * util/powerpc/ieee1275/grub-install.in: New file.
11449 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11451 (add_segments): Call `grub_util_get_path'.
11453 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11455 From Timothy Baldwin:
11456 * commands/ls.c (grub_ls_list_files): Close FILE with
11458 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11460 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11462 * include/grub/parser.h: New file.
11464 * kern/parser.c: Likewise.
11466 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11467 (grub_setup_SOURCES): Likewise.
11468 (grub_probefs_SOURCES): Likewise.
11469 (grub_emu_SOURCES): Likewise.
11470 (kernel_img_HEADERS): Add `parser.h'.
11472 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11473 (grub_emu_SOURCES): Add `kern/parser.c'.
11474 (grubof_SOURCES): Likewise.
11476 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11477 (grubof_SOURCES): Add `kern/parser.c'.
11479 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11481 * kern/misc.c (grub_split_cmdline): Removed function.
11483 * kern/rescue.c: Include <grub/parser.h>.
11484 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11485 of `grub_split_cmdline'.
11487 * normal/command.c: Include <grub/parser.h>.
11488 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11489 of `grub_split_cmdline'.
11491 * normal/completion.c: Include <grub/parser.h>.
11492 (cmdline_state): New variable.
11493 (iterate_dir): End the filename with a quote depending on the
11494 command line state.
11495 (get_state): new function.
11496 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11497 split the arguments and determine the current argument. When the
11498 argument string is not quoted, escape all spaces.
11500 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11502 * normal/sparc64/setjmp.S: New file.
11504 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11506 * include/grub/sparc64/libgcc.h: New file.
11507 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11508 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11509 normal/sparc64/setjmp.c.
11511 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11513 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11514 * kern/sparc64/cache.S: New file.
11515 * kern/sparc64/cache.c: Removed.
11516 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11517 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11519 (COMMON_LDFLAGS): Add -melf64_sparc.
11520 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11521 (grubof_SOURCES): Use cache.S instead of cache.c.
11522 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11523 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11524 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11526 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11527 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11528 (linux_mod_CFLAGS): Commented out.
11529 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11530 out because module isn't built.
11531 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11532 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11533 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11534 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11535 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11536 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11537 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11538 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11539 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11540 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11541 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11542 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11543 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11544 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11546 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11548 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11549 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11550 longer, because HFS should not be used on PC.
11552 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11554 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11555 consistently within the loop.
11557 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
11559 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11560 directory can not be read.
11562 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11564 * configure.ac (AC_INIT): Increase the version number to 1.91.
11566 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11567 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11568 term/i386/pc/serial.c.
11570 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11572 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11573 file size must be permitted.
11575 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11576 between %ah and %al.
11578 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11580 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11582 Call the hook with a NUL-terminated filename.
11583 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11586 * kern/term.c (cursor_state): New variable.
11587 (grub_term_set_current): Reset the cursor state on a new
11589 (grub_setcursor): Rewritten to use CURSOR_STATE.
11590 (grub_getcursor): New function.
11592 * include/grub/term.h (grub_getcursor): New prototype.
11594 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11595 integers on ARM. Reported by Timothy Baldwin
11596 <T.E.Baldwin99@members.leeds.ac.uk>.
11598 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
11600 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11602 (grub_sfs_dir): Likewise.
11604 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
11606 Add support for the SFS filesystem.
11608 * fs/sfs.c: New file.
11610 * DISTLIST: Added `fs/sfs.c'.
11612 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11613 (grub_probefs_SOURCES): Likewise.
11614 (grub_emu_SOURCES): Likewise.
11615 (pkgdata_MODULES): Add `sfs.mod'.
11616 (sfs_mod_SOURCES): New variable.
11617 (sfs_mod_CFLAGS): Likewise.
11618 (sfs_mod_LDFLAGS): Likewise.
11620 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11621 (pkgdata_MODULES): Add `sfs.mod'.
11622 (sfs_mod_SOURCES): New variable.
11623 (sfs_mod_CFLAGS): Likewise.
11625 * util/grub-emu.c (main): Call `grub_sfs_init' and
11628 * include/grub/fs.h (grub_sfs_init): New prototype.
11629 (grub_sfs_fini): Likewise.
11631 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
11633 Add support for the AFFS filesystem.
11635 * fs/affs.c: New file.
11637 * DISTLIST: Added `fs/affs.c'.
11639 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11640 (grub_probefs_SOURCES): Likewise.
11641 (grub_emu_SOURCES): Likewise.
11642 (pkgdata_MODULES): Add `affs.mod'.
11643 (affs_mod_SOURCES): New variable.
11644 (affs_mod_CFLAGS): Likewise.
11645 (affs_mod_LDFLAGS): Likewise.
11647 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11648 (pkgdata_MODULES): Add `affs.mod'.
11649 (affs_mod_SOURCES): New variable.
11650 (affs_mod_CFLAGS): Likewise.
11652 * util/grub-emu.c (main): Call `grub_affs_init' and
11655 * include/grub/fs.h (grub_affs_init): New prototype.
11656 (grub_affs_fini): Likewise.
11658 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11660 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11662 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11664 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11667 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11670 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11671 (COMMON_LDFLAGS): New variable.
11672 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11673 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11674 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11675 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11676 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11677 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11678 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11679 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11680 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11681 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11682 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11683 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11684 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11685 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11686 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11688 (normal_mod_ASFLAGS): Add `-m32'.
11690 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11691 (grub_host_size_t, grub_host_ssize_t): New types.
11692 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
11693 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
11694 `GRUB_HOST_SIZEOF_VOID_P'.
11696 * include/grub/kernel.h (struct grub_module_header): Type of
11697 member offset changed to `grub_host_off_t'. Type of member size
11698 changed to `grub_host_size_t'.
11699 (struct grub_module_info): Type of member offset changed to
11700 `grub_host_off_t'. Type of member size changed to
11701 `grub_host_size_t'.
11703 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11705 Make GRUB's kernel compliant to Multiboot Specification.
11707 * kern/i386/pc/startup.S (multiboot_header): New label.
11708 (multiboot_entry): Likewise.
11709 (multiboot_trampoline): Likewise.
11711 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11712 Increased to 0x4A0.
11714 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11715 put parentheses after a question mark.
11716 [!GRUB_UTIL] (my_mod): New variable.
11718 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11720 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
11722 Adds support for the XFS filesystem. Btrees are not supported
11725 * fs/xfs.c: New file.
11727 * DISTLIST: Added `fs/xfs.c'.
11729 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11730 (grub_probefs_SOURCES): Likewise.
11731 (grub_emu_SOURCES): Likewise.
11732 (pkgdata_MODULES): Add `xfs.mod'.
11733 (xfs_mod_SOURCES): New variable.
11734 (xfs_mod_CFLAGS): Likewise.
11736 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11737 (pkgdata_MODULES): Add `xfs.mod'.
11738 (xfs_mod_SOURCES): New variable.
11739 (xfs_mod_CFLAGS): Likewise.
11741 * util/grub-emu.c (main): Call `grub_xfs_init' and
11744 * include/grub/fs.h (grub_xfs_init): New prototype.
11745 (grub_xfs_fini): Likewise.
11748 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11750 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11751 color modes, allow greater than 16 colors to be configured as
11754 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11756 * normal/completion.c (complete_arguments): Add the qualifier
11757 const into OPTIONS.
11759 From Omniflux <omniflux+lists@omniflux.com>:
11760 * include/grub/terminfo.h: New file.
11761 * include/grub/tparm.h: Likewise.
11762 * include/grub/i386/pc/serial.h: Likewise.
11763 * term/terminfo.c: Likewise.
11764 * term/tparm.c: Likewise.
11765 * term/i386/pc/serial.c: Likewise.
11766 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11768 (terminfo_mod_SOURCES): New variable.
11769 (terminfo_mod_CFLAGS): Likewise.
11770 (serial_mod_SOURCES): Likewise.
11771 (serial_mod_CFLAGS): Likewise.
11773 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11775 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11776 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11777 and kern/powerpc/ieee1275/cmain.c, respectively.
11779 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11780 * kern/powerpc/ieee1275/crt0.S: ... here.
11782 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11783 * kern/powerpc/ieee1275/cmain.c: ... here.
11785 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11786 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11787 instead of boot/powerpc/ieee1275/crt0.S and
11788 boot/powerpc/ieee1275/cmain.c, respectively.
11790 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11791 sectors. It was not used anyway.
11793 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11795 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11796 `unused parameter' warning.
11798 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11800 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11802 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11805 2005-08-28 Marco Gerards <metgerards@student.han.nl>
11807 * include/grub/normal.h (enum grub_completion_type): Added
11808 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11810 * normal/cmdline.c (print_completion): Handle
11811 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11812 * normal/menu_entry.c (store_completion): Likewise.
11814 * normal/completion.c (complete_arguments): New function.
11815 (grub_normal_do_completion): Call `complete_arguments' when the
11816 current words start with a dash.
11818 2005-08-27 Marco Gerards <metgerards@student.han.nl>
11820 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11821 `gzio.mod' instead of `io.mod').
11823 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11825 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11826 (DISTDIRS): Added io and video.
11827 Rewrite the search routine to make an output consistently.
11829 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11830 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11831 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11832 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11833 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11834 util/powerpc/ieee1275/misc.c.
11836 * include/grub/gzio.h: New file.
11837 * io/gzio.c: Likewise.
11839 * kern/file.c (grub_file_close): Call grub_device_close only if
11840 FILE->DEVICE is not NULL.
11842 * include/grub/mm.h [!NULL] (NULL): New macro.
11844 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11846 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11847 (pkgdata_MODULES): Added gzio.mod.
11848 (gzio_mod_SOURCES): New variable.
11849 (gzio_mod_CFLAGS): Likewise.
11851 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11852 (pkgdata_MODULES): Added gzio.mod.
11853 (gzio_mod_SOURCES): New variable.
11854 (gzio_mod_CFLAGS): Likewise.
11856 * commands/cat.c: Include grub/gzio.h.
11857 (grub_cmd_cat): Use grub_gzfile_open instead of
11860 * commands/cmp.c: Include grub/gzio.h.
11861 (grub_cmd_cmp): Use grub_gzfile_open instead of
11864 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11865 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11867 (grub_rescue_cmd_module): Likewise.
11869 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11871 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11872 kern/sparc64/ieee1275/init.c because it contains _start.
11873 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11875 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11877 * configure.ac: Add support for sparc64 host with ieee1275
11879 * configure: Generated from configure.ac.
11880 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11882 (grub_ofdisk_read): Likewise.
11883 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11884 pointers as (void *) to remove a warning.
11885 (grub_ofdisk_close): Likewise.
11886 (grub_ofdisk_read): Likewise.
11887 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11888 returns, so make it return void to remove a warning.
11889 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11890 Corresponding prototype change.
11891 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11892 values, and cast the pointers as (void *) to remove a warning.
11893 (grub_mm_dump): Likewise.
11894 * conf/sparc64-ieee1275.mk: New file.
11895 * conf/sparc64-ieee1275.rmk: Likewise.
11896 * include/grub/sparc64/setjmp.h: Likewise.
11897 * include/grub/sparc64/types.h: Likewise.
11898 * include/grub/sparc64/ieee1275/console.h: Likewise.
11899 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11900 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11901 * include/grub/sparc64/ieee1275/time.h: Likewise.
11902 * kern/sparc64/cache.c: Likewise.
11903 * kern/sparc64/dl.c: Likewise.
11904 * kern/sparc64/ieee1275/init.c: Likewise.
11905 * kern/sparc64/ieee1275/openfw.c: Likewise.
11907 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11909 * util/console.c (grub_ncurses_putchar): If C is greater than
11910 0x7f, set C to a question mark.
11911 (grub_ncurses_getcharwidth): New function.
11912 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11915 * normal/menu.c (print_entry): Made aware of Unicode. First,
11916 convert TITLE to UCS-4, and predict the cursor position by
11919 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11921 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11923 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11925 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11926 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11929 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11930 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11931 grub_strcpy and grub_strlen. Take it into account that a space
11932 character is inserted as a delimiter.
11934 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11936 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
11937 invalid magic in the error.
11939 * commands/search.c: New file.
11941 * util/grub-emu.c (main): Call grub_search_init and
11944 * kern/rescue.c (grub_rescue_print_disks): Removed.
11945 (grub_rescue_print_devices): New function.
11946 (grub_rescue_cmd_ls): Use grub_device_iterate with
11947 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11948 grub_rescue_print_disks.
11950 * kern/partition.c (grub_partition_iterate): Return the result of
11951 PARTMAP->ITERATE instead of GRUB_ERRNO.
11953 * kern/device.c: Include grub/partition.h.
11954 (grub_device_iterate): New function.
11956 * include/grub/partition.h (grub_partition_iterate): Return int
11957 instead of grub_err_t.
11959 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11961 [GRUB_UTIL] (grub_search_fini): Likewise.
11963 * include/grub/device.h (grub_device_iterate): New prototype.
11965 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11967 (pkgdata_MODULES): Added search.mod.
11968 (search_mod_SOURCES): New variable.
11969 (search_mod_CFLAGS): Likewise.
11971 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11972 (pkgdata_MODULES): Added search.mod.
11973 (search_mod_SOURCES): New variable.
11974 (search_mod_CFLAGS): Likewise.
11976 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11977 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11978 All callers changed.
11980 * DISTLIST: Added commands/search.c.
11982 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11984 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11986 (grub_getcharwidth): New function.
11988 * kern/misc.c (grub_utf8_to_ucs4): New function.
11990 * include/grub/term.h (struct grub_term): Added a new member
11992 (grub_getcharwidth): New prototype.
11994 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11996 * term/i386/pc/console.c (map_char): New function. Segregated from
11997 grub_console_putchar.
11998 (grub_console_putchar): Use map_char.
11999 (grub_console_getcharwidth): New function.
12000 (grub_console_term): Specified grub_console_getcharwidth as
12003 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12004 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12006 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12008 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12009 on grub_strtoul completely.
12010 (write_char): Declare local variables in the beginning of the
12012 (grub_vesafb_getcharwidth): New function.
12013 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12016 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12018 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12019 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12020 commands/i386/pc/vbetest.c.
12022 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12023 call grub_vbe_get_controller_info again, because the returned
12024 information is volatile.
12025 (grub_vbe_set_video_mode): Mostly rewritten.
12026 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12027 grub_vbe_status_t correctly.
12028 (grub_vbe_get_video_mode_info): Likewise.
12029 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12030 several if statements.
12032 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12033 * commands/i386/pc/vbeinfo.c: ... this.
12035 * commands/i386/pc/vbe_test.c: Renamed to ...
12036 * commands/i386/pc/vbetest.c: ... this.
12038 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12040 (grub_cmd_vbeinfo): ... this. Save video modes before
12041 iterating. Skip a video mode, if it is not available, not enough
12042 information is given or it is monochrome. Show the memory
12043 model. Leave the interpretation of MODEVAR to grub_strtoul
12045 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12046 (GRUB_MOD_FINI): Likewise.
12048 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12049 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12050 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12051 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12052 grub_strtoul completely.
12053 (real2pm): Removed.
12054 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12055 (GRUB_MOD_FINI): Likewise.
12057 * normal/misc.c: Include grub/mm.h.
12059 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12060 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12061 (vbe_list_modes_mod_SOURCES): Removed.
12062 (vbe_list_modes_mod_CFLAGS): Likewise.
12063 (vbe_test_mod_SOURCES): Likewise.
12064 (vbe_test_mod_CFLAGS): Likewise.
12065 (vbeinfo_mod_SOURCES): New variable.
12066 (vbeinfo_mod_CFLAGS): Likewise.
12067 (vbetest_mod_SOURCES): Likewise.
12068 (vbetest_mod_CFLAGS): Likewise.
12070 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12072 * normal/misc.c: New file.
12074 * DISTLIST: Added normal/misc.c.
12076 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12077 DISK to HOOK. Call HOOK with DISK.
12078 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12079 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12080 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12082 * normal/menu_entry.c (struct screen): Added a new member
12083 "completion_shown".
12084 (completion_buffer): New global variable.
12085 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12086 (store_completion): New function.
12087 (complete): Likewise.
12088 (clear_completions): Likewise.
12089 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12090 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12091 a tab, call complete.
12093 * normal/completion.c (disk_dev): Removed.
12094 (print_simple_completion): Likewise.
12095 (print_partition_completion): Likewise.
12096 (print_func): New global variable.
12097 (add_completion): Do not take the arguments WHAT or PRINT any
12098 longer. Added a new argument TYPE. Instead of printing directly,
12099 call PRINT_FUNC if not NULL.
12100 All callers changed.
12101 (complete_device): Use a local variable DEV instead of
12102 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12103 (grub_normal_do_completion): Take a new argument HOOK. Do not
12104 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12105 empty string, return NULL instead.
12106 All callers changed.
12108 * normal/cmdline.c (print_completion): New function.
12110 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12112 All callers changed.
12114 * kern/disk.c (grub_print_partinfo): Removed.
12116 * include/grub/partition.h (struct grub_partition_map): Add a new
12117 argument DISK into HOOK of ITERATE.
12118 (grub_partition_iterate): Add a new argument DISK to HOOK.
12120 * include/grub/normal.h (enum grub_completion_type): New enum.
12121 (grub_completion_type_t): New type.
12122 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12123 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12124 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12125 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12126 (grub_normal_do_completion): Added a new argument HOOK.
12127 (grub_normal_print_device_info): New prototype.
12129 * include/grub/disk.h (grub_print_partinfo): Removed.
12131 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12132 (normal_mod_SOURCES): Likewise.
12133 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12134 (normal_mod_SOURCES): Likewise.
12136 * commands/ls.c (grub_ls_list_disks): Use
12137 grub_normal_print_device_info instead of grub_print_partinfo. Free
12139 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12140 duplicating the code.
12142 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12144 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12145 follow GCS more precisely.
12146 * commands/i386/pc/vbe_test.c: Likewise.
12147 * include/grub/i386/pc/vbe.h: Likewise.
12148 * term/i386/pc/vesafb.c: Likewise.
12149 * video/i386/pc/vbe.c: Likewise.
12151 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12153 * DISTLIST: Added term/i386/pc/vesafb.c
12154 DISTLIST: Added video/i386/pc/vbe.c
12155 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12156 DISTLIST: Added commands/i386/pc/vbe_test.c.
12157 * commands/i386/pc/vbe_list_modes.c: New file.
12158 * commands/i386/pc/vbe_test.c: Likewise.
12159 * term/i386/pc/vesafb.c: Likewise.
12160 * video/i386/pc/vbe.c: Likewise.
12161 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12162 (grub_vbe_probe) Added prototype.
12163 (grub_vbe_set_video_mode) Likewise.
12164 (grub_vbe_get_video_mode) Likewise.
12165 (grub_vbe_get_video_mode_info) Likewise.
12166 (grub_vbe_set_pixel_rgb) Likewise.
12167 (grub_vbe_set_pixel_index) Likewise.
12168 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12169 (pkgdata_MODULES): Added vesafb.mod.
12170 (pkgdata_MODULES): Added vbe_list_modes.mod.
12171 (pkgdata_MODULES): Added vbe_test.mod.
12172 (vbe_mod_SOURCES): Added.
12173 (vbe_mod_CFLAGS): Likewise.
12174 (vesafb_mod_SOURCES): Likewise.
12175 (vesafb_mod_CFLAGS): Likewise.
12176 (vbe_list_modes_mod_SOURCES): Likewise.
12177 (vbe_list_modes_mod_CFLAGS): Likewise.
12178 (vbe_test_mod_SOURCES): Likewise.
12179 (vbe_test_mod_CFLAGS): Likewise.
12181 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12183 * normal/command.c (grub_command_execute): If INTERACTIVE is
12184 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12185 CMDLINE. Disable the pager if INTERACTIVE is true.
12186 All callers are changed.
12188 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12189 before reading a config file.
12190 * normal/main.c (read_config_file): Even if a command is not
12191 found, register it if it is within an entry.
12193 * util/grub-emu.c: Include sys/types.h and unistd.h.
12194 (options): Added --hold.
12195 (struct arguments): Added a new member "hold".
12196 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12198 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12199 cleared by a debugger, if it is not zero.
12201 * include/grub/normal.h (grub_command_execute): Add an argument
12204 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12206 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12208 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12210 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12211 program with another one, because the old one didn't detect a bug
12212 in gcc-3.4. Always use regparm 2, because the new test is still
12213 not enough for gcc-4.0. Someone must investigate a simple test
12214 case which detects a bug in gcc-4.0.
12216 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12218 * DISTLIST: Added normal/completion.c.
12220 * normal/completion.c: New file.
12222 * term/i386/pc/console.c (grub_console_getwh): New function.
12223 (grub_console_term): Assign grub_console_getwh to getwh.
12225 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12226 function is defined in normal/completion.c as
12227 grub_normal_do_completion.
12228 (grub_cmdline_get): Use grub_normal_do_completion instead of
12231 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12232 returns non-zero, otherwise return 0.
12233 (grub_partition_iterate): First, probe the partition map. Then,
12234 call ITERATE only for this partition map.
12236 * kern/misc.c (grub_strncmp): Rewritten.
12238 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12239 returns non-zero. Otherwise return 0.
12241 * include/grub/partition.h (grub_partition_map_iterate): Return
12242 int instead of void.
12244 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12246 * include/grub/misc.h (grub_strncmp): Change the type of N to
12249 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12252 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12253 unsigned explicitly before comparing it with I.
12255 * kern/main.c (grub_env_write_root): Add the attribute unused into
12258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12259 normal/completion.c.
12260 (normal_mod_SOURCES): Likewise.
12261 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12262 (normal_mod_SOURCES): Likewise.
12264 * normal/command.c (grub_iterate_commands): If ITERATE returns
12265 non-zero, return one immediately.
12267 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12269 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12270 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12272 (grub_vbe_get_controller_info): New function.
12273 (grub_vbe_get_mode_info): Likewise.
12274 (grub_vbe_set_mode): Likewise.
12275 (grub_vbe_get_mode): Likewise.
12276 (grub_vbe_set_memory_window): Likewise.
12277 (grub_vbe_get_memory_window): Likewise.
12278 (grub_vbe_set_scanline_length): Likewise.
12279 (grub_vbe_get_scanline_length): Likewise.
12280 (grub_vbe_set_display_start): Likewise.
12281 (grub_vbe_get_display_start): Likewise.
12282 (grub_vbe_set_palette_data): Likewise.
12283 * include/grub/i386/pc/vbe.h: New file.
12285 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12287 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12288 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12289 * DISTLIST: Likewise.
12290 * kern/ieee1275/of.c: Moved to ...
12291 * kern/ieee1275/ieee1275.c: ... here.
12293 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12295 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12296 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12297 Pass 0 as `end' parameter to grub_strtoul().
12299 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12301 * include/grub/powerpc/ieee1275/console.h: Do not include
12302 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12304 (grub_console_cur_color): Remove i386-specific prototype.
12305 (grub_console_real_putchar): Likewise.
12306 (grub_console_checkkey): Likewise.
12307 (grub_console_getkey): Likewise.
12308 (grub_console_getxy): Likewise.
12309 (grub_console_gotoxy): Likewise.
12310 (grub_console_cls): Likewise.
12311 (grub_console_setcursor): Likewise.
12312 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12313 Include <grub/machine/console.h>.
12314 * term/ieee1275/ofconsole.c: Likewise.
12316 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12318 * Makefile.in (LIBLZO): New variable.
12320 * configure.ac: Check for LZO version 2.
12322 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12323 lzo/lzo1x.h instead of lzo1x.h.
12325 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12328 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12329 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12331 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12332 copying the data from PARTITION to P.
12334 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12336 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12337 negative, unload the module.
12339 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12340 map is "pc_partition_map" but not "pc".
12341 (usage): Fix the description. The options are --boot-image and
12342 --core-image but not --boot-file or --core-file.
12343 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12344 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12347 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12348 --core-file. Specify INSTALL_DEVICE as an argument.
12350 * util/console.c: Include config.h.
12351 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12352 [HAVE_NCURSES_H]: Include ncurses.h.
12353 [HAVE_CURSES_H]: Include curses.h.
12354 [!A_NORMAL] (A_NORMAL): Defined as zero.
12355 [!A_STANDOUT] (A_STANDOUT): Likewise.
12357 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12359 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12361 * configure.ac: Check for curses libraries and headers.
12363 * Makefile.in (LIBCURSES): New variable.
12365 * genmk.rb (Script::rule): Set the executable bits.
12367 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12368 name of the PC partition map is "pc_partition_map" but not "pc".
12370 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12372 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12373 (modules): Likewise.
12374 (usage): Added descriptions for --modules and --grub-probefs.
12375 Handle --modules and --grub-probefs. Save the arguments in MODULES
12376 and GRUB_PROBEFS, respectively.
12377 Auto-detect a filesystem module against GRUBDIR. If the result is
12378 empty and modules are not specified explicitly, abort the
12379 installation. Add the result to MODULES.
12381 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12382 disk/powerpc/ieee1275/ofdisk.c,
12383 include/grub/powerpc/ieee1275/init.h and
12384 term/powerpc/ieee1275/ofconsole.c.
12385 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12386 term/ieee1275/ofconsole.c.
12388 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12390 * COPYING: Upgraded to the latest version. Only the address of the
12391 FSF office has changed.
12393 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12395 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12396 kern/ieee1275.c with kern/ieee1275/of.c.
12398 * kern/ieee1275.c: Moved to ...
12399 * kern/ieee1275/of.c: ... here.
12401 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12403 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12406 * config.guess: Updated to the latest version from gnulib.
12407 * config.sub: Likewise.
12408 * install.sh: Likewise.
12409 * mkinstalldirs: Likewise.
12411 * include/grub/console.h: Removed. This file is arch-specific. Do
12412 not put this in include/grub.
12414 * include/grub/i386/pc/console.h: Resurrected.
12416 * util/console.c: Include grub/machine/console.h instead of
12418 * util/grub-emu.c: Likewise.
12420 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12422 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12425 From Vincent Pelletier <subdino2004@yahoo.fr>
12426 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12427 Redefined to use grub_getwh.
12428 (grub_term): New member named getwh.
12429 (grub_getwh): New prototype.
12430 * kern/term.c (grub_getwh): New function.
12431 * term/i386/pc/console.c (grub_console_getwh): New function.
12432 (grub_console_term): New member `getwh'.
12433 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12434 (grub_vga_term): New member `getwh'.
12435 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12437 (grub_ofconsole_getw): New function.
12438 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12439 (grub_ofconsole_term): New field named getwh and new initial
12442 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12444 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12445 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12446 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12447 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12448 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12449 of <grub/machine/ieee1275.h>.
12450 * commands/ieee1275/reboot.c: Likewise.
12451 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12452 * kern/ieee1275.c: ... to here. All users updated. Change all
12453 parameter structs to use new type `grub_ieee1275_cell_t'.
12454 * term/powerpc/ieee1275/ofconsole.c: Move ...
12455 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12456 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12457 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12458 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12460 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12461 Remove unused prototypes. All users updated.
12462 * include/grub/powerpc/ieee1275/console.h: Removed.
12463 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12464 `grub_ieee1275_cell_t'.
12465 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12466 Cast comparisons with -1 to the correct type.
12467 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12468 type to match `grub_ieee1275_entry_fn'.
12470 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12472 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12474 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12475 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12477 (grub_probefs_SOURCES): New variable.
12479 * util/i386/pc/grub-probefs.c: New file.
12481 * util/i386/pc/grub-setup.c (main): Call
12482 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12483 grub_hfs_init and grub_jfs_init to initialize the system. Call
12484 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12485 grub_pc_partition_map_fini to finish the system.
12487 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12489 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12491 (grub_multiboot_load_elf32): Likewise.
12492 (grub_multiboot_is_elf64): Likewise.
12493 (grub_multiboot_load_elf64): Likewise.
12494 (grub_multiboot_load_elf): Likewise.
12495 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12496 an ELF32 or ELF64 file.
12497 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12499 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12500 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12501 NULL before calling FS->LABEL.
12502 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12503 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12504 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12505 before calling FS->LABEL.
12507 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12509 * util/i386/pc/grub-install.in (datadir): New variable.
12511 (pkgdatadir): New variable.
12512 (pkglibdir): Removed.
12514 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12516 * DISTLIST: Added util/i386/pc/grub-install.in.
12518 * util/i386/pc/grub-install.in: New file.
12520 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12521 (grub_install_SOURCES): Likewise.
12523 * genmk.rb: Added support for scripts.
12524 (Script): New class.
12525 (scripts): New variable.
12527 * Makefile.in (install-local): Install sbin_SCRIPTS by
12529 (uninstall): Remove sbin_SCRIPTS.
12531 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12532 device, try to get a GRUB device by
12533 grub_util_biosdisk_get_grub_dev.
12536 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12537 description for --device-map.
12539 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12541 Change the semantics of variable hooks. They now return strings
12542 instead of error values.
12544 * util/i386/pc/grub-setup.c: Include grub/env.h.
12545 (setup): Use grub_device_set_root instead of grub_env_set.
12547 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12548 grub_env_get instead of grub_device_set_root and
12549 grub_device_get_root, respectively.
12551 * kern/main.c (grub_env_write_root): New function.
12552 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12553 grub_env_set instead of grub_device_set_root.
12555 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12557 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12558 rather than calling ENV->WRITE_HOOK afterwards.
12559 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12560 passing a pointer of a pointer.
12561 (grub_register_variable_hook): Change the types of "read_hook" and
12562 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12564 Allocate the default empty string on the heap, because this string
12565 may be freed later.
12567 * kern/device.c: Include grub/env.h.
12568 (grub_device_set_root): Removed.
12569 (grub_device_get_root): Likewise.
12570 (grub_device_open): Use grub_env_get instead of
12571 grub_device_get_root.
12573 * include/grub/env.h (grub_env_read_hook_t): New type.
12574 (grub_env_write_hook_t): Likewise.
12575 (grub_env_var): Change the types of "read_hook" and "write_hook"
12576 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12577 (grub_register_variable_hook): Likewise.
12579 * include/grub/device.h (grub_device_set_root): Removed.
12580 (grub_device_set_root): Likewise.
12582 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12583 make sure that DIRNAME terminates with '/', so that
12584 grub_fat_find_dir will fail if PATH is not a directory.
12586 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12588 Use the qualifier auto for print_files and print_files_long.
12589 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12591 Put a newline only if there is no error.
12592 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12595 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12597 * kern/partition.c (grub_partition_probe): Initialize PART to
12598 NULL. Otherwise, when no partition map is registered, this returns
12601 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12603 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12604 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12607 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12609 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12610 information on each device, if it does not have partitions. Print
12611 "Device" instead of "Disk", because this function is not specific
12614 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12615 static to ensure that it is put on the memory rather than a
12618 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12620 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12621 (grub_cat_init): Likewise.
12622 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12623 (options): Likewise.
12624 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12625 (grub_configfile_init): Likewise.
12626 * font/manager.c (GRUB_MOD_INIT): Likewise.
12627 * commands/help.c (GRUB_MOD_INIT): Likewise.
12628 (grub_help_init): Likewise.
12629 * normal/command.c (grub_command_init): Likewise.
12630 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12631 * disk/loopback.c (grub_loop_init): Likewise.
12632 (GRUB_MOD_INIT): Likewise.
12633 * commands/ls.c (grub_ls_init): Likewise.
12634 (GRUB_MOD_INIT): Likewise.
12635 (options): Likewise.
12636 * commands/boot.c (grub_boot_init): Likewise.
12637 (GRUB_MOD_INIT): Likewise.
12638 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12639 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12640 (GRUB_MOD_INIT): Likewise.
12641 * commands/cmp.c (grub_cmp_init): Likewise.
12642 (GRUB_MOD_INIT): Likewise.
12644 * normal/arg.c: Use <> instead of "" to include header files.
12645 (SHORT_ARG_HELP): New macro.
12646 (SHORT_ARG_USAGE): Likewise.
12647 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12648 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12650 (find_short): Check if C is 'h' or 'u' explicitly.
12651 (grub_arg_show_help): Use space characters instead of tabs. Treat
12652 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12653 are shown with --help and --usage only if they are not used for
12654 the command itself.
12655 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12658 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12659 const into "longarg". Change the type of "shortarg" to int.
12661 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12663 * boot/i386/pc/boot.S (boot_drive_check): New label.
12665 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12668 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12669 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12671 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12673 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12674 When turning off Gate A20, skip the check and return immediately,
12675 because this is not fatal usually.
12677 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12679 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12680 be 0x7C00 instead of 0x8000.
12682 * boot/i386/pc/pxeboot.S: Rewritten.
12684 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12686 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12689 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12691 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12692 robustness. This routine now supports a BIOS call and System
12693 Control Port A to modify the gate A20.
12695 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12696 Increased to 0x440.
12698 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12700 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12701 device path and resulting ihandle.
12702 (grub_ofdisk_close): dprintf the ihandle being closed.
12703 (grub_ofdisk_read): dprintf function parameters.
12704 * kern/mm.c (grub_mm_init_region): Likewise.
12705 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12706 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12707 size, and boot arguments.
12708 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12709 before loading into memory.
12710 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12711 before loading into memory.
12713 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12715 * kern/mm.c: Added much documentation.
12716 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12717 8, set to 5 instead of 8.
12719 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12721 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12723 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12724 (grub_mkdevicemap_SOURCES): New variable.
12726 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12727 lib/device.c of GRUB Legacy.
12729 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12731 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12732 instead of PATH is NULL.
12734 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12736 * commands/cmp.c (BUFFER_SIZE): New macro.
12737 (grub_cmd_cmp): Close the right file at the right time. Compare
12738 only data just read. Don't report files of different size as
12739 identical. Dynamically allocate buffers. Move variable
12740 declarations at the beginning of function.
12742 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
12744 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12747 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12749 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12750 when backspace is pressed at beginning of line.
12752 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
12754 * DISTLIST: Added genfslist.sh.
12756 * normal/main.c (fs_module_list): New variable.
12757 (autoload_fs_module): New function.
12758 (read_fs_list): Likewise.
12759 (grub_normal_execute): Call read_fs_list.
12761 * kern/fs.c (grub_fs_autoload_hook): New variable.
12762 (grub_fs_probe): Added support for auto-loading.
12764 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12765 (grub_fs_module_list_t): New type.
12767 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12768 (grub_fs_autoload_hook): New prototype.
12770 * genfslist.sh: New file.
12772 * genmk.rb: Added a rule to generate a filesystem list.
12774 2005-06-30 Marco Gerards <metgerards@student.han.nl>
12776 * configure.ac: Fix the test for cross-compiling.
12778 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12779 define GRUB_UTIL anymore.
12781 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12782 so this function works on other systems than just big endian.
12783 (load_modules): Likewise.
12784 (add_segments): Likewise.
12786 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12788 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12789 contains `l' modifier, get a long from va_arg().
12791 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12793 * kern/mm.c (grub_free): If the next free block which is being
12794 merged is the first free block, set the first block to the block
12796 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12798 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12800 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12801 `grub_ieee1275_chosen'.
12803 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12805 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12806 (grub_ieee1275_chosen): New variable.
12807 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12809 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12810 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12811 Rename first argument to `phandle' for consistency.
12812 (grub_ieee1275_get_property_length): Likewise.
12813 (grub_ieee1275_next_property): Likewise. Change type of first argument
12814 to grub_ieee1275_phandle_t.
12815 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12816 Move export next to declaration.
12817 (grub_ieee1275_chosen): New variable.
12818 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12819 Correct cosmetic typo.
12820 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12821 `grub_ieee1275_chosen'.
12822 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12823 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12824 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12825 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12826 `grub_ieee1275_chosen'.
12828 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12830 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12832 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12833 /chosen/bootargs as "variable=value" pairs.
12835 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12837 * include/grub/misc.h (grub_dprintf): New macro.
12838 (grub_real_dprintf): New prototype.
12839 (grub_strword): Likewise.
12840 (grub_iswordseparator): Likewise.
12841 * kern/misc.c (grub_real_dprintf): New function.
12842 (grub_strword): Likewise.
12843 (grub_iswordseparator): Likewise.
12845 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12847 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12848 (roundup): Remove macro.
12849 (grub_ieee1275_flags): Make static.
12850 (grub_ieee1275_realmode): Remove.
12851 (grub_ieee1275_test_flag): New function.
12852 (grub_ieee1275_set_flag): Likewise.
12853 (find_options): Rename to `grub_ieee1275_find_options'; update
12854 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12855 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12856 (cmain): New prototype.
12857 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12858 `grub_ieee1275_flags' directly.
12859 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12860 machine/biosdisk.h.
12861 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12862 Don't include grub/machine/init.h.
12863 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12864 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12866 (grub_ieee1275_realmode): Likewise.
12867 (grub_ieee1275_flag): New enum.
12868 (grub_ieee1275_test_flag): New prototype.
12869 (grub_ieee1275_set_flag): New prototype.
12870 * include/grub/powerpc/ieee1275/init.h: Remove file.
12871 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12872 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12873 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12874 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12876 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12877 `grub_ieee1275_test_flag'.
12878 (grub_ieee1275_encode_devname): Likewise.
12880 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12882 * include/grub/powerpc/ieee1275/ieee1275.h
12883 (grub_ieee1275_encode_devname): New prototype.
12884 (grub_ieee1275_get_filename): Likewise.
12885 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12887 (grub_set_prefix): Likewise.
12888 (grub_machine_init): Call grub_set_prefix.
12889 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12890 (grub_parse_type): New enum.
12891 (grub_ieee1275_get_devargs): New function.
12892 (grub_ieee1275_get_devname): Likewise.
12893 (grub_ieee1275_parse_args): Likewise.
12894 (grub_ieee1275_get_filename): Likewise.
12895 (grub_ieee1275_encode_devname): Likewise.
12897 2005-03-30 Marco Gerards <metgerards@student.han.nl>
12899 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12900 `grub_loader_unset'.
12902 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12904 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12905 instead of grub_ieee1275_interpret.
12906 (grub_halt_init): New function.
12907 (grub_halt_fini): Likewise.
12908 (GRUB_MOD_INIT): Correct message grammar.
12909 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12910 instead of grub_ieee1275_interpret.
12911 (grub_reboot_init): New function.
12912 (grub_reboot_fini): Likewise.
12913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12914 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12915 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12916 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12917 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12919 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12921 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12923 (grub_halt): Likewise.
12924 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12925 (cmain): Remove __attribute__((unused)).
12926 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12927 (grub_heap_len): Likewise.
12928 (grub_machine_fini): New function.
12929 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12930 (grub_halt): Likewise.
12931 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12933 * util/powerpc/ieee1275/misc.c: New file.
12935 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12937 * DISTLIST: New file.
12938 * gendistlist.sh: Likewise.
12940 * Makefile.in (COMMON_DISTFILES): Removed.
12941 (BOOT_DISTFILES): Likewise.
12942 (CONF_DISTFILES): Likewise.
12943 (DISK_DISTFILES): Likewise.
12944 (FS_DISTFILES): Likewise.
12945 (INCLUDE_DISTFILES): Likewise.
12946 (KERN_DISTFILES): Likewise.
12947 (LOADER_DISTFILES): Likewise.
12948 (TERM_DISTFILES): Likewise.
12949 (UTIL_DISTFILES): Likewise.
12950 (DISTFILES): Likewise.
12951 (uninstall): Uninstall files in $(pkgdata_DATA).
12952 (DISTLIST): New target.
12953 (distdir): Use the contents of the file DISTLIST to get a list of
12956 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12958 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12959 descriptor. This is ported from GRUB Legacy.
12961 * gencmdlist.sh: Added an extra semicolon to make it work with
12962 old sed versions. Reported by Robert Bihlmeyer
12963 <robbe@orcus.priv.at>.
12965 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
12967 Automatic loading of commands is supported.
12969 * normal/main.c (read_command_list): New function.
12970 (grub_normal_execute): Call read_command_list.
12972 * normal/command.c (grub_register_command): Return zero or CMD.
12973 Allocate CMD->NAME from the heap.
12974 Initialize CMD->MODULE_NAME to zero.
12975 Find the same name as well. If the same command is found and it is
12976 a dummy command, overwrite members. If it is not a dummy command,
12978 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12979 (grub_command_find): If a dummy command is found, load a module
12980 and retry to find a command only once.
12982 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12983 make sure that each command is loaded.
12985 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12987 (struct grub_command): Remove const from the member `name'.
12988 Add a new member `module_name'.
12989 (grub_register_command): Return grub_command_t.
12991 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12992 sure that each command is loaded.
12994 * genmk.rb (PModule::rule): Specify a module name without the
12995 suffix ".mod" to gencmdlist.sh.
12997 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12999 * gencmdlist.sh: New file.
13001 * genmk.rb (PModule::rule): Generate a rule for a command list.
13003 Generate command.lst from $(COMMANDFILES).
13005 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13006 (DATA): Added $(pkgdata_DATA).
13007 (install-local): Install files in $(pkgdata_DATA).
13009 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13011 * term/i386/pc/vga.c (debug_command): Removed.
13012 (GRUB_MOD_INIT): Do not register the command "debug".
13014 From Hollis Blanchard:
13015 * commands/configfile.c: New file.
13016 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13017 commands/configfile.c.
13018 (pkgdata_MODULES): Added configfile.mod.
13019 (configfile_mod_SOURCES): New variable.
13020 (configfile_mod_CFLAGS): Likewise.
13021 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13022 commands/configfile.c.
13023 (pkgdata_MODULES): Added configfile.mod.
13024 (configfile_mod_SOURCES): New variable.
13025 (configfile_mod_CFLAGS): Likewise.
13026 * util/grub-emu.c (main): Call grub_configfile_init and
13027 grub_configfile_fini.
13028 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13030 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13032 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13034 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13037 * commands/help.c (grub_cmd_help): Do not print newlines after
13038 the last command in print_command_help.
13040 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13042 * commands/default.h: New file.
13043 * commands/timeout.h: Likewise.
13044 * normal/context.c: Likewise.
13046 * util/misc.c: Do not include sys/times.h.
13047 Include sys/time.h and grub/machine/time.h.
13048 (grub_get_rtc): Rewritten with gettimeofday.
13050 * util/grub-emu.c (main): Call grub_default_init and
13051 grub_timeout_init before grub_normal_init, and call
13052 grub_timeout_fini and grub_default_fini after grub_main.
13054 * util/console.c (grub_ncurses_checkkey): Return the read
13057 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13060 * normal/main.c (read_config_file): Push MENU. If this fails,
13061 print an error and wait for a user input.
13062 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13063 If a menu is empty or an error occurs, pop MENU.
13064 (grub_normal_execute): Pop and free MENU after grub_menu_run
13067 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13069 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13071 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13073 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13075 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13078 * include/grub/normal.h (struct grub_menu_list): New struct.
13079 (grub_menu_list_t): New type.
13080 (struct grub_context): New struct.
13081 (grub_context_t): New type.
13082 (grub_register_command): Got rid of EXPORT_FUNC.
13083 (grub_unregister_command): Likewise.
13084 (grub_context_get): New prototype.
13085 (grub_context_get_current_menu): Likewise.
13086 (grub_context_push_menu): Likewise.
13087 (grub_context_pop_menu): Likewise.
13088 [GRUB_UTIL] (grub_default_init): Likewise.
13089 [GRUB_UTIL] (grub_default_fini): Likewise.
13090 [GRUB_UTIL] (grub_timeout_init): Likewise.
13091 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13093 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13094 commands/timeout.c and normal/context.c.
13095 (pkgdata_MODULES): Added default.mod and timeout.mod.
13096 (normal_mod_SOURCES): Added normal/context.c.
13097 (default_mod_SOURCES): New variable.
13098 (default_mod_CFLAGS): Likewise.
13099 (timeout_mod_SOURCES): Likewise.
13100 (timeout_mod_CFLAGS): Likewise.
13101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13103 (pkgdata_MODULES): Added default.mod and timeout.mod.
13104 (normal_mod_SOURCES): Added normal/context.c.
13105 (default_mod_SOURCES): New variable.
13106 (default_mod_CFLAGS): Likewise.
13107 (timeout_mod_SOURCES): Likewise.
13108 (timeout_mod_CFLAGS): Likewise.
13110 * Makefile.in (all-local): Added $(MKFILES).
13112 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13114 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13115 (grub_emu_SOURCES): Likewise.
13116 (pkgdata_MODULES): Add `sun.mod'.
13117 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13118 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13120 (pkgdata_MODULES): Add `sun.mod'.
13121 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13122 * include/grub/partition.h (grub_sun_partition_map_init): New
13124 (grub_sun_partition_map_fini): Likewise.
13125 * partmap/sun.c: New file.
13126 * util/grub-emu.c (main): Initialize and de-initialize the sun
13127 partitionmap support.
13129 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13131 This implements an Emacs-like menu entry editor.
13133 * normal/menu_entry.c: New file.
13135 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13136 characters to ASCII.
13137 (saved_char): New variable.
13138 (grub_ncurses_checkkey): Rewritten completely.
13139 (grub_ncurses_getkey): Likewise.
13140 (grub_ncurses_init): Call raw instead of cbreak.
13142 * normal/menu.c (print_entry): Do not put a space.
13143 (init_page): Renamed to ...
13144 (grub_menu_init_page): ... this. All callers changed.
13145 (edit_menu_entry): Removed.
13146 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13148 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13150 * kern/misc.c (grub_vprintf): Call grub_refresh.
13152 * normal/menu.c (DISP_LEFT): Renamed to ...
13153 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13154 * normal/menu.c (DISP_UP): Renamed to ...
13155 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13156 * normal/menu.c (DISP_RIGHT): Renamed to ...
13157 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13158 * normal/menu.c (DISP_DOWN): Renamed to ...
13159 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13160 * normal/menu.c (DISP_HLINE): Renamed to ...
13161 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13162 * normal/menu.c (DISP_VLINE): Renamed to ...
13163 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13164 * normal/menu.c (DISP_UL): Renamed to ...
13165 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13166 * normal/menu.c (DISP_UR): Renamed to ...
13167 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13168 * normal/menu.c (DISP_LL): Renamed to ...
13169 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13170 * normal/menu.c (DISP_LR): Renamed to ...
13171 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13172 * normal/menu.c (TERM_WIDTH): Renamed to ...
13173 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13174 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13175 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13176 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13177 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13178 * normal/menu.c (TERM_MARGIN): Renamed to ...
13179 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13180 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13181 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13182 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13183 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13184 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13185 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13186 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13187 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13188 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13189 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13190 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13191 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13192 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13193 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13194 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13195 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13196 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13197 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13198 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13199 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13200 All callers changed.
13202 * include/grub/normal.h: New prototype.
13204 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13205 normal/menu_entry.c.
13206 (normal_mod_SOURCES): Likewise.
13207 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13208 (normal_mod_SOURCES): Likewise.
13210 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13212 * include/grub/normal.h (grub_halt_init): New prototype.
13213 (grub_halt_fini): Likewise.
13214 (grub_reboot_init): Likewise.
13215 (grub_reboot_fini): Likewise.
13217 * util/grub-emu.c: Include signal.h.
13218 (main_env): New global variable.
13219 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13221 (grub_machine_fini): New function.
13222 (main): Call grub_halt_init and grub_reboot_init before
13223 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13224 Call setjmp with MAIN_ENV to go back afterwards.
13225 Call grub_machine_fini right before return.
13227 * include/grub/util/misc.h: Include setjmp.h.
13228 (main_env): New prototype.
13230 * include/grub/kernel.h (grub_machine_fini): New prototype.
13231 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13232 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13234 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13235 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13236 * term/i386/pc/console.c (grub_console_fini): Likewise.
13238 * util/i386/pc/misc.c: New file.
13240 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13241 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13242 commands/i386/pc/reboot.c.
13244 2005-02-14 Guillem Jover <guillem@hadrons.org>
13246 * include/grub/dl.h (grub_dl_check_header): New prototype.
13247 (grub_arch_dl_check_header): Change return type to grub_err_t,
13248 remove size parameter and export function. Update all callers.
13249 * kern/dl.c (grub_dl_check_header): New function.
13250 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13251 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13252 are inside the core.
13253 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13254 independent ELF header checks.
13255 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13256 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13257 `grub_dl_check_header' instead of explicit checks. Check for the
13259 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13260 `grub_dl_check_header' instead of explicit checks. Remove arch
13261 specific ELF header checks.
13263 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13266 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13268 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13269 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13271 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13273 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13274 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13275 (part_map_iterate): Clear `grub_errno' and return 0 if
13276 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13277 * partmap/amiga.c (amiga_partition_map_iterate): Return
13278 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13279 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13281 2005-02-01 Guillem Jover <guillem@hadrons.org>
13283 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13286 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13288 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13290 (grub_rescue_cmd_linux): New prototype.
13291 (grub_rescue_cmd_initrd): Likewise.
13292 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13294 (grub_linux_release_mem): Release the memory for the initrd.
13295 (grub_load_linux): Renamed from this...
13296 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13297 Changed `entry' not to be static. Loop over memory regions to
13298 find another one when the default fails.
13299 (grub_rescue_cmd_initrd): New function.
13300 (grub_linux_init): Remove function.
13301 (grub_linux_fini): Likewise.
13302 (GRUB_MOD_INIT): Register `initrd'.
13303 (GRUB_MOD_FINI): Unregister `initrd'.
13304 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13306 (grub_linux_normal_fini): Likewise.
13307 (GRUB_MOD_INIT): Register `initrd'.
13308 (GRUB_MOD_FINI): Unregister `initrd'.
13310 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13312 * commands/help.c: New file.
13313 * normal/arg.c (show_help): Renamed to...
13314 (grub_arg_show_help): ... this.
13315 * commands/i386/pc/halt.c: New file.
13316 * commands/i386/pc/reboot.c: Likewise.
13317 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13318 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13319 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13320 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13322 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13324 (pkgdata_MODULES): Add `help.mod'.
13325 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13326 * grub/i386/pc/init.h (grub_reboot): New prototype.
13327 (grub_halt): Likewise.
13328 * include/grub/normal.h (grub_arg_show_help): New prototype.
13329 (grub_help_init): Likewise.
13330 (grub_help_fini): Likewise.
13331 * util/grub-emu.c (main): Initialize and deinitialize the help
13334 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13336 * normal/command.c (grub_command_init): Fixed the description of
13337 the `set' and `unset' commands.
13339 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13341 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13343 * commands/ieee1275/halt.c: New file.
13344 * commands/ieee1275/reboot.c: Likewise.
13345 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13346 `__attribute__ ((unused))'. Some GCS related fixed.
13347 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13348 (grub_suspend_fini): Likewise.
13349 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13351 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13352 (halt_mod_CFLAGS): New variables.
13353 * include/grub/powerpc/ieee1275/ieee1275.h
13354 (grub_ieee1275_interpret): New prototype.
13356 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13358 * include/grub/misc.h (memmove): New prototype.
13359 (memcpy): Likewise.
13361 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13363 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13364 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13366 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13368 * kern/misc.c (grub_strndup): Function rewritten.
13370 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13372 * normal/menu.c (TERM_WIDTH): Macro redefined.
13373 (TERM_TOP_BORDER_Y): Likewise.
13374 (draw_border): Replaced while-loop by a for-loop. Make the number
13375 of lines consistent with the number of lines displayed in
13376 print_entries. Added a margin below the rectangle.
13377 (print_entry): Make the entry fit in the rectangle.
13378 (print_entries): Display the scroll arrows next to the right
13381 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13383 * fs/minix.c (grub_minix_find_file): Reserve more space for
13384 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13385 `grub_strncpy' to copy `path' into it.
13387 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13389 Add the loopback device, a device via which files can be accessed
13392 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13393 (pkgdata_MODULES): Add loopback.mod.
13394 (loopback_mod_SOURCES): New variable.
13395 (loopback_mod_CFLAGS): Likewise.
13396 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13398 (pkgdata_MODULES): Add loopback.mod.
13399 (loopback_mod_SOURCES): New variable.
13400 (loopback_mod_CFLAGS): Likewise.
13401 * disk/loopback.c: new file.
13402 * include/grub/normal.h (grub_loop_init): New prototype.
13403 (grub_loop_fini): New prototype.
13404 * util/grub-emu.c (main): Initialize and de-initialize loopback
13406 * include/grub/disk.h (grub_disk_dev_id): Add
13407 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13409 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13411 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13413 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13414 (suspend_mod_SOURCES): New variable.
13415 (suspend_mod_CFLAGS): Likewise.
13416 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13418 * commands/ieee1275/suspend.c: New file.
13420 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13422 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13423 ((unused))' to `__attribute__ ((used))'.
13424 (GRUB_MOD_FINI): Likewise.
13425 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13426 * genmk.rb (PModule): Assign space to common symbols when linking
13429 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13431 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13432 `unsigned' arguments to `grub_size_t'.
13433 (grub_malloc): Likewise.
13434 (grub_realloc): Likewise.
13435 (grub_memalign): Likewise.
13436 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13437 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13438 * util/misc.c (grub_malloc): Likewise.
13439 (grub_realloc): Likewise.
13440 * kern/mm.c (get_header_from_pointer): Change the casts to
13441 `unsigned' into a cast to `grub_size_t'.
13443 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13444 point to `currnode' when `currnode' is changed.
13446 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13447 Schottelius <nico-linux@schottelius.org>.
13449 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13451 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13452 (note_path): Remove variable.
13453 (GRUB_IEEE1275_NOTE_NAME): New macro.
13454 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13455 (grub_ieee1275_note_hdr): New structure.
13456 (grub_ieee1275_note_desc): Likewise.
13457 (grub_ieee1275_note): Likewise.
13458 (load_note): Remove `dir' argument. All callers updated. Remove
13459 `note_img' and `path'. Do not load a file from `note_path'.
13460 Initialize a struct grub_ieee1275_note and write that to `out'.
13461 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13463 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13465 * util/misc.c (grub_util_read_image): Revert last change. It
13466 called `grub_util_read_at', which seeks from the beginning of the
13469 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13471 * TODO: Add note about endianness in grub-mkimage.
13472 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13474 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13475 (grub_mkimage_SOURCES): New target.
13476 * include/grub/kernel.h (grub_start_addr): Remove variable.
13477 (grub_end_addr): Likewise.
13478 (grub_total_module_size): Likewise.
13479 (grub_kernel_image_size): Likewise.
13480 (GRUB_MODULE_MAGIC): New constant.
13481 (grub_module_info): New structure.
13482 (grub_arch_modules_addr): New prototype.
13483 (grub_get_end_addr): Remove prototype.
13484 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13485 * include/grub/powerpc/ieee1275/kernel.h: New file.
13486 * include/grub/util/misc.h (grub_util_get_fp_size): New
13488 (grub_util_read_at): Likewise.
13489 (grub_util_write_image_at): Likewise.
13490 * kern/main.c (grub_get_end_addr): Remove function.
13491 (grub_load_modules): Call grub_arch_modules_addr instead of using
13492 grub_end_addr. Look for a grub_module_info struct in memory. Use
13493 the grub_module_info fields instead of calling grub_get_end_addr
13494 as loop conditions. Move grub_add_unused_region code here.
13495 (grub_add_unused_region): Remove function.
13496 * kern/i386/pc/init.c: Include grub/cache.h.
13497 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13498 one call to add_mem_region.
13499 (grub_arch_modules_addr): New function.
13500 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13501 (grub_total_module_size): Likewise.
13502 Include grub/machine/kernel.h.
13503 (grub_arch_modules_addr): New function.
13504 * util/grub-emu.c (grub_end_addr): Remove variable.
13505 (grub_total_module_size): Likewise.
13506 (grub_arch_modules_addr): New function.
13507 * util/misc.c: Include unistd.h.
13508 (grub_util_get_fp_size): New function.
13509 (grub_util_read_at): Likewise.
13510 (grub_util_write_image_at): Likewise.
13511 (grub_util_read_image): Call grub_util_read_at.
13512 (grub_util_write_image): Call grub_util_write_image_at.
13513 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13514 additional memory in kernel_img for a struct grub_module_info.
13515 Fill in that grub_module_info.
13516 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13518 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13520 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13522 * include/grub/powerpc/ieee1275/ieee1275.h
13523 (grub_ieee1275_milliseconds): New prototype.
13524 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13526 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13527 grub_ieee1275_milliseconds.
13529 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13531 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13533 (find_options): New function.
13534 (cmain): Call find_options.
13535 * include/grub/powerpc/ieee1275/ieee1275.h
13536 (grub_ieee1275_realmode): New extern variable.
13537 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13538 grub_map if grub_ieee1275_realmode is false.
13540 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13542 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13543 lines are inserted and make it work like readline. Reported by
13544 Vincent Pelletier <subdino2004@yahoo.fr>.
13546 2004-12-28 Marco Gerards <metgerards@student.han.nl>
13548 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13551 `kern/powerpc/cache.S'.
13553 2004-12-27 Marco Gerards <metgerards@student.han.nl>
13555 * genmk.rb: Handle the `Program' class in the main loop. Written
13556 by Johan Rydberg <jrydberg@gnu.org>.
13557 (Program): New class.
13558 (programs): New variable.
13559 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13560 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13561 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13562 (help_arch): Function removed.
13563 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13564 `powerpc/libgcc.h' and `loader.h'.
13565 (pkgdata_PROGRAMS): New variable.
13566 (sbin_UTILITIES): Variable removed.
13567 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13568 (grubof_SOURCES): Variable re-defined so it only includes the
13569 core functionality.
13570 (grubof_CFLAGS): Remove `-DGRUBOF'.
13571 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13572 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13573 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13574 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13575 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13576 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13577 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13578 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13579 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13580 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13581 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13582 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13583 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13584 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13585 (pc_mod_CFLAGS): New variables.
13586 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13587 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13588 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13589 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13591 * include/grub/i386/pc/init.h (grub_os_area_addr)
13592 (rub_os_area_size): ... to here.
13593 * include/grub/powerpc/ieee1275/ieee1275.h
13594 (grub_ieee1275_entry_fn): Export symbol.
13595 * include/grub/powerpc/ieee1275/init.h: New file.
13596 * include/grub/powerpc/libgcc.h: Likewise.
13597 * include/grub/cache.h: Likewise.
13598 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13599 <hollis@penguinppc.org>.
13600 * kern/dl.c: Include <grub/cache.h>.
13601 (grub_dl_flush_cache): New function.
13602 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13604 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13605 (grub_console_init): Removed prototypes.
13606 (grub_machine_init): Don't initialize the modules anymore.
13607 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13609 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13610 Macro undef removed.
13611 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13612 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13613 relocation `R_PPC_REL32'. Return an error when the relocation is
13615 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13616 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13617 * util/misc.c (grub_arch_sync_caches): Likewise.
13619 2004-12-19 Marco Gerards <metgerards@student.han.nl>
13621 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13622 `symlist.c', add `grubof_symlist.c'.
13623 (symlist.c): Variable removed.
13624 (grubof_HEADERS): Variable added.
13625 (grubof_symlist.c): New target.
13626 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13627 `kernel_img_HEADERS'.
13628 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13629 * kern/powerpc/dl.c: New file.
13630 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13632 (grub_arch_dl_relocate_symbols): Likewise.
13633 (grub_register_exported_symbols): Likewise.
13635 2004-12-13 Marco Gerards <metgerards@student.han.nl>
13637 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13638 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13639 to fail instead. Reported by Vincent Pelletier
13640 <subdino2004@yahoo.fr>.
13642 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13643 it is not allocated. Reported by Vincent Pelletier
13644 <subdino2004@yahoo.fr>.
13646 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13647 output so the output looks better.
13649 2004-12-04 Marco Gerards <metgerards@student.han.nl>
13651 Modulize the partition map support and add support for the amiga
13654 * commands/ls.c: Include <grub/partition.h> instead of
13655 <grub/machine/partition.h>.
13656 * kern/disk.c: Likewise.
13657 * kern/rescue.c: Likewise.
13658 * loader/i386/pc/chainloader.c: Likewise.
13659 * normal/cmdline.c: Likewise.
13660 * kern/powerpc/ieee1275/init.c: Likewise.
13661 (grub_machine_init): Call `grub_pc_partition_map_init',
13662 `grub_amiga_partition_map_init' and
13663 `grub_apple_partition_map_init'.
13664 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13665 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13666 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13667 `partition.h' and `pc_partition.h'.
13668 (grub_setup_SOURCES): Remove
13669 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13670 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13671 (grub_emu_SOURCES): Likewise.
13672 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13673 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13674 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13675 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13676 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13677 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13678 (grubof_SOURCES): Likewise.
13679 * disk/i386/pc/partition.c: File removed.
13680 * disk/powerpc/ieee1275/partition.c: Likewise.
13681 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13682 * include/grub/i386/pc/partition.h: Likewise.
13683 * kern/partition.c: New file.
13684 * partmap/amiga.c: Likewise.
13685 * partmap/apple.c: Likewise.
13686 * partmap/pc.c: Likewise.
13687 * include/grub/partition.h: Likewise..
13688 * include/grub/pc_partition.h: Likewise.
13689 * util/grub-emu.c: Include <grub/partition.h> instead of
13690 <grub/machine/partition.h>.
13691 (main): Call `grub_pc_partition_map_init',
13692 `grub_amiga_partition_map_init' and
13693 `grub_apple_partition_map_init' and deinitialize afterwards.
13694 * util/i386/pc/biosdisk.c: Include `#include
13695 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13696 `<grub/machine/partition.h>'.
13697 * util/i386/pc/grub-setup.c: Likewise.
13698 * util/i386/pc/biosdisk.c: Likewise.
13699 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13700 partition information in case of a PC partition.
13701 * util/i386/pc/grub-setup.c: Include `#include
13702 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13703 `<grub/machine/partition.h>'.
13704 (setup): Only access the PC specific partition information in case
13707 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
13709 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13710 (grub_longjmp): Likewise.
13711 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13713 * normal/powerpc/setjmp.S: New file.
13714 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13715 `normal/powerpc/setjmp.S'.
13716 (grubof_CFLAGS): Add `-DGRUBOF'.
13717 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13718 [GRUB_UTIL && !GRUBOF].
13720 2004-11-16 Marco Gerards <metgerards@student.han.nl>
13722 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13723 property named `name'. Correctly handle the error returned by
13724 `grub_ieee1275_finddevice' if a device can not be opened.
13726 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13728 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13729 `actual' for negativity.
13730 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13733 2004-11-01 Marco Gerards <metgerards@student.han.nl>
13735 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13736 (PAGE_OFFSET): New macro.
13737 (CRTC_ADDR_PORT): Likewise.
13738 (CRTC_DATA_PORT): Likewise.
13739 (START_ADDR_HIGH_REGISTER): Likewise.
13740 (START_ADDR_LOW_REGISTER): Likewise.
13741 (GRAPHICS_ADDR_PORT): Likewise.
13742 (GRAPHICS_DATA_PORT): Likewise.
13743 (READ_MAP_REGISTER): Likewise.
13744 (INPUT_STATUS1_REGISTER): Likewise.
13745 (INPUT_STATUS1_VERTR_BIT): Likewise.
13746 (page): New variable.
13747 (wait_vretrace): New function.
13748 (set_read_map): Likewise.
13749 (set_start_address): Likewise.
13750 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13752 (check_vga_mem): Take the page into account.
13753 (write_char): Likewise.
13754 (write_cursor): Likewise.
13755 (scroll_up): Likewise. Copy the page to the page that is not
13756 shown and switch between both pages.
13757 (grub_vga_putchar): Fix off by one error.
13758 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13761 2004-11-01 Marco Gerards <metgerards@student.han.nl>
13763 Add support for iso9660 (including rockridge).
13765 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13766 (iso9660_mod_SOURCES): New variable.
13767 (iso9660_mod_CFLAGS): Likewise.
13768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13769 * include/grub/fs.h (grub_iso9660_init): New prototype.
13770 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13771 * fs/iso9660.c: New file.
13773 * include/grub/misc.h (grub_strncat): New prototype.
13774 * kern/misc.c (grub_strncat): New function.
13776 * fs/hfs.c (grub_hfs_mount): Translate the error
13777 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13778 * fs/jfs.c (grub_jfs_mount): Likewise.
13779 * fs/ufs.c (grub_ufs_mount): Likewise.
13781 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13783 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13784 which initialized BAT registers.
13785 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13786 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13788 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13789 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13791 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13792 (grub_mapclaim): Likewise.
13793 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13794 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13797 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13799 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13800 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13801 -ffreestanding and -msoft-float.
13803 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13805 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13806 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13807 set in grub_ieee1275_flags.
13809 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13811 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13813 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13814 grub_console_init first.
13815 Change the memory range used for grub_ieee1275_claim and
13816 grub_mm_init_region.
13817 Print an error message if the claim fails.
13818 Include <grub/misc.h>.
13820 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13822 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13823 Call grub_children_iterate for device nodes of type `scsi',
13825 (grub_ofdisk_open): Remove manual device alias resolution.
13826 Fix memory leak when device cannot be opened.
13827 * include/grub/powerpc/ieee1275/ieee1275.h
13828 (grub_children_iterate): New prototype.
13829 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13831 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13832 Return -1 if args.size was -1.
13834 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13836 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13837 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13838 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13839 Open Firmware's memory for it; claim memory from _start to _end.
13840 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13841 (_end): New extern.
13842 (_start): Zero BSS from __bss_start to _end.
13843 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13845 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13847 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13849 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13850 -1 if args.base was -1.
13852 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13854 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13855 escape sequence instead of a literal ^L. Also call
13856 grub_ofconsole_gotoxy.
13858 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13860 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13861 void * arguments to grub_addr_t. All callers updated. Also make
13862 the `result' argument optional.
13863 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13864 All callers updated.
13866 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13868 * commands/ls.c (grub_ls_list_files): Use the string following the
13869 initial ')', if present, as the filesystem path.
13870 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13872 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13874 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13876 Make the source code of the menu interface more readable.
13878 * normal/menu.c: Include grub/mm.h.
13879 (TERM_WIDTH): New macro.
13880 (TERM_HEIGHT): Likewise.
13881 (TERM_INFO_HEIGHT): Likewise.
13882 (TERM_MARGIN): Likewise.
13883 (TERM_SCROLL_WIDTH): Likewise.
13884 (TERM_TOP_BORDER_Y): Likewise.
13885 (TERM_LEFT_BORDER_X): Likewise.
13886 (TERM_BORDER_WIDTH): Likewise.
13887 (TERM_MESSAGE_HEIGHT): Likewise.
13888 (TERM_BORDER_HEIGHT): Likewise.
13889 (TERM_NUM_ENTRIES): Likewise.
13890 (TERM_FIRST_ENTRY_Y): Likewise.
13891 (TERM_ENTRY_WIDTH): Likewise.
13892 (TERM_CURSOR_X): Likewise.
13893 (draw_border): Use macros instead of magic numbers.
13894 (print_entry): Likewise.
13895 (print_entries): Likewise.
13896 (run_menu): Likewise. Also, handle the key 'e'.
13897 (run_menu_entry): Ignore empty command lines.
13898 (print_message): Added a new argument EDIT. If EDIT is true,
13899 print a different message.
13900 (init_page): Likewise.
13901 (edit_menu_entry): New function. Not implemented yet.
13903 2004-09-17 Marco Gerards <metgerards@student.han.nl>
13905 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13906 can be loaded from normal mode.
13908 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13910 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13911 (multiboot_mod_CFLAGS): New variables.
13912 * loader/i386/pc/linux_normal.c: New file.
13913 * loader/i386/pc/multiboot_normal.c: Likewise.
13915 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13916 attribute `unused'.
13918 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13919 `fdiro' to read the mode information from instead of `diro'.
13921 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13922 looking up a symlink.
13924 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13926 * normal/command.c (grub_command_execute): Don't parse the
13927 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13928 flags of the command.
13930 * normal/menu.c (grub_menu_run): Fix typo.
13932 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13934 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13936 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13937 `y + 1' instead of `y - 1'.
13939 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
13941 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13943 From Hollis Blanchard <hollis@penguinppc.org>:
13944 * kern/misc.c (memmove): New alias for grub_memmove.
13945 (memcmp): New alias for grub_memcmp.
13946 (memset): New alias for grub_memset.
13947 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13948 Change "int handle" to "grub_ieee1275_phandle_t handle".
13949 * include/grub/powerpc/ieee1275/ieee1275.h
13950 (grub_ieee1275_get_property): Likewise.
13952 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13954 Added normal mode command `chainloader' as module chain.mod, which
13955 depends on normal.mod and _chain.mod.
13957 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13958 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13959 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13961 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13962 but arguments parsing moved to ...
13963 (grub_chainloader_cmd): ... here. New function.
13964 * include/grub/i386/pc/chainloader.h: New file.
13965 * loader/i386/pc/chainloader_normal.c: Likewise.
13967 2004-09-11 Marco Gerards <metgerards@student.han.nl>
13969 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13970 (grub_mkimage_LDFLAGS): Likewise.
13971 (grub_emu_SOURCES): Likewise.
13972 (kernel_img_HEADERS): Added fshelp.h.
13973 * fs/ext2.c: Include <grub/fshelp.h>.
13974 (FILETYPE_REG): New macro.
13975 (FILETYPE_INO_REG): Likewise.
13976 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13978 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13980 (grub_fshelp_node): New struct.
13981 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13983 (grub_ext2_get_file_block): Removed function.
13984 (grub_ext2_read_block): New function.
13985 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13986 This function was written.
13987 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13988 (grub_ext2_find_file): Removed function.
13989 (grub_ext2_read_symlink): New function.
13990 (grub_ext2_iterate_dir): Likewise.
13991 (grub_ext2_open): Rewritten.
13992 (grub_ext2_dir): Rewritten.
13993 * include/grub/fshelp.h: New file.
13994 * fs/fshelp.c: Likewise.
13996 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13998 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13999 (print_message): Add a missing newline.
14000 (run_menu): Added timeout support.
14001 (run_menu_entry): New local function.
14002 (grub_menu_run): Added support for booting.
14004 * kern/loader.c (grub_loader_is_loaded): New function.
14006 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14007 (grub_get_rtc): Exported.
14009 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14010 (grub_get_rtc): Exported.
14012 * include/grub/normal.h (struct grub_command_list): Remove
14013 constant from the member `command'.
14015 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14017 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14019 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14021 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14023 Add support for the JFS filesystem.
14025 * fs/jfs.c: New file.
14026 * include/grub/fs.h (grub_jfs_init): New prototype.
14027 (grub_jfs_fini): New prototype.
14028 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14029 (grub_emu_SOURCES): Likewise.
14030 (pkgdata_MODULES): Add jfs.mod.
14031 (jfs_mod_SOURCES): New variable.
14032 (jfs_mod_CFLAGS): Likewise.
14033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14034 (grubof_SOURCES): Likewise.
14035 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14037 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14038 endian to the host endian.
14039 (grub_fat_utf16_to_utf8): Move function from there...
14040 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14041 the endianness of the source string anymore.
14042 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14044 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14046 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14047 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14048 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14049 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14051 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14052 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14053 for `node_found' and `it_dir'.
14054 (grub_hfs_dir): Add prototype for `dir_hook'.
14056 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14057 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14058 and `indir32' to silence a gcc warning.
14060 * include/grub/fs.h (grub_hfs_init): New prototype.
14061 (grub_hfs_fini): Likewise.
14064 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14066 Each disk device has its own id now. This is useful to make use
14067 of multiple disk devices.
14069 * include/grub/disk.h (grub_disk_dev_id): New enum.
14070 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14071 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14073 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14074 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14076 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14077 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14079 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14080 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14082 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14083 "id" which is used by the cache manager.
14085 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14088 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14090 * fs/hfs.c: New file.
14091 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14092 (grub_emu_SOURCES): Likewise.
14093 (pkgdata_MODULES): Add hfs.mod.
14094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14095 (grubof_SOURCES): Likewise.
14096 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14098 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14099 * kern/misc.c (grub_strncasecmp): Add function.
14101 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14103 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14106 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14107 (grub_ext2_dir): In case the directory entry type is unknown, read
14110 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14112 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14113 grub_load_linux instead of grub_rescue_cmd_linux as second
14114 argument of grub_rescue_register_command.
14116 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14118 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14120 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14122 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14123 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14124 `loader/powerpc/ieee1275/linux.c',
14125 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14126 * include/grub/powerpc/ieee1275/ieee1275.h
14127 (grub_ieee1275_release): New prototype.
14128 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14129 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14130 normal, boot, linux and linux_normal.
14131 * loader/powerpc/ieee1275/linux.c: New file.
14132 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14134 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14136 * normal/arg.c (grub_arg_parse): Correct error handling after
14137 reallocating the argumentlist (check if `argl' is not null instead
14138 of checking if `args' is not null).
14139 * kern/mm.c (grub_realloc): Return the same pointer when using the
14140 same region, instead of returning the header address.
14142 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14144 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14145 one block instead of two when looking for the initial partition.
14146 (grub_partition_probe): Initialize the local variable `p' with 0.
14147 Use base 10 for the grub_strtoul call.
14148 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14149 need for one local variable.
14150 (grub_strtoul): Don't add the new value to `num', instead of that
14153 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14155 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14156 (pxeboot_img_SOURCES): New variable.
14157 (pxeboot_img_ASFLAGS): Likewise.
14158 (pxeboot_img_LDFLAGS): Likewise.
14159 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14160 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14161 <lode_leroy@hotmail.com>.
14163 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14165 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14166 there was no input.
14168 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14170 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14171 the history buffer logic.
14173 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14175 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14176 (FILETYPE_INO_SYMLINK): New macros.
14177 (grub_ext2_find_file): Check if the node is a directory using the
14178 inode stat information instead of using the filetype in the
14179 dirent. Exclude the first character of an absolute symlink.
14180 (grub_ext2_dir): Mask out the filetype part of the mode member of
14183 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14185 Add support for UFS version 1 and 2. Add support for the minix
14186 filesystem version 1 and 2, both the variants with 14 and 30 long
14189 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14191 (grub_emu_SOURCES): Likewise.
14192 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14193 (ufs_mod_SOURCES): New variable.
14194 (ufs_mod_CFLAGS): Likewise.
14195 (minix_mod_SOURCES): Likewise.
14196 (minix_mod_CFLAGS): Likewise.
14197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14199 (grubof_SOURCES): Likewise.
14200 * fs/ufs.c: New file.
14201 * fs/minix.c: New file.
14202 * include/grub/fs.h (grub_ufs_init): New prototype.
14203 (grub_ufs_fini): Likewise.
14204 (grub_minix_init): Likewise.
14205 (grub_minix_fini): Likewise.
14206 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14209 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14212 commands/ls.c, commands/terminal.c, commands/boot.c,
14213 commands/cmp.c and commands/cat.c.
14214 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14216 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14219 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14221 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14222 and grub_, respectively. Because the conversion is trivial and
14223 mechanical, I omit the details here. Please refer to the CVS
14224 if you need more information.
14226 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14228 * include/pupa: Renamed to ...
14229 * include/grub: ... this.
14230 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14231 * util/i386/pc/grub-mkimage.c: ... this.
14232 * util/i386/pc/pupa-setup.c: Renamed to ...
14233 * util/i386/pc/grub-setup.c: ... this.
14234 * util/pupa-emu.c: Renamed to ...
14235 * util/grub-emu.c: ... this.
14237 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14239 Add support for the newworld apple macintosh (PPC). This has been
14240 tested on the powerbook 2000 only. It only adds support for
14241 generic ieee1275 functions, console and disk support. This should
14242 be easy to port to other architectures with support for Open
14245 * configure.ac: Accept the powerpc as host_cpu. In the case of
14246 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14247 specific tests are only executed while building for the i386.
14248 Inverse test for crosscompile.
14249 * genmk.rb (Utility): Allow assembler files.
14250 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14251 * conf/powerpc-ieee1275.rmk: New file.
14252 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14253 * disk/powerpc/ieee1275/partition.c: Likewise.
14254 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14255 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14256 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14257 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14258 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14259 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14260 * include/pupa/powerpc/ieee1275/loader.h
14261 * include/pupa/powerpc/setjmp.h: Likewise.
14262 * include/pupa/powerpc/types.h: Likewise.
14263 * kern/powerpc/ieee1275/init.c: Likewise.
14264 * kern/powerpc/ieee1275/openfw.c: Likewise.
14265 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14267 These files were written by Johan Rydberg
14268 (jrydberg@night.trouble.net) and I only modified them slightly.
14270 * boot/powerpc/ieee1275/cmain.c: New file.
14271 * boot/powerpc/ieee1275/crt0.S: Likewise.
14272 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14273 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14275 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14277 * Makefile.in: Update copyright.
14278 * genmodsrc.sh: Likewise.
14279 * gensymlist.sh: Likewise.
14280 * term/i386/pc/vga.c: Indent correctly.
14282 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14283 bugreporting address.
14284 * util/i386/pc/pupa-setup.c (usage): Likewise,
14285 (main): Call pupa_ext2_init and pupa_ext2_fini.
14287 * fs/fat.c (log2): Renamed to ...
14288 (fat_log2): ... this.
14289 All callers changed.
14290 * kern/misc.c (memcpy): Alias to pupa_memmove.
14291 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14293 * util/console.c (pupa_ncurses_fini): Return 0.
14295 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14296 Move fail label here.
14297 [__GNU__]: Don't warn when using stat.
14298 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14299 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14300 long int. Use strtol instead of strtoul.
14302 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14304 * commands/boot.c: New file.
14305 * commands/cat.c: Likewise.
14306 * commands/cmp.c: Likewise.
14307 * commands/ls.c: Likewise.
14308 * commands/terminal.c: Likewise.
14309 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14310 (pupa_register_command): Changed interface to match the new
14312 (pupa_command_execute): Changed (almost rewritten) so it uses
14313 pupa_split_command. Added support for setting variables using the
14315 (rescue_command): Changed to work with the new argument parser.
14316 (terminal_command): Moved from here to commands/terminal.c.
14317 (set_command): New function.
14318 (unset_command): New function.
14319 (insmod_command): New function.
14320 (rmmod_command): New function.
14321 (lsmod_command): New function.
14322 (pupa_command_init): Don't initialize the command terminal
14323 anymore. Initialize the commands set, unset, insmod, rmmod and
14325 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14326 (kernel_img_HEADERS): Add arg.h and env.h.
14327 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14328 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14329 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14331 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14333 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14334 (boot_mod_SOURCES): New variable.
14335 (terminal_mod_SOURCES): Likewise.
14336 (ls_mod_SOURCES): Likewise.
14337 (cmp_mod_SOURCES): Likewise.
14338 (cat_mod_SOURCES): Likewise.
14340 * normal/arg.c: New file.
14341 * kern/env.c: Likewise.
14342 * include/pupa/arg.h: Likewise.
14343 * include/pupa/env.h: Likewise.
14344 * font/manager.c (font_command): Changed to match argument parsing
14346 (PUPA_MOD_INIT): Likewise.
14347 * hello/hello.c (pupa_cmd_hello): Likewise.
14348 (PUPA_MOD_INIT): Likewise.
14349 * include/pupa/disk.h: Include <pupa/device.h>.
14350 (pupa_print_partinfo): New prototype.
14351 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14352 (pupa_dl_get_prefix): Likewise.
14353 * include/pupa/misc.h: Include <pupa/err.h>.
14354 (pupa_isgraph): New prototype.
14355 (pupa_isdigit): Likewise.
14356 (pupa_split_cmdline): Likewise.
14357 * include/pupa/normal.h: Include <pupa/arg.h>.
14358 (pupa_command): Changed the prototype of the member `func' to
14359 match the argument parsing interface. Added member `options'.
14360 (pupa_register_command): Updated to match function.
14361 (pupa_arg_parse): New prototype.
14362 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14363 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14364 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14365 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14366 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14367 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14368 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14369 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14370 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14371 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14372 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14373 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14374 * kern/disk.c: Include <pupa/file.h>.
14375 (pupa_print_partinfo): New function.
14376 * kern/dl.c: Include <pupa/env.h>.
14377 (pupa_dl_dir): Variable removed.
14378 (pupa_dl_load): Use the environment variable `prefix' instead of
14379 the variable pupa_dl_dir.
14380 (pupa_dl_set_prefix): Function removed.
14381 (pupa_dl_get_prefix): Likewise.
14382 * kern/i386/pc/init.c: Include <pupa/env.h>.
14383 (pupa_machine_init): Use the environment variable `prefix' instead of
14384 using pupa_dl_set_prefix to set the prefix.
14385 * kern/main.c: Include <pupa/env.h>.
14386 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14387 using pupa_dl_get_prefix to get the prefix.
14388 * kern/misc.c: Include <pupa/env.h>.
14389 (pupa_isdigit): New function.
14390 (pupa_isgraph): Likewise.
14391 (pupa_ftoa): Likewise.
14392 (pupa_vsprintf): Added support for printing values of the type
14393 `double'. Make it possible to format variable output when using
14394 formatting like `%1.2%f'.
14395 (pupa_split_cmdline): New function.
14396 * kern/rescue.c: Include <pupa/env.h>.
14397 (next_word): Removed function.
14398 (pupa_rescue_cmd_prefix): Likewise.
14399 (pupa_rescue_cmd_set): New function.
14400 (pupa_rescue_cmd_unset): New function.
14401 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14402 split the command line instead of splitting it here. Added
14403 support for setting variables using the syntax `foo=bar'. Don't
14404 initialize the prefix command anymore. Initialized the set and
14406 * normal/cmdline.c: Include <pupa/env.h>.
14407 (pupa_tab_complete): Added prototypes for print_simple_completion,
14408 print_partition_completion, add_completion, iterate_commands,
14409 iterate_dev, iterate_part and iterate_dir. Moved code to print
14410 partition information from here to kern/disk.c.
14411 (pupa_cmdline_run): Don't check if the function exists anymore.
14412 * normal/main.c: Include <pupa/env.h>.
14413 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14414 instead of using pupa_dl_get_prefix to get the prefix.
14415 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14416 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14418 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14419 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14420 ((unused))' to silence a gcc warning.
14421 (pupa_vga_setcolor): Likewise.
14422 (debug_command): Changed to match argument parsing
14424 * util/pupa-emu.c: Include <pupa/env.h>.
14425 (options): Added 0's for unused fields to silence a gcc warning.
14427 (main): Use the environment variable `prefix' instead of using
14428 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14429 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14432 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14433 * util/misc.c: Include <malloc.h>.
14434 (pupa_malloc): Rewritten so errors are correctly reported.
14435 (pupa_realloc): Likewise.
14436 (pupa_memalign): Likewise.
14437 (pupa_mm_init_region): Declare unused variables with
14438 `__attribute__ ((unused))' to silence a gcc warning.
14439 * normal/i386/setjmp.S: Remove tab at the end of the file to
14440 silence a gcc warning.
14441 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14442 variables with `__attribute__ ((unused))' to silence a gcc
14444 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14445 local variable i unsigned to silence a gcc warning.
14447 * kern/term.c: Include <pupa/misc.h>.
14448 (pupa_more_lines): New variable.
14449 (pupa_more): Likewise.
14450 (pupa_putcode): When the pager is active pause at the end of every
14452 (pupa_set_more): New function.
14453 * include/pupa/term.h (pupa_set_more): New prototype.
14456 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14458 Now this project is GRUB 2 rather than PUPA. The location of
14459 the CVS repository was moved to GRUB's.
14461 * configure.ac: Use bug-grub as the reporting address.
14462 Use GRUB instead of PUPA.
14463 Change the version number to 1.90.
14465 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14467 * genkernsyms.sh: Updated copyright information.
14468 * genmk.rb: Likewise.
14469 * genmodsrc.sh: Likewise.
14470 * gensymlist.sh: Likewise.
14471 * boot/i386/pc/boot.S: Likewise.
14472 * boot/i386/pc/diskboot.S: Likewise.
14473 * disk/i386/pc/biosdisk.c: Likewise.
14474 * disk/i386/pc/partition.c: Likewise.
14475 * font/manager.c: Likewise.
14476 * fs/ext2.c: Likewise.
14477 * fs/fat.c: Likewise.
14478 * include/pupa/boot.h: Likewise.
14479 * include/pupa/device.h: Likewise.
14480 * include/pupa/disk.h: Likewise.
14481 * include/pupa/dl.h: Likewise.
14482 * include/pupa/elf.h: Likewise.
14483 * include/pupa/err.h: Likewise.
14484 * include/pupa/file.h: Likewise.
14485 * include/pupa/font.h: Likewise.
14486 * include/pupa/fs.h: Likewise.
14487 * include/pupa/kernel.h: Likewise.
14488 * include/pupa/loader.h: Likewise.
14489 * include/pupa/misc.h: Likewise.
14490 * include/pupa/mm.h: Likewise.
14491 * include/pupa/net.h: Likewise.
14492 * include/pupa/normal.h: Likewise.
14493 * include/pupa/rescue.h: Likewise.
14494 * include/pupa/setjmp.h: Likewise.
14495 * include/pupa/symbol.h: Likewise.
14496 * include/pupa/term.h: Likewise.
14497 * include/pupa/types.h: Likewise.
14498 * include/pupa/i386/setjmp.h: Likewise.
14499 * include/pupa/i386/types.h: Likewise.
14500 * include/pupa/i386/pc/biosdisk.h: Likewise.
14501 * include/pupa/i386/pc/boot.h: Likewise.
14502 * include/pupa/i386/pc/console.h: Likewise.
14503 * include/pupa/i386/pc/init.h: Likewise.
14504 * include/pupa/i386/pc/kernel.h: Likewise.
14505 * include/pupa/i386/pc/linux.h: Likewise.
14506 * include/pupa/i386/pc/loader.h: Likewise.
14507 * include/pupa/i386/pc/memory.h: Likewise.
14508 * include/pupa/i386/pc/multiboot.h: Likewise.
14509 * include/pupa/i386/pc/partition.h: Likewise.
14510 * include/pupa/i386/pc/time.h: Likewise.
14511 * include/pupa/i386/pc/vga.h: Likewise.
14512 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14513 * include/pupa/util/getroot.h: Likewise.
14514 * include/pupa/util/misc.h: Likewise.
14515 * include/pupa/util/resolve.h: Likewise.
14516 * kern/device.c: Likewise.
14517 * kern/disk.c: Likewise.
14518 * kern/dl.c: Likewise.
14519 * kern/err.c: Likewise.
14520 * kern/file.c: Likewise.
14521 * kern/fs.c: Likewise.
14522 * kern/loader.c: Likewise.
14523 * kern/main.c: Likewise.
14524 * kern/misc.c: Likewise.
14525 * kern/mm.c: Likewise.
14526 * kern/rescue.c: Likewise.
14527 * kern/term.c: Likewise.
14528 * kern/i386/dl.c: Likewise.
14529 * kern/i386/pc/init.c: Likewise.
14530 * kern/i386/pc/lzo1x.S: Likewise.
14531 * kern/i386/pc/startup.S: Likewise.
14532 * loader/i386/pc/chainloader.c: Likewise.
14533 * loader/i386/pc/linux.c: Likewise.
14534 * loader/i386/pc/multiboot.c: Likewise.
14535 * normal/cmdline.c: Likewise.
14536 * normal/command.c: Likewise.
14537 * normal/main.c: Likewise.
14538 * normal/menu.c: Likewise.
14539 * normal/i386/setjmp.S: Likewise.
14540 * term/i386/pc/console.c: Likewise.
14541 * term/i386/pc/vga.c: Likewise.
14542 * util/console.c: Likewise.
14543 * util/genmoddep.c: Likewise.
14544 * util/misc.c: Likewise.
14545 * util/pupa-emu.c: Likewise.
14546 * util/resolve.c: Likewise.
14547 * util/unifont2pff.rb: Likewise.
14548 * util/i386/pc/biosdisk.c: Likewise.
14549 * util/i386/pc/getroot.c: Likewise.
14550 * util/i386/pc/pupa-mkimage.c: Likewise.
14551 * util/i386/pc/pupa-setup.c: Likewise.
14553 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14555 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14556 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14557 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14558 reading and reset it after reading.
14559 (pupa_ext2_close): Return PUPA_ERR_NONE.
14561 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14563 (struct linux_kernel_header): Add kernel_version and
14565 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14566 pupa_file_read succeeds.
14567 (pupa_rescue_cmd_initrd): Implement.
14569 2003-12-03 Marco Gerards <metgerards@student.han.nl>
14571 * fs/ext2.c (pupa_ext2_label): New function.
14572 (pupa_ext2_fs): Added label.
14573 * fs/fat.c (pupa_fat_label): New function.
14574 (pupa_fat_fs): Added label.
14575 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14577 * kern/misc.c (pupa_strndup): New function.
14578 * include/pupa/misc.h (pupa_strndup): New prototype.
14580 * include/pupa/normal.h: Include <pupa/err.h>.
14581 (pupa_set_history): New prototype.
14582 (pupa_iterate_commands): New prototype.
14583 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14584 <pupa/disk.h>, <pupa/file.h>.
14585 (hist_size): New variable.
14586 (hist_lines): Likewise.
14587 (hist_end): Likewise.
14588 (hist_used): Likewise.
14589 (pupa_set_history): New function.
14590 (pupa_history_get): Likewise.
14591 (pupa_history_add): Likewise.
14592 (pupa_history_replace): Likewise.
14593 (pupa_tab_complete): Likewise.
14594 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14595 completion shows partitionnames while completing partitions, this
14596 feature was suggested by Jeff Bailey.
14597 * normal/command.c (pupa_iterate_commands): New function.
14598 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14599 (pupa_normal_init): Initialize history buffer.
14600 (PUPA_MOD_INIT): Likewise.
14601 (pupa_normal_fini): Free the history buffer.
14602 (PUPA_MOD_FINI): Likewise.
14604 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14607 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14608 * configure.ac [i386]: Check for regparam bug.
14609 (NESTED_FUNC_ATTR) [! i386]: Defined.
14611 2003-11-17 Marco Gerards <metgerards@student.han.nl>
14613 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14614 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14615 (pupa_emu_SOURCES): New variable.
14616 (pupa_emu_LDFLAGS): Likewise.
14617 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14618 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14619 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14620 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14621 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14622 (pupa_jmp_buf): New typedef.
14623 (pupa_setjmp) [PUPA_UTIL]: New macro.
14624 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14625 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14626 (pupa_refresh): New prototype.
14627 * include/pupa/util/getroot.h: New file.
14628 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14630 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14631 (pupa_rescue_cmd_cat): Likewise.
14632 (pupa_rescue_cmd_ls): Likewise.
14633 (pupa_rescue_cmd_testload): Likewise.
14634 (pupa_rescue_cmd_lsmod): Likewise.
14635 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14636 * normal/menu.c (run_menu): Likewise.
14637 * kern/term.c (pupa_cls): Likewise.
14638 (pupa_refresh): New function.
14639 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14640 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14641 * util/console.c: New file.
14643 * util/i386/pc/getroot.c: New file.
14644 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14645 (pupa_putchar): New function.
14646 (pupa_refresh): Likewise.
14647 (xgetcwd): Function moved to ...
14648 (strip_extra_slashes): Likewise.
14649 (get_prefix): Likewise.
14650 * util/i386/pc/getroot.c: ... here.
14651 (find_root_device): Function moved and renamed to...
14652 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14653 Changed all callers.
14654 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14656 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14657 Changed all callers.
14658 * util/misc.c (pupa_memalign): New function.
14659 (pupa_mm_init_region): Likewise.
14660 (pupa_register_exported_symbols): Likewise.
14661 (pupa_putchar): Function removed.
14662 * util/pupa-emu.c: New file.
14664 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14666 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14667 (_multiboot_mod_SOURCES): New variable.
14668 (_multiboot_mod_CFLAGS): Likewise.
14669 * loader/i386/pc/multiboot.c: New file.
14670 * include/pupa/i386/pc/multiboot.h: Likewise.
14671 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14672 (pupa_multiboot_real_boot): New function.
14673 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14674 (pupa_multiboot_real_boot): New prototype.
14675 (pupa_rescue_cmd_multiboot): Likewise
14676 (pupa_rescue_cmd_module): Likewise.
14678 * kern/loader.c (pupa_loader_set): Continue when
14679 pupa_loader_unload_func() fails.
14680 (pupa_loader_unset): New function.
14681 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14683 * kern/misc.c (pupa_stpcpy): New function.
14684 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14686 2003-11-12 Marco Gerards <metgerards@student.han.nl>
14688 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14689 for available extensions.
14691 * include/pupa/i386/pc/time.h: New file.
14692 * kern/disk.c: Include <pupa/machine/time.h>.
14693 (PUPA_CACHE_TIMEOUT): New macro.
14694 (pupa_last_time): New variable.
14695 (pupa_disk_open): Flush the cache when there was a timeout.
14696 (pupa_disk_close): Reset the timer.
14697 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14699 * util/misc.c: Include <sys/times.h>
14700 (pupa_get_rtc): New function.
14702 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14704 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14706 (pupa_ext2_get_file_block): Use blocks member.
14708 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14709 first block. Return -1 instead of pupa_errno on error.
14711 2003-10-27 Marco Gerards <metgerards@student.han.nl>
14713 * README: In the pupa-mkimage example use _chain instead of chain
14714 and ext2 instead of fat.
14715 * TODO: Replace ext2fs with jfs as an example. Add an item for
14716 adding journal playback for ext2fs.
14717 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14718 (pkgdata_MODULES): Added ext2.mod.
14719 (ext2_mod_SOURCES): New variable.
14720 (ext2_mod_CFLAGS): Likewise.
14721 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14722 * include/pupa/misc.h (pupa_strncpy): New prototype.
14723 (pupa_strcat): Likewise.
14724 (pupa_strncmp): Likewise.
14725 * kern/misc.c (pupa_strcat): Enable function.
14726 (pupa_strncpy): New function.
14727 (pupa_strncmp): Likewise.
14728 * fs/ext2.c: New file.
14730 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14731 when the read failed before retrying.
14732 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14733 (_FILE_OFFSET_BITS): Likewise.
14734 * configure.ac: Added AC_SYS_LARGEFILE.
14736 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14738 * genmk.rb (PModule#rule): Make sure to get only symbol names
14739 from the output of nm.
14740 Reported by Robert Millan <zeratul2@wanadoo.es>.
14742 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14744 I forgot to check in these changes for a long time. This adds
14745 incomplete support for VGA console, and this is still very
14746 buggy. Also, a lot of consideration is required for I18N,
14747 UNICODE, and VGA font issues. Therefore, assume that this is
14748 such that "better than nothing".
14750 * font/manager.c: New file.
14751 * include/pupa/font.h: Likewise.
14752 * include/pupa/i386/pc/vga.h: Likewise.
14753 * term/i386/pc/vga.c: Likewise.
14754 * util/unifont2pff.rb: Likewise.
14756 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14757 (pkgdata_MODULES): Added vga.mod and font.mod.
14758 (vga_mod_SOURCES): New variables.
14759 (vga_mod_CFLAGS): Likewise.
14760 (font_mod_SOURCES): Likewise.
14761 (font_mod_CFLAGS): Likewise.
14763 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14765 * include/pupa/term.h: Include pupa/err.h.
14766 (struct pupa_term): Added init and fini.
14767 Changed the argument of putchar to pupa_uint32_t.
14769 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14770 (pupa_console_real_putchar): New prototype.
14771 (pupa_console_putchar): Removed.
14772 (pupa_console_checkkey): Exported.
14773 (pupa_console_getkey): Likewise.
14775 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14778 * kern/term.c (pupa_term_set_current): Rewritten.
14779 (pupa_putchar): Likewise.
14780 (pupa_putcode): New function.
14782 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14783 (pupa_console_real_putchar): ... this.
14784 (pupa_vga_set_mode): New function.
14785 (pupa_vga_get_font): Likewise.
14787 * normal/command.c: Include pupa/term.h.
14788 (terminal_command): New function.
14789 (pupa_command_init): Register the command "terminal".
14791 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14792 (DISP_UP): Likewise.
14793 (DISP_RIGHT): Likewise.
14794 (DISP_DOWN): Likewise.
14795 (DISP_HLINE): Likewise.
14796 (DISP_VLINE): Likewise.
14797 (DISP_UL): Likewise.
14798 (DISP_UR): Likewise.
14799 (DISP_LL): Likewise.
14800 (DISP_LR): Likewise.
14802 * term/i386/pc/console.c (pupa_console_putchar): New function.
14804 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14806 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14807 FIX. Reverse the path_list.
14809 * include/pupa/normal.h: Export pupa_register_command and
14810 pupa_unregister_command.
14812 * hello/hello.c (pupa_cmd_hello): New module.
14813 * conf/i386-pc.rmk: Added hello.mod.
14815 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14817 * kern/i386/pc/lzo1x.S: New file.
14819 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14820 (compress_kernel): New variable.
14821 (generate_image): Heavily modified to support compressing a
14822 large part of the core image.
14824 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14826 (pupa_util_load_image): New function.
14828 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14829 (pupa_compressed_size): New variable.
14830 (codestart): Enable Gate A20 here.
14831 Decompress the compressed part of the core image.
14832 Rearrange the code to put functions and variables which are
14833 required for initialization in the non-compressed part.
14836 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14839 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14841 * include/pupa/i386/pc/kernel.h
14842 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14843 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14844 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14845 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14846 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14848 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14850 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14851 (Utility#rule): Likewise.
14853 * configure.ac: Check if LZO is available.
14855 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14857 * include/pupa/normal.h: New file.
14858 * include/pupa/setjmp.h: Likewise.
14859 * include/pupa/i386/setjmp.h: Likewise.
14860 * normal/cmdline.c: Likewise.
14861 * normal/command.c: Likewise.
14862 * normal/main.c: Likewise.
14863 * normal/menu.c: Likewise.
14864 * normal/i386/setjmp.S: Likewise.
14866 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14867 (pupa_rescue_cmd_initrd): Likewise.
14869 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14872 * kern/i386/pc/startup.S (translation_table): New variable.
14873 (translate_keycode): New function.
14874 (pupa_console_getkey): Call translate_keycode.
14876 * kern/rescue.c (attempt_normal_mode): New function.
14877 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14878 it failed, print a message.
14880 * kern/mm.c (pupa_real_malloc): Print more information when a
14881 free magic is broken.
14882 (pupa_free): If the first free header is not free actually, set
14885 * kern/main.c (pupa_load_normal_mode): Just load the module
14887 (pupa_main): Don't print the message
14888 "Entering into rescue mode..." here.
14890 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14892 (pupa_rescue_cmd_initrd): Likewise.
14893 (pupa_rescue_cmd_initrd): Likewise.
14895 * include/pupa/symbol.h (FUNCTION): Specify the type.
14896 (VARIABLE): Likewise.
14898 * include/pupa/err.h (pupa_err_t): Added
14899 PUPA_ERR_UNKNOWN_COMMAND.
14901 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14902 (pupa_dl_get_prefix): Likewise.
14904 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14905 Added _chain.mod and _linux.mod instead of chain.mod and
14907 (chain_mod_SOURCES): Renamed to ...
14908 (_chain_mod_SOURCES): ... this.
14909 (chain_mod_CFLAGS): Renamed to ...
14910 (_chain_mod_CFLAGS): ... this.
14911 (linux_mod_SOURCES): Renamed to ...
14912 (_linux_mod_SOURCES): ... this.
14913 (linux_mod_CFLAGS): Renamed to ...
14914 (_linux_mod_CFLAGS): ... this.
14915 (normal_mod_SOURCES): New variable.
14916 (normal_mod_CFLAGS): Likewise.
14917 (normal_mod_ASFLAGS): Likewise.
14919 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14921 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14924 * kern/dl.c (pupa_dl_ref): Refer depending modules
14926 (pupa_dl_unref): Unrefer depending modules recursively.
14927 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14928 a module is unloaded before one depending on that module is
14930 (pupa_dl_unload): Unload depending modules explicitly,
14933 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14935 * include/pupa/i386/pc/linux.h: New file.
14936 * loader/i386/pc/linux.c: Likewise.
14938 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14940 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14941 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14942 of PUPA_CHAINLOADER_BOOT_SECTOR.
14944 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14945 (pupa_linux_prot_size): New variable.
14946 (pupa_linux_tmp_addr): Likewise.
14947 (pupa_linux_real_addr): Likewise.
14948 (pupa_linux_boot_zimage): New function.
14949 (pupa_linux_boot_bzimage): Likewise.
14951 * kern/i386/pc/init.c (struct mem_region): New structure.
14952 (MAX_REGIONS): New macro.
14953 (mem_regions): New variable.
14954 (num_regions): Likewise.
14955 (pupa_os_area_addr): Likewise.
14956 (pupa_os_area_size): Likewise.
14957 (pupa_lower_mem): Likewise.
14958 (pupa_upper_mem): Likewise.
14959 (add_mem_region): New function.
14960 (compact_mem_regions): Likewise.
14961 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14962 the size of the conventional memory and that of so-called upper
14963 memory (before the first memory hole).
14964 Instead of adding each found region to free memory, use
14965 add_mem_region and add them after removing overlaps.
14966 Also, add only 1/4 of the upper memory to free memory. The rest
14967 is used for loading OS images. Maybe this is ad hoc, but this
14968 makes it much easier to relocate OS images when booting.
14970 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14971 (pupa_enter_rescue_mode): Don't register initrd and module.
14973 * kern/mm.c: Include pupa/dl.h.
14975 * kern/main.c: Include pupa/file.h and pupa/device.h.
14977 * kern/loader.c (pupa_loader_load_module_func): Removed.
14978 (pupa_loader_load_module): Likewise.
14980 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14983 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14984 (pupa_linux_tmp_addr): Likewise.
14985 (pupa_linux_real_addr): Likewise.
14986 (pupa_linux_boot_zimage): Likewise.
14987 (pupa_linux_boot_bzimage): Likewise.
14989 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14990 (pupa_upper_mem): Likewise.
14991 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14992 module is too dangerous.
14994 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14995 (pupa_os_area_size): Likewise.
14996 (pupa_loader_set): Remove the first argument. Loader doesn't
14997 manage modules or initrd any longer.
14998 (pupa_loader_load_module): Removed.
15000 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15001 (linux_mod_SOURCES): New variable.
15002 (linux_mod_CFLAGS): Likewise.
15004 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15006 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15007 the length of a blocklist correctly.
15009 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15010 Use ioctl only if the OS file is a block device.
15011 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15012 not very useful for normal files.
15014 * kern/main.c (pupa_set_root_dev): New function.
15015 (pupa_load_normal_mode): Likewise.
15016 (pupa_main): Call those above.
15018 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15021 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15023 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15025 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15026 (setup): Configure the installed partition information and the
15029 * loader/i386/pc/chainloader.c (my_mod): New variable.
15030 (pupa_chainloader_unload): New function.
15031 (pupa_rescue_cmd_chainloader): Refer itself.
15032 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15034 * kern/i386/pc/startup.S (install_partition): Removed.
15035 (version_string): Likewise.
15036 (config_file): Likewise.
15037 (pupa_install_dos_part): New variable.
15038 (pupa_install_bsd_part): Likewise.
15039 (pupa_prefix): Likewise.
15040 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15042 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15044 (make_install_device): New function.
15045 (pupa_machine_init): Set the dl prefix.
15047 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15048 (buf): Renamed to ...
15049 (linebuf): ... this.
15050 (pupa_rescue_cmd_prefix): New function.
15051 (pupa_rescue_cmd_insmod): Likewise.
15052 (pupa_rescue_cmd_rmmod): Likewise.
15053 (pupa_rescue_cmd_lsmod): Likewise.
15054 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15057 * kern/mm.c (pupa_memalign): If failed even after invalidating
15058 disk caches, unload unneeded modules and retry.
15060 * kern/misc.c (pupa_memmove): New function.
15061 (pupa_memcpy): Removed.
15062 (pupa_strcpy): New function.
15063 (pupa_itoa): Made static.
15065 * kern/dl.c (pupa_dl_iterate): New function.
15066 (pupa_dl_ref): Likewise.
15067 (pupa_dl_unref): Likewise.
15068 (pupa_dl_unload): Return if succeeded or not.
15069 (pupa_dl_unload_unneeded): New function.
15070 (pupa_dl_unload_all): Likewise.
15071 (pupa_dl_init): Renamed to ...
15072 (pupa_dl_set_prefix): ... this.
15073 (pupa_dl_get_prefix): New function.
15075 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15076 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15077 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15078 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15079 (pupa_install_dos_part): Declared.
15080 (pupa_install_bsd_part): Likewise.
15081 (pupa_prefix): Likewise.
15082 (pupa_boot_drive): Likewise.
15084 * include/pupa/types.h: Fix a typo.
15086 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15088 (pupa_memmove): Declared.
15089 (pupa_strcpy): Likewise.
15091 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15092 pupa_mod_init takes one argument, its own module.
15093 (pupa_dl_unload_unneeded): Declared.
15094 (pupa_dl_unload_all): Likewise.
15095 (pupa_dl_ref): Likewise.
15096 (pupa_dl_unref): Likewise.
15097 (pupa_dl_iterate): Likewise.
15098 (pupa_dl_init): Renamed to ...
15099 (pupa_dl_set_prefix): ... this.
15100 (pupa_dl_get_prefix): Declared.
15102 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15103 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15105 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15106 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15108 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15109 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15111 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15113 * util/i386/pc/pupa-setup.c (setup): Define the internal
15114 function find_first_partition_start at the top level, because GCC
15115 3.0.x cannot compile internal functions in deeper scopes
15117 (find_root_device): Use lstat instead of stat.
15118 Don't follow symbolic links.
15119 Fix the path-constructing code.
15121 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15122 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15123 by a BLKGETSIZE ioctl first, because block devices don't fill
15124 the member st_mode of the structure stat on Linux.
15125 [__linux__] (linux_find_partition): Use a temporary buffer
15126 REAL_DEV for the working space. Copy it to DEV before returning.
15127 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15128 buffer cache consistent.
15129 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15130 strncmp. The previous value was merely wrong.
15131 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15133 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15134 FAT size is 12. The previous value was merely wrong.
15136 * kern/main.c (pupa_main): Don't split the starting message from
15139 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15140 LF, because BIOS goes crazy about character attributes in this
15143 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15145 * include/i386/pc/util/biosdisk.h: New file.
15146 * util/i386/pc/biosdisk.c: Likewise.
15147 * util/i386/pc/pupa-setup.c: Likewise.
15149 * Makefile.in (INCLUDE_DISTFILES): Added
15150 include/pupa/i386/pc/util/biosdisk.h.
15151 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15152 directory util/i386/pc.
15153 (install-local): Added a rule for sbin_UTILITIES.
15154 (uninstall): Likewise.
15156 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15158 * util/misc.c (xrealloc): New function.
15159 (pupa_malloc): Likewise.
15160 (pupa_free): Likewise.
15161 (pupa_realloc): Likewise.
15162 (pupa_stop): Likewise.
15163 (pupa_putchar): Likewise.
15165 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15167 * include/pupa/util/misc.h (xrealloc): Declared.
15169 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15171 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15172 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15174 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15175 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15177 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15178 way should be implemented.
15179 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15181 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15182 the size of NAME for safety.
15183 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15186 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15187 (pupa_setup_SOURCES): Likewise.
15189 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15191 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15193 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15194 bunch of pushl's from pusha, because this destroys the return
15197 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15199 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15200 This means that any missing prototypes could be fatal. Also, you
15201 must take care when writing assembly code. See the comments at
15202 the beginning of startup.S, for more details.
15204 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15205 compilation mechanism.
15206 (pupa_chainloader_real_boot): Likewise.
15207 (pupa_biosdisk_rw_int13_extensions): Likewise.
15208 (pupa_biosdisk_rw_standard): Likewise.
15209 (pupa_biosdisk_check_int13_extensions): Likewise.
15210 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15211 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15212 (pupa_get_memsize): Likewise.
15213 (pupa_get_mmap_entry): Likewise.
15214 (pupa_console_putchar): Likewise.
15215 (pupa_console_setcursor): Likewise.
15216 (pupa_getrtsecs): Use pushl instead of push.
15218 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15219 memory instead of the stack for a mmap entry, because some
15220 BIOSes may ignore the maximum size and overflow.
15222 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15224 * genmk.rb (PModule#rule): Compile automatically generated
15225 sources with module-specific CFLAGS as well as other sources.
15227 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15229 * configure.ac: Check ld.
15230 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15231 respectively, before checking endianness and sizes.
15233 * Makefile.in (LD): New variable.
15235 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15237 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15239 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15241 * Changelog: New file.