1 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
3 * util/getroot.c (find_root_device): Add support for MacOSX.
4 * util/hostdisk.c: Likewise.
6 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
8 * font/font.c (find_glyph): Check whether a font is present to avoid
11 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
13 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
15 2009-07-20 Pavel Roskin <proski@gnu.org>
17 * configure.ac: Trim excessively wordy excuses.
19 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
21 Add symlink, mtime and label support to AtheFS.
23 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
24 (grub_afs_iterate_dir): Handle symlinks.
25 (grub_afs_open): Use grub_afs_read_symlink.
26 (grub_afs_dir): Likewise.
28 (grub_afs_label): New function.
29 (grub_afs_fs): Add grub_afs_label.
30 (grub_afs_read_symlink): New function.
32 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
36 * fs/afs.c: Fix comments style.
37 (grub_afs_blockrun): Declare as packed.
38 (grub_afs_datastream): Likewise.
39 (grub_afs_bnode): Likewise.
40 (grub_afs_btree): Likewise.
41 (grub_afs_sblock): Likewise.
42 Declare `name' as char.
43 (grub_afs_inode): Declare as packed.
44 Change void *vnode to grub_uint32_t unused.
45 (grub_afs_iterate_dir): Check that key_size is positive.
46 (grub_afs_mount): Don't read superblock twice.
47 (grub_afs_dir): Don't free node in case of error,
48 grub_fshelp_find_file already handles this.
49 (grub_afs_open): Likewise.
51 2009-07-19 Pavel Roskin <proski@gnu.org>
53 * Makefile.in: Remove LIBLZO and enable_lzo.
54 * conf/i386-pc.rmk: Remove lzo support.
55 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
56 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
58 * kern/i386/pc/lzo1x.S: Remove.
59 * kern/i386/pc/startup.S: Remove lzo support.
60 * util/i386/pc/grub-mkimage.c: Likewise.
62 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
64 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
65 * fs/xfs.c (grub_xfs_dir): Likewise.
66 * fs/afs.c (grub_afs_dir): Likewise.
67 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
68 (grub_iso9660_open): Likewise.
69 * fs/jfs.c (grub_jfs_open): Likewise.
70 * fs/ext2.c (grub_ext2_dir): Likewise.
71 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
72 * script/sh/lexer.c (grub_script_yylex): Likewise.
74 2009-07-16 Pavel Roskin <proski@gnu.org>
76 * configure.ac: Never add "-c" to CFLAGS.
78 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
80 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
81 grub_cv_cc_efiemu should be used.
83 * configure.ac: Typo fixes.
85 * kern/mm.c (grub_zalloc): New function.
86 (grub_debug_zalloc): Likewise.
87 * include/grub/mm.h: Declare grub_zalloc() and
89 * util/misc.c (grub_zalloc): New function.
90 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
91 instead of grub_malloc(), remove unneeded initializations.
92 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
93 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
94 * commands/parttool.c (grub_cmd_parttool): Likewise.
95 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
96 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
97 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
98 * disk/usbms.c (grub_usbms_finddevs): Likewise.
99 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
100 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
101 (grub_cmd_efiemu_pnvram): Likewise.
102 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
103 * fs/iso9660.c (grub_iso9660_mount): Likewise.
104 (grub_iso9660_iterate_dir): Likewise.
105 * fs/jfs.c (grub_jfs_opendir): Likewise.
106 * fs/ntfs.c (list_file): Likewise.
107 (grub_ntfs_mount): Likewise.
108 * kern/disk.c (grub_disk_open): Likewise.
109 * kern/dl.c (grub_dl_load_core): Likewise.
110 * kern/elf.c (grub_elf_file): Likewise.
111 * kern/env.c (grub_env_context_open): Likewise.
112 (grub_env_set): Likewise.
113 (grub_env_set_data_slot): Likewise.
114 * kern/file.c (grub_file_open): Likewise.
115 * kern/fs.c (grub_fs_blocklist_open): Likewise.
116 * loader/i386/multiboot.c (grub_module): Likewise.
117 * loader/xnu.c (grub_xnu_create_key): Likewise.
118 (grub_xnu_create_value): Likewise.
119 * normal/main.c (grub_normal_add_menu_entry): Likewise.
120 (read_config_file): Likewise.
121 * normal/menu_entry.c (make_screen): Likewise.
122 * partmap/sun.c (sun_partition_map_iterate): Likewise.
123 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
124 * script/sh/script.c (grub_script_parse): Likewise.
125 * video/bitmap.c (grub_video_bitmap_create): Likewise.
126 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
127 * video/readers/png.c (grub_png_output_byte): Likewise.
128 (grub_video_reader_png): Likewise.
130 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
132 Enable all targets that can be built by default
134 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
135 grub-mkfont and grub-fstest if they can be built
137 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
139 Fix hang and segmentation fault in grub-emu-usb
141 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
142 * util/usb.c (grub_libusb_devices): likewise
143 (grub_libusb_init): rename to ...
144 (GRUB_MOD_INIT (libusb)):...this
145 (grub_libusb_fini): rename to ..
146 (GRUB_MOD_FINI (libusb)):...this
147 * disk/usbms.c (grub_usbms_transfer): fix retry logic
148 * include/grub/disk.h (grub_raid_init): removed, it's useless
149 (grub_raid_fini): likewise
150 (grub_lvm_init): likewise
151 (grub_lvm_fini): likewise
152 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
155 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
159 * Makefile.in (LIBUSB): new macro
160 * genmk.rb (Utility/print_tail): new method
161 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
162 (top level): call util.print_tail at the end.
164 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
166 Make FreeBSD accept zpool.cache
168 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
169 type is /boot/zfs/zpool.cache
171 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
175 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
176 correct wrong typedef
177 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
179 2009-07-15 Pavel Roskin <proski@gnu.org>
181 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
182 * kern/disk.c (struct grub_disk_cache): Likewise.
184 * commands/probe.c (options): Typo fix.
186 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
187 Increase to 0x5a to accommodate FAT32. Adjust other offsets
189 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
191 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
192 the end of "Error" to make the message more readable.
194 * boot/i386/pc/boot.S (kernel_segment): Remove.
195 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
198 * boot/i386/pc/boot.S (boot_version): Remove.
199 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
202 * include/grub/i386/pc/boot.h: Sort all offsets.
203 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
204 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
205 * boot/i386/pc/boot.S: Assert location of every offset listed in
206 include/grub/i386/pc/boot.h.
208 2009-07-13 Pavel Roskin <proski@gnu.org>
210 * include/grub/i386/coreboot/machine.h: Rename
211 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
212 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
213 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
215 * kern/dl.c: Force native word size to suppress warnings when
218 * kern/device.c (grub_device_iterate): Change struct part_ent to
219 hold the name, not a pointer to it. Use one grub_malloc() per
220 partition, not two. Free partition_name if grub_malloc() fails.
221 Set ents to NULL only before grub_partition_iterate() is called.
223 2009-07-11 Bean <bean123ch@gmail.com>
225 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
228 2009-07-10 Bean <bean123ch@gmail.com>
229 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
231 * kern/ieee1275/openfw.c (grub_children_iterate)
232 (grub_devalias_iterate): Fix size evaluation for property or path
233 strings, which was broken since r2132.
235 2009-07-07 Pavel Roskin <proski@gnu.org>
237 * commands/search.c (search_file): Merge into ...
238 (search_fs): ... this. Accept search type as argument.
239 (grub_cmd_search): Pass search type to search_fs().
241 * include/grub/util/console.h: New file.
242 * util/console.c: Use it instead of grub/machine/console.h.
243 * util/grub-emu.c: Likewise.
245 * lib/arg.c (find_long_option): Remove.
246 (find_long): Add `len' argument, make `s' const char *.
247 (grub_arg_parse): Parse long options in place, not in a
250 2009-07-06 Pavel Roskin <proski@gnu.org>
252 * commands/search.c (search_fs): Fix potential NULL pointer
255 * commands/search.c (search_fs): Replace QUID macro with quid_fn
258 2009-07-06 Daniel Mierswa <impulze@impulze.org>
260 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
263 2009-07-05 Pavel Roskin <proski@gnu.org>
265 * include/grub/i386/linux.h (struct linux_kernel_params):
266 Restore padding3, it's still needed.
268 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
270 * util/osdetect.lua: Likewise.
272 2009-07-05 Bean <bean123ch@gmail.com>
274 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
276 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
277 (grub_lua_getenv): Likewise.
278 (grub_lua_setenv): Likewise.
279 (save_errno): New function.
280 (push_result): Likewise.
281 (grub_lua_enum_device): Likewise.
282 (grub_lua_enum_file): Likewise.
283 (grub_lua_file_open): Likewise.
284 (grub_lua_file_close): Likewise.
285 (grub_lua_file_seek): Likewise.
286 (grub_lua_file_read): Likewise.
287 (grub_lua_file_getline): Likewise.
288 (grub_lua_file_getsize): Likewise.
289 (grub_lua_file_getpos): Likewise.
290 (grub_lua_file_eof): Likewise.
291 (grub_lua_file_exist): Likewise.
292 (grub_lua_add_menu): Likewise.
294 * script/lua/grub_lua.h (isupper): New inline function.
297 (isxdigit): Likewise.
298 (strcspn): Change to normal function.
299 (strpbkr): New function declaration.
302 * script/lua/grub_main.c (scan_str): New function.
307 * script/lua/linit.c (lualibs): Enable the string library.
309 * util/osdetect.lua: New file.
311 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
313 * include/grub/i386/linux.h (struct linux_kernel_params): Add
314 `capabilities' member.
316 2009-07-02 Pavel Roskin <proski@gnu.org>
318 * genparttoollist.sh: Add missing newline at the end.
320 2009-07-01 Pavel Roskin <proski@gnu.org>
322 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
324 * util/hostdisk.c (open_device): Remove `const' from
325 `sysctl_size', as sysctlbyname() can change it (in this case it
326 doesn't actually happen).
328 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
329 using signed long int constants.
331 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
332 constant to avoid a warning on FreeBSD.
334 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
337 * Makefile.in: Install include/grub/machine symlink.
339 * Makefile.in: When installing symlinks, use "cp -fR", which
340 works on FreeBSD and MacOSX.
341 From Yves Blusseau <cl7m42e02@sneakemail.com>
343 * kern/dl.c (grub_dl_resolve_symbol): Make static.
344 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
346 * util/misc.c: Move grub_reboot() and grub_halt() ...
347 * util/grub-emu.c: ... here. Make main_env static.
348 * include/grub/util/misc.h: Remove main_env.
350 * kern/mm.c: Use correct format to print size_t.
352 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
353 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
354 * kern/powerpc/dl.c: Likewise.
355 * kern/sparc64/dl.c: Likewise.
356 * kern/x86_64/dl.c: Likewise.
358 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
360 Fix grub-emu build on sparc64-ieee1275.
362 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
363 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
365 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
367 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
368 (grub_reboot, grub_halt): New functions.
370 * util/i386/pc/misc.c: Delete. Update all users.
371 * util/sparc64/ieee1275/misc.c: Likewise.
372 * util/powerpc/ieee1275/misc.c: Likewise.
374 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
376 * conf/i386.rmk (setjmp_mod_SOURCES)
377 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
378 * conf/common.rmk (setjmp_mod_SOURCES)
379 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
380 to use $(target_cpu).
381 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
382 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
383 * conf/powerpc-ieee1275.rmk: Likewise.
384 * conf/sparc64-ieee1275.rmk: Likewise.
386 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
387 $(target_cpu) for kern/$(target_cpu)/dl.c.
388 * conf/i386-efi.rmk: Likewise.
389 * conf/i386-ieee1275.rmk: Likewise.
390 * conf/x86_64-efi.rmk: Likewise.
391 * conf/i386-coreboot.rmk: Likewise.
392 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
393 $(target_cpu) for kern/$(target_cpu)/dl.c and for
394 kern/$(target_cpu)/cache.S.
395 * conf/sparc64-ieee1275.rmk: Likewise.
397 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
399 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
400 type to `grub_uint8_t', and adjust `padding9' accordingly.
402 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
404 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
406 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
407 assembly in final jump, using register constraints.
409 (grub_linux_boot): For text mode, initialize `have_vga' using
410 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
412 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
413 right before the final jump.
415 Set `video_mode' to 0x3.
417 Document initialization of `video_page', `video_mode' and
420 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
422 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
423 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
424 and set GRUB_LINUX_FLAG_QUIET appropriately.
426 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
428 Fix build on Debian / sparc.
430 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
432 2009-06-28 Pavel Roskin <proski@gnu.org>
434 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
437 * util/grub.d/10_linux.in: Match SUSE style initrd names.
439 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
441 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
444 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
448 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
449 file can't be opened. grub_file_open() is already supposed to set
450 grub_errno / grub_errmsg appropriately.
451 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
453 2009-06-27 Pavel Roskin <proski@gnu.org>
454 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
456 * include/grub/dl.h: Include grub/elf.h.
457 (struct grub_dl): Add symtab field.
458 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
459 GRUB_MODULES_MACHINE_READONLY.
460 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
461 of the header for read-only modules.
462 (grub_dl_unload): Free mod->symtab for read-only modules.
463 * kern/i386/dl.c: Use mod->symtab.
464 * kern/powerpc/dl.c: Likewise.
465 * kern/sparc64/dl.c: Likewise.
466 * kern/x86_64/dl.c: Likewise.
468 * conf/i386-qemu.rmk: New file.
469 * kern/i386/qemu/startup.S: Likewise.
470 * kern/i386/qemu/mmap.c: Likewise.
471 * boot/i386/qemu/boot.S: Likewise.
472 * include/grub/i386/qemu/time.h: Likewise.
473 * include/grub/i386/qemu/serial.h: Likewise.
474 * include/grub/i386/qemu/kernel.h: Likewise.
475 * include/grub/i386/qemu/console.h: Likewise.
476 * include/grub/i386/qemu/boot.h: Likewise.
477 * include/grub/i386/qemu/init.h: Likewise.
478 * include/grub/i386/qemu/machine.h: Likewise.
479 * include/grub/i386/qemu/loader.h: Likewise.
480 * include/grub/i386/qemu/memory.h: Likewise.
482 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
483 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
484 [qemu] (pkglib_IMAGES): Add `boot.img'.
485 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
486 [qemu] (boot_img_FORMAT): New variables.
487 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
488 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
489 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
490 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
491 [qemu] (kernel_img_FORMAT): New variables.
493 * configure.ac: Recognise `i386-qemu'.
495 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
496 (for no compression).
497 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
498 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
499 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
500 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
503 2009-06-27 Pavel Roskin <proski@gnu.org>
505 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
507 * efiemu/prepare32.c: Likewise.
508 * efiemu/prepare64.c: Likewise.
510 2009-06-26 Pavel Roskin <proski@gnu.org>
512 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
513 * include/grub/elf.h: Define symbols without "32" or "64" based
514 on GRUB_TARGET_WORDSIZE.
515 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
516 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
518 * efiemu/loadcore64.c: Likewise.
519 * loader/i386/bsd32.c: Likewise.
520 * loader/i386/bsd64.c: Likewise.
521 * kern/dl.c: Remove own ELF definitions.
522 * util/i386/efi/grub-mkimage.c: Likewise.
524 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
526 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
527 segment 0x0 unconditionally, because the reference generated by
528 GAS is an absolute address.
530 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
532 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
533 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
535 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
537 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
538 indexes. Check for -f explicitly.
539 (search_file): Improve error message.
540 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
542 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
544 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
545 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
547 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
549 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
550 * conf/i386-ieee1275.rmk: Likewise.
551 * conf/i386-coreboot.rmk: Likewise.
553 * kern/i386/pc/startup.S (grub_stop): Remove function.
554 * kern/i386/ieee1275/startup.S: Likewise.
555 * kern/i386/coreboot/startup.S: Likewise.
556 * kern/i386/misc.S (grub_stop): New function.
558 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
560 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
561 * kern/i386/realmode.S (real_to_prot): ... to here.
563 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
565 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
567 (kernel_elf_SOURCES): Rename to ...
568 (kernel_img_SOURCES): ... this.
569 (kernel_elf_HEADERS): Rename to ...
570 (kernel_img_HEADERS): ... this. Update all users.
571 (kernel_elf_ASFLAGS): Rename to ...
572 (kernel_img_ASFLAGS): ... this.
573 (kernel_elf_CFLAGS): Rename to ...
574 (kernel_img_CFLAGS): ... this.
575 (kernel_elf_LDFLAGS): Rename to ...
576 (kernel_img_LDFLAGS): ... this.
577 * conf/i386-coreboot.rmk: Likewise.
578 * conf/powerpc-ieee1275.rmk: Likewise.
580 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
583 2009-06-21 Pavel Roskin <proski@gnu.org>
585 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
586 to match nested functions.
587 * loader/sparc64/ieee1275/linux.c: Likewise.
589 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
591 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
593 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
596 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
598 Fix asm file handling on ELF, and remove workarounds.
600 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
601 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
602 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
603 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
605 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
609 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
610 and loader/i386/bsd64.c
611 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
612 (FREEBSD_MODTYPE_ELF_MODULE): New definition
613 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
614 (grub_freebsd_load_elfmodule32): New declaration
615 (grub_freebsd_load_elfmoduleobj64): Likewise
616 (grub_freebsd_load_elf_meta32): Likewise
617 (grub_freebsd_load_elf_meta64): Likewise
618 (grub_freebsd_add_meta): Likewise
619 (grub_freebsd_add_meta_module): Likewise
620 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
621 (grub_freebsd_add_meta_module): Likewise and move module-specific
622 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
623 (grub_cmd_freebsd): Add elf-kernel specific parts
624 based on grub_freebsd_add_meta_module
625 (grub_cmd_freebsd_module): Add type parsing moved from
626 grub_freebsd_add_meta_module
627 (grub_cmd_freebsd_module_elf): New function
628 (cmd_freebsd_module_elf): New variable
629 (GRUB_MOD_INIT): Register freebsd_module_elf
630 * loader/i386/bsd32.c: New file
631 * loader/i386/bsd64.c: Likewise
632 * loader/i386/bsdXX.c: Likewise
633 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
634 (grub_elf64_load): Likewise
635 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
637 (grub_elf64_load_hook_t): Likewise
639 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
641 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
643 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
644 don't write a menu entry for recovery mode.
646 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
648 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
649 after it's no longer needed.
651 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
653 * include/grub/i386/loader.h (grub_linux_prot_size)
654 (grub_linux_tmp_addr, grub_linux_real_addr)
655 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
657 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
658 common grub_util_info() call to ...
659 (generate_image): ... here.
660 Fix use of uninitialized memory, comparison of signed with
661 unsigned integers and memory leak.
662 Remove bogus module address message.
664 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
666 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
668 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
670 2009-06-19 Pavel Roskin <proski@gnu.org>
672 * configure.ac: Remove stray AC_MSG_CHECKING.
674 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
676 * disk/scsi.c (grub_scsi_open): use continue instead of big if
678 2009-06-18 Pavel Roskin <proski@gnu.org>
680 * conf/common.rmk: Add fs_file.mod.
681 * disk/fs_file.c: New file.
682 * include/grub/disk.h (enum grub_disk_dev_id): Add
683 GRUB_DISK_DEVICE_FILE_ID.
685 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
687 Fix build with Apple's toolchain. Part 2
689 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
692 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
694 Fix build with Apple's toolchain. Part 1
696 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
698 * configure.ac: remove a leftover AC_MSG_RESULT
699 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
702 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
706 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
707 (decomp_block): initialize ch
708 use grub_memcpy instead of memcpy
710 2009-06-17 Pavel Roskin <proski@gnu.org>
712 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
713 version, use declarations needed to use vga_text as the startup
716 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
717 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
719 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
720 and grub_at_keyboard_fini(), it's done on module load and
723 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
725 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
727 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
729 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
733 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
734 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
735 (grub_script_yylex): don't segfault on unterminated script
736 newline terminates command and variable
738 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
740 avoid double grub_adjust_range call. Bug reported by David Simner
742 * kern/disk.c (grub_disk_write): change to raw disk access before
745 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
747 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
748 spaces, for the benefit of help2man.
749 * util/i386/efi/grub-mkimage.c (usage): Likewise.
751 2009-06-16 Pavel Roskin <proski@gnu.org>
753 * kern/i386/halt.c: Include grub/machine/init.h.
754 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
756 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
758 * util/grub.d/30_os-prober.in: Use ${root} in the generated
761 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
763 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
766 2009-06-16 Pavel Roskin <proski@gnu.org>
768 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
769 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
770 save %dx, we only need %dl and we never change it.
771 * boot/i386/pc/cdboot.S: Don't set the root drive.
772 * boot/i386/pc/pxeboot.S: Likewise.
773 * include/grub/i386/pc/boot.h: Remove
774 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
775 GRUB_BOOT_MACHINE_DRIVE_CHECK.
776 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
777 * kern/i386/pc/init.c (make_install_device): Remove references
779 * kern/i386/pc/startup.S: Likewise.
780 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
782 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
786 * commands/xnu_uuid.c: new file
787 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
788 (xnu_uuid_mod_SOURCES): new variable
789 (xnu_uuid_mod_CFLAGS): likewise
790 (xnu_uuid_mod_LDFLAGS): likewise
791 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
792 * conf/i386-ieee1275.rmk: likewise
793 * conf/i386-pc.rmk: likewise
794 * conf/powerpc-ieee1275.rmk: likewise
795 * conf/sparc64-ieee1275.rmk: likewise
796 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
798 2009-06-16 Pavel Roskin <proski@gnu.org>
800 * configure.ac: Avoid '==' in test command, it's not portable.
802 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
806 * commands/probe.c: new file
807 * conf/common.rmk (pkglib_MODULES): add probe.mod
808 (probe_mod_SOURCES): new variable
809 (probe_mod_CFLAGS): likewise
810 (probe_mod_LDFLAGS): likewise
811 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
812 * conf/i386-ieee1275.rmk: likewise
813 * conf/i386-pc.rmk: likewise
814 * conf/powerpc-ieee1275.rmk: likewise
815 * conf/sparc64-ieee1275.rmk: likewise
817 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
819 Fix handling of string like \"hello\" and "a
822 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
823 (grub_script_yylex): fix parsing of quoting, escaping and newline
825 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
827 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
830 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
832 * util/grub-mkconfig.in: Fix parsing of --output option.
834 2009-06-12 Pavel Roskin <proski@gnu.org>
836 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
837 genmk.rb don't need to be generated or installed.
839 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
841 * commands/i386/pc/drivemap_int13h.S: add more comments
843 2009-06-11 Pavel Roskin <proski@gnu.org>
845 * Makefile.in (uninstall): Uninstall manuals.
847 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
848 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
849 and update-grub_lib in two places.
850 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
852 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
855 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
856 `entry_lo' to fix variable shadowing.
858 2009-06-11 Christian Franke <franke@computer.org>
860 * kern/misc.c (__enable_execute_stack): Add missing return type
861 to prevent gcc warning.
863 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
865 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
867 2009-06-11 Pavel Roskin <proski@gnu.org>
869 * Makefile.in: Don't rely on any scripts being executable.
870 Always use $(SHELL) to run shell scripts.
872 * configure.ac: Always define ___main if using -nostdlib. This
873 fixes tests on Cygwin.
875 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
879 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
880 is in bytes and not in blocks
882 2009-06-11 Pavel Roskin <proski@gnu.org>
884 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
887 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
889 * util/grub.d/30_os-prober.in: Fix a comment. Source
890 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
891 to set the root device. Place drivemap command in the generated
894 2009-06-11 Pavel Roskin <proski@gnu.org>
896 * configure.ac: Remove host_m32. Issues with 64-bit utilities
897 have long been resolved.
899 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
901 * util/grub.d/10_linux.in: Capitalise "Linux".
903 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
905 2009-06-11 Pavel Roskin <proski@gnu.org>
907 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
908 fix a gcc warning and ensure that the function won't ever exit.
910 * kern/i386/ieee1275/init.c: Add missing prototype for
913 * loader/ieee1275/multiboot2.c [__i386__]: Include
914 grub/cpu/multiboot.h.
916 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
917 casts to short - they are not portable and cause warnings. Fix
918 use of uninitialized values in input_buf. Use ARRAY_SIZE.
920 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
924 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
926 (grub_get_root_biosnumber_saved): new variable
927 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
928 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
929 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
930 %dx after the call if necessary
931 * conf/common.rmk (pkglib_MODULES): remove boot.mod
932 (boot_mod_SOURCES): remove
933 (boot_mod_CFLAGS): remove
934 (boot_mod_LDFLAGS): remove
935 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
936 (boot_mod_SOURCES): new variable
937 (boot_mod_CFLAGS): likewise
938 (boot_mod_LDFLAGS): likewise
939 * conf/i386-efi.rmk: likewise
940 * conf/i386-ieee1275.rmk: likewise
941 * conf/i386-pc.rmk: likewise
942 * conf/powerpc-ieee1275.rmk: likewise
943 * conf/sparc64-ieee1275.rmk: likewise
944 * conf/x86_64-efi.rmk: likewise
945 * include/grub/i386/pc/biosnum.h: new file
946 * lib/i386/pc/biosnum.c: likewise
947 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
948 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
949 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
951 2009-06-10 Pavel Roskin <proski@gnu.org>
953 * io/gzio.c (test_header): Don't reuse one buffer for all data.
954 Use separate variables. Read only the file size at the end, but
955 not the checksum that we don't use.
957 * kern/file.c (grub_file_read): Use void pointer for the buffer.
960 * kern/ieee1275/openfw.c: Remove libc includes.
961 * kern/ieee1275/cmain.c: Likewise.
962 * include/grub/ieee1275/ieee1275.h: Likewise.
964 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
967 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
969 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
970 `genparttoollist.sh'.
971 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
972 Add `*.sh' to the list find searches for and change `mdate.sh'
975 2009-06-10 Pavel Roskin <proski@gnu.org>
977 * include/grub/multiboot2.h: Provide compatibility defines for
979 * include/multiboot2.h: Include stdint.h only if needed, using
981 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
983 * loader/ieee1275/multiboot2.c: Likewise.
984 * loader/multiboot2.c: Likewise.
985 * loader/multiboot_loader.c: Likewise.
987 * configure.ac: Use -nostdlib when probing for the target. It
988 should not be required to have libc for the target.
990 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
991 they fail without libc headers for the target.
992 * include/grub/powerpc/libgcc.h: Use weak attribute for all
994 * include/grub/sparc64/libgcc.h: Likewise. Don't use
995 preprocessor conditionals.
997 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
998 build system doesn't need to be aware of the tar.c internals.
1000 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1002 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1004 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1006 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1007 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1009 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1011 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1012 aren't available if ata.mod gets used.
1014 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1016 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1017 initialising controller.
1018 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1020 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1022 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1023 to choose between ata and biosdisk module on i386-pc.
1025 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1027 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1028 Subclass and Programming Interface fields in terms of the 3 byte
1029 Class Code register.
1030 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1032 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1033 interface is OHCI. Add grub_dprintf for symmetry with
1035 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1036 interface is UHCI. Add interf variable for programming
1037 interface. Print interface with class/subclass.
1039 * bus/usb/ohci.c: Set interf with correct field.
1041 * bus/usb/uhci.c: Remove unneeded doubled lines.
1042 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1043 Remove whitespace inside comment.
1045 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1047 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1048 as fallback an equivalent option without depth.
1050 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1052 Not fail if unable to retrieve C/H/S on LBA disks
1054 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1055 if unable to retrieve C/H/S on LBA disks
1057 2009-06-08 Pavel Roskin <proski@gnu.org>
1059 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1062 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1064 * Makefile.in (uninstall): Remove all $lib_DATA files.
1066 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1068 Bugfix: install on partitionless device
1070 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1073 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1075 * Makefile.in (uninstall): Remove all $include_DATA files.
1077 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1079 * commands/true.c: New file. Implement the true and false commands.
1080 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1081 (true_mod_SOURCES): New variable.
1082 (true_mod_CFLAGS): Likewise.
1083 (true_mod_LDFLAGS): Likewise.
1085 2009-06-05 Colin D Bennett <colin@gibibit.com>
1087 Optimized font character lookup using binary search instead of linear
1088 search. Fonts now are required to have the character index ordered by
1091 * font/font.c (load_font_index): Verify that fonts have ordered
1093 (find_glyph): Use binary search instead of linear search to find a
1094 character in a font.
1096 2009-06-05 Michael Scherer <misc@mandriva.org>
1098 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1099 uses case sensitive btree.
1100 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1101 only for case insensitive filesystems.
1103 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1105 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1106 * conf/common.rmk (search_mod_CFLAGS): likewise
1108 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1110 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1111 compensate a compiler bug
1113 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1115 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1118 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1120 Definitions for creating asm symbols with Apple's CC
1122 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1123 [APPLE_CC] (VARIABLE): likewise
1125 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1127 Disable lnxboot.img when compiled
1130 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1131 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1132 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1133 [! APPLE_CC] (CODE_LENG): skip
1134 [! APPLE_CC] (setup_sects): likewise
1135 [! APPLE_CC]: skip filling
1137 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1139 Address in trampolines based on 32-bit registers when compiled
1142 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1144 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1146 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1148 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1150 * kern/misc.c [APPLE_CC] (memcpy): new function
1151 [APPLE_CC] (memmove): likewise
1152 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1153 (memcpy): define alias conditionally on !APPLE_CC
1156 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1157 APPLE_CC are defined
1158 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1159 (grub_assert_fail): make prototype conditional
1161 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1163 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1165 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1167 (CLEANFILES): add grub-macho2img
1168 (grub_macho2img_SOURCES): new variable
1169 * kern/i386/pc/startup.S (bss_start): new variable
1171 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1172 * util/grub-macho2img.c: new file
1174 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1176 Use objconv when compiling with Apple's CC
1178 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1179 (efiemu64.o): likewise
1180 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1181 when compiling with Apple's CC
1182 (efiemu64_s.o): likewise
1183 * configure.ac: check for objconv when compiling with Apple's CC
1184 * genmk.rb: use objconv for modules when compiled with Apple's CC
1186 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1188 Define segment as well as section when compiling with
1191 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1192 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1193 (efiemu_convert_pointer): likewise
1194 (efiemu_set_virtual_address_map): likewise
1195 (efiemu_convert_pointer): likewise
1196 (efiemu_getcrc32): likewise
1197 (init_crc32_table): likewise
1199 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1200 (GRUB_MOD_DEP): likewise
1202 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1204 Allow a compilation without -mcmodel=large
1206 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1207 when compiled without -mcmodel=large
1208 (filter_memory_map): remove memory post 4 GiB when compiled
1209 without -mcmodel=large
1210 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1211 TARGET_CFLAGS when -mcmodel=large isn't supported
1213 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1215 Remove nested functions in efiemu core
1217 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1219 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1221 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1223 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1225 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1227 (grub_cpu_is_tsc_supported): likewise
1228 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1230 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1232 Absolute addressing through constant with Apple's cc
1234 * kern/i386/pc/startup.S: Define necessary constants
1235 and address through it when using ABS with Apple's CC
1236 * boot/i386/pc/diskboot.S: likewise
1237 * boot/i386/pc/boot.S: likewise
1238 * boot/i386/pc/lnxboot.S: likewise
1239 * boot/i386/pc/cdboot.S: likewise
1240 * mmap/i386/pc/mmap_helper.S: likewise
1241 * commands/i386/pc/drivemap_int13h.S: likewise
1243 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1245 Check if compiler is apple cc
1247 * Makefile.in (ASFLAGS): new variable
1248 (TARGET_ASFLAGS): likewise
1249 (TARGET_MODULE_FORMAT): likewise
1250 (TARGET_APPLE_CC): likewise
1252 (TARGET_IMG_CFLAGS): likewise
1253 (TARGET_CPPFLAGS): add includedir
1254 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1255 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1256 Check for linker script only if compiler isn't Apple's CC
1257 (TARGET_MODULE_FORMAT): set
1258 (TARGET_APPLE_CC): likewise
1259 (TARGET_ASFLAGS): likewise
1261 Check for objcopy only if compiler isn't Apple's CC
1262 Check for BSS symbol only if compiler isn't Apple's CC
1263 * genmk.rb: adapt nm options if we use Apple's utils
1264 * aclocal.m4 (grub_apple_cc): new test
1265 (grub_apple_target_cc): likewise
1267 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1269 Simplify sed expressions and improve awk
1271 * Makefile.in (install-local): simplify sed expression
1272 * gencmdlist.sh: likewise
1273 * genmoddep.awk: avoid adding module as a dependency of itself
1275 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1277 Add missing start symbols
1279 * boot/i386/pc/boot.S: add start
1280 * boot/i386/pc/pxeboot.S: likewise
1282 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1284 Fix wrong assumptions with grub-mkimage on EFI
1286 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1287 (relocate_addresses): consider both r_addend and value at offset
1288 (make_mods_section): zerofill modinfo and header
1289 (convert_elf): write prefix here
1291 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1293 Use .asciz instead of .string
1295 * i386/pc/diskboot.S: use .asciz instead of .string
1296 * i386/pc/boot.S: likewise
1297 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1298 (GRUB_MOD_NAME): likewise
1300 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1304 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1305 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1306 (grub_video_setup): remove
1307 (grub_video_set_mode): new prototype
1308 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1310 (linux_vesafb_res): compile only on PCBIOS
1311 (grub_linux_boot): support gfxpayload
1312 * loader/i386/pc/xnu.c (video_hook): new function
1313 (grub_xnu_set_video): support gfxpayload
1314 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1315 (DEFAULT_VIDEO_HEIGHT): likewise
1316 (DEFAULT_VIDEO_FLAGS): likewise
1317 (DEFAULT_VIDEO_MODE): new definition
1318 (video_hook): new function
1319 (grub_gfxterm_init): use grub_video_set_mode
1320 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1322 * video/video.c (grub_video_setup): removed
1323 (grub_video_set_mode): new function based on grub_gfxterm_init and
1326 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1328 Avoid calling biosdisk in drivemap
1330 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1331 (revparse_biosdisk): likewise
1332 (list_mappings): derive name from id directly
1333 (grub_cmd_drivemap): use tryparse_diskstring
1335 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1339 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1340 (grub_lexer_param): add tokenonhold
1341 (grub_script_create_cmdline): remove cmdline. All callers updated
1342 (grub_script_function_create): make functionname
1343 grub_script_arg. All callers updated
1344 (grub_script_execute_argument_to_string): new prototype
1345 * kern/parser.c (state_transitions): reorder
1346 (grub_parser_cmdline_state): fix a bug and make more compact
1347 * script/sh/execute.c (grub_script_execute_argument_to_string):
1349 (grub_script_execute_cmdline): use new format
1350 * script/sh/function.c (grub_script_function_create): make functionname
1351 grub_script_arg. All callers updated
1352 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1353 (grub_script_yylex): remove
1354 (grub_script_yylex2): renamed to ...
1355 (grub_script_yylex): ...renamed
1356 parse the expressions like a${b}c
1357 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1358 (GRUB_PARSER_TOKEN_VAR): remove
1359 (GRUB_PARSER_TOKEN_NAME): likewise
1360 ("if"): declare as typeless
1362 ("function"): likewise
1367 (argument): likewise
1368 (script): accept empty scripts and make exit on error
1369 (arguments): use GRUB_PARSER_TOKEN_ARG
1370 (function): likewise
1371 (command): move error handling to script
1372 (menuentry): move grub_script_lexer_ref before
1373 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1374 argument. All callers updated
1376 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1378 Prevent GRUB from probing floppies during boot.
1380 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1381 * commands/search.c (options): Add --no-floppy.
1382 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1383 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1384 --no-floppy when searching for UUIDs.
1386 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1388 Simplify the code duplication in commands/search.c.
1390 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1391 (search_fs): ... this. Update all users.
1393 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1395 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1397 2009-05-28 Pavel Roskin <proski@gnu.org>
1399 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1400 Remove the original symlink explicitly.
1402 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1403 just one slash. That's how grub_fshelp_find_file() does it.
1405 2009-05-26 Pavel Roskin <proski@gnu.org>
1407 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1410 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1413 2009-05-25 Christian Franke <franke@computer.org>
1415 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1417 (grub_atapi_identify): Add wait after drive select.
1418 (grub_ata_identify): Do more strict status register check before
1419 calling grub_atapi_identify (). Suppress error message if status
1420 register is 0x00 after command failure. Add status register
1421 check after PIO read to avoid bogus identify due to stuck DRQ.
1422 Thanks to Pavel Roskin for testing.
1423 (grub_device_initialize): Remove unsafe status register check.
1424 Thanks to 'phcoder' for problem report and patch.
1425 Prevent sign extension in debug message.
1427 2009-05-23 Colin D Bennett <colin@gibibit.com>
1429 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1430 definition file, and functions defined in `normal/menu.c' have had
1431 their prototypes moved to `include/grub/menu.h' for consistency.
1433 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1435 (grub_menu_get_entry): Likewise.
1436 (grub_menu_get_timeout): Likewise.
1437 (grub_menu_set_timeout): Likewise.
1438 (grub_menu_execute_entry): Likewise.
1439 (grub_menu_execute_with_fallback): Likewise.
1440 (grub_menu_entry_run): Likewise.
1442 * include/grub/normal.h: Re-ordered and grouped function
1443 prototypes by file that the function is defined in.
1444 (grub_menu_execute_callback): Removed; moved to menu.h.
1445 (grub_menu_get_entry): Likewise.
1446 (grub_menu_get_timeout): Likewise.
1447 (grub_menu_set_timeout): Likewise.
1448 (grub_menu_execute_entry): Likewise.
1449 (grub_menu_execute_with_fallback): Likewise.
1450 (grub_menu_entry_run): Likewise.
1451 (grub_menu_addentry): Renamed from this ...
1452 (grub_normal_add_menu_entry): ... to this.
1454 * normal/main.c (grub_menu_addentry): Renamed from this ...
1455 (grub_normal_add_menu_entry): ... to this.
1457 * script/sh/execute.c (grub_script_execute_menuentry): Update
1458 reference to renamed grub_menu_addentry function.
1460 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1462 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1464 2009-05-22 Pavel Roskin <proski@gnu.org>
1466 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1467 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1468 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1469 compiling for the i386 targets, but not for the utilities.
1471 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1473 (grub_root_drive): Likewise.
1474 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1476 (grub_root_drive): Change size to byte.
1477 (grub_start_addr): Remove.
1478 (grub_end_addr): Likewise.
1479 (grub_apm_bios_info): Likewise.
1481 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1483 * normal/i386: Remove.
1484 * normal/powerpc: Likewise.
1485 * normal/sparc64: Likewise.
1486 * normal/x86_64: Likewise.
1488 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1490 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1491 * loader/i386/linux_trampoline.S: Fix indentation
1492 * loader/i386/xnu_helper.S: Likewise
1494 2009-05-18 Colin D Bennett <colin@gibibit.com>
1496 Display error messages when parsing a Lua statement fails.
1497 Previously, executing a syntactically invalid statement like
1498 ")foo" or "bar;" would silently fail.
1500 * script/lua/grub_main.c (handle_lua_error): New function.
1501 (grub_lua_parse_line): Improved reporting of Lua parser and
1504 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1506 Remove -Werror which causes build to fail on some systems
1508 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1509 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1510 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1512 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1514 trampoline for linux on 64-bit platform
1516 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1517 loader/i386/efi/linux_trampoline.S
1518 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1520 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1522 * loader/i386/linux_trampoline.S: moved here
1523 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1525 (jumpvector): removed
1526 (grub_linux_trampoline_start): new declaration
1527 (grub_linux_trampoline_end): likewise
1528 (grub_linux_boot): use trampoline when on 64-bit platform
1529 * loader/i386/linux.c: likewise
1531 2009-05-16 Pavel Roskin <proski@gnu.org>
1533 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1534 const to avoid a warning.
1535 (grub_lua_setenv): Likewise.
1536 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1537 lmsg to fix a warning.
1539 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1541 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1542 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1543 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1544 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1545 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1546 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1547 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1548 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1550 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1552 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1554 2009-05-16 Bean <bean123ch@gmail.com>
1556 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1557 (lua_mod_SOURCES): New variable.
1558 (lua_mod_CFLAGS): Likewise.
1559 (lua_mod_LDFLAGS): Likewise.
1561 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1562 (setjmp_mod_SOURCES): New variable.
1563 (setjmp_mod_CFLAGS): Likewise.
1564 (setjmp_LDFLAGS): Likewise.
1566 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1567 (setjmp_mod_SOURCES): New variable.
1568 (setjmp_mod_CFLAGS): Likewise.
1569 (setjmp_LDFLAGS): Likewise.
1571 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1572 (setjmp_mod_SOURCES): New variable.
1573 (setjmp_mod_CFLAGS): Likewise.
1574 (setjmp_LDFLAGS): Likewise.
1576 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1577 (setjmp_mod_SOURCES): New variable.
1578 (setjmp_mod_CFLAGS): Likewise.
1579 (setjmp_LDFLAGS): Likewise.
1581 * normal/i386/setjmp.S: Moved from here ...
1582 * lib/i386/setjmp.S: ... Moved here
1583 * normal/x86_64/setjmp.S: Moved from here ...
1584 * lib/x86_64/setjmp.S: ... Moved here
1585 * normal/powerpc/setjmp.S: Moved from here ...
1586 * lib/powerpc/setjmp.S: ... Moved here
1587 * normal/sparc64/setjmp.S: Moved from here ...
1588 * lib/sparc64/setjmp.S: ... Moved here
1590 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1591 returns_twice in mingw.
1593 * script/lua/grub_lib.c: New file.
1594 * script/lua/grub_lib.h: Likewise.
1595 * script/lua/grub_lua.h: Likewise.
1596 * script/lua/grub_main.c: Likewise.
1597 * script/lua/lapi.c: Likewise.
1598 * script/lua/lapi.h: Likewise.
1599 * script/lua/lauxlib.c: Likewise.
1600 * script/lua/lauxlib.h: Likewise.
1601 * script/lua/lbaselib.c: Likewise.
1602 * script/lua/lcode.c: Likewise.
1603 * script/lua/lcode.h: Likewise.
1604 * script/lua/ldblib.c: Likewise.
1605 * script/lua/ldebug.c: Likewise.
1606 * script/lua/ldebug.h: Likewise.
1607 * script/lua/ldo.c: Likewise.
1608 * script/lua/ldo.h: Likewise.
1609 * script/lua/ldump.c: Likewise.
1610 * script/lua/lfunc.c: Likewise.
1611 * script/lua/lfunc.h: Likewise.
1612 * script/lua/lgc.c: Likewise.
1613 * script/lua/lgc.h: Likewise.
1614 * script/lua/linit.c: Likewise.
1615 * script/lua/liolib.c: Likewise.
1616 * script/lua/llex.c: Likewise.
1617 * script/lua/llex.h: Likewise.
1618 * script/lua/llimits.h: Likewise.
1619 * script/lua/lmathlib.c: Likewise.
1620 * script/lua/lmem.c: Likewise.
1621 * script/lua/lmem.h: Likewise.
1622 * script/lua/loadlib.c: Likewise.
1623 * script/lua/lobject.c: Likewise.
1624 * script/lua/lobject.h: Likewise.
1625 * script/lua/lopcodes.c: Likewise.
1626 * script/lua/lopcodes.h: Likewise.
1627 * script/lua/loslib.c: Likewise.
1628 * script/lua/lparser.c: Likewise.
1629 * script/lua/lparser.h: Likewise.
1630 * script/lua/lstate.c: Likewise.
1631 * script/lua/lstate.h: Likewise.
1632 * script/lua/lstring.c: Likewise.
1633 * script/lua/lstring.h: Likewise.
1634 * script/lua/lstrlib.c: Likewise.
1635 * script/lua/ltable.c: Likewise.
1636 * script/lua/ltable.h: Likewise.
1637 * script/lua/ltablib.c: Likewise.
1638 * script/lua/ltm.c: Likewise.
1639 * script/lua/ltm.h: Likewise.
1640 * script/lua/lua.h: Likewise.
1641 * script/lua/luaconf.h: Likewise.
1642 * script/lua/lualib.h: Likewise.
1643 * script/lua/lundump.c: Likewise.
1644 * script/lua/lundump.h: Likewise.
1645 * script/lua/lvm.c: Likewise.
1646 * script/lua/lvm.h: Likewise.
1647 * script/lua/lzio.c: Likewise.
1648 * script/lua/lzio.h: Likewise.
1650 2009-05-16 Bean <bean123ch@gmail.com>
1652 * include/grub/kernel.h (grub_module_header_types): Add type
1655 * kern/main.c (grub_load_config): New function.
1656 (grub_main): Call grub_load_config to read boot config.
1658 * grub-mkimage (generate_image): New parameter config_path.
1659 (options): New option --config.
1660 (main): Parse --config option, and pass it to generate_image.
1662 2009-05-14 Christian Franke <franke@computer.org>
1664 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1665 This fixes build on Cygwin.
1667 2009-05-14 Pavel Roskin <proski@gnu.org>
1669 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1670 jump. This saves two bytes, so the typical case of 2 swapped
1671 drives would fit 32 bytes.
1673 2009-05-13 Pavel Roskin <proski@gnu.org>
1675 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1676 grub_uint32_t to avoid a warning.
1678 * loader/i386/linux.c (allocate_pages): When assigning
1679 real_mode_mem, cast through grub_size_t to fix a warning. The
1680 code already makes sure that the value would fit a pointer.
1681 (grub_linux_setup_video): Cast render_target->data to
1682 grub_size_t to fix a warning.
1684 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1686 * commands/i386/pc/drivemap.c: New file - implement drivemap
1688 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1689 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1691 2009-05-13 Pavel Roskin <proski@gnu.org>
1693 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1694 embedding_area_exists.
1696 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1698 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1699 it easier to understand / work with.
1700 Improve warning messages for cases where there's no embedding area,
1701 or when it is too small (or core.img too large).
1703 2009-05-13 Pavel Roskin <proski@gnu.org>
1705 * loader/i386/pc/multiboot2.c: Add necessary includes for
1706 grub_multiboot2_real_boot().
1708 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1709 PX record is always little-endian. We only need the lower 2
1712 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1713 facilitate code reuse.
1714 (grub_cpio_mount): Use "struct head", not a char buffer. This
1715 fixes a warning reported by gcc 4.4.
1717 * kernel/disk.c (grub_disk_read): Use void pointer for the
1719 (grub_disk_write): Use const void pointer for the buffer.
1720 Adjust all callers. Remove unnecessary casts.
1722 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1724 * util/i386/pc/grub-install.in: Update copyright year.
1726 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1730 * commands/gptsync.c: new file
1731 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1732 (gptsync_mod_SOURCES): new variable
1733 (gptsync_mod_CFLAGS): likewise
1734 (gptsync_mod_LDFLAGS): likewise
1735 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1737 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1738 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1739 * conf/i386-ieee1275.rmk: likewise
1740 * conf/i386-pc.rmk: likewise
1741 * conf/powerpc-ieee1275.rmk: likewise
1743 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1747 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1748 (grub_dl_ref): likewise
1750 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1752 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1753 split in two functions (one for msdos and one for gpt).
1755 2009-05-08 Pavel Roskin <proski@gnu.org>
1757 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1760 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1761 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1762 Initialize them with -1. Add sanity check for bad1. Eliminate
1765 2009-05-08 David S. Miller <davem@davemloft.net>
1767 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1769 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1771 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1774 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1777 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1779 2009-05-05 David S. Miller <davem@davemloft.net>
1781 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1783 2009-05-05 Pavel Roskin <proski@gnu.org>
1785 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1786 of grub_dl_ref() and grub_dl_unref().
1787 * commands/parttool.c: Remove preprocessor conditionals around
1788 grub_dl_ref() and grub_dl_unref().
1789 * fs/affs.c: Likewise.
1790 * fs/afs.c: Likewise.
1791 * fs/cpio.c: Likewise.
1792 * fs/ext2.c: Likewise.
1793 * fs/fat.c: Likewise.
1794 * fs/hfs.c: Likewise.
1795 * fs/hfsplus.c: Likewise.
1796 * fs/iso9660.c: Likewise.
1797 * fs/jfs.c: Likewise.
1798 * fs/minix.c: Likewise.
1799 * fs/ntfs.c: Likewise.
1800 * fs/reiserfs.c: Likewise.
1801 * fs/sfs.c: Likewise.
1802 * fs/udf.c: Likewise.
1803 * fs/ufs.c: Likewise.
1804 * fs/xfs.c: Likewise.
1805 * include/grub/dl.h: Likewise.
1806 * loader/xnu.c: Likewise.
1808 2009-05-04 Pavel Roskin <proski@gnu.org>
1810 * commands/acpi.c: Remove unused variable my_mod.
1811 * partmap/amiga.c: Likewise.
1812 * partmap/apple.c: Likewise.
1813 * partmap/gpt.c: Likewise.
1814 * partmap/pc.c: Likewise.
1815 * partmap/sun.c: Likewise.
1816 * term/gfxterm.c: Likewise.
1817 * term/i386/pc/vesafb.c: Likewise.
1818 * term/i386/pc/vga.c: Likewise.
1820 2009-05-04 David S. Miller <davem@davemloft.net>
1822 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1823 pointer args to grub_ieee1275_get_property().
1825 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1827 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1828 devices, and do not traverse down under controller nodes.
1830 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1831 (grub_ofdisk_open): Use it to un-escape "," characters.
1832 * kern/disk.c (find_part_sep): New.
1833 (grub_disk_open): Use it to find the first non-escaped ','
1834 character in the disk name.
1835 * util/ieee1275/devicemap.c (escape_of_path): New.
1836 (grub_util_emit_devicemap_entry): Use it.
1837 * util/sparc64/ieee1275/grub-install.in: Update script to
1838 strip partition specifiers properly by not triggering on
1839 '\' escaped ',' characters.
1841 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1843 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1845 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1847 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1848 on documentation from Wikipedia).
1850 2009-05-04 Pavel Roskin <proski@gnu.org>
1852 * disk/ata.c: Spelling fixes.
1853 * disk/raid.c: Likewise.
1854 * disk/usbms.c: Likewise.
1855 * disk/dmraid_nvidia.c: Likewise.
1856 * kern/ieee1275/openfw.c: Likewise.
1857 * kern/ieee1275/init.c: Likewise.
1858 * kern/ieee1275/cmain.c: Likewise.
1859 * boot/i386/pc/cdboot.S: Likewise.
1860 * video/readers/png.c: Likewise.
1861 * video/i386/pc/vbe.c: Likewise.
1862 * fs/udf.c: Likewise.
1863 * fs/hfs.c: Likewise.
1864 * fs/reiserfs.c: Likewise.
1865 * efiemu/runtime/efiemu.c: Likewise.
1866 * efiemu/main.c: Likewise.
1867 * efiemu/mm.c: Likewise.
1868 * include/grub/elf.h: Likewise.
1869 * include/grub/xnu.h: Likewise.
1870 * include/grub/usbdesc.h: Likewise.
1871 * include/grub/usb.h: Likewise.
1872 * include/grub/script_sh.h: Likewise.
1873 * include/grub/lib/LzmaEnc.h: Likewise.
1874 * include/grub/efiemu/efiemu.h: Likewise.
1875 * include/grub/command.h: Likewise.
1876 * normal/menu.c: Likewise.
1877 * normal/main.c: Likewise.
1878 * normal/datetime.c: Likewise.
1879 * bus/usb/uhci.c: Likewise.
1880 * mmap/i386/uppermem.c: Likewise.
1881 * mmap/mmap.c: Likewise.
1882 * commands/acpi.c: Likewise.
1883 * commands/test.c: Likewise.
1884 * partmap/apple.c: Likewise.
1885 * font/font.c: Likewise.
1886 * loader/sparc64/ieee1275/linux.c: Likewise.
1887 * loader/macho.c: Likewise.
1888 * loader/i386/bsd_trampoline.S: Likewise.
1889 * loader/i386/bsd.c: Likewise.
1890 * loader/xnu.c: Likewise.
1891 * term/i386/pc/vesafb.c: Likewise.
1892 * term/usb_keyboard.c: Likewise.
1893 * util/resolve.c: Likewise.
1894 * util/getroot.c: Likewise.
1896 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1898 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1900 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1902 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1905 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1907 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1908 parameter only available on BIOS.
1910 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1912 Removed wrong semicolon in declaration
1914 * grub/misc.h (grub_dprintf): remove semicolon
1916 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1918 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1919 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1920 is done by grub_cmd_linux() now).
1921 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1922 restore video to text mode.
1923 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1924 indicates lack of "vga=" parameter. "vga=0" is mapped to
1925 `GRUB_LINUX_VID_MODE_NORMAL'.
1927 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1929 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1930 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1931 and `normal/script.c'. Add `kern/rescue_reader.c',
1932 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1933 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1934 `grub_script.tab.c'.
1936 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1937 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1939 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1940 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1942 * Makefile.in: Remove duplicated 2008 in Copyright line.
1944 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1946 * util/misc.c (grub_util_warn): New function. Emits a warning
1948 * include/grub/util/misc.h (grub_util_warn): New declaration.
1950 * util/i386/pc/grub-install.in: Understand --force and pass it down
1953 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1955 (setup): Improve error messages and add warnings when requested to
1956 install in odd layouts. Refuse to install using blocklists unless
1959 2009-05-04 martin f. krafft <madduck@madduck.net>
1961 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1963 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1965 Updated copyright year
1967 * fs/hfsplus.c: updated copyright year
1969 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1973 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1974 in the space previously used by unused3
1975 (grub_hfsplus_uuid): new function
1976 (grub_hfsplus_fs): added uuid field
1978 2009-05-03 Pavel Roskin <proski@gnu.org>
1980 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1981 suppress warnings. It's no longer needed.
1982 * disk/host.c: Likewise.
1983 * disk/ata_pthru.c: Likewise.
1984 * disk/loopback.c: Likewise.
1985 * hook/datehook.c: Likewise.
1986 * parttool/pcpart.c: Likewise.
1987 * fs/i386/pc/pxe.c: Likewise.
1988 * fs/ntfscomp.c: Likewise.
1989 * efiemu/main.c: Likewise.
1990 * mmap/mmap.c: Likewise.
1991 * commands/crc.c: Likewise.
1992 * commands/hexdump.c: Likewise.
1993 * commands/hdparm.c: Likewise.
1994 * commands/acpi.c: Likewise.
1995 * commands/echo.c: Likewise.
1996 * commands/minicmd.c: Likewise.
1997 * commands/blocklist.c: Likewise.
1998 * commands/memrw.c: Likewise.
1999 * commands/loadenv.c: Likewise.
2000 * commands/usbtest.c: Likewise.
2001 * commands/lsmmap.c: Likewise.
2002 * commands/boot.c: Likewise.
2003 * commands/parttool.c: Likewise.
2004 * commands/configfile.c: Likewise.
2005 * commands/search.c: Likewise.
2006 * commands/ieee1275/suspend.c: Likewise.
2007 * commands/cat.c: Likewise.
2008 * commands/i386/pc/pxecmd.c: Likewise.
2009 * commands/i386/pc/play.c: Likewise.
2010 * commands/i386/pc/halt.c: Likewise.
2011 * commands/i386/pc/vbeinfo.c: Likewise.
2012 * commands/i386/pc/vbetest.c: Likewise.
2013 * commands/lspci.c: Likewise.
2014 * commands/date.c: Likewise.
2015 * commands/handler.c: Likewise.
2016 * commands/ls.c: Likewise.
2017 * commands/test.c: Likewise.
2018 * commands/cmp.c: Likewise.
2019 * commands/efi/loadbios.c: Likewise.
2020 * commands/efi/fixvideo.c: Likewise.
2021 * commands/halt.c: Likewise.
2022 * commands/help.c: Likewise.
2023 * commands/reboot.c: Likewise.
2024 * hello/hello.c: Likewise.
2025 * script/sh/main.c: Likewise.
2026 * loader/xnu.c: Likewise.
2027 * term/terminfo.c: Likewise.
2028 * term/i386/pc/serial.c: Likewise.
2029 * term/usb_keyboard.c: Likewise.
2031 2009-05-03 David S. Miller <davem@davemloft.net>
2033 * normal/menu.c: Include grub/parser.h
2035 2009-05-03 Pavel Roskin <proski@gnu.org>
2037 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2039 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2040 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2042 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2043 efiemu??.o doesn't exist.
2044 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2047 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2049 FreeBSD 64-bit support
2051 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2052 and loader/i386/bsd_trampoline.S
2053 (bsd_mod_ASFLAGS): new variable
2054 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2055 (FREEBSD_MODTYPE_KERNEL64): likewise
2056 (grub_bsd64_trampoline_start): likewise
2057 (grub_bsd64_trampoline_end): likewise
2058 (grub_bsd64_trampoline_selfjump): likewise
2059 (grub_bsd64_trampoline_gdt): likewise
2060 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2061 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2062 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2063 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2064 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2066 * loader/i386/bsd_pagetable.c: new file
2067 * loader/i386/bsd_trampoline.S: likewise
2068 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2069 (ALIGN_VAR): likewise
2070 (entry_hi): new variable
2071 (kern_end_mdofs): likewise
2072 (is_64bit): likewise
2073 (grub_freebsd_add_meta): use ALIGN_VAR
2074 (grub_e820_mmap): new declaration
2075 (grub_freebsd_add_mmap): new function
2076 (grub_freebsd_add_meta_module): support 64 bit kernels
2077 (grub_freebsd_list_modules): use ALIGN_VAR
2078 (gdt_descriptor): new declaration
2079 (grub_freebsd_boot): support 64 bit kernels
2080 (grub_bsd_elf64_hook): new function
2081 (grub_bsd_load_elf): support elf64
2083 2009-05-03 Bean <bean123ch@gmail.com>
2085 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2086 after we get the result of if statement.
2088 2009-05-03 Bean <bean123ch@gmail.com>
2090 * Makefile.in (enable_efiemu): New variable.
2092 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2094 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2096 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2097 path, add -mno-red-zone option.
2098 (efiemu64_s.o): Likewise.
2099 (efiemu64.o): Use macro $^ for source file.
2101 * configure.ac (--enable-efiemu): New option.
2103 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2107 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2108 (pkglib_MODULES): add xnu.mod
2109 (xnu_mod_SOURCES): new variable
2110 (xnu_mod_CFLAGS): likewise
2111 (xnu_mod_LDFLAGS): likewise
2112 (xnu_mod_ASFLAGS): likewise
2113 * conf/i386-pc.rmk: likewise
2114 * conf/x86_64-efi.rmk: likewise
2115 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2117 * include/grub/i386/macho.h: new file
2118 * include/grub/i386/xnu.h: likewise
2119 * include/grub/macho.h: likewise
2120 * include/grub/machoload.h: likewise
2121 * include/grub/x86_64/macho.h: likewise
2122 * include/grub/x86_64/xnu.h: likewise
2123 * include/grub/xnu.h: likewise
2124 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2125 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2126 * loader/i386/efi/xnu.c: new file
2127 * loader/i386/pc/xnu.c: likewise
2128 * loader/i386/xnu.c: likewise
2129 * loader/i386/xnu_helper.S: likewise
2130 * loader/macho.c: likewise
2131 * loader/xnu.c: likewise
2132 * loader/xnu_resume.c: likewise
2133 * util/grub-dumpdevtree: likewise
2134 * include/grub/i386/pit.h: include grub/err.h
2135 (grub_pit_wait): export
2136 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2138 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2142 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2143 _linux_efi, linux_efi.
2144 new files in grub-emu
2145 new targets efiemu32.o and efiemu64.o
2146 * loader/linux_normal_efiemu.c: likewise
2147 * loader/i386/efi/linux.c: added preliminary efiemu support
2148 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2150 * include/grub/autoefi.h: new file
2151 * include/grub/i386/efiemu.h: likewise
2152 * include/grub/i386/pc/efiemu.h: likewise
2153 * include/grub/efi/api.h: add LL suffix when necessary
2154 new definitions relating to tables
2155 * include/grub/efiemu/efiemu.h: new file
2156 * include/grub/efiemu/runtime.h: likewise
2157 * efiemu/prepare.c: likewise
2158 * efiemu/loadcore_common.c: likewise
2159 * efiemu/loadcore64.c: likewise
2160 * efiemu/runtime/efiemu.sh: likewise
2161 * efiemu/runtime/efiemu.S: likewise
2162 * efiemu/runtime/efiemu.c: likewise
2163 * efiemu/runtime/config.h: likewise
2164 * efiemu/prepare32.c: likewise
2165 * efiemu/main.c: likewise
2166 * efiemu/modules/pnvram.c: likewise
2167 * efiemu/modules/i386: likewise
2168 * efiemu/modules/i386/pc: likewise
2169 * efiemu/modules/acpi.c: likewise
2170 * efiemu/i386/pc/cfgtables.c: likewise
2171 * efiemu/i386/loadcore64.c: likewise
2172 * efiemu/i386/loadcore32.c: likewise
2173 * efiemu/prepare64.c: likewise
2174 * efiemu/loadcore.c: likewise
2175 * efiemu/symbols.c: likewise
2176 * efiemu/mm.c: likewise
2177 * efiemu/loadcore32.c: likewise
2179 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2183 * commands/acpi.c: new file
2184 * commands/i386/pc/acpi.c: likewise
2185 * commands/efi/acpi.c: likewise
2186 * include/grub/acpi.h: likewise
2187 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2188 (acpi_mod_SOURCES): new variable
2189 (acpi_mod_CFLAGS): likewise
2190 (acpi_mod_LDFLAGS): likewise
2191 * conf/i386-efi.rmk: likewise
2192 * conf/x86_64-efi.rmk: likewise
2194 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2196 Missing part from mmap patch
2198 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2199 (grub_mmap_unregister)
2200 (grub_mmap_free_and_unregister): use grub_mmap_register
2202 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2206 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2207 * loader/i386/linux.c (find_mmap_size): likewise
2208 (allocate_pages): likewise
2209 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2210 (grub_fill_multiboot_mmap): likewise
2211 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2212 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2213 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2214 (OPENBSD_MMAP_RESERVED): likewise
2215 * include/grub/i386/pc/memory.h: include grub/memory.h
2216 (grub_lower_mem): removed
2217 (grub_upper_mem): likewise
2218 (GRUB_MACHINE_MEMORY_ACPI): new definition
2219 (GRUB_MACHINE_MEMORY_NVS): likewise
2220 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2221 (GRUB_MACHINE_MEMORY_HOLE): likewise
2222 (grub_machine_mmap_register): likewise
2223 (grub_machine_mmap_unregister): likewise
2224 (grub_machine_get_upper): likewise
2225 (grub_machine_get_lower): likewise
2226 (grub_machine_get_post64): likewise
2227 * include/grub/i386/efi/memory.h: new file
2228 * include/grub/x86_64/efi/memory.h: likewise
2229 * include/grub/efi/memory.h: likewise
2230 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2231 (mmap_mod_SOURCES): new variable
2232 (mmap_mod_LDFLAGS): likewise
2233 (mmap_mod_ASFLAGS): likewise
2234 * conf/i386-coreboot.rmk: likewise
2235 * conf/i386-ieee1275.rmk: likewise
2236 * conf/i386-efi.rmk: likewise
2237 * conf/x86_64-efi.rmk: likewise
2238 * include/grub/types.h (UINT_TO_PTR): new macro
2239 (PTR_TO_UINT32): likewise
2240 (PTR_TO_UINT64): likewise
2241 * include/grub/memory.h: new file
2242 * mmap/i386/pc/mmap.c: likewise
2243 * mmap/i386/pc/mmap_helper.S: likewise
2244 * mmap/i386/uppermem.c: likewise
2245 * mmap/mmap.c: likewise
2246 * mmap/efi/mmap.c: likewise
2247 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2249 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2250 (grub_upper_mem): likewise
2251 (grub_machine_init): don't use grub_upper_mem,
2252 make grub_lower_mem local
2253 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2254 grub_mmap_iterate and grub_mmap_get_upper
2255 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2257 2009-05-02 Bean <bean123ch@gmail.com>
2259 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2261 (pkglib_MODULES): Add normal.mod and sh.mod.
2262 (normal_SOURCES): New variable.
2263 (normal_mod_CFLAGS): Likewise.
2264 (normal_mod_LDFLAGS): Likewise.
2265 (sh_mod_SOURCES): Likewise.
2266 (sh_mod_CFLAGS): Likewise.
2267 (sh_mod_LDFLAGS): Likewise.
2269 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2270 script/sh/lexer.c_DEPENDENCIES.
2271 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2272 kern/rescue_reader.c and kern/rescue_parser.c.
2273 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2274 (grub_emu_SOURCES): Change source files.
2275 (pkglib_MODULES): Remove normal.mod.
2276 (normal_SOURCES): Removed.
2277 (normal_mod_CFLAGS): Likewise.
2278 (normal_mod_LDFLAGS): Likewise.
2279 * conf/i386-coreboot.rmk: Likewise.
2280 * conf/i386-efi.rmk: Likewise.
2281 * conf/i386-ieee1276.rmk: Likewise.
2282 * conf/powerpc-ieee1275.rmk: Likewise.
2283 * conf/sparc64-ieee1275.rmk: Likewise.
2284 * conf/x86_64-efi.rmk: Likewise.
2286 * include/grub/command.h (grub_command_execute): New inline function.
2288 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2290 * include/grub/normal.h: Remove <grub/setjmp.h>.
2291 (grub_fs_module_list): Moved to normal/autofs.c.
2292 (grub_exit_env): Removed.
2293 (grub_command_execute): Likewise.
2294 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2296 (read_command_list): New function declaration.
2297 (read_fs_list): Likewise.
2299 * include/parser.h: Include <grub/reader.h>.
2300 (grub_parser_split_cmdline): Change type of getline parameter.
2301 (grub_parser): New structure.
2302 (grub_parser_class): New variable.
2303 (grub_parser_execute): New function declaration.
2304 (grub_register_rescue_parser): Likewise.
2305 (grub_parser_register): New inline function.
2306 (grub_parser_unregister): Likewise.
2307 (grub_parser_get_current): Likewise.
2308 (grub_parser_set_current): Likewise.
2310 * include/grub/reader.h: New file.
2311 * kern/reader.c: Likewise.
2312 * kern/rescue_parser.c: Likewise.
2313 * kern/rescue_reader.c: Likewise.
2314 * normal/autofs.c: Likewise.
2315 * normal/dyncmd.c: Likewise.
2317 * include/grub/rescue.h: Removed.
2318 * normal/command.h: Likewise.
2320 * include/grub/script.h: Moved to ...
2321 * include/grub/script_sh.h: ... Moved here.
2322 * normal/execute.c: Moved to ...
2323 * script/sh/execute.c: ... Moved here.
2324 * normal/function.c: Moved to ...
2325 * script/sh/function.c: ... Moved here.
2326 * normal/lexer.c: Moved to ...
2327 * script/sh/lexer.c: ... Moved here.
2328 * normal/parser.y: Moved to ...
2329 * script/sh/parser.y: ... Moved here.
2330 * normal/script.c: Moved to ...
2331 * script/sh/script.c: ... Moved here.
2333 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2335 (grub_exit_env): Removed.
2336 (fs_module_list): Moved to normal/autofs.c.
2337 (grub_file_getline): Don't handle comment here.
2338 (free_menu): Skip removed field entry->commands.
2339 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2341 (read_config_file): Removed nested parameter, change getline function.
2342 (grub_enter_normal_mode): Removed.
2343 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2344 (read_command_list): Likewise.
2345 (autoload_fs_module): Moved to normal/autofs.c.
2346 (read_fs_list): Likewise.
2347 (reader_nested): New variable.
2348 (grub_normal_execute): Run parser.sh to switch to sh parser.
2349 (grub_cmd_rescue): Removed.
2350 (cmd_normal): Removed.
2351 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2353 (grub_cmdline_run): New function.
2354 (grub_normal_reader_init): Likewise.
2355 (grub_normal_read_line): Likewise.
2356 (grub_env_write_pager): Likewise.
2357 (cmdline): New variable.
2358 (grub_normal_reader): Likewise.
2359 (GRUB_MOD_INIT): Register normal reader and set as current, register
2360 pager hook, register normal command with grub_register_command_prio,
2361 so that it won't show up in command.lst.
2362 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2363 grub_fs_autoload_hook.
2365 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2366 (grub_menu_execute_entry): Replace grub_script_execute with
2367 grub_parser_execute, change parameter to grub_command_execute.
2369 * normal/menu_text.c: Remove <grub/script.h>.
2371 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2372 and <grub/parser.h>.
2373 (run): Change editor_getline to use new parser interface. Change
2374 parameter to grub_command_execute.
2376 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2377 <grub/reader.h> and <grub/parser.h>.
2378 (grub_load_normal_mode): Execute normal command.
2379 (grub_main): Call grub_register_core_commands,
2380 grub_register_rescue_parser and grub_register_rescue_reader, use
2381 grub_reader_loop to enter input loop.
2383 * kern/parser.c (grub_parser_split_cmdline): Change type of
2385 (grub_parser_class): New variable.
2386 (grub_parser_execute): New function.
2388 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2389 * loader/multiboot2.c: Likewise.
2390 * loader/sparc64/ieee1275/linux.c: Likewise.
2392 * util/grub-emu.c (read_command_list): New dummy function.
2394 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2396 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2397 count to 16 for CCISS and IDA.
2399 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2401 * normal/menu_text.c (grub_wait_after_message): Print a newline
2402 after waiting for user input.
2404 * loader/i386/linux.c: Include `<grub/normal.h>'.
2405 (grub_cmd_linux): Improve the error message about `ask' mode, by
2406 waiting for user input so it's not missed (we can do this, since
2407 user requested interaction).
2409 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2411 Added missing lst to grub-mkrescue
2413 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2414 and ${input_dir}/parttool.lst
2416 2009-04-30 David S. Miller <davem@davemloft.net>
2418 * util/hostdisk.c (device_is_wholedisk): New function.
2419 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2420 zero only if device_is_wholedisk() returns true.
2422 * util/hostdisk.c (convert_system_partition_to_system_disk):
2423 Handle virtual disk devices named /dev/vdiskX as found on sparc
2426 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2427 lettered partition specifier is found, convert to numbered.
2429 2009-04-29 David S. Miller <davem@davemloft.net>
2431 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2432 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2434 * normal/command.c: Add missing newline at end of file.
2436 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2438 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2439 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2440 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2441 ihandles have a 32-bit type but need to be stored in a "void *".
2443 2009-04-28 Pavel Roskin <proski@gnu.org>
2445 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2446 not disk. Adjust all dependencies.
2447 (grub_fs_uuid_close): Use grub_device_close(), not
2450 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2451 parent's partition, don't copy it by reference, as it gets freed
2454 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2456 Preboot hooks support
2458 * commands/boot.c (struct grub_preboot_t): new declaration
2459 (preboots_head): new variable
2460 (preboots_tail): likewise
2461 (grub_loader_register_preboot_hook): new function
2462 (grub_loader_unregister_preboot_hook): likewise
2463 (grub_loader_set): launch preboot hooks
2464 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2465 (grub_loader_register_preboot_hook): new declaration
2466 (grub_loader_unregister_preboot_hook): likewise
2468 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2472 * disk/scsi.c (grub_scsi_open): added missing cast when
2473 calling grub_dprintf
2475 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2477 Bug and warning fixes
2479 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2481 * commands/test.c (test_parse): fixed bug with file tests and corrected
2482 declaration of find_file
2484 2009-04-26 Pavel Roskin <proski@gnu.org>
2486 * Makefile.in: Don't install empty manual pages if help2man is
2487 missing. Use help2man option for output, not shell redirection.
2489 2009-04-26 David S. Miller <davem@davemloft.net>
2491 * util/grub-mkdevicemap.c (make_device_map): Add missing
2492 NESTED_FUNC_ATTR to process_device().
2494 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2498 * commands/test.c: rewritten to use bash-like test
2500 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2502 Parttool autoloading and improvements
2504 * Makefile.in (pkglib_DATA): add parttool.lst
2505 (parttool.lst): new target
2506 * genmk.rb: generate parttool-*
2507 (CLEANFILES): add #{parttool}
2508 (PARTTOOLFILES): new variable
2509 * genparttoollist.sh: new file
2510 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2511 (grub_pcpart_type): likewise
2512 * commands/parttool.c (helpmsg): new variable
2513 (grub_cmd_parttool): output help if not enough arguments are supplied
2515 (GRUB_MOD_INIT(parttool)): use helpmsg
2517 2009-04-24 David S. Miller <davem@davemloft.net>
2519 Avoiding opening same device multiple times in device iterator.
2521 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2522 and use it to build a list of partitions in iterate_disk() and
2523 iterate_partition().
2525 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2528 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2529 grub_devalias_iterate() result instead of unconditional 0.
2530 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2531 Also, capture hook return value, either directly or via
2532 grub_children_iterate(), and propagate to caller.
2533 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2534 grub_children_iterate): Return value is now 'int' instead of
2536 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2537 like a proper iterator, stopping when hooks return non-zero.
2538 (grub_devalias_iterate): Likewise.
2540 2009-04-23 David S. Miller <davem@davemloft.net>
2542 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2544 2009-04-22 David S. Miller <davem@davemloft.net>
2546 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2547 is larger than address_cells, use that value for address_cells too.
2549 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2550 IEEE1275_MAX_PATH_LEN): Define.
2551 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2552 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2553 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2554 'devtype'. Explicitly NULL terminate devalias expansion.
2556 * util/sparc64/ieee1275/misc.c: New file.
2557 * util/sparc64/ieee1275/grub-setup.c: New file.
2558 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2559 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2560 * util/sparc64/ieee1275/grub-install.in: New file.
2561 * util/ieee1275/ofpath.c: New file.
2562 * util/ieee1275/devicemap.c: New file.
2563 * util/devicemap.c: New file.
2564 * util/deviceiter.c: New file.
2565 * kern/sparc64/ieee1275/init.c: New file.
2566 * include/grub/util/ofpath.h: New file.
2567 * include/grub/util/deviceiter.h: New file.
2568 * util/grub-mkdevicemap.c: Include deviceiter.h.
2569 Implement using grub_util_emit_devicemap_entry and
2570 grub_util_iterate_devices.
2571 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2572 util/devicemap.c into grub-mkdevicemap
2573 * conf/i386-efi.rmk: Likewise.
2574 * conf/i386-ieee1275.rmk: Likewise.
2575 * conf/i386-pc.rmk: Likewise.
2576 * conf/powerpc-ieee1275.rmk: Likewise.
2577 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2578 images and installation utilities. Build kernel as image
2579 instead of as elf binary. Use common rules as much as possible.
2581 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2583 Correct GPT definition
2585 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2588 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2590 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2592 2009-04-19 David S. Miller <davem@davemloft.net>
2594 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2595 (grub_rescue_cmd_linux): Rename to...
2596 (grub_cmd_linux): and fix prototype.
2597 (grub_rescue_cmd_initrd): Rename to...
2598 (grub_cmd_initrd): and fix prototype.
2599 (cmd_linux, cmd_initrd): New.
2600 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2601 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2603 2009-04-17 Pavel Roskin <proski@gnu.org>
2605 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2607 (grub_ohci_transfer): Likewise.
2609 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2611 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2612 return without a value. Fix inconsistent indentation.
2614 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2615 match struct grub_fs.
2617 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2618 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2619 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2620 * commands/lspci.c (grub_lspci_iter): Likewise.
2622 2009-04-16 Bean <bean123ch@gmail.com>
2624 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2627 2009-04-15 Pavel Roskin <proski@gnu.org>
2629 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2630 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2631 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2634 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2636 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2637 that no multiple data or metadata areas are supported and `Unknown
2640 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2642 Move loader out of the kernel
2644 * kern/loader.c: moved to ...
2645 * commands/boot.c: ... moved here
2646 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2647 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2648 * include/grub/kernel.h (grub_machine_fini): export
2649 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2650 (grub_loader_set): likewise
2651 (grub_loader_unset): likewise
2652 (grub_loader_boot): likewise
2653 * conf/common.rmk: new module boot.mod
2654 (pkglib_MODULES): add boot.mod
2655 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2656 (grub_emu_SOURCES): likewise
2657 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2658 (grub_emu_SOURCES): likewise
2659 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2660 (grub_emu_SOURCES): likewise
2661 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2662 (grub_emu_SOURCES): likewise
2663 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2664 (grub_emu_SOURCES): likewise
2665 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2666 (grub_emu_SOURCES): likewise
2667 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2668 (grub_emu_SOURCES): likewise
2670 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2672 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2674 * kern/misc.c (grub_itoa): Removed function
2675 (grub_ltoa): likewise
2676 (grub_vsprintf): use grub_lltoa
2678 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2682 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2683 * conf/i386-coreboot.rmk: likewise
2684 * conf/i386-ieee1275.rmk: likewise
2685 * conf/powerpc-ieee1275.rmk: likewise
2687 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2689 * INSTALL: Add that `./autogen.sh' needs to be run before
2692 2009-04-14 Bean <bean123ch@gmail.com>
2694 * Makefile.in (pkglib_DATA): Add handler.lst.
2695 (handler.lst): New rule.
2697 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2698 * conf/i386-coreboot.rmk: Likewise.
2699 * conf/i386-ieee1275.rmk: Likewise.
2700 * conf/i386-efi.rmk: Likewise.
2701 * conf/x86_64-efi.rmk: Likewise.
2702 * conf/powerpc-ieee1275.rmk: Likewise.
2703 * conf/sparc64-ieee1275.rmk: Likewise.
2705 * genhandlerlist.sh: New file.
2707 * genmk.rb: Add rules to generate handler.lst.
2709 * include/grub/normal.h (grub_file_getline): New function definition.
2710 (read_handler_list): Likewise.
2711 (free_handler_list): Likewise.
2713 * include/grub/term.h (grub_term_register_input): Add name parameter
2714 for auto generation of handler.lst.
2715 (grub_term_register_output): Likewise.
2717 * normal/handler.c: New file.
2719 * normal/main.c (get_line): Renamed to grub_file_getline.
2720 (read_config_file): Use the newly renamed grub_file_getline.
2721 (read_command_list): Likewise.
2722 (read_fs_list): Likewise.
2723 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2724 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2726 * term/efi/console.c (grub_console_init): Add name parameter for auto
2727 generation of handler.lst.
2728 * term/gfxterm.c: Likewise.
2729 * term/i386/pc/at_keyboard.c: Likewise.
2730 * term/i386/pc/console.c: Likewise.
2731 * term/i386/pc/serial.c: Likewise.
2732 * term/i386/pc/vesafb.c: Likewise.
2733 * term/i386/pc/vga.c: Likewise.
2734 * term/i386/pc/vga_text.c: Likewise.
2735 * term/ieee1275/ofconsole.c: Likewise.
2736 * term/usb_keyboard.c: Likewise.
2738 2009-04-14 Bean <bean123ch@gmail.com>
2740 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2741 properly with null character.
2743 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2745 * configure: Remove.
2746 * config.h.in: Likewise.
2747 * stamp-h.in: Likewise.
2748 * DISTLIST: Likewise.
2749 * conf/common.mk: Likewise.
2750 * conf/i386-coreboot.mk: Likewise.
2751 * conf/i386-efi.mk: Likewise.
2752 * conf/i386-ieee1275.mk: Likewise.
2753 * conf/i386.mk: Likewise.
2754 * conf/i386-pc.mk: Likewise.
2755 * conf/powerpc-ieee1275.mk: Likewise.
2756 * conf/sparc64-ieee1275.mk: Likewise.
2757 * conf/x86_64-efi.mk: Likewise.
2759 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2762 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2763 David S. Miller <davem@davemloft.net>
2765 * util/hostdisk.c (make_device_name): Fix buffer length
2768 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2770 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2771 <sys/param.h> and <sys/sysctl.h>.
2772 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2773 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2774 opening the device and reset them afterwards.
2776 2009-04-13 Pavel Roskin <proski@gnu.org>
2778 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2779 Reported by John Stanley <jpsinthemix@verizon.net>
2781 2009-04-13 Robert Millan <rmh@aybabtu.com>
2783 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2784 that name for menuentries when appropriate.
2786 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2788 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2790 2009-04-13 Robert Millan <rmh@aybabtu.com>
2792 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2793 to Linux, simply abort telling the user it's no longer supported.
2795 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2797 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2798 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2799 `freebsd_loadenv' only when devices.hints exist.
2801 2009-04-13 Pavel Roskin <proski@gnu.org>
2803 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2805 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2807 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2809 (grub_drive): Likewise.
2811 2009-04-13 David S. Miller <davem@davemloft.net>
2813 * kern/sparc64/ieee1275/ieee1275.c: New file.
2814 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2815 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2816 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2817 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2818 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2819 grub_ieee1275_alloc_physmem): Declare new exported functions.
2821 * include/grub/sparc64/ieee1275/loader.h: New file.
2822 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2823 * include/grub/sparc64/kernel.h: Likewise.
2824 * loader/sparc64/ieee1275/linux.c: Likewise.
2826 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2827 (grub_fstest_SOURCES): Likewise.
2829 * util/hostdisk.c (make_device_name): Do not make any assumptions
2830 about the length of drive names.
2832 * kern/dl.c (grub_dl_load_file): Close file immediately when
2833 we are done using it.
2835 2009-04-12 David S. Miller <davem@davemloft.net>
2837 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2838 values. Noticed by Pavel Roskin.
2840 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2843 * genmk.rb: Add more flexible image type specification, also
2844 pass --strip-unneeded to objcopy.
2845 * conf/i386-pc.rmk: Use *_FORMAT.
2846 * conf/i386-pc.mk: Rebuilt.
2848 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2849 (OFDISK_HASH_SZ): Define.
2850 (ofdisk_hash): New hash table.
2851 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2852 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2853 instead of device phandle which is not unique.
2855 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2856 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2857 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2858 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2859 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2860 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2861 GRUB_KERNEL_MACHINE_DATA_END): Define.
2862 (grub_kernel_image_size, grub_total_module_size): Declare.
2864 2009-04-12 Pavel Roskin <proski@gnu.org>
2866 * configure.ac: Change the logic when we check for target tools.
2867 Do it when the target is specified and it's different from the
2868 specified value of the host.
2870 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2872 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2873 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2874 GNU/kFreeBSD. Check if a device is a character device. Use
2875 DIOCGMEDIASIZE to get the size.
2876 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2877 support for GNU/kFreeBSD.
2878 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2879 is a character device instead of a block device. Add support for
2880 FreeBSD device names.
2882 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2883 is a character device instead of a block device.
2885 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2886 is a character device instead of a block device.
2888 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2890 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2891 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2892 FreeBSD. Check if a device is a character device. Use
2893 DIOCGMEDIASIZE to get the size.
2894 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2895 support for FreeBSD.
2896 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2897 is a character device instead of a block device. Add support for
2898 FreeBSD device names.
2900 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2901 a character device instead of a block device.
2902 (grub_util_check_char_device): New function.
2904 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2905 a character device instead of a block device.
2907 * include/grub/util/getroot.h (grub_util_check_char_device): New
2910 2009-04-11 David S. Miller <davem@davemloft.net>
2912 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2914 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2915 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2916 function, if present.
2917 (__bswapdi2): Likewise.
2919 * include/grub/sparc64/ieee1275/boot.h: New file.
2920 * boot/sparc64/ieee1275/boot.S: Likewise.
2921 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2923 * kern/misc.c (grub_ltoa): New function.
2924 (grub_vsprintf): Use it to format 'long' integers.
2926 2009-04-10 David S. Miller <davem@davemloft.net>
2928 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2929 slots are of type grub_ieee1275_cell_t.
2930 (grub_nand_read): Likewise.
2931 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2932 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2933 macros are used to compare values in arg/ret block of the call.
2934 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2935 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2936 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2937 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2938 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2939 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2940 grub_ieee1275_close, grub_ieee1275_set_property,
2941 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2942 grub_ieee1275_cell_t.
2943 * kern/ieee1275/openfw.c (grub_map): Likewise.
2944 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2945 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2947 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2948 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2949 (grub_devalias_iterate): Likewise.
2951 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2955 * fs/ufs.c (INODE_NBLOCKS): new definition
2956 (struct grub_ufs_dirent): added fields for non-BSD dirents
2957 (grub_ufs_get_file_block): fixed double indirect handling
2958 (grub_ufs_lookup_symlink): use more robust way to determine whether
2960 (grub_ufs_find_file): support for non-BSD dirents
2961 (grub_ufs_dir): support for non-BSD dirents
2963 2009-04-10 Bean <bean123ch@gnail.com>
2965 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2966 attribute, otherwise the size would be wrong for i386 platform.
2968 * include/grub/pci.h (grub_pci_read_word): New inline function.
2969 (grub_pci_read_byte): Likewise.
2970 (grub_pci_write): Likewise.
2971 (grub_pci_write_word): Likewise.
2972 (grub_pci_write_byte): Likewise.
2974 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2976 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2977 (find_framebuf): Scan pci to locate the frame buffer address.
2979 * commands/efi/fixvideo.c: New file.
2981 * commands/efi/loadbios.c: Likewise.
2983 * commands/memrw.c: Likewise.
2985 * util/grub-dumpbios.in: Likewise.
2987 * conf/common.rmk (grub-dumpbios): New utility.
2988 (pkglib_MODULES): New module memrw.mod.
2989 (memrw_mod_SOURCE): New macro.
2990 (memrw_mod_CFLAGS): Likewise.
2991 (memrw_mod_LDFLAGS): Likewise.
2993 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2995 (loadbios_mod_SOURCE): New macro.
2996 (loadbios_mod_CFLAGS): Likewise.
2997 (loadbios_mod_LDFLAGS): Likewise.
2998 (fixvideo_mod_SOURCE): Likewise.
2999 (fixvideo_mod_CFLAGS): Likewise.
3000 (fixvideo_mod_LDFLAGS): Likewise.
3002 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3004 (loadbios_mod_SOURCE): New macro.
3005 (loadbios_mod_CFLAGS): Likewise.
3006 (loadbios_mod_LDFLAGS): Likewise.
3007 (fixvideo_mod_SOURCE): Likewise.
3008 (fixvideo_mod_CFLAGS): Likewise.
3009 (fixvideo_mod_LDFLAGS): Likewise.
3011 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3013 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3015 2009-04-07 David S. Miller <davem@davemloft.net>
3017 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3018 support for R_SPARC_OLO10 relocations. Fix compile warning for
3019 R_SPARC_WDISP30 case.
3020 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3022 2009-04-06 Pavel Roskin <proski@gnu.org>
3024 * include/grub/misc.h (ARRAY_SIZE): New macro.
3025 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3027 * loader/i386/linux.c (allocate_pages): Use free_pages().
3028 (grub_linux_unload): Don't use free_pages().
3029 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3030 wrong index. Treat all other modes as text modes.
3031 (grub_cmd_linux): Initialize vid_mode unconditionally to
3032 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3034 * commands/help.c (print_command_help): Use cmd->prio, not
3035 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3037 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3041 * parttool/pcpart.c: new file
3042 * commands/parttool.c: likewise
3043 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3044 (parttool_mod_SOURCES): new variable
3045 (parttool_mod_CFLAGS): likewise
3046 (parttool_mod_LDFLAGS): likewise
3047 (pcpart_mod_SOURCES): likewise
3048 (pcpart_mod_CFLAGS): likewise
3049 (pcpart_mod_LDFLAGS): likewise
3050 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3051 and parttool/pcpart.c
3052 * conf/i386-efi.rmk: likewise
3053 * conf/i386-ieee1275.rmk: likewise
3054 * conf/i386-pc.rmk: likewise
3055 * conf/powerpc-ieee1275.rmk: likewise
3056 * conf/sparc64-ieee1275.rmk: likewise
3057 * conf/x86_64-ieee1275.rmk: likewise
3059 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3061 Support for mtime and further expandability of dir command
3063 * include/grub/lib/datetime.h: moved to ...
3064 * include/grub/datetime.h: ... moved here and added
3065 declaration of grub_unixtime2datetime. All users updated
3066 * include/grub/fs.h: new syntax for dir and mtime functions in
3068 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3069 and GRUB_FSHELP_FLAGS_MASK
3070 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3071 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3072 (grub_ext2_mtime): new function
3073 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3074 (grub_hfsplus_mtime): new function
3075 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3076 (GRUB_UFS_ATTR_FILE): likewise
3077 (GRUB_UFS_ATTR_LNK): likewise
3078 (struct grub_ufs_sblock): new fields mtime
3079 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3081 (grub_ufs_dir): mtime support
3082 (grub_ufs_mtime): new function
3083 * fs/affs.c (grub_affs_dir): use new dir syntax
3084 * fs/afs.c (grub_afs_dir): likewise
3085 * fs/cpio.c (grub_cpio_dir): likewise
3086 * fs/fat.c (grub_fat_find_dir): likewise
3087 * fs/hfs.c (grub_hfs_dir): likewise
3088 * fs/iso9660.c (grub_iso9660_dir): likewise
3089 * fs/jfs.c (grub_jfs_dir): likewise
3090 * fs/minix.c (grub_minix_dir): likewise
3091 * fs/ntfs.c (grub_ntfs_dir): likewise
3092 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3093 * fs/sfs.c (grub_sfs_dir): likewise
3094 * fs/xfs.c (grub_xfs_dir): likewise
3095 * util/hostfs.c (grub_hostfs_dir): likewise
3096 * lib/datetime.c: moved to ...
3097 * normal/datetime.c: ... moved here
3098 (grub_unixtime2datetime): new function
3099 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3100 * normal/completion.c (iterate_dir): use new dir syntax
3101 * normal/misc.c (grub_normal_print_device_info): tell the
3102 last modification time of a volume
3103 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3104 * conf/common.rmk: added lib/datetime.c to ls.mod
3105 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3106 (normal_mod_SOURCES): likewise
3107 (datetime_mod_SOURCES): Removed lib/datetime.c
3108 * conf/i386-efi.rmk: likewise
3109 * conf/i386-ieee1275.rmk: likewise
3110 * conf/i386-pc.rmk: likewise
3111 * conf/powerpc-ieee1275.rmk: likewise
3112 * conf/sparc64-ieee1275.rmk: likewise
3113 * conf/x86_64-efi.rmk: likewise
3115 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3117 Trim trailing spaces in FAT label and support mtools-like labels
3119 * fs/fat.c (grub_fat_iterate_dir): New function based
3120 on grub_fat_find_dir
3121 (grub_fat_find_dir): use grub_fat_iterate_dir
3122 (grub_fat_label): likewise
3124 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3126 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3128 remove extraneous kernel_elf_HEADERS
3130 2009-04-04 Bean <bean123ch@gnail.com>
3132 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3134 * util/misc.c: Likewise.
3136 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3138 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3139 instead of grub_printf.
3141 2009-04-03 Robert Millan <rmh@aybabtu.com>
3143 * loader/i386/linux.c (grub_linux_setup_video): Fill
3144 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3145 values from `mode info' structure instead of hardcoded
3148 2009-04-01 Pavel Roskin <proski@gnu.org>
3150 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3152 * genmk.rb: Likewise.
3153 * configure.ac: Likewise.
3155 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3157 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3158 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3160 2009-04-01 David S. Miller <davem@davemloft.net>
3162 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3163 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3164 (grub_setjmp): Mark with 'returns_twice' attribute.
3165 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3166 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3167 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3169 2009-04-01 Robert Millan <rmh@aybabtu.com>
3171 Reapply fix from 2008-07-28 which was accidentally reverted; also
3172 perform the same fix to a similar check in same function.
3174 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3175 with the same number are found, just use issue a warning with
3176 grub_dprintf(), as this error has been reported to be non-fatal.
3178 2009-03-31 Pavel Roskin <proski@gnu.org>
3180 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3181 for cross-compilation.
3183 2009-03-30 Robert Millan <rmh@aybabtu.com>
3185 Fix i386-ieee1275 build.
3187 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3190 2009-03-30 Pavel Roskin <proski@gnu.org>
3192 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3193 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3194 zero-terminated, rely only on the strlen value. Fix comparison
3195 of strings differing in length.
3197 2009-03-30 Robert Millan <rmh@aybabtu.com>
3199 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3200 checking for abi version. Improve error messages on BIOS to notify
3201 user about `linux16' command.
3203 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3207 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3208 in case of collision
3209 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3211 2009-03-29 Robert Millan <rmh@aybabtu.com>
3213 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3214 set `vid_mode' accordingly.
3215 (grub_linux_boot): Process `vid_mode' and set video mode.
3217 2009-03-29 Robert Millan <rmh@aybabtu.com>
3219 * util/grub.d/10_linux.in (linux_entry): New function.
3220 Factorize generation of Linux boot entries.
3222 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3224 Make the format of Environment Block plain text. The boot loader
3225 part is not tested well yet.
3227 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3230 (usage): Remove "info" and "clear". Add "unset". Update the
3231 description of "set", as this does not delete variables any
3233 (create_envblk_file): Complete rewrite.
3234 (open_envblk_file): Likewise.
3235 (cmd_info): Removed.
3236 (cmd_list): Likewise.
3237 (cmd_set): Likewise.
3238 (cmd_clear): Likewise.
3239 (list_variables): New function.
3240 (write_envblk): Likewise.
3241 (set_variables): Likewise.
3242 (unset_variables): Likewise.
3243 (main): Complete rewrite.
3245 * commands/loadenv.c (buffer): Removed.
3247 (open_envblk_file): New function.
3248 (read_envblk_file): Complete rewrite.
3249 (grub_cmd_load_env): Likewise.
3250 (grub_cmd_list_env): Likewise.
3251 (struct blocklist): New struct.
3252 (free_blocklists): New function.
3253 (check_blocklists): Likewise.
3254 (write_blocklists): Likewise.
3255 (grub_cmd_save_env): Complete rewrite.
3257 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3258 a plain text signature.
3259 (GRUB_ENVBLK_MAXLEN): Removed.
3260 (struct grub_envblk): Complete rewrite.
3261 (grub_envblk_find): Removed.
3262 (grub_envblk_insert): Likewise.
3263 (grub_envblk_open): New prototype.
3264 (grub_envblk_set): Likewise.
3265 (grub_envblk_delete): Put const to VALUE.
3266 (grub_envblk_iterate): Put const to NAME and VALUE.
3267 (grub_envblk_close): New prototype.
3268 (grub_envblk_buffer): New inline function.
3269 (grub_envblk_size): Likewise.
3271 * lib/envblk.c: Include grub/mm.h.
3272 (grub_env_find): Removed.
3273 (grub_envblk_open): New function.
3274 (grub_envblk_close): Likewise.
3275 (escaped_value_len): Likewise.
3276 (find_next_line): Likewise.
3277 (grub_envblk_insert): Removed.
3278 (grub_envblk_set): New function.
3279 (grub_envblk_delete): Complete rewrite.
3280 (grub_envblk_iterate): Likewise.
3282 2009-03-28 Robert Millan <rmh@aybabtu.com>
3284 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3285 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3286 variables. Use 16-bit loader.
3287 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3289 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3290 (grub_linux16_boot): ... this. Update all users.
3291 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3292 (grub_linux_boot): ... this. Update all users.
3294 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3295 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3296 commands to `linux16' and `initrd16'.
3297 (GRUB_MOD_FINI(linux)): Rename to ...
3298 (GRUB_MOD_FINI(linux16)): ... this.
3300 2009-03-24 Pavel Roskin <proski@gnu.org>
3302 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3303 not just for compilation.
3305 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3307 Move multiboot helper out of kernel
3309 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3310 `loader/i386/multiboot_helper.S'.
3311 * conf/i386-coreboot.rmk: Likewise
3312 * conf/i386-ieee1275.rmk: Likewise
3314 * kern/i386/loader.S: Move multiboot helpers from here...
3315 * loader/i386/multiboot_helper.S: ...moved here
3316 * include/grub/i386/loader.h: Move declarations of multiboot
3317 helpers from here...
3318 * include/grub/i386/multiboot.h: ...moved here
3319 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3321 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3323 * kern/env.c (grub_env_context_open): Added an argument to specify
3324 whether a new context inherits exported variables from current
3325 one. This is useful when making a sandbox to interpret a config
3327 All callers updated.
3329 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3331 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3333 * kern/env.c (grub_env_context_close): Fix memory leaks.
3335 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3337 * normal/main.c (grub_normal_execute): Added an argument
3338 BATCH to specify if an interactive interface should be provided
3339 after reading a config file.
3340 All callers updated.
3341 (read_command_list): Prevent being executed twice.
3342 (read_fs_list): Likewise.
3344 * include/grub/normal.h (grub_normal_execute): Updated the
3347 2009-03-22 Pavel Roskin <proski@gno.org>
3349 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3351 * kern/i386/pc/startup.S: Likewise.
3352 * kern/i386/efi/startup.S: Likewise.
3353 * kern/i386/ieee1275/startup.S: Likewise.
3354 * kern/i386/coreboot/startup.S: Likewise.
3355 * kern/x86_64/efi/startup.S: Likewise.
3357 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3358 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3359 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3361 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3363 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3365 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3367 Use vaddr of correct segment for entry_point.
3369 2009-03-21 Bean <bean123ch@gmail.com>
3371 * commands/blocklist.c: Add include file <grub/command.h>, remove
3372 <grub/normal.h> and <grub/arg.h>.
3373 (grub_cmd_blocklist): Use the new command interface.
3374 (GRUB_MOD_INIT): Likewise.
3375 (GRUB_MOD_FINI): Likewise.
3376 * commands/boot.c: Likewise.
3377 * commands/cat.c: Likewise.
3378 * commands/cmp.c: Likewise.
3379 * commands/configfile.c: Likewise.
3380 * commands/crc.c: Likewise.
3381 * commands/echo.c: Likewise.
3382 * commands/halt.c: Likewise.
3383 * commands/handler.c: Likewise.
3384 * commands/hdparm.c: Likewise.
3385 * commands/help.c: Likewise.
3386 * commands/hexdump.c: Likewise.
3387 * commands/loadenv.c: Likewise.
3388 * commands/ls.c: Likewise.
3389 * commands/lsmmap.c: Likewise.
3390 * commands/lspci.c: Likewise.
3391 * commands/loadenv.c: Likewise.
3392 * commands/read.c: Likewise.
3393 * commands/reboot.c: Likewise.
3394 * commands/search.c: Likewise.
3395 * commands/sleep.c: Likewise.
3396 * commands/test.c: Likewise.
3397 * commands/usbtest.c: Likewise.
3398 * commands/videotest.c: Likewise.
3399 * commands/i386/cpuid.c: Likewise.
3400 * commands/i386/pc/halt.c: Likewise.
3401 * commands/i386/pc/play.c: Likewise.
3402 * commands/i386/pc/pxecmd.c: Likewise.
3403 * commands/i386/pc/vbeinfo.c: Likewise.
3404 * commands/i386/pc/vbetest.c: Likewise.
3405 * commands/ieee1275/suspend.c: Likewise.
3406 * disk/loopback.c: Likewise.
3407 * font/font_cmd.c: Likewise.
3408 * hello/hello.c: Likewise.
3409 * loader/efi/appleloader.c: Likewise.
3410 * loader/efi/chainloader.c: Likewise.
3411 * loader/i386/bsd.c: Likewise.
3412 * loader/i386/efi/linux.c: Likewise.
3413 * loader/i386/ieee1275/linux.c: Likewise.
3414 * loader/i386/linux.c: Likewise.
3415 * loader/i386/pc/chainloader.c: Likewise.
3416 * loader/i386/pc/linux.c: Likewise.
3417 * loader/powerpc/ieee1275/linux.c: Likewise.
3418 * loader/multiboot_loader.c: Likewise.
3419 * term/gfxterm.c: Likewise.
3420 * term/i386/pc/serial.c: Likewise.
3421 * term/terminfo.c: Likewise.
3423 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3424 * term/i386/pc/vga.c: Likewise.
3425 * video/readers/jpeg.c: Likewise.
3426 * video/readers/png.c: Likewise.
3427 * video/readers/tga.c: Likewise.
3429 * util/grub-fstest (cmd_loopback): Removed.
3430 (cmd_blocklist): Likewise.
3432 (grub_register_command): Likewise.
3433 (grub_unregister_command): Likewise.
3434 (execute_command): Use grub_command_find to locate command and execute
3437 * include/grub/efi/chainloader.h: Removed.
3438 * loader/efi/chainloader_normal.c: Likewise.
3439 * loader/i386/bsd_normal.c: Likewise.
3440 * loader/i386/pc/chainloader_normal.c: Likewise.
3441 * loader/i386/pc/multiboot_normal.c: Likewise.
3442 * loader/linux_normal.c: Likewise.
3443 * loader/multiboot_loader_normal.c: Likewise.
3444 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3446 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3447 and grub_register_command_p1.
3449 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3450 kern/command.c, lib/arg.c and commands/extcmd.c.
3451 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3452 (minicmd_mod_SOURCES): New variable.
3453 (minicmd_mod_CFLAGS): Likewise.
3454 (minicmd_mod_LDFLAGS): Likewise.
3455 (extcmd_mod_SOURCES): Likewise.
3456 (extcmd_mod_CFLAGS): Likewise.
3457 (extcmd_mod_LDFLAGS): Likewise.
3458 (boot_mod_SOURCES): Removed.
3459 (boot_mod_CFLAGS): Likewise.
3460 (boot_mod_LDFLAGS): Likewise.
3462 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3464 (kernel_img_HEADERS): Add command.h.
3465 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3466 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3468 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3469 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3470 remove the corresponding normal mode command.
3471 (normal_mod_SOURCES): Remove normal/arg.c.
3472 * conf/i386-coreboot.rmk: Likewise.
3473 * conf/i386-efi.rmk: Likewise.
3474 * conf/i386-ieee1275.rmk: Likewise.
3475 * conf/powerpc-ieee1275.rmk: Likewise.
3476 * conf/x86_64-efi.rmk: Likewise.
3478 * include/grub/arg.h: Move from here ...
3479 * include/grub/lib/arg.h: ... to here.
3481 * normal/arg.c: Move from here ...
3482 * lib/arg.c: ... to here.
3484 * commands/extcmd.c: New file.
3485 * commands/minicmd.c: Likewise.
3486 * include/grub/command.h: Likewise.
3487 * include/grub/extcmd.h: Likewise.
3488 * kern/command.c: Likewise.
3489 * kern/corecmd.c: Likewise.
3491 * kern/list.c (grub_list_iterate): Return int instead of void.
3492 (grub_list_insert): New function.
3493 (grub_prio_list_insert): Likewise.
3495 * kern/rescue.c (grub_rescue_command): Removed.
3496 (grub_rescue_command_list): Likewise.
3497 (grub_rescue_register_command): Likewise.
3498 (grub_rescue_unregister_command): Likewise.
3499 (grub_rescue_cmd_boot): Move to minicmd.c
3500 (grub_rescue_cmd_help): Likewise.
3501 (grub_rescue_cmd_info): Likewise.
3502 (grub_rescue_cmd_boot): Likewise.
3503 (grub_rescue_cmd_testload): Likewise.
3504 (grub_rescue_cmd_dump): Likewise.
3505 (grub_rescue_cmd_rmmod): Likewise.
3506 (grub_rescue_cmd_lsmod): Likewise.
3507 (grub_rescue_cmd_exit): Likewise.
3508 (grub_rescue_print_devices): Moved to corecmd.c.
3509 (grub_rescue_print_files): Likewise.
3510 (grub_rescue_cmd_ls): Likewise.
3511 (grub_rescue_cmd_insmod): Likewise.
3512 (grub_rescue_cmd_set): Likewise.
3513 (grub_rescue_cmd_unset): Likewise.
3514 (attempt_normal_mode): Use grub_command_find to get normal module.
3515 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3516 commands, remove grub_rescue_register_command calls.
3518 * normal/command.c (grub_register_command): Removed.
3519 (grub_unregister_command): Likewise.
3520 (grub_command_find): Likewise.
3521 (grub_iterate_commands): Likewise.
3522 (rescue_command): Likewise.
3523 (export_command): Moved to corecmd.c.
3524 (set_command): Removed.
3525 (unset_command): Likewise.
3526 (insmod_command): Likewise.
3527 (rmmod_command): Likewise.
3528 (lsmod_command): Likewise.
3529 (grub_command_init): Likewise.
3531 * normal/completion.c (iterate_command): Use cmd->prio to check for
3533 (complete_arguments): Use grub_extcmd_t structure to find options.
3534 (grub_normal_do_completion): Change function grub_iterate_commands to
3535 grub_command_iterate.
3537 * normal/execute.c (grub_script_execute_cmd): No need to parse
3540 * normal/main.c (grub_dyncmd_dispatcher): New function.
3541 (read_command_list): Register unload commands as dyncmd.
3542 (grub_cmd_normal): Use new command interface, register rescue,
3543 unregister normal at entry, register normal, unregister rescue at exit.
3545 * include/grub/list.h (grub_list_test_t): New type.
3546 (grub_list_iterate): Return int instead of void.
3547 (grub_list_insert): New function.
3548 (GRUB_AS_NAMED_LIST_P): New macro.
3549 (GRUB_AS_PRIO_LIST): Likewise.
3550 (GRUB_AS_PRIO_LIST_P): Likewise.
3551 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3552 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3553 (grub_prio_list): New structure.
3554 (grub_prio_list_insert): New function.
3555 (grub_prio_list_remove): New inline function.
3557 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3558 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3559 (GRUB_COMMAND_FLAG_MENU): Likewise.
3560 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3561 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3562 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3563 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3564 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3565 (grub_command): Likewise.
3566 (grub_register_command): Likewise.
3567 (grub_command_find): Likewise.
3568 (grub_iterate_commands): Likewise.
3569 (grub_command_init): Likewise.
3570 (grub_arg_parse): Likewise.
3571 (grub_arg_show_help): Likewise.
3573 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3574 (grub_rescue_unregister_command): Likewise.
3576 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3577 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3578 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3580 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3581 grub_rescue_cmd_initrd.
3582 * include/grub/i386/loader.h: Likewise.
3583 * include/grub/x86_64/loader.h: Likewise.
3585 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3587 2009-03-21 Bean <bean123ch@gmail.com>
3589 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3590 instead of stat in mingw environment.
3592 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3594 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3596 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3599 2009-03-21 Bean <bean123ch@gmail.com>
3601 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3604 2009-03-18 Michel Dänzer <michel@daenzer.net>
3606 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3607 checking inode flags for EXT4_EXTENTS_FLAG.
3609 2009-03-18 Robert Millan <rmh@aybabtu.com>
3611 * loader/i386/linux.c: Include `<grub/video.h>' and
3612 `<grub/i386/pc/vbe.h>'..
3613 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3614 (grub_linux32_boot): Attempt to configure video settings with
3615 grub_linux_setup_video().
3616 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3617 to avoid grub_console_fini() which would step out of graphical mode
3620 2009-03-14 Robert Millan <rmh@aybabtu.com>
3622 Fix build on powerpc.
3623 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3625 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3627 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3628 background image command.
3630 2009-03-12 Colin D Bennett <colin@gibibit.com>
3632 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3633 (grub_gfxterm_putchar): Extract pairs of identical calls to
3634 draw_cursor out of conditional blocks.
3636 2009-03-11 Pavel Roskin <proski@gnu.org>
3638 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3639 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3641 2009-03-11 Robert Millan <rmh@aybabtu.com>
3643 * loader/i386/multiboot_elfxx.c
3644 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3646 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3648 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3651 2009-03-11 Robert Millan <rmh@aybabtu.com>
3653 * loader/i386/multiboot.c (code_size): New variable.
3654 (grub_multiboot): Define offsets by adding to `code_size' rather
3655 than subtracting from `grub_multiboot_payload_size'. Provide
3656 4-byte alignment to MBI and others by increasing
3657 `boot_loader_name_length' appropriately.
3659 * loader/i386/multiboot_elfxx.c
3660 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3662 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3664 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3667 2009-03-08 Robert Millan <rmh@aybabtu.com>
3669 Make loader/i386/linux.c usable on i386-pc again.
3671 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3673 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3676 2009-03-07 Bean <bean123ch@gmail.com>
3678 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3681 2009-03-06 Robert Millan <rmh@aybabtu.com>
3683 Fix display issue on terminals with screen size other than 80x25
3684 (e.g. gfxterm with resolution higher than 640x480).
3686 * normal/main.c (grub_normal_init_page): Display title text in a
3687 position relative to the center of the terminal instead of relying
3688 on a hardcoded offset.
3690 2009-03-04 Robert Millan <rmh@aybabtu.com>
3692 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3695 * Makefile.in (host_kernel): New variable.
3696 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3697 scripts instead of just the windows one.
3698 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3700 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3702 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3704 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3705 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3706 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3707 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3708 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3709 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3711 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3713 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3714 or if there's no space for the disk label and print the partition number on a
3717 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3719 * util/misc.c: Include <time.h>.
3720 (grub_millisleep): New function.
3722 2009-03-04 Bean <bean123ch@gmail.com>
3724 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3725 another option -mno-red-zone.
3727 * commands/handler.c: Change module description.
3729 * kern/handler.c: Add missing space at the end of description line.
3731 * kern/list.c: Likewise.
3733 2009-03-03 Robert Millan <rmh@aybabtu.com>
3735 Move more components to the relocation area, and fix mbi pointer
3736 handling to use the destination rather than the origin (thanks to
3737 Vladimir Serbinenko for spotting).
3739 * loader/i386/multiboot.c (mbi_dest): New variable.
3740 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3741 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3744 2009-03-01 Bean <bean123ch@gmail.com>
3746 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3747 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3748 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3749 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3751 * loader/i386/efi/linux.c (acpi_guid): New variable.
3752 (acpi_guid): Likewise.
3753 (EBDA_SEG_ADDR): New constant.
3754 (LOW_MEM_ADDR): Likewise.
3755 (FAKE_EBDA_SEG): Likewise.
3756 (fake_bios_data): New function.
3757 (grub_linux_boot): Call fake_bios_data.
3759 2009-03-01 Bean <bean123ch@gmail.com>
3761 * commands/terminal.c: Removed.
3763 * commands/handler.c: New file.
3765 * include/grub/list.h: Likewise.
3767 * include/grub/handler.h: Likewise.
3769 * kern/list.c: Likewise.
3771 * kern/handler.c: Likewise.
3773 * kern/term.h: Include header file <grub/handler.h>.
3774 (grub_term_input): Move next field to the beginning.
3775 (grub_term_output): Likewise.
3776 (grub_term_input_class): New variable.
3777 (grub_term_output_class): Likewise.
3778 (grub_term_register_input): Changed to inline function.
3779 (grub_term_register_output): Likewise.
3780 (grub_term_unregister_input): Likewise.
3781 (grub_term_unregister_output): Likewise.
3782 (grub_term_set_current_input): Likewise.
3783 (grub_term_set_current_output): Likewise.
3784 (grub_term_get_current_input): Likewise.
3785 (grub_term_get_current_output): Likewise.
3786 (grub_term_iterate_input): Removed.
3787 (grub_term_iterate_output): Likewise.
3789 * kern/term.c (grub_term_list_input): Removed.
3790 (grub_term_list_output): Likewise.
3791 (grub_term_input_class): New variable.
3792 (grub_term_output_class): Likewise.
3793 (grub_cur_term_input): Change variable as macro.
3794 (grub_cur_term_output): Likewise.
3795 (grub_term_register_input): Removed.
3796 (grub_term_register_output): Likewise.
3797 (grub_term_unregister_input): Likewise.
3798 (grub_term_unregister_output): Likewise.
3799 (grub_term_set_current_input): Likewise.
3800 (grub_term_set_current_output): Likewise.
3801 (grub_term_iterate_input): Likewise.
3802 (grub_term_iterate_output): Likewise.
3803 (grub_term_get_current_input): Likewise.
3804 (grub_term_get_current_output): Likewise.
3806 * util/grub-editenv.c: Include header file <grub/handler.h>.
3807 (grub_term_get_current_input): Removed.
3808 (grub_term_get_current_output): Likewise.
3809 (grub_term_input_class): New variable.
3810 (grub_term_output_class): Likewise.
3812 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3813 (grub_term_get_current_output): Likewise.
3814 (grub_term_input_class): New variable.
3815 (grub_term_output_class): Likewise.
3817 * util/grub-probe.c (grub_term_get_current_input): Removed.
3818 (grub_term_get_current_output): Likewise.
3819 (grub_term_input_class): New variable.
3820 (grub_term_output_class): Likewise.
3822 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3823 (grub_term_get_current_output): Likewise.
3824 (grub_term_input_class): New variable.
3825 (grub_term_output_class): Likewise.
3827 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3828 (terminal_mod_SOURCES): Likewise.
3829 (terminal_mod_CFLAGS): Likewise.
3830 (terminal_mod_LDFLAGS): Likewise.
3832 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3834 (kernel_img_SOURCES): Add list.c and handler.c.
3835 (kernel_img_HEADERS): Add list.h and handler.h.
3837 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3839 (kernel_mod_SOURCES): Add list.c and handler.c.
3840 (kernel_mod_HEADERS): Add list.h and handler.h.
3842 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3844 (kernel_elf_SOURCES): Add list.c and handler.c.
3845 (kernel_elf_HEADERS): Add list.h and handler.h.
3847 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3849 (kernel_elf_SOURCES): Add list.c and handler.c.
3850 (kernel_elf_HEADERS): Add list.h and handler.h.
3852 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3854 (kernel_mod_SOURCES): Add list.c and handler.c.
3855 (kernel_mod_HEADERS): Add list.h and handler.h.
3857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3859 (kernel_elf_SOURCES): Add list.c and handler.c.
3860 (kernel_elf_HEADERS): Add list.h and handler.h.
3862 2009-02-27 Robert Millan <rmh@aybabtu.com>
3864 Factorize elf32 / elf64 code in Multiboot loader. This will
3865 prevent it from getting out of sync again.
3867 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3868 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3869 grub_multiboot_load_elf64): Move from here ...
3870 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3871 grub_multiboot_load_elf): ... to here (new file).
3873 2009-02-27 Robert Millan <rmh@aybabtu.com>
3875 * util/grub.d/10_linux.in: Rename "single-user mode" to
3878 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3880 Don't leak in SCSI code.
3881 * disk/scsi.c (grub_scsi_close): free `scsi'.
3883 2009-02-27 Robert Millan <rmh@aybabtu.com>
3885 * loader/i386/pc/multiboot.c: Move from here ...
3886 * loader/i386/multiboot.c: ... to here. Update all users.
3888 2009-02-27 Robert Millan <rmh@aybabtu.com>
3890 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3891 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3893 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3895 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3898 2009-02-27 Robert Millan <rmh@aybabtu.com>
3900 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3901 `0x' qualifier as 0 when base is specified as parameter).
3903 2009-02-24 Bean <bean123ch@gmail.com>
3905 * configure.ac: Check for -mcmodel=large in x86_64 target.
3907 * include/grub/efi/api.h (efi_call_10): New macro.
3908 (efi_wrap_10): New function.
3910 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3911 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3912 (GRUB_PE32_REL_BASED_LOW): Likewise.
3913 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3914 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3915 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3916 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3917 (GRUB_PE32_REL_BASED_REL): Likewise.
3918 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3919 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3920 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3922 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3925 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3926 (efi_wrap_10): New function.
3928 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3930 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3931 MB/MBP model (NV chipset).
3932 (devdata_devs): Add devpath_5 to the list.
3934 * load/i386/efi/linux.c (video_base): Remove variable.
3935 (RGB_MASK): New macro.
3936 (RGB_MAGIC): Likewise.
3937 (LINE_MIN): Likewise.
3938 (LINE_MAX): Likewise.
3939 (FBTEST_STEP): Likewise.
3940 (FBTEST_COUNT): Likewise.
3941 (fb_list): New variable.
3942 (grub_find_video_card): Remove function.
3943 (find_framebuf): New function.
3944 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3947 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3950 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3952 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3954 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3957 2009-02-22 Robert Millan <rmh@aybabtu.com>
3959 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3960 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3961 in our relocation, instead of using it directly from heap. Also
3962 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3964 2009-02-21 Robert Millan <rmh@aybabtu.com>
3966 Implement USB keyboard support (based on patch by Marco Gerards)
3968 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3969 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3970 (usb_keyboard_mod_LDFLAGS): New variables.
3972 * term/usb_keyboard.c: New file.
3974 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3976 Corrected wrong declaration
3978 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3980 2009-02-14 Christian Franke <franke@computer.org>
3982 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3983 (grub_lspci_iter): Print class code and programming interface byte.
3985 2009-02-14 Christian Franke <franke@computer.org>
3987 * gendistlist.sh: Ignore `.svn' directories.
3989 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3991 * fs/fat.c: Add 2009 to Copyright line.
3993 2009-02-14 Christian Franke <franke@computer.org>
3995 * commands/hdparm.c: New file. Provides `hdparm' command
3996 which sends ATA commands via grub_disk_ata_pass_through ().
3998 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4000 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4001 and <grub/cpu/io.h> to include/grub/ata.h.
4002 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4003 (GRUB_CDROM_SECTOR_SIZE): Remove.
4004 (GRUB_ATA_*): Move to include/grub/ata.h.
4005 (GRUB_ATAPI_*): Likewise.
4006 (enum grub_ata_commands): Likewise.
4007 (enum grub_ata_timeout_milliseconds): Likewise.
4008 (struct grub_ata_device): Likewise.
4009 (grub_ata_regset): Likewise.
4010 (grub_ata_regget): Likewise.
4011 (grub_ata_regset2): Likewise.
4012 (grub_ata_regget2): Likewise.
4013 (grub_ata_check_ready): Likewise.
4014 (grub_ata_wait_not_busy): Remove static, exported in
4016 (grub_ata_wait_drq): Likewise.
4017 (grub_ata_pio_read): Likewise.
4019 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4020 function for hdparm.mod.
4022 * include/grub/ata.h: New file, contains declarations from
4024 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4026 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4027 (grub_disk_ata_pass_through): New exported variable.
4029 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4031 2009-02-13 Colin D Bennett <colin@gibibit.com>
4033 Support multiple fallback entries, and provide an API to support
4034 executing default+fallback menu entries. Renamed the `terminal' menu
4037 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4038 variable declaration.
4039 (grub_menu_execute_callback): New structure declaration.
4040 (grub_menu_execute_callback_t): New typedef.
4041 (grub_menu_execute_with_fallback): New function declaration.
4042 (grub_menu_get_entry): Likewise.
4043 (grub_menu_get_timeout): Likewise.
4044 (grub_menu_set_timeout): Likewise.
4046 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4048 * normal/menu.c (grub_wait_after_message): Moved to
4049 `normal/menu_text.c'.
4050 (draw_border): Likewise.
4051 (print_message): Likewise.
4052 (print_entry): Likewise.
4053 (print_entries): Likewise.
4054 (grub_menu_init_page): Likewise.
4055 (get_entry_number): Likewise.
4056 (print_timeout): Likewise.
4057 (run_menu): Likewise.
4058 (grub_menu_execute_entry): Likewise.
4059 (show_text_menu): Likewise.
4060 (get_and_remove_first_entry_number): New function.
4061 (grub_menu_execute_with_fallback): Likewise.
4062 (get_entry): Renamed to ...
4063 (grub_menu_get_entry): .. this and made it global.
4064 (get_timeout): Renamed to ...
4065 (grub_menu_get_timeout): ... this and made it global.
4066 (set_timeout): Renamed to ...
4067 (grub_menu_set_timeout): ... this and made it global.
4068 (grub_normal_terminal_menu_viewer): Renamed to ...
4069 (grub_normal_text_menu_viewer): ... this.
4071 * normal/menu_text.c: New file. Extracted text-menu-specific code
4074 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4075 (normal_mod_SOURCES): Likewise.
4077 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4078 (normal_mod_SOURCES): Likewise.
4080 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4081 (normal_mod_SOURCES): Likewise.
4083 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4084 (normal_mod_SOURCES): Likewise.
4086 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4087 (normal_mod_SOURCES): Likewise.
4089 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4090 (normal_mod_SOURCES): Likewise.
4092 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4093 (normal_mod_SOURCES): Likewise.
4095 2009-02-11 Robert Millan <rmh@aybabtu.com>
4097 * util/grub.d/00_header.in: Update old reference to `font' command.
4099 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4101 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4103 Based on patch from Javier MartÃn.
4105 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4107 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4108 to avoid false positives with FAT.
4109 (grub_fstest_SOURCES): Likewise.
4110 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4111 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4113 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4114 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4115 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4117 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4119 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4120 bpb.version_specific.fat12_or_fat16.fstype and
4121 bpb.version_specific.fat32.fstype.
4123 2009-02-08 Robert Millan <rmh@aybabtu.com>
4125 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4127 2009-02-08 Robert Millan <rmh@aybabtu.com>
4129 * Makefile.in (host_os, host_cpu): New variables.
4130 (target_os): Remove. Update all users.
4132 2009-02-08 Marco Gerards <marco@gnu.org>
4134 * Makefile.in (enable_grub_emu_usb): New variable.
4135 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4136 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4137 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4138 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4139 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4140 `usbtest.mod' and `usbms.mod'.
4141 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4142 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4143 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4144 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4145 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4148 * disk/usbms.c: New file.
4150 * include/grub/usb.h: Likewise.
4152 * include/grub/usbtrans.h: Likewise.
4154 * include/grub/usbdesc.h: Likewise.
4156 * bus/usb/usbtrans.c: Likewise.
4158 * bus/usb/ohci.c: Likewise.
4160 * bus/usb/uhci.c: Likewise.
4162 * bus/usb/usbhub.c: Likewise.
4164 * bus/usb/usb.c: Likewise.
4166 * commands/usbtest.c: Likewise.
4168 * util/usb.c: Likewise.
4170 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4172 * configure.ac: Test for libusb presence.
4174 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4176 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4178 * kern/mm.c: Add more comments.
4180 2009-02-08 Robert Millan <rmh@aybabtu.com>
4182 Patch from Javier MartÃn.
4183 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4184 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4186 2009-02-08 Robert Millan <rmh@aybabtu.com>
4188 * fs/cpio.c: Split tar functionality to ...
4189 * fs/tar.c: ... here (new file). Update all users.
4191 2009-02-07 Robert Millan <rmh@aybabtu.com>
4193 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4194 backward-incompatible features.
4196 Based on patch from Javier MartÃn, with some adjustments.
4198 2009-02-07 Michael Scherer <misc@mandriva.org>
4200 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4202 2009-02-07 Robert Millan <rmh@aybabtu.com>
4204 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4205 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4206 after the RAID stuff.
4208 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4210 Fixes problem when running vbetest command as reported by
4211 Vladimir Serbinenko <phcoder@gmail.com>.
4213 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4215 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4217 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4218 /dev/md/NpN style mdraid devices.
4220 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4222 * util/unifont2pff.rb: Remove.
4224 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4226 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4229 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4231 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4232 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4233 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4234 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4235 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4236 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4237 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4239 2009-02-02 Christian Franke <franke@computer.org>
4241 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4243 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4245 * INSTALL: Note that we now require at least autoconf 2.59 and
4246 that LZO is optional.
4248 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4250 Base on patch on bug #24154 created by Tomas Tintera
4253 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4255 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4257 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4258 <bero@arklinux.org>.
4260 * normal/parser.y (script_init): Add missing semicolon.
4262 2009-01-31 Colin D Bennett <colin@gibibit.com>
4264 * normal/main.c: Add include to grub/menu_viewer.h.
4265 (free_menu_entry_classes): Added.
4266 (grub_normal_menu_addentry): Added class property handling.
4267 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4268 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4270 * normal/menu_viewer.c: New file.
4272 * normal/menu.c (run_menu_entry): Renamed to ...
4273 (grub_menu_execute_entry): ... this and made it as global.
4274 (grub_menu_run): Renamed to ...
4275 (show_text_menu): ... this and made it local.
4276 (show_text_menu): Adapt to new function names.
4277 (grub_normal_terminal_menu_viewer): New global variable.
4279 * include/grub/menu.h: New file.
4281 * include/grub/menu_viewer.h: New file.
4283 * include/grub/normal.h: Added include to grub/menu.h.
4284 (grub_menu_entry): Moved to include/grub/menu.h.
4285 (grub_menu_entry_t): Likewise.
4286 (grub_menu): Likewise.
4287 (grub_menu_t): Likewise.
4288 (grub_normal_terminal_menu_viewer): Added.
4289 (grub_menu_execute_entry): Likewise.
4290 (grub_menu_run): Removed.
4292 * DISTLIST: Added include/grub/menu.h.
4293 Added include/grub/menu_viewer.h.
4294 Added normal/menu_viewer.c.
4296 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4298 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4299 arglist for menutitle arguments.
4301 * normal/main.c (grub_normal_menu_addentry): Likewise.
4303 * normal/parser.y (menuentry): Likewise.
4305 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4307 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4308 (grub_script_create_cmdmenu): Likewise.
4310 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4312 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4315 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4317 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4319 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4321 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4323 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4325 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4327 2009-01-30 Christian Franke <franke@computer.org>
4329 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4330 in option help text.
4332 2009-01-27 Pavel Roskin <proski@gnu.org>
4334 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4336 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4338 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4340 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4342 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4343 unregister function.
4345 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4347 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4349 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4351 * util/grub-mkfont.c (usage): Fix typo.
4353 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4355 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4357 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4359 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4361 * kern/misc.c (grub_strcasecmp): New function.
4362 (grub_strcasecmp): Use grub_size_t instead of int for length.
4364 * include/grub/misc.h: Update function prototypes.
4366 2009-01-26 Robert Millan <rmh@aybabtu.com>
4368 * configure.ac: Fix cross-compilation check.
4370 2009-01-22 Christian Franke <franke@computer.org>
4372 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4373 (precision) digit string. Allow `.format2' without `format1' (width).
4374 Limit input chars for `%s' output to `format2' if specified. This is
4375 compatible with standard printf ().
4377 2009-01-22 Christian Franke <franke@computer.org>
4379 * disk/ata.c (grub_ata_wait_status): Replace by ...
4380 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4381 other status bits may be invalid while BSY is asserted.
4382 (grub_ata_check_ready): New function.
4383 (grub_ata_cmd): Removed.
4384 (grub_ata_wait_drq): New function.
4385 (grub_ata_strncpy): Remove inline.
4386 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4387 and error check now done by grub_ata_wait_drq ().
4388 (grub_ata_pio_write): Likewise.
4389 (grub_atapi_identify): Set DEV before check for !BSY. Use
4390 grub_ata_wait_drq () to wait for data.
4391 (grub_ata_device_initialize): Add status register check to
4392 detect missing SATA slave devices. Add debug messages.
4393 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4394 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4395 transfer loop by grub_ata_pio_write ().
4396 (grub_ata_identify): Set DEV before check for !BSY. Use
4397 grub_ata_wait_drq () to wait for data.
4398 (grub_ata_setaddress): Set DEV before check for !BSY.
4399 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4400 read/write in one loop. Fix invalid command on write. Fix incomplete
4401 command on (size % batch) == 0. Add missing error check after write of
4402 last block. Add debug messages.
4403 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4405 2009-01-19 Christian Franke <franke@computer.org>
4407 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4408 (GRUB_ATAPI_IREASON_*): Likewise.
4409 (grub_ata_pio_write): Fix timeout error return.
4410 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4411 (grub_atapi_wait_drq): New function.
4412 (grub_atapi_packet): New parameter `size'.
4413 Use grub_atapi_wait_drq () and direct write instead of
4414 grub_ata_pio_write ().
4415 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4416 reads the number of bytes requested by the device for each DRQ
4418 (grub_atapi_write): Remove old implementation, return not
4419 implemented instead.
4421 2009-01-19 Christian Franke <franke@computer.org>
4423 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4424 of 512 to calculate data size.
4425 (grub_scsi_read12): Likewise.
4426 (grub_scsi_write10): Likewise.
4427 (grub_scsi_write12): Likewise.
4428 (grub_scsi_read): Adjust size according to blocksize.
4429 Add checks for invalid blocksize and unaligned transfer.
4431 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4433 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4435 * term/gfxterm.c (write_char): Fix background rendering for wide
4438 2009-01-19 Robert Millan <rmh@aybabtu.com>
4440 * config.guess: Update to latest version from config git.
4441 * config.sub: Likewise.
4443 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4445 * Makefile.in: Change font compilation to use new grub-mkfont instead
4448 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4449 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4450 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4451 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4452 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4453 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4454 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4455 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4456 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4458 2009-01-16 Christian Franke <franke@computer.org>
4460 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4461 (enum grub_ata_timeout_milliseconds): New enum.
4462 (grub_ata_wait_status): Add parameter milliseconds.
4463 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4464 recovery from timed-out commands.
4465 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4466 return grub_errno instead of REG_ERROR.
4467 (grub_ata_pio_write): Add parameter milliseconds.
4468 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4469 Pass milliseconds to grub_ata_wait_status () and
4470 grub_ata_pio_read ().
4471 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4472 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4473 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4474 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4475 It is not suitable for device detection, because DEV bit is ignored,
4476 the command may run too long, and not all devices set the signature
4478 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4479 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4480 Fix device selection, DEV bit must be set first to address the registers
4481 of the correct device.
4482 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4483 grub_ata_pio_read/write ().
4484 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4485 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4487 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4489 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4491 2009-01-13 Bean <bean123ch@gmail.com>
4493 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4495 2009-01-13 Bean <bean123ch@gmail.com>
4497 * Makefile.in: (enable_grub_mkfont): New variable.
4498 (freetype_cflags): Likewise.
4499 (freetype_libs): Likewise.
4501 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4502 (grub_mkfont_SOURCES): New variable.
4503 (grub_mkfont_CFLAGS): Likewise.
4504 (grub_mkfont_LDFLAGS): Likewise.
4506 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4507 library if `--enable-grub-mkfont' is requested.
4508 (enable_grub_mkfont): New variable.
4509 (freetype_cflags): Likewise.
4510 (freetype_libs): Likewise.
4512 * util/grub-mkfont.c: New file.
4514 2009-01-12 Christian Franke <franke@computer.org>
4516 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4517 mode check. Fix setting of compat_use[].
4519 2009-01-10 Robert Millan <rmh@aybabtu.com>
4521 Update a few copyright years which we forgot to do in 2008 (only for
4522 files whose changes made in 2008 were copyright-significant)
4524 * Makefile.in: Add 2008 to Copyright line.
4525 * disk/ieee1275/ofdisk.c: Likewise.
4526 * disk/efi/efidisk.c: Likewise.
4527 * kern/dl.c: Likewise.
4528 * kern/sparc64/ieee1275/init.c: Likewise.
4529 * kern/mm.c: Likewise.
4530 * kern/efi/mm.c: Likewise.
4531 * boot/i386/pc/boot.S: Likewise.
4532 * genfslist.sh: Likewise.
4533 * fs/iso9660.c: Likewise.
4534 * fs/hfs.c: Likewise.
4535 * fs/jfs.c: Likewise.
4536 * fs/minix.c: Likewise.
4537 * fs/ufs.c: Likewise.
4538 * gensymlist.sh.in: Likewise.
4539 * genkernsyms.sh.in: Likewise.
4540 * include/grub/misc.h: Likewise.
4541 * include/grub/types.h: Likewise.
4542 * include/grub/symbol.h: Likewise.
4543 * include/grub/elf.h: Likewise.
4544 * include/grub/kernel.h: Likewise.
4545 * include/grub/disk.h: Likewise.
4546 * include/grub/dl.h: Likewise.
4547 * include/grub/i386/linux.h: Likewise.
4548 * include/grub/i386/pc/biosdisk.h: Likewise.
4549 * include/grub/efi/api.h: Likewise.
4550 * include/grub/efi/pe32.h: Likewise.
4551 * include/grub/util/misc.h: Likewise.
4552 * normal/execute.c: Likewise.
4553 * normal/arg.c: Likewise.
4554 * normal/completion.c: Likewise.
4555 * normal/lexer.c: Likewise.
4556 * normal/parser.y: Likewise.
4557 * normal/misc.c: Likewise.
4558 * commands/i386/pc/vbeinfo.c: Likewise.
4559 * commands/hexdump.c: Likewise.
4560 * commands/terminal.c: Likewise.
4561 * commands/ls.c: Likewise.
4562 * commands/help.c: Likewise.
4563 * partmap/pc.c: Likewise.
4564 * loader/efi/chainloader.c: Likewise.
4565 * loader/multiboot_loader.c: Likewise.
4566 * loader/i386/pc/multiboot2.c: Likewise.
4567 * term/efi/console.c: Likewise.
4568 * term/i386/pc/serial.c: Likewise.
4569 * util/lvm.c: Likewise.
4570 * util/console.c: Likewise.
4571 * util/i386/efi/grub-mkimage.c: Likewise.
4572 * util/raid.c: Likewise.
4574 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4576 * commands/videotest.c: Removed include to grub/machine/memory.h.
4578 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4579 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4580 (video_mod_SOURCES): Removed.
4581 (video_mod_CFLAGS): Likewise.
4582 (video_mod_LDFLAGS): Likewise.
4583 (gfxterm_mod_SOURCES): Likewise.
4584 (gfxterm_mod_CFLAGS): Likewise.
4585 (gfxterm_mod_LDFLAGS): Likewise.
4586 (videotest_mod_SOURCES): Likewise.
4587 (videotest_mod_CFLAGS): Likewise.
4588 (videotest_mod_LDFLAGS): Likewise.
4589 (bitmap_mod_SOURCES): Likewise.
4590 (bitmap_mod_CFLAGS): Likewise.
4591 (bitmap_mod_LDFLAGS): Likewise.
4592 (tga_mod_SOURCES): Likewise.
4593 (tga_mod_CFLAGS): Likewise.
4594 (tga_mod_LDFLAGS): Likewise.
4595 (jpeg_mod_SOURCES): Likewise.
4596 (jpeg_mod_CFLAGS): Likewise.
4597 (jpeg_mod_LDFLAGS): Likewise.
4598 (png_mod_SOURCES): Likewise.
4599 (png_mod_CFLAGS): Likewise.
4600 (png_mod_LDFLAGS): Likewise.
4602 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4603 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4604 (video_mod_SOURCES): Added.
4605 (video_mod_CFLAGS): Likewise.
4606 (video_mod_LDFLAGS): Likewise.
4607 (videotest_mod_SOURCES): Likewise.
4608 (videotest_mod_CFLAGS): Likewise.
4609 (videotest_mod_LDFLAGS): Likewise.
4610 (bitmap_mod_SOURCES): Likewise.
4611 (bitmap_mod_CFLAGS): Likewise.
4612 (bitmap_mod_LDFLAGS): Likewise.
4613 (tga_mod_SOURCES): Likewise.
4614 (tga_mod_CFLAGS): Likewise.
4615 (tga_mod_LDFLAGS): Likewise.
4616 (jpeg_mod_SOURCES): Likewise.
4617 (jpeg_mod_CFLAGS): Likewise.
4618 (jpeg_mod_LDFLAGS): Likewise.
4619 (png_mod_SOURCES): Likewise.
4620 (png_mod_CFLAGS): Likewise.
4621 (png_mod_LDFLAGS): Likewise.
4622 (gfxterm_mod_SOURCES): Likewise.
4623 (gfxterm_mod_CFLAGS): Likewise.
4624 (gfxterm_mod_LDFLAGS): Likewise.
4626 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4627 grub/machine/console.h.
4629 2009-01-04 Jerone Young <jerone@gmail.com>
4631 Make on screen instructions clearer
4633 Based on patch created by Jidanni <jidanni@jidanni.org>
4635 * normal/menu.c: print clearer instructions on the screen
4637 2009-01-02 Colin D Bennett <colin@gibibit.com>
4641 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4642 build system and fixed gfxterm.c to work with different sized fonts.
4644 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4646 * configure: Re-generated.
4648 * DISTLIST: Removed font/manager.c.
4650 Added font/font_cmd.c.
4652 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4655 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4657 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4659 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4661 * normal/menu.c: Likewise.
4663 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4664 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4666 * include/grub/font.h: Replaced with new file.
4668 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4669 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4670 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4671 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4672 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4673 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4674 fg_red, fg_green, fg_blue, fg_alpha.
4675 (grub_video_adapter): Removed blit_glyph.
4676 (grub_video_blit_glyph): Removed.
4678 * font/manager.c: Removed file.
4680 * font/font.c: New file.
4682 * font/font_cmd.c: Likewise.
4684 * video/video.c (grub_video_blit_glyph): Removed.
4686 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4687 (grub_video_vbe_map_rgba): Likewise.
4688 (grub_video_vbe_unmap_color_int): Likewise.
4689 (grub_video_vbe_blit_glyph): Removed.
4690 (grub_video_vbe_adapter): Removed blit_glyph.
4692 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4693 (get_pixel): Likewise.
4694 (set_pixel): Likewise.
4696 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4698 * term/gfxterm.c: Adapted to new font engine.
4700 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4702 * term/i386/pc/vga.c: Likewise.
4704 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4706 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4708 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4710 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4712 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4714 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4716 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4718 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4720 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4722 * util/grub.d/00_header.in: Changed to use new loadfont command.
4724 * util/grub-mkconfig_lib.in: Changed font extension.
4726 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4728 * util/getroot.c (grub_util_get_grub_dev): Add support for
4729 /dev/md/dNNpNN style partitionable mdraid devices.
4731 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4733 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4734 at a time limit of the PXE TFTP API correctly.
4735 (grub_pxefs_close): Likewise.
4737 2008-11-29 Robert Millan <rmh@aybabtu.com>
4739 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4740 grub_ata_device_initialize() calls.
4742 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4744 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4746 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4748 2008-11-28 Robert Millan <rmh@aybabtu.com>
4750 Fix build on powerpc-ieee1275. Based on patch created by
4751 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4752 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4753 `kern/ieee1275/mmap.c'.
4754 * include/grub/powerpc/ieee1275/memory.h: New file.
4756 Provide grub-install on coreboot.
4757 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4758 (grub_install_SOURCES): New variable.
4759 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4762 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4764 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4765 to `grub_term_input_t'.
4766 (grub_term_get_current_output): Change return type to
4767 `grub_term_output_t'.
4769 2008-11-22 Robert Millan <rmh@aybabtu.com>
4771 Fix breakage on coreboot due to declaration mismatch.
4772 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4773 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4774 grub_vga_text_cls().
4776 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4777 comments. Avoid copying one more byte than necessary (just in case).
4779 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4780 to 0x200000 (avoids trouble with some OFW implementations, and matches
4781 with the one in Yaboot).
4782 Reported by Manoel Abranches
4784 2008-11-20 Robert Millan <rmh@aybabtu.com>
4786 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4787 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4789 * util/grub-mkconfig_lib.in (grub_warn): New function.
4790 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4791 warnings, to obtain consistent formatting.
4792 * util/grub.d/00_header.in: Likewise.
4793 * util/update-grub_lib.in: Likewise.
4795 * loader/i386/linux.c (allocate_pages): Fix a warning.
4796 Move comment text to `#error' stanza.
4798 Harmonize ieee1275's grub_available_iterate() with the generic
4799 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4800 build problem on i386-ieee1275):
4801 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4802 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4803 parameter `type'. Update all users of this function.
4804 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4805 `kern/ieee1275/mmap.c'.
4806 * kern/ieee1275/init.c
4807 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4809 (grub_machine_mmap_iterate): ... this.
4810 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4811 return type to `grub_err_t'. Update all implementations of this
4813 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4816 Add `lsmmap' command (lists firmware-provided memory map):
4817 * commands/lsmmap.c: New file.
4818 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4819 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4821 * conf/powerpc-ieee1275.rmk: Likewise.
4822 * conf/i386-coreboot.rmk: Likewise.
4823 * conf/i386-ieee1275.rmk: Likewise.
4825 2008-11-19 Robert Millan <rmh@aybabtu.com>
4827 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4828 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4829 constraints to initrd allocation (based on code from
4830 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4831 for Linux to find it.
4833 2008-11-14 Robert Millan <rmh@aybabtu.com>
4835 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4836 order to cope with duplicate slashes.
4838 2008-11-14 Robert Millan <rmh@aybabtu.com>
4840 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4841 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4842 don't want to mess with lower memory, because it is used in the Linux
4845 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4846 an appropriate place in lower memory, between 0x10000 and 0x90000,
4847 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4848 is in our heap (probably as a result of it being corrupted during
4849 decompression). Add #error instance with comment to explain why this
4850 loader isn't currently usable on PC/BIOS.
4852 2008-11-14 Robert Millan <rmh@aybabtu.com>
4854 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4855 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4857 2008-11-12 Robert Millan <rmh@aybabtu.com>
4859 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4861 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4862 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4864 * include/grub/i386/pc/memory.h: ... to here.
4866 2008-11-12 Robert Millan <rmh@aybabtu.com>
4868 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4871 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4872 (grub_console_cur_color, grub_console_real_putchar)
4873 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4874 (grub_console_setcolorstate, grub_console_setcolor)
4875 (grub_console_getcolor): Move from here ...
4876 * include/grub/i386/vga_common.h: ... to here (new file).
4878 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4879 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4881 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4882 `<grub/i386/vga_common.h>'.
4884 2008-11-12 Robert Millan <rmh@aybabtu.com>
4886 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4887 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4888 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4890 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4891 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4893 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4894 grub_console_init() with call to grub_vga_text_init().
4895 (grub_machine_fini): Replace call to
4896 grub_console_fini() with call to grub_vga_text_fini() and
4897 grub_at_keyboard_fini().
4899 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4900 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4901 (grub_console_setcolorstate, grub_console_setcolor)
4902 (grub_console_getcolor): New function prototypes.
4904 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4905 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4906 (grub_vga_text_setcursor): Static-ize.
4907 (grub_vga_text_term): New structure.
4908 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4910 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4911 (grub_console_cur_color, grub_console_standard_color)
4912 (grub_console_normal_color, grub_console_highlight_color)
4913 (map_char, grub_console_putchar, grub_console_getcharwidth)
4914 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4915 (grub_console_getcolor): Move from here ...
4916 * term/i386/vga_common.c: ... to here (same function names).
4918 2008-11-12 Robert Millan <rmh@aybabtu.com>
4920 Use newly-added Multiboot support in coreboot.
4922 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4923 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4925 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4926 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4927 (codestart): Store the MBI in `startup_multiboot_info' when we're
4928 being loaded using Multiboot.
4930 * kern/i386/coreboot/init.c (grub_machine_init): Move
4931 grub_at_keyboard_init() call to beginning of function (useful for
4932 debugging). Call grub_machine_mmap_init() before attempting to use
4933 grub_machine_mmap_iterate().
4934 (grub_lower_mem, grub_upper_mem): Move from here ...
4935 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4938 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4941 2008-11-12 Robert Millan <rmh@aybabtu.com>
4943 Fix a regression introduced by the at_keyboard.mod split. Because
4944 some terminals are default on some platforms and non-default on
4945 others, the first terminal being registered determines which is
4946 going to be default.
4948 * kern/term.c (grub_term_register_input): If this is the first
4949 terminal being registered, set it as the current one.
4950 (grub_term_register_output): Likewise.
4952 * term/efi/console.c (grub_console_init): Do not call
4953 grub_term_set_current_output() or grub_term_set_current_input().
4954 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4955 * term/i386/pc/console.c (grub_console_init): Likewise.
4956 (grub_console_fini): Do not call grub_term_set_current_input()
4957 (but leave grub_term_set_current_output() to restore text mode).
4959 2008-11-10 Robert Millan <rmh@aybabtu.com>
4961 * util/grub.d/00_header.in: Add backward compatibility check for
4962 versions of terminal.mod that don't understand `terminal_input' or
4965 2008-11-09 Robert Millan <rmh@aybabtu.com>
4967 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4968 `terminal_input' / `terminal_output', not `terminal'.
4970 2008-11-08 Robert Millan <rmh@aybabtu.com>
4972 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4973 (DISTCLEANFILES): Add `build_env.mk'.
4975 2008-11-08 Robert Millan <rmh@aybabtu.com>
4977 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4978 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4979 members. Update all users.
4980 * util/console.c (grub_ncurses_term): Split in ...
4981 (grub_ncurses_term_input): ... this, and ...
4982 (grub_ncurses_term_output): ... this. Update all users.
4983 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4985 2008-11-08 Robert Millan <rmh@aybabtu.com>
4987 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4988 (PKGDATA): Add $(pkgdata_SRCDIR).
4989 (pkglib_BUILDDIR): New variable.
4990 (pkgdata_SRCDIR): New variable.
4991 (build_env.mk): New target.
4992 (include_DATA): New variable.
4993 (install-local): Install $(include_DATA) files in $(includedir).
4995 2008-11-07 Pavel Roskin <proski@gnu.org>
4997 * gendistlist.sh: Use C locale for sorting to ensure consistent
4998 output on all systems.
5000 * util/grub.d/00_header.in: Remove incorrect space before
5003 2008-11-07 Robert Millan <rmh@aybabtu.com>
5005 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5007 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5008 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5009 (based on find_multi_boot1_header).
5010 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5011 using find_multi_boot2_header(), and abort if neither Multiboot or
5012 Multiboot headers were found.
5014 2008-11-07 Robert Millan <rmh@aybabtu.com>
5016 Modularize at_keyboard.mod:
5018 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5019 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5020 (at_keyboard_mod_LDFLAGS): New variables.
5022 Actual terminal split:
5024 * include/grub/term.h (struct grub_term): Split in ...
5025 (struct grub_term_input): ... this, and ...
5026 (struct grub_term_output): ... this. Update all users.
5027 (grub_term_set_current): Split in ...
5028 (grub_term_set_current_input): ... this, and ...
5029 (grub_term_set_current_output): ... this.
5030 (grub_term_get_current): Split in ...
5031 (grub_term_get_current_input): ... this, and ...
5032 (grub_term_get_current_output): ... this.
5033 (grub_term_register): Split in ...
5034 (grub_term_register_input): ... this, and ...
5035 (grub_term_register_output): ... this.
5036 (grub_term_unregister): Split in ...
5037 (grub_term_unregister_input): ... this, and ...
5038 (grub_term_unregister_output): ... this.
5039 (grub_term_iterate): Split in ...
5040 (grub_term_iterate_input): ... this, and ...
5041 (grub_term_iterate_output): ... this.
5043 * kern/term.c (grub_term_list): Split in ...
5044 (grub_term_list_input): ... this, and ...
5045 (grub_term_list_output): ... this. Update all users.
5046 (grub_cur_term): Split in ...
5047 (grub_cur_term_input): ... this, and ...
5048 (grub_cur_term_output): ... this. Update all users.
5049 (grub_term_set_current): Split in ...
5050 (grub_term_set_current_input): ... this, and ...
5051 (grub_term_set_current_output): ... this.
5052 (grub_term_get_current): Split in ...
5053 (grub_term_get_current_input): ... this, and ...
5054 (grub_term_get_current_output): ... this.
5055 (grub_term_register): Split in ...
5056 (grub_term_register_input): ... this, and ...
5057 (grub_term_register_output): ... this.
5058 (grub_term_unregister): Split in ...
5059 (grub_term_unregister_input): ... this, and ...
5060 (grub_term_unregister_output): ... this.
5061 (grub_term_iterate): Split in ...
5062 (grub_term_iterate_input): ... this, and ...
5063 (grub_term_iterate_output): ... this.
5065 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5066 a check for input and one for output (and only attempt to get keys
5067 from user when input works).
5069 * util/grub-probe.c (grub_term_get_current): Split in ...
5070 (grub_term_get_current_input): ... this, and ...
5071 (grub_term_get_current_output): ... this.
5072 * util/grub-fstest.c: Likewise.
5073 * util/i386/pc/grub-setup.c: Likewise.
5074 * util/grub-editenv.c: Likewise.
5076 Portability adjustments:
5078 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5079 `term/i386/pc/at_keyboard.c'.
5080 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5081 grub_keyboard_controller_init() (now handled by terminal .init).
5082 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5083 grub_at_keyboard_init().
5084 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5085 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5086 at_keyboard.mod via input terminal interface).
5087 * include/grub/i386/coreboot/console.h: Convert into a stub for
5088 `<grub/i386/pc/console.h>'.
5090 Migrate full terminals to new API:
5092 * term/efi/console.c (grub_console_term): Split into ...
5093 (grub_console_term_input): ... this, and ...
5094 (grub_console_term_output): ... this. Update all users.
5095 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5096 (grub_ofconsole_init): Split into ...
5097 (grub_ofconsole_init_input): ... this, and ...
5098 (grub_ofconsole_init_output): ... this.
5099 (grub_ofconsole_term): Split into ...
5100 (grub_ofconsole_term_input): ... this, and ...
5101 (grub_ofconsole_term_output): ... this. Update all users.
5102 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5103 (grub_serial_term_input): ... this, and ...
5104 (grub_serial_term_output): ... this. Update all users.
5105 * term/i386/pc/console.c (grub_console_term): Split into ...
5106 (grub_console_term_input): ... this, and ...
5107 (grub_console_term_output): ... this. Update all users.
5108 (grub_console_term_input): Only enable it on PC/BIOS platform.
5109 (grub_console_init): Remove grub_keyboard_controller_init() call.
5111 Migrate input terminals to new API:
5113 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5114 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5115 i386-specific anyway).
5116 (grub_console_checkkey): Rename to ...
5117 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5119 (grub_keyboard_controller_orig): New variable.
5120 (grub_console_getkey): Rename to ...
5121 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5123 (grub_keyboard_controller_init): Static-ize. Save original
5124 controller value so that it can be restored ...
5125 (grub_keyboard_controller_fini): ... here (new function).
5126 (grub_at_keyboard_term): New structure.
5127 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5130 Migrate output terminals to new API:
5132 * term/i386/pc/vga.c (grub_vga_term): Change type to
5133 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5134 members. Update all users.
5135 * term/gfxterm.c (grub_video_term): Change type to
5136 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5137 members. Update all users.
5138 * include/grub/i386/pc/console.h (grub_console_checkkey)
5139 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5142 Migrate `terminal' command and userland tools to new API:
5144 * commands/terminal.c (grub_cmd_terminal): Split into ...
5145 (grub_cmd_terminal_input): ... this, and ...
5146 (grub_cmd_terminal_output): ... this.
5147 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5148 `terminal_input' and `terminal_output'.
5149 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5150 `terminal_input' / `terminal_output' API.
5151 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5152 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5153 provided ${GRUB_TERMINAL}, convert it).
5155 2008-11-04 Robert Millan <rmh@aybabtu.com>
5157 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5159 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5161 2008-11-03 Bean <bean123ch@gmail.com>
5163 * kern/elf.c (grub_elf32_load): Revert to previous code.
5164 (grub_elf64_load): Likewise.
5166 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5168 2008-11-01 Robert Millan <rmh@aybabtu.com>
5170 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5171 (TARGET_CPPFLAGS): Likewise.
5172 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5174 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5176 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5178 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5180 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5181 addition of objects until the code is not going to be able to fail.
5183 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5185 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5186 (add a missing NULL check, and correct them by moving the pointer
5187 operations after the actual check).
5189 2008-10-29 Robert Millan <rmh@aybabtu.com>
5191 * util/i386/pc/grub-install.in: Handle empty string as output from
5192 make_system_path_relative_to_its_root().
5194 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5196 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5197 circular metadata worst case scenario. If the metadata is circular
5198 then copy the wrap in place.
5199 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5200 project lib/format_text/layout.h
5201 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5203 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5205 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5207 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5209 * util/update-grub_lib.in: Mention filename in warning message.
5211 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5213 * NEWS: Update for rename of update-grub to grub-mkconfig.
5215 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5217 * util/update-grub_lib.in: Copy to ...
5218 * util/grub-mkconfig_lib.in: ... this. Update all users.
5219 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5220 * util/update-grub.in: Rename to ...
5221 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5222 option. Add `--output' option to allow users to specify the generated
5223 configuration file. Default to stdout.
5224 (update_grub_dir): Rename to ...
5225 (grub_mkconfig_dir): ... this.
5226 (grub_cfg): Default to an empty string.
5227 * conf/common.rmk (update-grub): Rename to ...
5228 (grub-mkconfig): ... this.
5229 (update-grub_lib): Copy to ...
5230 (grub-mkconfig_lib): ... this.
5231 (update-grub_SCRIPTS): Copy to ...
5232 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5233 (update-grub_DATA): Rename to ...
5234 (grub-mkconfig_DATA): ... this.
5236 2008-09-28 Robert Millan <rmh@aybabtu.com>
5238 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5239 to `modified'. Add the real `created' field.
5240 (grub_iso9660_uuid): Use `modified' rather than `created' for
5241 constructing the UUID.
5243 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5245 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5246 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5248 2008-09-28 Bean <bean123ch@gmail.com>
5250 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5251 Thanks to Christian Franke for finding this bug.
5253 2008-09-25 Robert Millan <rmh@aybabtu.com>
5255 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5256 instances of grub_util_get_disk_name() (see previous commit).
5258 2008-09-25 Robert Millan <rmh@aybabtu.com>
5260 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5261 `util/i386/get_disk_name.c'.
5262 * conf/i386-efi.rmk: Likewise.
5263 * conf/x86_64-efi.rmk: Likewise.
5264 * conf/i386-coreboot.rmk: Likewise.
5265 * conf/i386-ieee1275.rmk: Likewise.
5266 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5267 `util/ieee1275/get_disk_name.c'.
5268 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5269 * util/ieee1275/get_disk_name.c: Remove file.
5270 * util/i386/get_disk_name.c: Remove file.
5271 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5272 "hd%d" for device.map entries, rather than using
5273 grub_util_get_disk_name().
5275 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5277 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5279 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5281 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5283 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5285 (GRUB_TERM_PPAGE): Changed to 0x4900.
5287 2008-09-24 Robert Millan <rmh@aybabtu.com>
5289 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5290 macros (they were i386-pc specific).
5291 * include/grub/sparc64/ieee1275/console.h: Likewise.
5292 * include/grub/efi/console.h: Likewise.
5294 2008-09-22 Bean <bean123ch@gmail.com>
5296 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5297 resident and in attribute list.
5299 * include/grub/ntfs.h (BMP_LEN): Removed.
5301 2008-09-22 Bean <bean123ch@gmail.com>
5303 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5304 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5306 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5307 error occurs, as grub_disk_open will call grub_disk_close, which will
5308 call p->close (scsi).
5310 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5312 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5313 (AC_PREREQ): Bumped to 2.59.
5314 (AC_TRY_COMPILE): Replace obsolete macro with ...
5315 (AC_COMPILE_IFELSE): ... this.
5316 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5317 (AC_LINK_IFELSE): ... this.
5319 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5321 * autogen.sh: Add a call to `gendistlist.sh'.
5323 2008-09-19 Christian Franke <franke@computer.org>
5325 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5326 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5327 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5328 Export __enable_execute_stack() to modules.
5329 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5332 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5334 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5337 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5339 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5340 #include <grub/util/hostdisk.h>.
5342 2008-09-08 Robert Millan <rmh@aybabtu.com>
5344 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5345 segments when their filesz is zero (grub_file_read() interprets
5346 zero-size as "read until EOF", which results in memory corruption).
5347 Use `lowest_segment' rather than 0 for calculating the current
5348 segment load address.
5350 2008-09-08 Robert Millan <rmh@aybabtu.com>
5352 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5353 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5354 clobbered useful information.
5356 2008-09-08 Robert Millan <rmh@aybabtu.com>
5358 * include/grub/util/biosdisk.h: Move to ...
5359 * include/grub/util/hostdisk.h: ... here. Update all users.
5360 * util/biosdisk.c: Move to ...
5361 * util/hostdisk.c: ... here. Update all users.
5363 2008-09-07 Robert Millan <rmh@aybabtu.com>
5365 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5367 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5368 and length can be stored directly in the `mbi->mmap_addr' and
5369 `mbi->mmap_length' struct fields.
5371 2008-09-07 Robert Millan <rmh@aybabtu.com>
5373 * conf/i386.rmk: New file. Provides declaration for building
5375 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5376 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5378 Include `conf/i386.mk'.
5379 * conf/i386-efi.rmk: Likewise.
5380 * conf/x86_64-efi.rmk: Likewise.
5381 * conf/i386-coreboot.rmk: Likewise.
5382 * conf/i386-ieee1275.rmk: Likewise.
5384 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5386 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5387 Adds optimization support for BGR based modes.
5389 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5390 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5391 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5392 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5393 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5394 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5395 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5396 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5397 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5398 (grub_video_i386_vbeblit_index_index): Likewise.
5399 (grub_video_i386_vbeblit_replace_directN): Added.
5400 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5401 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5402 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5403 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5404 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5405 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5406 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5407 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5408 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5409 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5410 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5411 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5412 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5414 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5415 (grub_video_i386_vbefill_R8G8B8): Likewise.
5416 (grub_video_i386_vbefill_index): Likewise.
5417 (grub_video_i386_vbefill_direct32): Added.
5418 (grub_video_i386_vbefill_direct24): Likewise.
5419 (grub_video_i386_vbefill_direct16): Likewise.
5420 (grub_video_i386_vbefill_direct8): Likewise.
5422 * include/grub/video.h (grub_video_blit_format): Removed
5423 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5424 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5425 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5426 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5427 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5429 * video/video.c (grub_video_get_blit_format): Updated to use new
5430 blit formats. Added handling for 16 bit color modes.
5432 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5434 (common_blitter): Updated to use new blitters.
5436 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5438 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5439 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5440 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5441 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5442 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5443 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5444 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5445 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5446 (grub_video_i386_vbeblit_index_index): Likewise.
5447 (grub_video_i386_vbeblit_replace_directN): Added.
5448 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5449 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5450 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5451 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5452 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5453 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5454 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5455 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5456 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5457 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5458 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5459 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5460 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5462 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5463 (grub_video_i386_vbefill_R8G8B8): Likewise.
5464 (grub_video_i386_vbefill_index): Likewise.
5465 (grub_video_i386_vbefill_direct32): Added.
5466 (grub_video_i386_vbefill_direct24): Likewise.
5467 (grub_video_i386_vbefill_direct16): Likewise.
5468 (grub_video_i386_vbefill_direct8): Likewise.
5470 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5473 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5476 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5479 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5482 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5484 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5487 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5489 * fs/iso9660.c (grub_iso9660_date): New structure.
5490 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5491 (grub_iso9660_uuid): New function.
5493 2008-09-05 Bean <bean123ch@gmail.com>
5495 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5497 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5498 insensitive bit for names in Win32 and Win32 & DOS namespace.
5500 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5502 * include/grub/types.h (LONG_MAX): Likewise.
5504 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5506 * util/getroot.c: Include <config.h>.
5507 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5508 add support for /dev/md/N devices and handle LVM double dash escaping.
5510 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5512 * config.guess: Update to latest version from config git.
5513 * config.sub: Likewise.
5515 2008-09-03 Robert Millan <rmh@aybabtu.com>
5517 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5518 `disk->total_sectors'.
5520 2008-09-01 Colin D Bennett <colin@gibibit.com>
5522 * include/grub/normal.h: Fixed incorrect comment for
5523 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5525 2008-09-01 Colin D Bennett <colin@gibibit.com>
5527 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5528 values with defines.
5530 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5531 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5532 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5533 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5534 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5535 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5536 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5537 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5538 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5539 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5540 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5541 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5542 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5543 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5544 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5545 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5546 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5547 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5548 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5550 2008-08-31 Robert Millan <rmh@aybabtu.com>
5552 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5554 (grub_multiboot): Fix a few warnings.
5556 2008-08-31 Robert Millan <rmh@aybabtu.com>
5558 * loader/i386/pc/multiboot.c: Update comment not to say that
5559 boot_device support is unimplemented.
5561 2008-08-31 Robert Millan <rmh@aybabtu.com>
5563 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5564 or memory map support are unimplemented.
5566 2008-08-31 Colin D Bennett <colin@gibibit.com>
5568 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5570 2008-08-31 Colin D Bennett <colin@gibibit.com>
5572 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5573 total video memory in 'vbeinfo' output; show color format details for
5576 2008-08-30 Pavel Roskin <proski@gnu.org>
5578 * util/genmoddep.c: Remove for real this time.
5579 * DISTLIST: Remove util/genmoddep.c.
5581 2008-08-30 Robert Millan <rmh@aybabtu.com>
5583 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5584 as required by Multiboot spec (it was already 4-byte aligned, but
5587 2008-08-29 Pavel Roskin <proski@gnu.org>
5589 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5590 * kern/powerpc/ieee1275/startup.S: ... this.
5591 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5592 * DISTLIST: Likewise.
5594 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5595 grub/cpu/kernel.h. Add start label for consistency with other
5596 platforms. Add grub_prefix immediately after start. Add jump
5597 to the code after grub_prefix.
5598 * include/grub/powerpc/kernel.h: Provide valid values for
5599 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5601 2008-08-29 Bean <bean123ch@gmail.com>
5603 * configure.ac: Change host_os to cygwin for mingw.
5604 (asprintf): New check for function.
5606 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5607 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5609 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5610 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5611 sync, sleep and grub_util_get_disk_size for mingw.
5613 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5614 to get size in mingw.
5615 (open_device): Use flag O_BINARY if it's defined.
5616 (find_root_device): Add dummy code for mingw.
5618 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5619 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5620 (get_scsi_disk_name): Return 0 for mingw.
5622 * util/hostfs.c: #include <grub/util/misc.h>.
5623 (grub_hostfs_open): Use "rb" flag to open file, use
5624 grub_util_get_disk_size to get disk size for mingw.
5626 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5627 (asprintf): New function if HAVE_ASPRINTF is not set.
5628 (sync): New function for mingw.
5630 (grub_util_get_disk_size): Likewise.
5632 2008-08-28 Pavel Roskin <proski@gnu.org>
5634 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5637 2008-08-28 Robert Millan <rmh@aybabtu.com>
5639 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5641 2008-08-28 Robert Millan <rmh@aybabtu.com>
5643 Change find_grub_drive() syntax so it doesn't prevent it from
5644 detecting NULL names as errors.
5646 * util/biosdisk.c (find_grub_drive): Move free slot search code
5648 (find_free_slot): ... to here.
5649 (read_device_map): Use find_free_slot() to search for free slots.
5651 2008-08-27 Marco Gerards <marco@gnu.org>
5653 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5654 (scsi_mod_SOURCES): New variable.
5655 (scsi_mod_CFLAGS): Likewise
5656 (scsi_mod_LDFLAGS): Likewise.
5658 * disk/scsi.c: New file.
5660 * include/grub/scsi.h: Likewise.
5662 * include/grub/scsicmd.h: Likewise.
5664 * disk/ata.c: Include <grub/scsi.h>.
5665 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5667 (grub_ata_iterate): Skip ATAPI devices.
5668 (grub_ata_open): Only handle ATAPI devices.
5669 (struct grub_atapi_read): Removed.
5670 (grub_atapi_readsector): Likewise.
5671 (grub_ata_read): No longer handle ATAPI devices.
5672 (grub_ata_write): Likewise.
5673 (grub_atapi_iterate): New function.
5674 (grub_atapi_read): Likewise.
5675 (grub_atapi_write): Likewise.
5676 (grub_atapi_open): Likewise.
5677 (grub_atapi_close): Likewise.
5678 (grub_atapi_dev): New variable.
5679 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5680 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5682 * include/grub/disk.h (enum grub_disk_dev_id): Add
5683 `GRUB_DISK_DEVICE_SCSI_ID'.
5685 2008-08-26 Robert Millan <rmh@aybabtu.com>
5687 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5688 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5691 2008-08-23 Bean <bean123ch@gmail.com>
5693 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5694 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5695 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5696 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5698 (raid5rec_mod_SOURCES): New macro.
5699 (raid5rec_mod_CFLAGS): Likewise.
5700 (raid5rec_mod_LDFLAGS): Likewise.
5701 (raid6rec_mod_SOURCES): Likewise.
5702 (raid6rec_mod_CFLAGS): Likewise.
5703 (raid6rec_mod_LDFLAGS): Likewise.
5704 (mdraid_mod_SOURCES): Likewise.
5705 (mdraid_mod_CFLAGS): Likewise.
5706 (mdraid_mod_LDFLAGS): Likewise.
5707 (dm_nv_mod_SOURCES): Likewise.
5708 (dm_nv_mod_CFLAGS): Likewise.
5709 (dm_nv_mod_LDFLAGS): Likewise.
5711 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5712 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5713 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5715 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5716 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5718 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5720 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5722 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5724 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5726 * disk/raid5_recover.c: New file.
5728 * disk/raid6_recover.c: Likewise.
5730 * disk/mdraid_linux.c: Likewise.
5732 * disk/dmraid_nvidia.c: Likewise.
5734 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5737 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5738 calculate the size of raid device.
5739 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5740 different layout of raid5.
5741 (grub_raid_scan_device): Remove code specific to mdraid.
5742 (grub_raid_list): New variable.
5743 (free_array): New function.
5744 (grub_raid_register): Likewise.
5745 (grub_raid_unregister): Likewise.
5746 (grub_raid_rescan): Likewise.
5747 (GRUB_MOD_INIT): Don't iterate device here.
5748 (GRUB_MOD_FINI): Use free_array to release resource.
5750 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5751 (grub_raid5_recover_func_t): New function variable type.
5752 (grub_raid6_recover_func_t): Likewise.
5753 (grub_raid5_recover_func): New variable.
5754 (grub_raid6_recover_func): Likewise.
5755 (grub_raid_register): New function.
5756 (grub_raid_unregister): Likewise.
5757 (grub_raid_rescan): Likewise.
5758 (grub_raid_block_xor): Likewise.
5760 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5761 (CMD_CRC): New macro.
5763 (read_file): Handle device as well as file.
5764 (cmd_crc): New function.
5765 (fstest): Handle multiple disks.
5766 (options): Remove part, raw and long, add root and diskcount.
5767 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5768 (main): Find the first non option entry and ignore subsequent options,
5769 add handling for the new options, support multiple disks.
5771 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5773 2008-08-23 Bean <bean123ch@gmail.com>
5775 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5777 * genfslist.sh: Ignore kernel.mod.
5779 * genpartmaplist.sh: Likewise.
5781 2008-08-23 Robert Millan <rmh@aybabtu.com>
5783 * util/getroot.c (find_root_device): Skip anything that starts with
5784 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5786 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5788 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5789 * util/grub.d/00_header.in: Allow the administrator to change default
5790 gfxmode via ${GRUB_GFXMODE}.
5792 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5794 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5796 2008-08-21 Robert Millan <rmh@aybabtu.com>
5798 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5800 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5801 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5803 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5805 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5806 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5808 2008-08-19 Robert Millan <rmh@aybabtu.com>
5810 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5811 (struct grub_virtual_screen): Remove `cursor_color'.
5812 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5814 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5816 2008-08-18 Robert Millan <rmh@aybabtu.com>
5818 Unify (identical) linux_normal.c files.
5819 * loader/i386/efi/linux_normal.c: Move from here ...
5820 * loader/linux_normal.c: ... to here. Update all users.
5821 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5822 * loader/i386/ieee1275/linux_normal.c: Likewise.
5824 2008-08-18 Robert Millan <rmh@aybabtu.com>
5826 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5827 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5828 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5829 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5830 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5832 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5833 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5834 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5835 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5836 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5837 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5838 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5839 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5840 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5841 portably using grub_getxy().
5842 Replace `-EFI' with `-bzImage' in boot message.
5844 2008-08-17 Robert Millan <rmh@aybabtu.com>
5846 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5848 2008-08-17 Robert Millan <rmh@aybabtu.com>
5850 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5852 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5853 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5854 (grub_machine_mmap_iterate): New function declaration.
5855 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5857 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5860 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5861 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5862 Move e820 parsing from here ...
5863 * kern/i386/pc/mmap.c: New file.
5864 (grub_machine_mmap_iterate): ... to here.
5866 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5867 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5868 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5869 (grub_available_iterate): Redeclare to return `void', and redeclare
5870 its hook to use grub_uint64_t as addr and size parameters, and rename
5872 (grub_machine_mmap_iterate): ... this. Update all users.
5874 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5875 to make it more readable. Rename to ...
5876 (grub_machine_mmap_iterate): ... this.
5878 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5879 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5880 (grub_multiboot): Allocate an extra region after the payload, and fill
5881 it with a Multiboot memory map. Adjust a.out loader to calculate size
5882 with the extra space.
5883 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5884 with the extra space.
5886 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5888 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5890 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5892 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5893 mdate-sh to the list `find' searches for.
5894 * DISTLIST: Regenerated.
5896 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5898 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5899 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5900 genmoddep.awk, gensymlist.sh.in.
5901 (DISTDIRS): Add bus, docs, hook, lib.
5902 * DISTLIST: Regenerated.
5903 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5905 2008-08-16 Robert Millan <rmh@aybabtu.com>
5907 * disk/raid.c (grub_raid_init): Handle/report errors set by
5908 grub_device_iterate().
5909 * disk/lvm.c (grub_lvm_init): Likewise.
5911 2008-08-15 Bean <bean123ch@gmail.com>
5913 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5915 (datetime_mod_SOURCES): New macro.
5916 (datetime_mod_CFLAGS): Likewise.
5917 (datetime_mod_LDFLAGS): Likewise.
5918 (date_mod_SOURCES): Likewise.
5919 (date_mod_CFLAGS): Likewise.
5920 (date_mod_LDFLAGS): Likewise.
5921 (datehook_mod_SOURCES): Likewise.
5922 (datehook_mod_CFLAGS): Likewise.
5923 (datehook_mod_LDFLAGS): Likewise.
5925 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5927 (datetime_mod_SOURCES): New macro.
5928 (datetime_mod_CFLAGS): Likewise.
5929 (datetime_mod_LDFLAGS): Likewise.
5930 (date_mod_SOURCES): Likewise.
5931 (date_mod_CFLAGS): Likewise.
5932 (date_mod_LDFLAGS): Likewise.
5933 (datehook_mod_SOURCES): Likewise.
5934 (datehook_mod_CFLAGS): Likewise.
5935 (datehook_mod_LDFLAGS): Likewise.
5937 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5939 (datetime_mod_SOURCES): New macro.
5940 (datetime_mod_CFLAGS): Likewise.
5941 (datetime_mod_LDFLAGS): Likewise.
5942 (date_mod_SOURCES): Likewise.
5943 (date_mod_CFLAGS): Likewise.
5944 (date_mod_LDFLAGS): Likewise.
5945 (datehook_mod_SOURCES): Likewise.
5946 (datehook_mod_CFLAGS): Likewise.
5947 (datehook_mod_LDFLAGS): Likewise.
5949 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5951 (datetime_mod_SOURCES): New macro.
5952 (datetime_mod_CFLAGS): Likewise.
5953 (datetime_mod_LDFLAGS): Likewise.
5954 (date_mod_SOURCES): Likewise.
5955 (date_mod_CFLAGS): Likewise.
5956 (date_mod_LDFLAGS): Likewise.
5957 (datehook_mod_SOURCES): Likewise.
5958 (datehook_mod_CFLAGS): Likewise.
5959 (datehook_mod_LDFLAGS): Likewise.
5961 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5963 (datetime_mod_SOURCES): New macro.
5964 (datetime_mod_CFLAGS): Likewise.
5965 (datetime_mod_LDFLAGS): Likewise.
5966 (date_mod_SOURCES): Likewise.
5967 (date_mod_CFLAGS): Likewise.
5968 (date_mod_LDFLAGS): Likewise.
5969 (datehook_mod_SOURCES): Likewise.
5970 (datehook_mod_CFLAGS): Likewise.
5971 (datehook_mod_LDFLAGS): Likewise.
5973 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5975 * commands/date.c: New file.
5977 * hook/datehook.c: Likewise.
5979 * include/grub/lib/datetime.h: Likewise.
5981 * include/grub/i386/cmos.h: Likewise.
5983 * lib/datetime.c: Likewise.
5985 * lib/i386/datetime.c: Likewise.
5987 * lib/efi/datetime.c: Likewise.
5989 2008-08-14 Robert Millan <rmh@aybabtu.com>
5991 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5992 (grub_mkelfimage_SOURCES): New variable.
5993 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5995 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5996 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5997 * conf/powerpc-ieee1275.rmk: Likewise.
5998 * conf/i386-ieee1275.rmk: Likewise.
6000 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6001 * kern/i386/coreboot/init.c: Likewise.
6003 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6004 with `<grub/cpu/kernel.h>'.
6005 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6007 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6008 * kern/i386/coreboot/startup.S: Likewise.
6010 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6011 (GRUB_MOD_GAP): Remove.
6012 * include/grub/powerpc/kernel.h: New file.
6013 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6014 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6015 * include/grub/i386/kernel.h: New file.
6016 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6017 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6018 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6020 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6022 Use --directory when invoking grub_mkimage.
6024 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6025 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6026 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6027 and GRUB_KERNEL_CPU_PREFIX.
6029 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6031 * include/grub/err.h (grub_err_printf): New function prototype.
6032 * util/misc.c (grub_err_printf): New function.
6033 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6035 * kern/err.c (grub_print_error): Use grub_err_printf.
6037 2008-08-13 Robert Millan <rmh@aybabtu.com>
6039 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6041 2008-08-13 Robert Millan <rmh@aybabtu.com>
6043 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6046 2008-08-12 Robert Millan <rmh@aybabtu.com>
6048 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6049 of the relocation code from here ...
6050 (grub_multiboot): ... to here.
6051 (forward_relocator, backward_relocator): Move from here ...
6052 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6053 (grub_multiboot_backward_relocator): ... to here.
6054 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6055 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6056 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6057 (grub_multiboot_forward_relocator_end)
6058 (grub_multiboot_backward_relocator)
6059 (grub_multiboot_backward_relocator_end): New variables.
6061 2008-08-12 Bean <bean123ch@gmail.com>
6063 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6065 2008-08-11 Robert Millan <rmh@aybabtu.com>
6067 * kern/i386/linuxbios/startup.S: Move from here ...
6068 * kern/i386/coreboot/startup.S: ... to here.
6070 * kern/i386/linuxbios/init.c: Move from here ...
6071 * kern/i386/coreboot/init.c: ... to here.
6073 * kern/i386/linuxbios/table.c: Move from here ...
6074 * kern/i386/coreboot/mmap.c: ... to here.
6076 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6078 2008-08-11 Robert Millan <rmh@aybabtu.com>
6080 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6081 errors. Leave it to the upper layer to handle them.
6083 2008-08-09 Christian Franke <franke@computer.org>
6085 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6086 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6087 Install `grub.d/10_windows' only on Cygwin.
6088 * configure.ac: Add subst of `target_os'.
6089 Check `target_os' also before setting TARGET_OBJ2ELF.
6090 Add `--enable-grub-pe2elf'.
6092 2008-08-08 Robert Millan <rmh@aybabtu.com>
6094 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6095 (grub_last_time): Change type to grub_uint64_t.
6096 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6097 (grub_disk_close): Likewise.
6099 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6100 (run_menu): Migrate code from to using grub_get_time_ms().
6102 * util/misc.c (grub_get_time_ms): New function.
6104 2008-08-08 Marco Gerards <marco@gnu.org>
6106 * disk/ata.c (grub_ata_regget): Change return type to
6108 (grub_ata_regget2): Likewise.
6109 (grub_ata_wait_status): New function.
6110 (grub_ata_wait_busy): Removed function, updated all users to use
6111 `grub_ata_wait_status'.
6112 (grub_ata_wait_drq): Likewise.
6113 (grub_ata_cmd): New function.
6114 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6116 (grub_ata_pio_write): Add error handling.
6117 (grub_atapi_identify): Likewise.
6118 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6120 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6121 handling. Actually use the detected registers. Reorder the
6122 detection logic such that it is easier to read.
6123 (grub_ata_pciinit): Do not assign the same ID to each controller.
6124 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6126 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6128 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6130 2008-08-08 Marco Gerards <marco@gnu.org>
6134 2008-08-07 Bean <bean123ch@gmail.com>
6136 * include/grub/x86_64/pci.h: New file.
6138 2008-08-07 Christian Franke <franke@computer.org>
6140 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6141 (TIMER2_GATE): Likewise.
6142 (grub_pit_wait): Add enable/disable of the timer2 gate
6143 bit of port 0x61. This fixes a possible infinite loop.
6145 2008-08-07 Bean <bean123ch@gmail.com>
6147 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6148 kern/i386/tsc.c and kern/i386/pit.c.
6150 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6153 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6156 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6158 2008-08-07 Bean <bean123ch@gmail.com>
6160 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6162 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6164 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6165 multiple inclusion. Add #include <grub/types.h>.
6167 2008-08-06 Christian Franke <franke@computer.org>
6169 * conf/common.rmk: Build and install `10_windows'.
6170 * util/grub.d/10_windows.in: New script.
6172 2008-08-06 Pavel Roskin <proski@gnu.org>
6174 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6176 2008-08-06 Robert Millan <rmh@aybabtu.com>
6178 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6179 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6181 2008-08-06 Bean <bean123ch@gmail.com>
6183 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6184 (grub_pxefs_fs_int): Remove dummy definition.
6185 (grub_pxefs_open): Use data->block_size to store the current block
6187 (grub_pxefs_read): Use block size stored in data->block_size. As the
6188 value of grub_pxe_blksize can be changed after the file is opened.
6190 2008-08-06 Bean <bean123ch@gmail.com>
6192 * fs/i386/pc/pxe.c (curr_file): new variable.
6193 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6194 require the dummy internal file system anymore.
6195 (grub_pxefs_read): Removed.
6196 (grub_pxefs_close): Likewise.
6197 (grub_pxefs_fs_int): Likewise.
6198 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6199 connection when we switch file.
6200 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6202 2008-08-06 Robert Millan <rmh@aybabtu.com>
6204 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6206 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6207 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6209 * kern/i386/halt.c: New file.
6210 * kern/i386/reboot.c: Likewise.
6211 * include/grub/i386/reboot.h: Likewise.
6212 * include/grub/i386/halt.h: Likewise.
6214 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6215 Include `<grub/cpu/halt.h>'.
6216 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6217 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6219 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6220 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6221 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6222 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6223 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6224 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6226 * include/grub/i386/at_keyboard.h: ... to here.
6228 2008-08-05 Robert Millan <rmh@aybabtu.com>
6230 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6231 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6232 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6233 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6234 `kern/generic/millisleep.c'.
6236 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6237 instead of grub_get_rtc().
6238 (grub_tsc_init): Initialize `tsc_boot_time'.
6240 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6241 (grub_machine_init): Use grub_tsc_init() rather than
6242 installing an RTC-based handler via grub_install_get_time_ms().
6244 * kern/i386/pit.c: New file.
6245 * include/grub/i386/pit.h: Likewise.
6247 2008-08-05 Bean <bean123ch@gmail.com>
6249 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6251 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6252 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6253 (pxe_mod_SOURCES): New macro.
6254 (pxe_mod_CFLAGS): Likewise.
6255 (pxe_mod_LDFLAGS): Likewise.
6256 (pxecmd_mod_SOURCES): Likewise.
6257 (pxecmd_mod_CFLAGS): Likewise.
6258 (pxecmd_mod_LDFLAGS): Likewise.
6260 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6261 (grub_pxe_call): Likewise.
6263 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6265 * commands/i386/pc/pxecmd.c: New file.
6267 * fs/i386/pc/pxe.c: Likewise.
6269 * include/grub/i386/pc/pxe.h: Likewise.
6271 2008-08-05 Bean <bean123ch@gmail.com>
6273 * util/console.c (grub_console_cur_color): New variable.
6274 (grub_console_standard_color): Likewise.
6275 (grub_console_normal_color): Likewise.
6276 (grub_console_highlight_color): Likewise.
6277 (color_map): Likewise.
6278 (use_color): Likewise.
6279 (NUM_COLORS): New macro.
6280 (grub_ncurses_setcolorstate): Handle color properly.
6281 (grub_ncurses_setcolor): Don't change color here, just remember the
6282 settings, color will be set in grub_ncurses_setcolorstate.
6283 (grub_ncurses_getcolor): New function.
6284 (grub_ncurses_init): Initialize color pairs.
6285 (grub_ncurses_term): New member grub_ncurses_getcolor.
6287 2008-08-05 Colin D Bennett <colin@gibibit.com>
6289 High resolution timer support. Implemented for x86 CPUs using TSC.
6290 Extracted generic grub_millisleep() so it's linked in only as needed.
6291 This requires a Pentium compatible CPU; if the RDTSC instruction is
6292 not supported, then it falls back on the generic grub_get_time_ms()
6293 implementation that uses the machine's RTC.
6295 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6296 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6297 `kern/generic/millisleep.c'.
6299 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6300 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6302 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6303 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6305 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6307 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6308 `kern/generic/millisleep.c'.
6310 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6312 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6314 * kern/generic/rtc_get_time_ms.c: New file.
6316 * kern/generic/millisleep.c: New file.
6318 * kern/misc.c: Don't include
6319 <kern/time.h> anymore.
6320 (grub_millisleep_generic): Removed.
6322 * commands/sleep.c (grub_interruptible_millisleep): Uses
6323 grub_get_time_ms() instead of grub_get_rtc().
6325 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6327 (grub_cpu_is_cpuid_supported): New inline function.
6328 (grub_cpu_is_tsc_supported): New inline function.
6329 (grub_tsc_init): New function prototype.
6330 (grub_tsc_get_time_ms): New function prototype.
6332 * kern/i386/tsc.c (grub_get_time_ms): New file.
6334 * include/grub/time.h: Include <grub/types.h.
6335 (grub_millisleep_generic): Removed.
6336 (grub_get_time_ms): New prototype.
6337 (grub_install_get_time_ms): New prototype.
6338 (grub_rtc_get_time_ms): New prototype.
6340 * kern/time.c (grub_get_time_ms): New function.
6341 (grub_install_get_time_ms): New function.
6343 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6344 <grub/time.h> anymore.
6345 (grub_millisleep): Removed.
6346 (grub_machine_init): Call grub_tsc_init.
6348 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6349 get_time_ms() implementation.
6351 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6352 (ieee1275_get_time_ms): New function.
6353 (grub_machine_init): Install get_time_ms() implementation.
6355 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6356 (grub_machine_init): Call grub_tsc_init().
6357 (grub_millisleep): Removed.
6359 * kern/ieee1275/init.c (grub_millisleep): Removed.
6360 (grub_machine_init): Install ieee1275_get_time_ms()
6362 (ieee1275_get_time_ms): New function.
6363 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6366 2008-08-05 Marco Gerards <marco@gnu.org>
6368 * disk/ata.c: Include <grub/pci.h>.
6369 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6370 (grub_ata_initialize): Rewritten.
6371 (grub_ata_device_initialize): New function.
6373 2008-08-04 Pavel Roskin <proski@gnu.org>
6375 * kern/main.c: Include grub/mm.h.
6377 2008-08-04 Robert Millan <rmh@aybabtu.com>
6379 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6380 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6381 corruption problem).
6383 2008-08-04 Robert Millan <rmh@aybabtu.com>
6385 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6386 warnings introduced in my last commit.
6388 2008-08-03 Robert Millan <rmh@aybabtu.com>
6390 Make PCI available on all i386 architectures.
6392 * include/grub/i386/pc/pci.h: Move from here ...
6393 * include/grub/i386/pci.h: ... to here.
6395 * include/grub/i386/pc/pci.h: Remove.
6396 * include/grub/i386/efi/pci.h: Remove.
6397 * include/grub/x86_64/efi/pci.h: Remove.
6399 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6402 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6403 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6404 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6406 * conf/i386-ieee1275.rmk: Likewise.
6408 2008-08-03 Robert Millan <rmh@aybabtu.com>
6410 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6411 (grub_console_setcursor): Make it possible to set cursor off.
6413 2008-08-03 Robert Millan <rmh@aybabtu.com>
6415 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6416 of modules instead of assuming which platform provides what.
6417 * util/update-grub.in: Likewise.
6419 2008-08-03 Robert Millan <rmh@aybabtu.com>
6421 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6422 instead of `grub_install_dos_part' to determine whether a drive needs
6423 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6424 because it can be overridden when loading GRUB via Multiboot).
6426 2008-08-02 Robert Millan <rmh@aybabtu.com>
6428 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6430 2008-08-02 Robert Millan <rmh@aybabtu.com>
6432 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6433 of informational grub_dprintf() calls.
6435 2008-08-02 Robert Millan <rmh@aybabtu.com>
6437 * disk/memdisk.c (memdisk_size): Don't initialize.
6438 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6440 * include/grub/i386/pc/kernel.h
6441 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6442 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6443 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6444 (grub_arch_memdisk_size): Remove.
6446 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6447 field (was only used to transfer a constant). Add `type' field to
6448 support multiple module types.
6449 (grub_module_iterate): New function.
6451 * kern/device.c (grub_device_open): Do not hide error messages
6452 when grub_disk_open() fails. Use grub_print_error() instead.
6454 * kern/i386/pc/init.c (grub_arch_modules_addr)
6455 (grub_arch_memdisk_size): Remove functions.
6456 (grub_arch_modules_addr): Return the module address in high memory
6457 (now that it isn't copied anymore).
6459 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6460 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6461 decompression routine (grub_total_module_size already includes that
6462 now). Don't copy modules back to low memory.
6464 * kern/main.c: Include `<grub/mm.h>'.
6465 (grub_load_modules): Split out (and use) ...
6466 (grub_module_iterate): ... this function, which iterates through
6467 module objects and runs a hook.
6468 Comment out grub_mm_init_region() call, as it would cause non-ELF
6469 modules to be overwritten.
6471 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6472 the memdisk image in its own region, make it part of the module list.
6473 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6474 (main): Parse --memdisk|-m option, and pass user-provided path as
6475 parameter to generate_image().
6476 (add_segments): Pass `memdisk_path' down to load_modules().
6477 (load_modules): Embed memdisk image in module section when requested.
6478 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6479 `header.type' instead of `header.offset'.
6481 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6482 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6483 (memdisk_mod_LDFLAGS): New variables.
6484 * conf/i386-coreboot.rmk: Likewise.
6485 * conf/i386-ieee1275.rmk: Likewise.
6487 2008-08-02 Robert Millan <rmh@aybabtu.com>
6489 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6490 (backward_relocator): New variables. Used to allocate and relocate
6491 the payload, respectively.
6492 (grub_multiboot_load_elf32): Load into heap instead of requested
6493 address, install the appropriate relocator code in each bound of
6494 the payload, and set the entry point such that
6495 grub_multiboot_real_boot() will jump to one of them.
6497 * kern/i386/loader.S (grub_multiboot_payload_size)
6498 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6499 (grub_multiboot_payload_entry_offset): New variables.
6500 (grub_multiboot_real_boot): Set cpu context to what the relocator
6501 expects, and jump to the relocator instead of the payload.
6503 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6504 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6505 (grub_multiboot_payload_entry_offset): Export.
6507 2008-08-01 Bean <bean123ch@gmail.com>
6509 * normal/menu_entry.c (editor_getline): Don't return the original
6510 string as result, as it will be released by lexer once it has done
6513 2008-08-01 Robert Millan <rmh@aybabtu.com>
6515 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6516 within menuentries, not before them.
6517 util/grub.d/10_hurd.in: Likewise.
6519 2008-08-01 Bean <bean123ch@gmail.com>
6521 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6522 (bufio_mod_SOURCES): New macro.
6523 (bufio_mod_CFLAGS): Likewise.
6524 (bufio_mod_LDFLAGS): Likewise.
6526 * include/grub/bufio.h: New file.
6528 * io/bufio.c: Likewise.
6530 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6531 (grub_video_reader_png): Use grub_buffile_open to open file.
6533 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6534 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6536 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6537 (grub_video_reader_tga): Use grub_buffile_open to open file.
6539 * font/manager.c: Include <grub/bufio.h>.
6540 (add_font): Use grub_buffile_open to open file.
6542 2008-07-31 Robert Millan <rmh@aybabtu.com>
6544 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6545 ELF segments, use a macro for arbitrarily accessing any of them instead
6546 of preparing a pointer that allows access to one at a time.
6547 (grub_multiboot_load_elf64): Likewise.
6549 2008-07-31 Bean <bean123ch@gmail.com>
6551 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6552 GRUB_KERNEL_MACHINE_DATA_END.
6554 2008-07-30 Robert Millan <rmh@aybabtu.com>
6556 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6557 Increase from 0x50 to 0x60.
6558 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6559 use UUIDs to identify the root drive for them. If that's not
6561 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6562 check, for cross-disk installs.
6564 2008-07-30 Robert Millan <rmh@aybabtu.com>
6566 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6567 is non-empty, use it to set the `prefix' environment variable instead
6568 of the usual approach.
6569 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6570 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6571 environment variable instead of dummy make_install_device().
6573 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6574 (start): Insert a data section, with `grub_prefix' variable.
6575 * kern/i386/linuxbios/startup.S: Likewise.
6577 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6578 New variable reference.
6579 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6580 New macro. Defines offset of `grub_prefix' within startup.S (relative
6582 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6583 section within startup.S (relative to `start').
6584 * include/grub/i386/coreboot/kernel.h: Likewise.
6586 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6587 Overwrite grub_prefix with its contents, at the beginning of the
6589 (main): Understand -p|--prefix.
6591 2008-07-30 Robert Millan <rmh@aybabtu.com>
6593 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6595 2008-07-30 Robert Millan <rmh@aybabtu.com>
6597 * term/i386/pc/vga_text.c (grub_console_cls): Use
6598 grub_console_gotoxy() to go back to beginning of the screen.
6599 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6601 2008-07-29 Christian Franke <franke@computer.org>
6603 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6604 Add conversion of emulated mount points on Cygwin.
6606 2008-07-29 Christian Franke <franke@computer.org>
6608 * util/update-grub.in: Add a check for admin
6610 Remove old `grub.cfg.new' before creation.
6611 Add `-f' to `mv' to handle the different filesystem
6612 semantics of Windows.
6614 2008-07-29 Bean <bean123ch@gmail.com>
6616 * normal/main.c (get_line): Fix buffer overflow bug.
6618 2008-07-28 Robert Millan <rmh@aybabtu.com>
6620 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6621 (struct grub_apple_header): New struct. Describes the layout of
6623 (apple_partition_map_iterate): Check the header magic as well as the
6624 partition magic (which was already being checked).
6626 2008-07-28 Pavel Roskin <proski@gnu.org>
6628 * genmk.rb: Add a warning to the beginning of the output that
6629 it's a generated file and should not be edited.
6631 2008-07-28 Robert Millan <rmh@aybabtu.com>
6633 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6634 with the same number are found, just use issue a warning with
6635 grub_dprintf(), as this error has been reported to be non-fatal.
6637 2008-07-27 Robert Millan <rmh@aybabtu.com>
6639 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6642 2008-07-27 Bean <bean123ch@gmail.com>
6644 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6645 (grub_fat_find_dir): Ignore case when comparing filename.
6647 2008-07-27 Bean <bean123ch@gmail.com>
6649 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6650 smallino, as it's more descriptive, and i8count can be confused with
6651 the other field count.
6652 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6655 2008-07-27 Bean <bean123ch@gmail.com>
6657 * commands/crc.c: New file.
6659 * lib/crc.c: Likewise.
6661 * include/grub/lib/crc.h: Likewise.
6663 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6665 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6666 (hexdump): Move this function to ...
6668 * lib/hexdump.c: ... here.
6670 * include/grub/hexdump.h: Renamed to ...
6672 * include/grub/lib/hexdump.h: ... this.
6674 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6676 * util/grub-editenv.c: Likewise.
6678 * include/envblk.h: Renamed to ...
6680 * include/lib/envblk.h: ... this.
6682 * util/envblk.c: Renamed to ...
6684 * lib/envblk.c: ... this.
6686 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6688 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6689 (pkglib_MODULES): Add crc.mod.
6690 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6691 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6692 (crc_mod_SOURCES): New macro.
6693 (crc_mod_CFLAGS): Likewise.
6694 (crc_mod_LDFLAGS): Likewise.
6696 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6698 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6700 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6704 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6706 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6708 * commands/help.c: Include <grub/term.h>.
6709 (TERM_WIDTH): Removed. Updated all users.
6711 2008-07-27 Pavel Roskin <proski@gnu.org>
6713 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6714 spurious warnings about a comment within a comment.
6716 2008-07-25 Robert Millan <rmh@aybabtu.com>
6718 * util/getroot.c (find_root_device): Skip devices that match
6719 /dev/dm-[0-9]. This lets the real device be found for any type of
6720 abstraction (LVM, EVMS, RAID..).
6721 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6722 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6723 device is found first, find_root_device() will now skip it.
6725 2008-07-24 Pavel Roskin <proski@gnu.org>
6727 * include/grub/types.h: Use __builtin_bswap32() and
6728 __builtin_bswap64() with gcc 4.3 and newer.
6730 2008-07-24 Christian Franke <franke@computer.org>
6732 * util/i386/pc/grub-install.in: If `--debug' is specified,
6733 pass `--verbose' to grub-setup.
6734 Abort script if make_system_path_relative_to_its_root() fails.
6736 2008-07-24 Bean <bean123ch@gmail.com>
6738 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6739 variable `target_platform' should be `platform'.
6741 2008-07-24 Bean <bean123ch@gmail.com>
6743 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6744 (grub_png_init_fixed_block): New function.
6745 (grub_png_decode_image_data): Handle fixed huffman code compression.
6747 2008-07-24 Bean <bean123ch@gmail.com>
6749 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6750 (grub_pe2elf_SOURCES): New macro.
6751 (CLEANFILES): Add grub-pe2elf.
6753 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6754 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6755 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6756 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6757 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6758 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6759 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6760 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6761 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6762 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6763 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6764 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6765 (GRUB_PE32_DT_FUNCTION): Likewise.
6766 (GRUB_PE32_REL_I386_DIR32): Likewise.
6767 (GRUB_PE32_REL_I386_REL32): Likewise.
6768 (grub_pe32_symbol): New structure.
6769 (grub_pe32_reloc): Likewise.
6771 * util/grub-pe2elf.c: New file.
6773 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6774 start symbol in non pc platform.
6776 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6778 The following patches are from Christian Franke.
6780 * include/grub/dl.h: Remove .previous, gas supports this only
6783 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6784 Remove .type, gas supports this only for ELF format.
6786 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6787 nullbytes in symbol table. This fixes an infinite loop if table is
6790 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6791 TARGET_IMG_LDFLAGS and EXEEXT.
6793 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6794 TARGET_IMG_LDFLAGS_AC.
6795 (grub_CHECK_STACK_ARG_PROBE): New function.
6797 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6799 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6801 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6802 to set TARGET_IMG_LD* accordingly.
6803 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6804 Add call to grub_CHECK_STACK_ARG_PROBE.
6805 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6807 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6809 * genmk.rb: Add EXEEXT to CLEANFILES.
6811 2008-07-23 Robert Millan <rmh@aybabtu.com>
6813 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6814 define the codes for arrows and lines used for the menu).
6815 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6818 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6819 fonts, because the latter are too slow.
6821 2008-07-21 Bean <bean123ch@gmail.com>
6823 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6824 a20. Run keyboard test last, as it will cause macbook to halt.
6826 2008-07-18 Pavel Roskin <proski@gnu.org>
6828 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6829 load foreign architecture modules correctly anyway. Keep
6830 support for loading host architecture modules, whether we
6831 compile them or not.
6833 2008-07-17 Pavel Roskin <proski@gnu.org>
6835 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6836 change target_cpu. The compiler default can mismatch target_cpu
6839 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6840 * kern/efi/efi.c: Likewise.
6842 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6843 target compiler is functional.
6844 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6847 * configure.ac: Default to efi platform for x86_64-apple. Allow
6848 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6849 adjustments from the rest, only do them if target is not
6850 explicitly given. Merge other adjustments with the final sanity
6851 check. Remove an extraneous check for supported CPU. Be
6852 specific which CPU and which platform is not supported.
6854 * configure.ac: Default to pc platform for x86_64.
6856 2008-07-17 Robert Millan <rmh@aybabtu.com>
6858 Partial LinuxBIOS -> Coreboot rename.
6860 * conf/i386-linuxbios.rmk: Renamed to ...
6861 * conf/i386-coreboot.rmk: ... this.
6862 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6863 * configure.ac: Accept "coreboot" as input platform (but maintain
6864 compatibility with "linuxbios").
6865 * include/grub/i386/linuxbios: Renamed to ...
6866 * include/grub/i386/coreboot: ... this.
6868 2008-07-17 Bean <bean123ch@gmail.com>
6870 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6871 (appleldr_mod_SOURCE): New variable.
6872 (appleldr_mod_CFLAGS): Likewise.
6873 (appleldr_mod_LDFLAGS): Likewise.
6874 (pci_mod_SOURCES): Likewise.
6875 (pci_mod_CFLAGS): Likewise.
6876 (pci_mod_LDFLAGS): Likewise.
6877 (lspci_mod_SOURCES): Likewise.
6878 (lspci_mod_CFLAGS): Likewise.
6879 (lspci_mod_LDFLAGS): Likewise.
6881 * conf/x86_64-efi.rmk: New file.
6883 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6885 (grub_efidisk_write): Likewise.
6887 * include/efi/api.h (efi_call_0): New macro.
6888 (efi_call_1): Likewise.
6889 (efi_call_2): Likewise.
6890 (efi_call_3): Likewise.
6891 (efi_call_4): Likewise.
6892 (efi_call_5): Likewise.
6893 (efi_call_6): Likewise.
6895 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6896 grub_rescue_cmd_chainloader.
6898 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6899 (grub_pe32_optional_header): Change some fields based on i386 or
6901 (GRUB_PE32_PE32_MAGIC): Likewise.
6903 * include/grub/efi/uga_draw.h: New file.
6905 * include/grub/elf.h (STN_ABS): New constant.
6906 (R_X86_64_NONE): Relocation constant for x86_64.
6907 (R_X86_64_64): Likewise.
6908 (R_X86_64_PC32): Likewise.
6909 (R_X86_64_GOT32): Likewise.
6910 (R_X86_64_PLT32): Likewise.
6911 (R_X86_64_COPY): Likewise.
6912 (R_X86_64_GLOB_DAT): Likewise.
6913 (R_X86_64_JUMP_SLOT): Likewise.
6914 (R_X86_64_RELATIVE): Likewise.
6915 (R_X86_64_GOTPCREL): Likewise.
6916 (R_X86_64_32): Likewise.
6917 (R_X86_64_32S): Likewise.
6918 (R_X86_64_16): Likewise.
6919 (R_X86_64_PC16): Likewise.
6920 (R_X86_64_8): Likewise.
6921 (R_X86_64_PC8): Likewise.
6923 * include/grub/i386/efi/pci.h: New file.
6925 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6926 Change it value based on platform.
6927 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6928 (GRUB_E820_RAM): Likewise.
6929 (GRUB_E820_RESERVED): Likewise.
6930 (GRUB_E820_ACPI): Likewise.
6931 (GRUB_E820_NVS): Likewise.
6932 (GRUB_E820_EXEC_CODE): Likewise.
6933 (GRUB_E820_MAX_ENTRY): Likewise.
6934 (grub_e820_mmap): New structure.
6935 (linux_kernel_header): Change the efi field according to different
6936 kernel version, also field from linux_kernel_header.
6938 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6940 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6941 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6942 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6943 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6944 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6945 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6946 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6947 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6948 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6949 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6951 * include/grub/x86_64/efi/kernel.h: New file.
6953 * include/grub/x86_64/efi/loader.h: Likewise.
6955 * include/grub/x86_64/efi/machine.h: Likewise.
6957 * include/grub/x86_64/efi/pci.h: Likewise.
6959 * include/grub/x86_64/efi/time.h: Likewise.
6961 * include/grub/x86_64/linux.h: Likewise.
6963 * include/grub/x86_64/setjmp.h: Likewise.
6965 * include/grub/x86_64/time.h: Likewise.
6967 * include/grub/x86_64/types.h: Likewise.
6969 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6970 GRUB_TARGET_SIZEOF_VOID_P.
6972 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6973 (grub_efi_locate_handle): Likewise.
6974 (grub_efi_open_protocol): Likewise.
6975 (grub_efi_set_text_mode): Likewise.
6976 (grub_efi_stall): Likewise.
6977 (grub_exit): Likewise.
6978 (grub_reboot): Likewise.
6979 (grub_halt): Likewise.
6980 (grub_efi_exit_boot_services): Likewise.
6981 (grub_get_rtc): Likewise.
6983 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6984 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6985 (grub_efi_allocate_pages): Wrap efi calls.
6986 (grub_efi_free_pages): Wrap efi calls.
6987 (grub_efi_get_memory_map): Wrap efi calls.
6989 * kern/x86_64/dl.c: New file.
6991 * kern/x86_64/efi/callwrap.S: Likewise.
6993 * kern/x86_64/efi/startup.S: Likewise.
6995 * loader/efi/appleloader.c: Likewise.
6997 * loader/efi/chainloader.c (cmdline): New variable.
6998 (grub_chainloader_unload): Wrap efi calls.
6999 (grub_chainloader_boot): Likewise.
7000 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7003 * loader/efi/chainloader_normal.c (chainloader_command):
7004 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7007 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7009 (grub_e820_add_region): New function.
7010 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7012 (grub_find_video_card): New function.
7013 (grub_linux_setup_video): New function.
7014 (grub_rescue_cmd_linux): Probe for video information.
7016 * normal/x86_64/setjmp.S: New file.
7018 * term/efi/console.c (map_char): New function.
7019 (grub_console_putchar): Map unicode char.
7020 (grub_console_checkkey): Wrap efi calls.
7021 (grub_console_getkey): Likewise.
7022 (grub_console_getwh): Likewise.
7023 (grub_console_gotoxy): Likewise.
7024 (grub_console_cls): Likewise.
7025 (grub_console_setcolorstate): Likewise.
7026 (grub_console_setcursor): Likewise.
7028 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7030 2008-07-16 Pavel Roskin <proski@gnu.org>
7032 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7035 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7036 pointer, not an integer. This fixes a warning and prevents
7037 precision loss on 64-bit systems.
7038 (relocate_addresses): Remove unneeded cast.
7040 2008-07-15 Pavel Roskin <proski@gnu.org>
7042 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7044 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7046 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7047 Fix comparison between signed and unsigned.
7049 * include/grub/i386/ieee1275/console.h: Declare
7050 grub_console_init() and grub_console_fini().
7052 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7053 It's empty and unused.
7055 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7056 beginning to avoid warnings with some compilers.
7058 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7059 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7061 2008-07-14 Pavel Roskin <proski@gnu.org>
7063 * kern/env.c (grub_register_variable_hook): Don't copy empty
7064 string, it leaks memory. Pass "" to grub_env_set(), it should
7065 handle constant strings.
7067 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7068 * commands/cmp.c (grub_cmd_cmp): Likewise.
7069 * kern/dl.c (grub_dl_flush_cache): Likewise.
7070 (grub_dl_load_core): Likewise.
7071 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7072 (grub_elf64_load_phdrs): Likewise.
7074 2008-07-13 Pavel Roskin <proski@gnu.org>
7076 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7077 between signed and unsigned.
7078 (LzmaEnc_Finish): Fix warning about an unused parameter.
7080 2008-07-13 Bean <bean123ch@gmail.com>
7082 * Makefile.in (enable_lzo): New rule.
7084 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7086 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7088 * boot/i386/pc/lnxboot.S: #include <config.h>.
7090 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7091 its value according to the compression algorithm used, lzo or lzma.
7093 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7094 compression algorithm according to configure macro.
7096 * kern/i386/pc/startup.S (codestart): Likewise.
7098 * kern/i386/pc/lzma_decode.S: New file.
7100 * include/grub/lib/LzFind.h: Likewise.
7102 * include/grub/lib/LzHash.h: Likewise.
7104 * include/grub/lib/LzmaDec.h: Likewise.
7106 * include/grub/lib/LzmaEnc.h: Likewise.
7108 * include/grub/lib/LzmaTypes.h: Likewise.
7110 * lib/LzFind.c: Likewise.
7112 * lib/LzmaDec.c: Likewise.
7114 * lib/LzmaEnc.c: Likewise.
7116 2008-07-13 Bean <bean123ch@gmail.com>
7118 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7119 (grub_ext4_extent_header): New structure.
7120 (grub_ext4_extent): Likewise.
7121 (grub_ext4_extent_idx): Likewise.
7122 (grub_ext4_find_leaf): New function.
7123 (grub_ext2_read_block): Handle extents.
7125 2008-07-12 Robert Millan <rmh@aybabtu.com>
7127 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7129 2008-07-11 Robert Millan <rmh@aybabtu.com>
7131 * util/grub.d/40_custom.in: New file. Example on how to add custom
7132 entries to /etc/grub.d.
7133 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7134 40_custom (implicitly, by merging all the grub.d rules).
7136 2008-07-11 Pavel Roskin <proski@gnu.org>
7138 * commands/read.c (grub_getline): Fix invalid memory access.
7139 Don't add newline to the variable value.
7141 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7142 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7143 (serial_hw_get_port): Check validity of the port number.
7144 (grub_cmd_serial): Check return value of serial_hw_get_port().
7146 2008-07-07 Pavel Roskin <proski@gnu.org>
7148 * boot/i386/pc/diskboot.S (notification_string): Replace
7149 "Loading kernel" with just "loading". This is shorter, less
7150 confusing and saves a few bytes for possible future changes.
7152 2008-07-05 Pavel Roskin <proski@gnu.org>
7154 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7155 size for ATAPI devices, they are undefined. Output sector
7156 number in decimal form.
7158 * disk/ata.c: Use named constants for status bits.
7160 2008-07-04 Pavel Roskin <proski@gnu.org>
7162 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7163 grub_addr_t before casting it to the void pointer to fix a
7164 warning. Non-addressable regions are discarded earlier.
7165 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7166 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7167 (check_signature): Don't shadow table_header.
7168 (grub_linuxbios_table_iterate): Cast numeric constants to
7169 grub_linuxbios_table_header_t.
7170 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7173 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7176 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7177 pointer, which can cause warnings. Support 64-bit addresses.
7179 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7180 of sizeof(long). This fixes PowerPC image generation on x86_64.
7182 2008-07-04 Robert Millan <rmh@aybabtu.com>
7184 This fixes a performance issue when pc & gpt partmap iterators
7185 didn't abort iteration even after our hook found what it was
7186 looking for (often causing expensive probes of non-existent drives).
7188 Some callers relied on previous buggy behaviour, since they would
7189 raise an error when their own hooks caused early abortion of its
7192 * kern/device.c (grub_device_open): Improve error message.
7193 * disk/lvm.c (grub_lvm_open): Likewise.
7194 * disk/raid.c (grub_raid_open): Likewise.
7196 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7197 when hook requests it, independently of grub_errno.
7198 (pc_partition_map_probe): Do not fail when find_func() caused
7199 early abortion of pc_partition_map_iterate().
7201 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7202 when hook requests it, independently of grub_errno.
7203 (gpt_partition_map_probe): Do not fail when find_func() caused
7204 early abortion of gpt_partition_map_iterate().
7206 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7207 when hook requests it, independently of grub_errno. Do not fail when
7208 part_map_iterate_hook() caused early abortion of p->iterate().
7210 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7211 when grub_partition_iterate() returned with non-zero.
7213 2008-07-03 Pavel Roskin <proski@gnu.org>
7215 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7216 like we do in grub_ata_pio_read().
7217 (grub_ata_readwrite): Always write individual sectors. Fix the
7218 sector count for the remainder.
7219 (grub_ata_write): Enable writing to ATA devices. Correctly
7220 report error for ATAPI devices.
7222 2008-07-02 Pavel Roskin <proski@gnu.org>
7224 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7227 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7228 for every read sector, we already increment it for the whole
7229 batch. This fixes reading more than 256 sectors at once.
7231 * util/grub-editenv.c (cmd_info): Cast argument to long
7232 explicitly. ptrdiff_t reduces to int on i386.
7234 * util/grub-editenv.c (main): Be specific which parameter is
7237 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7238 (memdisk): Make memdisk_orig_addr a pointer.
7240 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7241 for file offsets, use grub_off_t instead. Fix printf format
7244 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7245 there. Real unexpected warnings should not drown in the noise
7246 about known problems.
7248 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7249 grub_disk_addr_t for memory addresses.
7251 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7252 explicitly to fix a warning.
7254 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7256 * Makefile.in (MODULE_LDFLAGS): New variable.
7257 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7258 the linker accepts --build-id=none.
7259 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7261 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7263 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7264 those in Linux XFS code. Provide a way to access 64-bit parent
7266 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7267 the end of struct grub_xfs_dir_header.
7269 2008-07-02 Bean <bean123ch@gmail.com>
7271 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7272 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7273 and GRUB_IEEE1275_FLAG_NO_ANSI.
7275 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7276 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7277 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7279 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7280 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7282 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7283 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7285 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7286 esc sequence on non ANSI terminal.
7287 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7289 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7292 2008-07-02 Bean <bean123ch@gmail.com>
7294 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7295 (grub_editenv_SOURCES): New variable.
7296 (pkglib_MODULES): Add loadenv.mod.
7297 (loadenv_mod_SOURCES): New variable.
7298 (loadenv_mod_CFLAGS): Likewise.
7299 (loadenv_mod_LDFLAGS): Likewise.
7301 * include/grub/envblk.h: New file.
7303 * util/envblk.c: New file.
7305 * util/grub-editenv.c: New file.
7307 * commands/loadenv.c: New file.
7309 2008-07-01 Pavel Roskin <proski@gnu.org>
7311 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7312 not unsigned char. This fixes warnings and is consistent with
7315 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7317 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7319 * term/tparm.c (analyze): Always set *popcount.
7321 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7322 cast to fix a warning.
7324 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7325 cast to suppress a warning.
7327 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7328 grub_fshelp_read_file() expects.
7330 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7331 write uuid as a 32-bit value in CPU byte order, so declare and
7334 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7335 long if the format specifier expects it.
7336 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7337 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7338 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7339 long to fix a warning.
7340 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7341 grub_dprintf() arguments to fix warnings.
7343 2008-06-30 Pavel Roskin <proski@gnu.org>
7345 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7346 install_bsd_part immediately before core.img is embedded or
7347 modified on disk. This fixes core.img verification if core.img
7350 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7351 core_path to calculate the blocklist.
7352 Patch from Javier MartÃn <lordhabbit@gmail.com>
7354 2008-06-29 Robert Millan <rmh@aybabtu.com>
7356 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7357 block to disk block.
7358 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7359 Patch from Niels Böhm <bitbucket@arcor.de>
7361 2008-06-29 Robert Millan <rmh@aybabtu.com>
7363 * util/update-grub_lib.in (font_path): Search for fonts in
7364 /boot/grub first, which is more likely to be readable (we aren't
7365 deciding where fonts live, just looking for them).
7367 2008-06-26 Pavel Roskin <proski@gnu.org>
7369 * util/biosdisk.c (read_device_map): Don't leave dead map
7370 entries for devices failing stat() check.
7372 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7373 core_path_dev for the core.img path on the target device.
7375 2008-06-26 Robert Millan <rmh@aybabtu.com>
7377 * disk/fs_uuid.c: New file.
7378 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7379 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7380 (fs_uuid_mod_LDFLAGS): New variables.
7381 * include/grub/disk.h (grub_disk_dev_id): Add
7382 `GRUB_DISK_DEVICE_UUID_ID'.
7383 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7384 implement iterate().
7386 2008-06-26 Robert Millan <rmh@aybabtu.com>
7388 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7389 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7390 Linux image includes no initrd.
7392 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7394 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7395 call to resolve the core image location that effectively appended the
7398 2008-06-21 Robert Millan <rmh@aybabtu.com>
7400 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7403 * util/grub.d/10_hurd.in: ... to here ...
7404 * util/grub.d/10_linux.in: ... and here.
7406 2008-06-19 Robert Millan <rmh@aybabtu.com>
7408 * kern/main.c (grub_main): Export `prefix' variable immediately
7409 after it has been set by grub_machine_set_prefix().
7411 2008-06-19 Robert Millan <rmh@aybabtu.com>
7413 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7414 search result when not saving to variable, not the other way around.
7415 When saving to variable, abort iteration as soon as a match is found.
7417 2008-06-19 Robert Millan <rmh@aybabtu.com>
7419 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7420 check for partition that provides /boot/grub. Its logic is flawed,
7421 as it prevents prepare_grub_to_access_device() from being called
7424 2008-06-19 Robert Millan <rmh@aybabtu.com>
7426 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7427 "insmod" command directly when abstraction modules are needed,
7428 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7429 since it had already been processed).
7431 2008-06-19 Pavel Roskin <proski@gnu.org>
7433 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7434 changed. This is needed in case GRUB_LIBDIR changes.
7435 * conf/i386-ieee1275.rmk: Likewise.
7436 * conf/i386-linuxbios.rmk: Likewise.
7437 * conf/i386-pc.rmk: Likewise.
7438 * conf/powerpc-ieee1275.rmk: Likewise.
7440 2008-06-18 Pavel Roskin <proski@gnu.org>
7442 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7443 kernel_elf_symlist.c to symlist.c for consistency with other
7444 architectures. Update all users.
7445 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7447 2008-06-18 Robert Millan <rmh@aybabtu.com>
7449 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7452 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7453 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7454 a RAID device, run setup() for all members independently on whether
7455 LVM abstraction is being used.
7456 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7457 If grub-mkimage has set `*install_dos_part == -2', don't override this
7459 Perform *install_dos_part adjustments independently on whether
7460 we're embedding or not.
7461 Clarify error message when image is too big for embedding.
7462 Remove duplicate *install_dos_part stanza.
7464 2008-06-17 Robert Millan <rmh@aybabtu.com>
7466 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7467 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7469 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7470 values in grub_ofconsole_normal_color and
7471 grub_ofconsole_highlight_color (they're not directly related to
7472 background and foreground).
7473 (grub_ofconsole_setcolorstate): Extract background and foreground
7474 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7476 2008-06-17 Robert Millan <rmh@aybabtu.com>
7478 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7479 /boot/grub for the check in last commit, not /boot (they could be
7480 different partitions).
7482 2008-06-16 Robert Millan <rmh@aybabtu.com>
7484 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7485 asked to setup access for the same partition that provides /boot,
7486 don't bother using UUIDs since our root already has the value we
7489 2008-06-16 Robert Millan <rmh@aybabtu.com>
7491 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7493 Patch from Sven Mueller <sven@debian.org>.
7495 2008-06-16 Robert Millan <rmh@aybabtu.com>
7497 * util/update-grub.in: Check for $EUID instead of $UID.
7498 Reported by Vincent Zweije.
7500 2008-06-16 Bean <bean123ch@gmail.com>
7502 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7503 (grub_ext2_read_block): Likewise.
7504 (grub_ext2_read_inode): Likewise.
7505 (grub_ext2_mount): Likewise.
7506 (grub_ext2_close): Likewise.
7507 (grub_ext3_get_journal): Removed.
7509 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7510 (grub_reiserfs_read_symlink): Likewise.
7511 (grub_reiserfs_mount): Likewise.
7512 (grub_reiserfs_open): Likewise.
7513 (grub_reiserfs_read): Likewise.
7514 (grub_reiserfs_close): Likewise.
7515 (grub_reiserfs_get_journal): Removed.
7517 * fs/fshelp.c (grub_fshelp_read): Removed.
7518 (grub_fshelp_map_block): Likewise.
7520 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7521 (grub_fshelp_journal): Likewise.
7522 (grub_fshelp_read): Likewise.
7523 (grub_fshelp_map_block): Likewise.
7525 2008-06-16 Pavel Roskin <proski@gnu.org>
7527 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7528 floating point anymore.
7529 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7531 2008-06-15 Pavel Roskin <proski@gnu.org>
7533 * commands/ls.c (grub_ls_list_files): Use integer calculations
7534 for human readable format, avoid floating point use.
7535 * kern/misc.c (grub_ftoa): Remove.
7536 (grub_vsprintf): Remove floating point support.
7538 2008-06-15 Robert Millan <rmh@aybabtu.com>
7540 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7542 Reported by Max Vozeler.
7544 2008-06-15 Robert Millan <rmh@aybabtu.com>
7546 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7547 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7549 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7550 the beginning of the prefix.
7552 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7553 It is assumed that if we have a memdisk, grub-mkimage has set
7554 grub_prefix to include the "(memdisk)" drive in it.
7556 2008-06-15 Robert Millan <rmh@aybabtu.com>
7558 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7559 Initialize keyboard controller after registering the terminal, so that
7560 grub_printf() can be called from grub_keyboard_controller_init().
7562 2008-06-15 Robert Millan <rmh@aybabtu.com>
7564 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7565 extent-btree which is written as big endian on disk.
7566 Reported by Alain Greppin <al@chilibi.org>.
7568 2008-06-14 Robert Millan <rmh@aybabtu.com>
7570 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7571 * util/i386/pc/grub-install.in (modules): Likewise.
7573 2008-06-13 Pavel Roskin <proski@gnu.org>
7575 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7577 2008-06-13 Bean <bean123ch@gmail.com>
7579 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7581 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7583 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7584 to indicate sparse block.
7586 2008-06-12 Pavel Roskin <proski@gnu.org>
7588 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7589 number, grub_fshelp_read() does it for us.
7591 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7592 linear disk read with journal translation.
7593 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7594 * include/grub/fshelp.h: Declare grub_fshelp_read().
7596 2008-06-09 Pavel Roskin <proski@gnu.org>
7598 * fs/minix.c (grub_minix_mount): Handle error reading
7601 2008-06-08 Robert Millan <rmh@aybabtu.com>
7603 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7604 don't append the RAID prefix afterwards.
7605 Reported by Clint Adams.
7607 2008-06-08 Robert Millan <rmh@aybabtu.com>
7609 Based on description from Pavel:
7610 * kern/disk.c (grub_disk_check_range): Rename to ...
7611 (grub_disk_adjust_range): ... this. Add a comment explaining the
7612 tasks performed by this function.
7614 2008-06-08 Robert Millan <rmh@aybabtu.com>
7616 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7617 `num_serial' (for consistency with other variables).
7618 (struct grub_ntfs_data): Add `uuid' member.
7619 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7620 (grub_ntfs_uuid): New function.
7621 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7623 2008-06-07 Pavel Roskin <proski@gnu.org>
7625 * util/biosdisk.c (open_device): Revert last change to the
7626 function, it broke installation. The sector needs to be
7627 different dependent on which device is opened.
7629 2008-06-06 Robert Millan <rmh@aybabtu.com>
7631 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7632 rest of GRUB, and breakage doesn't happen if its value were modified.
7634 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7635 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7636 a constant (same value).
7637 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7638 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7640 2008-06-06 Robert Millan <rmh@aybabtu.com>
7642 * util/biosdisk.c (open_device): Do not modify sector offset when
7643 accessing a partition. kern/disk.c already handles this for us.
7645 2008-06-06 Robert Millan <rmh@aybabtu.com>
7647 * util/grub-emu.c (grub_machine_init): Move code in this function from
7649 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7650 segfault in case grub_printf() is called).
7652 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7653 grub_probe. Update all users not to explicitly add it again.
7654 (grub_device): New variable; contains corresponding device for grubdir.
7655 (fs_module, partmap_module, devabstraction_module): Pass
7656 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7659 2008-06-05 Robert Millan <rmh@aybabtu.com>
7661 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7662 is found, print it (same layout as with labels).
7664 2008-06-04 Robert Millan <rmh@aybabtu.com>
7666 * util/biosdisk.c (get_drive): Rename to ...
7667 (find_grub_drive): ... this. Update all users.
7669 (get_os_disk): Rename to ...
7670 (convert_system_partition_to_system_disk): ... this. Update all users.
7672 (find_drive): Rename to ...
7673 (find_system_device): ... this. Update all users.
7675 2008-06-04 Robert Millan <rmh@aybabtu.com>
7677 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7678 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7679 (make_device_map): Likewise.
7681 2008-06-01 Robert Millan <rmh@aybabtu.com>
7683 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7684 before dereferencing it.
7686 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7687 union with fat12/fat16-specific ones. Add some new fields, including
7688 `num_serial' for both versions.
7689 (struct grub_fat_data): Add `uuid' member.
7690 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7691 names. Initialize `data->uuid' using `num_serial'.
7692 (grub_fat_uuid): New function.
7693 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7695 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7696 (grub_reiserfs_uuid): New function.
7697 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7700 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7701 (grub_xfs_uuid): New function.
7702 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7704 2008-06-01 Robert Millan <rmh@aybabtu.com>
7706 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7707 code that is backward compatible with pre-uuid search command.
7709 2008-05-31 Robert Millan <rmh@aybabtu.com>
7711 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7712 floppies after everything else, to ensure floppy drive isn't accessed
7713 unnecessarily (patch from Bean).
7715 2008-05-31 Robert Millan <rmh@aybabtu.com>
7717 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7718 not print device names when we were asked to set a variable.
7720 2008-05-31 Robert Millan <rmh@aybabtu.com>
7722 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7723 using "cursor-on" and "cursor-off" commands (understood at least by
7724 the Open Firmware flavour on OLPC).
7726 2008-05-31 Michael Gorven <michael@gorven.za.net>
7728 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7729 on and off sequences.
7731 2008-05-31 Robert Millan <rmh@aybabtu.com>
7733 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7734 * util/update-grub.in: Likewise.
7736 2008-05-30 Pavel Roskin <proski@gnu.org>
7738 * util/biosdisk.c (linux_find_partition): Simplify logic and
7739 make the code more universal. Keep special processing for
7740 devfs, but use a simple rule for all other devices. If the
7741 device ends with a number, append 'p' and the partition number.
7742 Otherwise, append only the partition number.
7744 2008-05-30 Robert Millan <rmh@aybabtu.com>
7746 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7747 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7748 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7749 the `root' parameter to Linux.
7751 2008-05-30 Robert Millan <rmh@aybabtu.com>
7753 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7754 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7755 --fs_uuid with --fs-uuid.
7756 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7757 all filesystems support them).
7759 2008-05-30 Robert Millan <rmh@aybabtu.com>
7761 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7762 grub_printf() flags, since we're printing in units of 2 bytes.
7764 2008-05-30 Robert Millan <rmh@aybabtu.com>
7766 * util/grub.d/00_header.in: Remove obsolete comment referencing
7767 convert_system_path_to_grub_path().
7768 * util/update-grub.in: Likewise.
7769 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7770 (convert_system_path_to_grub_path): Add a warning message explaining
7771 that this function is deprecated. Rely on is_path_readable_by_grub()
7772 for the readability checks.
7773 (font_path): Use is_path_readable_by_grub() for the readability
7774 check rather than convert_system_path_to_grub_path().
7776 2008-05-30 Robert Millan <rmh@aybabtu.com>
7778 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7779 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7780 converting it first.
7781 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7782 grub.cfg for access to font file, and afterwards call it again to set
7785 2008-05-30 Robert Millan <rmh@aybabtu.com>
7787 * commands/search.c (options): Add --fs_uuid option.
7788 (search_fs_uuid): New function.
7789 (grub_cmd_search): Fix --set argument passing.
7790 Use search_fs_uuid() when requested via --fs_uuid.
7791 (grub_search_init): Update help message.
7792 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7793 and redeclare it as an array of 16-bit words.
7794 (grub_ext2_uuid): New function.
7795 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7796 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7797 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7798 (GRUB_DEVICE_BOOT_UUID): New variables.
7799 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7800 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7802 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7803 just assume `root' variable has the right value.
7804 * util/grub.d/10_linux.in: Likewise.
7805 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7807 (main): Recognise `-t fs_uuid' argument.
7809 2008-05-30 Robert Millan <rmh@aybabtu.com>
7811 * util/biosdisk.c (map): Redefine structure to hold information
7812 about GRUB drive name.
7813 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7815 (call_hook): Remove.
7816 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7817 member. Assume drive has partitions.
7818 (grub_util_biosdisk_open): Access device names via `.device' struct
7820 (open_device): Likewise.
7821 (find_drive): Likewise.
7822 (read_device_map): Adjust map[] usage to match the new struct
7823 definition. Don't check for duplicates (still possible, but not cheap
7825 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7826 (make_device_name): Remove assumption of BIOS-like drive names.
7828 2008-05-30 Pavel Roskin <proski@gnu.org>
7830 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7831 compiling execute.c doesn't need grub_script.tab.h anymore.
7832 (normal/command.c_DEPENDENCIES): Likewise.
7833 (normal/function.c_DEPENDENCIES): Likewise.
7834 * conf/i386-ieee1275.rmk: Likewise.
7835 * conf/i386-linuxbios.rmk: Likewise.
7836 * conf/i386-pc.rmk: Likewise.
7837 * conf/powerpc-ieee1275.rmk: Likewise.
7838 * conf/sparc64-ieee1275.rmk: Likewise.
7840 2008-05-29 Pavel Roskin <proski@gnu.org>
7842 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7843 when scanning metadata for volume group name.
7845 * include/grub/script.h: Don't include grub_script.tab.h. It's
7846 a generated file, which may only be included from the files with
7847 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7848 use union YYSTYPE, as the later allows forward declaration.
7849 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7851 2008-05-29 Robert Millan <rmh@aybabtu.com>
7853 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7854 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7855 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7856 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7859 2008-05-29 Robert Millan <rmh@aybabtu.com>
7861 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7862 control key combinations.
7864 2008-05-29 Robert Millan <rmh@aybabtu.com>
7866 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7867 * util/ieee1275/grub-install.in: ... to here.
7868 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7869 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7870 (grub_install_SOURCES): Likewise.
7872 2008-05-29 Robert Millan <rmh@aybabtu.com>
7874 * fs/affs.c: Update copyright year.
7875 * fs/ext2.c: Likewise.
7876 * fs/fshelp.c: Likewise.
7877 * fs/hfsplus.c: Likewise.
7878 * fs/ntfs.c: Likewise.
7879 * fs/xfs.c: Likewise.
7880 * include/grub/fshelp.h: Likewise.
7881 * util/grub-mkdevicemap.c: Likewise.
7883 2008-05-28 Robert Millan <rmh@aybabtu.com>
7885 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7886 might need to be fatfs to support some firmware implementations
7889 2008-05-28 Robert Millan <rmh@aybabtu.com>
7891 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7893 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7894 (make_device_map): Likewise.
7896 2008-05-20 Bean <bean123ch@gmail.com>
7898 * fs/fshelp.c (grub_fshelp_map_block): New function.
7899 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7900 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7902 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7903 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7904 (grub_fshelp_journal): New structure.
7905 (grub_fshelp_map_block): New function prototype.
7906 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7907 (grub_fshelp_map_block): Likewise.
7909 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7910 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7911 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7912 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7913 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7914 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7915 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7916 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7917 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7918 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7919 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7920 (grub_ext2_sblock): New members for journal support.
7921 (grub_ext3_journal_header): New structure.
7922 (grub_ext3_journal_revoke_header): Likewise.
7923 (grub_ext3_journal_block_tag): Likewise.
7924 (grub_ext3_journal_sblock): Likewise.
7925 (grub_fshelp_node): New members logfile and journal.
7926 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7927 grub_fshelp_map_block to get real block number.
7928 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7930 (grub_ext2_read_inode): Likewise.
7931 (grub_ext3_get_journal): New function.
7932 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7933 (grub_ext2_close): Release memory used by journal.
7935 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7936 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7937 (grub_reiserfs_transaction_header): Renamed to
7938 grub_reiserfs_description_block, replace field data with real_blocks.
7939 (grub_reiserfs_commit_block): New structure.
7940 (grub_reiserfs_data): New member journal.
7941 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7943 (grub_reiserfs_read_symlink): Likewise.
7944 (grub_reiserfs_iterate_dir): Likewise.
7945 (grub_reiserfs_open): Likewise.
7946 (grub_reiserfs_read): Likewise.
7947 (grub_reiserfs_get_journal): New function.
7948 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7949 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7950 using grub_reiserfs_get_journal.
7951 (grub_reiserfs_close): Release memory used by journal.
7953 * fs/affs.c (grub_affs_read_block): Change block type to
7954 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7956 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7958 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7960 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7962 * fs/udf.c (grub_udf_read_block): Change block type to
7963 grub_disk_addr_t. Use type cast to avoid warning.
7965 * fs/xfs.c (grub_xfs_read_block): Likewise.
7967 2008-05-16 Christian Franke <franke@computer.org>
7969 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7970 to ensure that break with ESC will always work.
7971 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7972 Remove ESC from keyboard queue.
7974 2008-05-16 Christian Franke <franke@computer.org>
7976 * util/biosdisk.c: [__CYGWIN__] Add includes.
7977 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7978 (get_os_disk): Move variable declarations to OS specific
7979 parts to avoid warning.
7980 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7981 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7982 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7984 * util/getroot.c: [__CYGWIN__] Add includes.
7985 (strip_extra_slashes): Fix "/" case.
7986 [__CYGWIN__] (get_win32_path): New function.
7987 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7988 [__CYGWIN__] (find_root_device): Disable.
7989 [__CYGWIN__] (get_bootsec_serial): New function.
7990 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7991 [__linux__] (grub_guess_root_device): Add early returns to simplify
7993 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7994 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7995 check for Linux only.
7997 2008-05-15 Bean <bean123ch@gmail.com>
7999 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8000 keyboard hang problem in apple's intel mac.
8002 2008-05-09 Robert Millan <rmh@aybabtu.com>
8004 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8006 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8007 (make_device_map): Likewise.
8008 Reported by Aurelien Jarno <aurel32@debian.org>
8010 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8012 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8013 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8014 (make_device_map): Output entries for xvd type disks.
8016 2008-05-07 Robert Millan <rmh@aybabtu.com>
8018 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8020 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8021 (make_device_map): Likewise.
8022 Reported by Roland Dreier <rdreier@cisco.com>
8024 2008-05-07 Robert Millan <rmh@aybabtu.com>
8026 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8027 grub_strstr() call. Correct a few mistakes in failure path handling.
8029 2008-05-06 Robert Millan <rmh@aybabtu.com>
8031 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8032 Do not print a trailing slash (therefore, the root directory is an
8034 (convert_system_path_to_grub_path): Do not remove trailing slash
8035 from make_system_path_relative_to_its_root() output.
8037 * util/i386/pc/grub-install.in: Add trailing slash to output from
8038 make_system_path_relative_to_its_root().
8040 2008-05-06 Robert Millan <rmh@aybabtu.com>
8042 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8043 ensures that output lines aren't intermangled with those sent to
8044 stderr (via grub_util_info()).
8045 * util/grub-probe.c (grub_refresh): Likewise.
8046 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8048 2008-05-05 Christian Franke <franke@computer.org>
8050 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8051 Add Cygwin device names.
8052 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8053 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8054 (check_device): Return error instead of success on empty name.
8055 (make_device_map): Move label inside linux specific code to
8056 prevent compiler warning.
8058 2008-04-30 Robert Millan <rmh@aybabtu.com>
8060 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8061 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8063 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8065 2008-04-29 Robert Millan <rmh@aybabtu.com>
8067 * docs/grub.cfg: New file (example GRUB configuration).
8069 2008-04-26 Robert Millan <rmh@aybabtu.com>
8071 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8072 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8073 and `disk/ieee1275/nand.c'.
8075 2008-04-25 Bean <bean123ch@gmail.com>
8077 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8080 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8081 change the buffer size to 4096 for cdrom device.
8083 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8085 (_linux_mod_SOURCES): New variable.
8086 (_linux_mod_CFLAGS): Likewise.
8087 (_linux_mod_LDFLAGS): Likewise.
8088 (linux_mod_SOURCES): Likewise.
8089 (linux_mod_CFLAGS): Likewise.
8090 (linux_mod_LDFLAGS): Likewise.
8091 (nand_mod_SOURCES): Likewise.
8092 (nand_mod_CFLAGS): Likewise.
8093 (nand_mod_LDFLAGS): Likewise.
8095 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8096 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8097 type property. (nand device in olpc don't have this property)
8099 * include/grub/disk.h (grub_disk_dev_id): New macro
8100 GRUB_DISK_DEVICE_NAND_ID.
8102 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8104 (grub_rescue_cmd_initrd): Likewise.
8106 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8107 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8108 ofw_cif_handler and ofw_idt, adjust padding number.
8110 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8111 GRUB_MACHINE_IEEE1275 is defined.
8113 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8114 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8116 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8117 on nested function heap_init.
8118 (grub_upper_mem): New variable for i386-ieee1275.
8119 (grub_get_extended_memory): New function for i386-ieee1275.
8120 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8122 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8123 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8126 * loader/i386/ieee1275/linux.c: New file.
8128 * loader/i386/ieee1275/linux_normal.c: New file.
8130 * disk/ieee1275/nand.c: New file.
8132 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8134 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8136 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8138 2008-04-18 Robert Millan <rmh@aybabtu.com>
8140 Restructures early code path on ieee1275 to unify grub_main() as
8141 the first C function that is executed in every platform.
8143 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8144 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8146 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8147 * kern/ieee1275/cmain.c (cmain): Rename to ...
8148 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8149 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8152 2008-04-18 Robert Millan <rmh@aybabtu.com>
8154 * util/update-grub.in: Fix syntax error when setting
8155 `GRUB_PRELOAD_MODULES'.
8156 Reported by Stephane Chazelas <stephane@artesyncp.com>
8158 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8160 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8161 section into account, newer toolchains generate unique build ids
8162 * configure.ac: remove the test for --build-id=none acceptance,
8163 we want build ids to be preserved
8164 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8165 far from other sections don't cause the raw binary images grow
8168 2008-04-15 Robert Millan <rmh@aybabtu.com>
8170 * disk/lvm.c: Update copyright year.
8171 * kern/misc.c: Likewise.
8173 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8175 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8176 there is no memory left for physical volume name.
8178 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8180 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8181 volume name mapping to support bigger than 9 character names properly.
8183 2008-04-13 Robert Millan <rmh@aybabtu.com>
8185 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8186 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8188 2008-04-13 Christian Franke <franke@computer.org>
8190 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8191 to create a floppy emulation boot CD when non emulation mode
8193 Enable Joliet CD filesystem extension.
8195 2008-04-13 Robert Millan <rmh@aybabtu.com>
8197 * kern/misc.c (grub_strncat): Fix off-by-one error.
8198 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8200 * kern/env.c (grub_env_context_close): Clear current context, not
8202 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8204 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8206 2008-04-13 Robert Millan <rmh@aybabtu.com>
8208 Improve robustness when handling LVM.
8210 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8211 (and leave `*p' unmodified).
8212 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8214 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8215 iterating through it.
8216 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8218 (grub_lvm_scan_device): Check the return value (and fail gracefully
8219 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8220 Don't assume `vg->pvs != NULL' when iterating through it.
8222 2008-04-13 Robert Millan <rmh@aybabtu.com>
8224 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8225 * genmk.rb (partmap): New variable.
8226 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8227 (#{partmap}): New target rule.
8228 * genpartmaplist.sh: New file.
8229 * Makefile.in (pkglib_DATA): Add partmap.lst.
8230 (partmap.lst): New target rule.
8231 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8232 modules (including all partition maps), instead of preloading them.
8234 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8236 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8237 `linux-boot-prober' (if installed) to detect other operating
8238 systems which are installed on the computer and add them to
8240 * conf/common.rmk: Build and install 30_os-prober.
8242 2008-04-12 Robert Millan <rmh@aybabtu.com>
8244 * kern/powerpc/ieee1275/init.c: Move from here ...
8245 * kern/ieee1275/init.c: ... to here. Update all users.
8247 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8248 * kern/ieee1275/cmain.c: ... to here. Update all users.
8250 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8251 * kern/ieee1275/openfw.c: ... to here. Update all users.
8253 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8254 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8256 2008-04-10 Pavel Roskin <proski@gnu.org>
8258 * configure.ac: Always use "_cv_" in cache variables for
8259 compatibility with Autoconf 2.62.
8261 2008-04-07 Robert Millan <rmh@aybabtu.com>
8263 Revert grub/machine/init.h addition by Pavel (since it breaks on
8264 i386-ieee1275 and others):
8265 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8266 * util/powerpc/ieee1275/misc.c: Likewise.
8268 2008-04-07 Robert Millan <rmh@aybabtu.com>
8270 * util/grub-probe.c (probe): Improve error message.
8272 2008-04-07 Robert Millan <rmh@aybabtu.com>
8274 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8275 (this prevents the presence of a bogus entry from ruining the whole
8278 2008-04-06 Pavel Roskin <proski@gnu.org>
8280 * util/biosdisk.c: Include grub/util/biosdisk.h.
8281 * util/grub-fstest.c (execute_command): Make static.
8282 * util/grub-mkdevicemap.c (check_device): Likewise.
8283 * util/i386/pc/misc.c: Include grub/machine/init.h.
8284 * util/powerpc/ieee1275/misc.c: Likewise.
8285 * util/lvm.c: Include grub/util/lvm.h.
8286 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8288 * util/raid.c: Include grub/util/raid.h.
8289 (grub_util_getdiskname): Make static.
8291 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8292 grub_hostfs_fini(), as they are called from grub_init_all() and
8293 grub_fini_all() respectively. This fixes an infinite loop in
8294 grub-fstest due to double registration of hostfs.
8295 Reported by Christian Franke <Christian.Franke@t-online.de>
8297 2008-04-05 Pavel Roskin <proski@gnu.org>
8299 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8300 all 8 functions. Otherwise, probe function 0 only.
8302 2008-04-04 Pavel Roskin <proski@gnu.org>
8304 * commands/lspci.c (grub_lspci_iter): Print the bus number
8307 * commands/lspci.c (grub_pci_classes): Fix typos.
8308 (grub_lspci_iter): Don't print func twice. Print vendor ID
8309 before device ID, as it's normally done.
8311 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8312 Fix signedness warnings.
8313 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8315 * util/ieee1275/get_disk_name.c: Include config.h so that
8316 _GNU_SOURCE is defined and getline() is declared. Mark an
8317 unused argument as such. Fix a signedness warning.
8319 2008-04-02 Pavel Roskin <proski@gnu.org>
8321 * genkernsyms.sh.in: Use more robust assignments for CC and
8322 srcdir. Quote srcdir.
8323 * gensymlist.sh.in: Likewise. Assert at the compile time that
8324 the symbol table is not empty.
8326 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8327 * fs/cpio.c (grub_cpio_read): Likewise.
8329 2008-04-01 Pavel Roskin <proski@gnu.org>
8331 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8332 * disk/host.c (grub_host_open): Likewise.
8333 * disk/loopback.c (grub_loopback_open): Likewise.
8334 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8335 disk->id as in disk/host.c, not a multi-character constant.
8337 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8338 later is obsolete, potentially dangerous and sets a bad example.
8339 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8340 * util/misc.c (grub_util_get_image_size): Likewise.
8342 * disk/loopback.c (options): Improve help for "--partitions".
8344 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8345 options to align them with the short options, e.g. "echo -e".
8347 2008-03-31 Bean <bean123ch@gmail.com>
8349 * video/reader/png.c (grub_png_data): New member is_16bit and
8351 (grub_png_decode_image_header): Detect 16 bit png image.
8352 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8353 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8354 (grub_video_reader_png): Release memory occupied by image_data.
8356 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8358 (grub_nfs_mount): Skip the test for sector per cluster.
8360 * include/grub/ntfs.h (MAX_SPC): Removed.
8362 2008-03-31 Bean <bean123ch@gmail.com>
8364 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8365 (grub_probe_SOURCES): Add fs/afs.c.
8366 (grub_fstest_SOURCES): Likewise.
8367 (afs_mod_SOURCES): New variable.
8368 (afs_mod_CFLAGS): Likewise.
8369 (afs_mod_LDFLAGS): Likewise.
8371 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8372 (grub_emu_SOURCES): Likewise.
8374 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8376 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8378 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8380 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8382 * fs/afs.c: New file.
8384 2008-03-30 Pavel Roskin <proski@gnu.org>
8386 * disk/host.c: Include grub/misc.h to fix a warning.
8387 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8388 warnings about implicit declarations.
8390 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8392 * include/grub/i386/loader.h: Change declaration of
8393 grub_linux_boot() to match what grub_loader_set() expects.
8394 * util/getroot.c (grub_guess_root_device): Return const char* to
8396 * util/grub-probe.c (probe): Fix a warning about uninitialized
8397 abstraction_name variable.
8398 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8399 second argument as unused to fix a warning.
8401 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8402 missing grub_error() call.
8404 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8405 2.60 and newer uses it to define datadir.
8407 * commands/sleep.c: Fix warning about implicit declaration.
8408 * disk/memdisk.c: Likewise.
8409 * loader/aout.c: Likewise.
8410 * loader/i386/bsd_normal.c: Likewise.
8411 * util/grub-probe.c: Likewise.
8413 * commands/i386/cpuid.c (has_longmode): Make static.
8414 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8415 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8417 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8418 GDT. This is more robust, as %ds can change.
8419 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8420 calling real_to_prot().
8421 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8423 2008-03-28 Pavel Roskin <proski@gnu.org>
8425 * kern/i386/pc/startup.S: Assert that uncompressed functions
8426 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8427 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8428 code, as they push parts of the code (error handlers) beyond
8429 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8430 code as correctness and size.
8432 2008-03-28 Pavel Roskin <proski@gnu.org>
8434 * kern/i386/pc/startup.S
8435 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8436 data block address to the real mode, keep offset minimal. This
8437 works around a bug in AWARD BIOS on old Athlon systems, which
8438 makes CD detection hang.
8440 2008-03-26 Pavel Roskin <proski@gnu.org>
8442 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8444 * include/grub/normal.h: Add grub_parse_color_name_pair()
8447 2008-03-24 Bean <bean123ch@gmail.com>
8449 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8450 (cd_count): Removed.
8451 (cd_drive): New variable.
8452 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8453 (grub_biosdisk_call_hook): Likewise.
8454 (grub_biosdisk_iterate): Change cdrom detection method.
8455 (grub_biosdisk_open): Replace cd_start with cd_drive.
8456 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8457 detect cdrom device.
8459 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8461 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8462 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8463 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8464 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8465 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8466 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8467 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8468 (grub_biosdisk_cdrp): New structure.
8469 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8471 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8473 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8476 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8479 2008-03-20 Robert Millan <rmh@aybabtu.com>
8481 Remove 2 TiB limit in ata.mod.
8482 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8483 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8484 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8485 grub_uint64_t instead of grub_uint32_t.
8487 2008-03-05 Bean <bean123ch@gmail.com>
8489 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8490 (grub_multiboot): Set boot device.
8492 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8494 2008-03-02 Bean <bean123ch@gmail.com>
8496 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8499 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8501 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8504 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8507 * docs/fdl.texi: New file.
8509 * docs/mdate-sh: New file. Copied from gnulib.
8510 * docs/texinfo.tex: Likewise.
8512 * config.guess: Updated from gnulib.
8513 * install-sh: Likewise.
8515 2008-02-28 Robert Millan <rmh@aybabtu.com>
8517 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8518 (aout_mod_SOURCES): New variable.
8519 (aout_mod_CFLAGS): Likewise.
8520 (aout_mod_LDFLAGS): Likewise.
8522 * conf/i386-ieee1275.rmk: Likewise.
8524 2008-02-28 Robert Millan <rmh@aybabtu.com>
8526 * util/update-grub.in: Reorganise terminal validity check. Accept
8527 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8528 Based on suggestion by Franklin PIAT.
8530 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8532 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8534 * util/getroot.c (grub_util_check_block_device): New function that
8535 returns the given argument if it is a block device and returns NULL else.
8536 * util/grub-probe.c (argument_is_device): New variable.
8537 (probe): Promote device_name from a variable to an argument. Receive
8538 device_name from grub_util_check_block_device() if path is NULL and from
8539 grub_guess_root_device() else. Do not free() device_name anymore.
8540 (options): Introduce new parameter '-d, --device'.
8541 (main): Add description of the new parameter to the help screen.
8542 Rename path variable to argument. Set argument_is_device if the '-d'
8543 option is given. Pass argument to probe() depending on
8546 2008-02-24 Bean <bean123ch@gmail.com>
8548 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8549 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8550 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8551 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8552 (GRUB_ISO9660_VOLDESC_END): Likewise.
8553 (grub_iso9660_primary_voldesc): New member escape.
8554 (grub_iso9660_data): New member joliet.
8555 (grub_iso9660_convert_string): New function.
8556 (grub_iso9660_mount): Detect joliet extension.
8557 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8558 (grub_iso9660_iso9660_label): Likewise.
8560 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8561 (grub_setup_SOURCES): Add fs/udf.c.
8562 (grub_fstest_SOURCES): Likewise.
8563 (udf_mod_SOURCES): New variable.
8564 (udf_mod_CFLAGS): Likewise.
8565 (udf_mod_LDFLAGS): Likewise.
8567 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8568 (grub_emu_SOURCES): Likewise.
8570 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8572 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8574 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8576 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8578 * fs/udf.c: New file.
8580 2008-02-24 Robert Millan <rmh@aybabtu.com>
8582 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8583 (normal/lexer.c_DEPENDENCIES): New variables.
8584 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8585 (normal/lexer.c_DEPENDENCIES): Likewise.
8586 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8587 (normal/lexer.c_DEPENDENCIES): Likewise.
8588 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8589 (normal/lexer.c_DEPENDENCIES): Likewise.
8590 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8591 (normal/lexer.c_DEPENDENCIES): Likewise.
8592 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8593 (normal/lexer.c_DEPENDENCIES): Likewise.
8595 2008-02-23 Robert Millan <rmh@aybabtu.com>
8597 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8598 since they were intended to be in hex. This didn't break previously
8599 because of a bug in gpt_partition_map_iterate() (see below).
8601 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8602 when checking the validity of GPT header.
8603 Remove `partno', since it always provides the same information as `i'.
8605 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8607 * include/grub/efi/time.h: Fix a wrong comment.
8609 2008-02-19 Pavel Roskin <proski@gnu.org>
8611 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8614 2008-02-19 Bean <bean123ch@gmail.com>
8616 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8617 (aout_mod_SOURCES): New variable.
8618 (aout_mod_CFLAGS): Likewise.
8619 (aout_mod_LDFLAGS): Likewise.
8620 (_bsd_mod_SOURCES): New variable.
8621 (_bsd_mod_CFLAGS): Likewise.
8622 (_bsd_mod_LDFLAGS): Likewise.
8623 (bsd_mod_SOURCES): New variable.
8624 (bsd_mod_CFLAGS): Likewise.
8625 (bsd_mod_LDFLAGS): Likewise.
8627 * include/grub/aout.h: New file.
8629 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8631 * include/grub/i386/bsd.h: New file.
8633 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8636 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8637 function is called, so that it's possible to change it inside the hook.
8638 (grub_elf64_load): Likewise.
8639 (grub_elf_file): Don't close the file if elf header is not found.
8640 (grub_elf_close): Close the file if grub_elf_file fails (The new
8641 grub_elf_file won't close it).
8642 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8643 (grub_elf64_size): Likewise.
8645 * kern/i386/loader.S (grub_unix_real_boot): New function.
8647 * loader/aout.c: New file.
8649 * loader/i386/bsd.c: New file.
8651 * loader/i386/bsd_normal.c: New file.
8653 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8655 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8656 can test other formats.
8658 2008-02-19 Robert Millan <rmh@aybabtu.com>
8660 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8661 (grub_gpt_partition_type_empty): Redefine with macro from
8662 `<grub/gpt_partition.h>'.
8663 (gpt_partition_map_iterate): Adjust partition type comparison.
8665 Export `entry' as partmap-specific `part.data' struct.
8666 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8668 * include/grub/gpt_partition.h (grub_gpt_header)
8669 (grub_gpt_partentry): ... to here (new file).
8671 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8673 (grub_gpt_partition_type_bios_boot): New const variable, defined
8674 with macro from `<grub/gpt_partition.h>'.
8676 (setup): Replace `first_start' with `embed_region', which keeps
8677 track of the embed region (and is partmap-agnostic).
8679 Replace find_first_partition_start() with find_usable_region(),
8680 which finds a usable region for embedding using partmap-specific
8681 knowledge (supports PC/MSDOS and GPT).
8683 Fix all assumptions that the embed region start at sector 1, using
8684 `embed_region.start' from now on. Similarly, use `embed_region.end'
8685 rather than `first_start' to calculate available size.
8687 In grub_util_info() message, replace "into after the MBR" with an
8688 indication of the specific sector our embed region starts at.
8690 2008-02-19 Robert Millan <rmh@aybabtu.com>
8692 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8693 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8694 `commands/reboot.c'.
8695 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8696 (halt_mod_SOURCES): Likewise.
8697 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8698 (halt_mod_SOURCES): Likewise.
8700 2008-02-17 Christian Franke <franke@computer.org>
8702 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8704 2008-02-17 Robert Millan <rmh@aybabtu.com>
8706 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8707 set `first_start' to 0 for non-PC/MSDOS partition maps.
8709 2008-02-16 Robert Millan <rmh@aybabtu.com>
8711 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8712 do not assume partition map is PC/MSDOS before performing checks that
8713 are specific to that layout.
8715 2008-02-13 Robert Millan <rmh@aybabtu.com>
8717 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8718 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8719 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8721 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8723 * configure.ac: Only a cosmetic change on the handling of
8724 -fno-stack-protector.
8726 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8728 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8729 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8731 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8732 (halt_mod_SOURCES): New variable.
8733 (halt_mod_CFLAGS): Likewise.
8734 (halt_mod_LDFLAGS): Likewise.
8735 (reboot_mod_SOURCES): Likewise.
8736 (reboot_mod_CFLAGS): Likewise.
8737 (reboot_mod_LDFLAGS): Likewise.
8739 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8740 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8742 (halt_mod_SOURCES): Likewise.
8743 (reboot_mod_SOURCES): Likewise.
8745 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8746 commands/i386/pc/reboot.c by commands/reboot.c.
8747 (reboot_mod_SOURCES): Likewise.
8749 * commands/i386/pc/reboot.c: merge this file ...
8751 * commands/ieee1275/reboot.c: ... and this file ...
8753 * commands/reboot.c: ... to this file.
8754 Add some precompiler directive to include the correct header for
8757 * commands/ieee1275/halt.c: move this file ...
8759 * commands/halt.c: ... to here.
8760 Add some precompiler directive to include the correct header for
8763 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8764 (grub_halt): Likewise.
8766 * kern/efi/efi.c (grub_reboot): New function.
8767 (grub_halt): Likewise.
8769 2008-02-12 Robert Millan <rmh@aybabtu.com>
8771 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8772 /dev (like it is done for /dev/mapper). This doesn't provide support
8773 for EVMS, but at least it is now easy to identify the problem when it
8776 2008-02-11 Robert Millan <rmh@aybabtu.com>
8778 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8779 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8780 comparing it with -1, not 0.
8782 2008-02-10 Robert Millan <rmh@aybabtu.com>
8784 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8786 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8787 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8789 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8790 `disk/lvm.c' to the end of the list.
8791 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8792 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8794 2008-02-10 Robert Millan <rmh@aybabtu.com>
8796 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8797 grub_print_error() instead. This will let user know why we're entering
8799 Based on suggestions from Sam Morris.
8801 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8803 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8804 on remaining N args, instead of "--" arg N times.
8806 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8808 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8809 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8810 pattern for unknown glyphs.
8812 2008-02-09 Robert Millan <rmh@aybabtu.com>
8814 * configure.ac: Probe for `help2man'.
8815 * Makefile.in (builddir): New variable.
8816 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8817 or otherwise add a few flags/options to it.
8818 (install-local): For every executable utility or script that is
8819 installed, invoke $(HELP2MAN) to install a manpage based on --help
8822 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8823 that it doesn't prevent --help from working in build tree.
8825 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8826 with `bug-grub@gnu.org'.
8827 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8828 * util/update-grub.in (usage): New function.
8829 Implement proper argument check, with support for --help and --version
8830 (as well as existing -y).
8832 2008-02-09 Christian Franke <franke@computer.org>
8834 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8835 avoid overwriting previous output.
8836 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8838 2008-02-09 Robert Millan <rmh@aybabtu.com>
8840 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8843 2008-02-09 Robert Millan <rmh@aybabtu.com>
8845 * commands/sleep.c: New file.
8846 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8847 (sleep_mod_SOURCES): New variable.
8848 (sleep_mod_CFLAGS): Likewise.
8849 (sleep_mod_LDFLAGS): Likewise.
8851 2008-02-09 Robert Millan <rmh@aybabtu.com>
8853 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8854 situations in which we can deduce the RAID size and the superblock
8857 2008-02-09 Robert Millan <rmh@aybabtu.com>
8859 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8860 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8861 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8863 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8864 and return a grub_diskmemberlist_t composed of physical array members.
8865 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8867 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8869 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8870 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8871 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8873 * util/grub-probe.c (probe): Move partmap probing code from here ...
8874 (probe_partmap): ... to here.
8875 (probe): Use probe_partmap() once for the disk we're probing, and
8876 additionally, when such disk contains a memberlist() struct member,
8877 once for each disk that is contained in the structure returned by
8880 2008-02-09 Robert Millan <rmh@aybabtu.com>
8882 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8883 environment variable to 'all' in order to obtain debug output from
8885 * util/i386/pc/grub-setup.c (main): Likewise.
8887 2008-02-08 Robert Millan <rmh@aybabtu.com>
8889 * disk/raid.c (grub_raid_scan_device): Check for
8890 `array->device[sb.this_disk.number]' rather than for
8891 `array->device[sb.this_disk.number]->name', since the latter is not
8892 guaranteed to be accessible.
8894 2008-02-08 Robert Millan <rmh@aybabtu.com>
8896 * disk/raid.c: Update copyright.
8897 * fs/cpio.c: Likewise.
8898 * include/grub/raid.h: Likewise.
8899 * loader/i386/pc/multiboot.c: Likewise.
8900 * util/hostfs.c: Likewise.
8902 2008-02-08 Robert Millan <rmh@aybabtu.com>
8904 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8905 to a grub_disk_t array.
8906 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8908 (grub_raid_scan_device): Replace `device[x].name' accesses with
8909 `device[x]->name'. Simplify initialization of `array->device[x]'.
8911 2008-02-08 Robert Millan <rmh@aybabtu.com>
8913 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8914 grub_dprintf() calls.
8915 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8918 2008-02-07 Christian Franke <franke@computer.org>
8920 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8921 instead of fseek and ftell to support large files.
8922 (grub_hostfs_read): Likewise.
8924 2008-02-07 Robert Millan <rmh@aybabtu.com>
8926 Patch from Jeroen Dekkers.
8927 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8928 failure, since successfully reading all array members might not be
8931 2008-02-06 Robert Millan <rmh@aybabtu.com>
8933 * util/grub-probe.c (probe): Simplify partmap probing (with the
8934 assumption that the first word up to the underscore equals to
8937 2008-02-06 Christian Franke <franke@computer.org>
8939 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8940 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8941 last block of a cpio or tar stream.
8942 Check for "TRAILER!!!" instead of any empty data
8943 block to detect last block of a cpio stream.
8944 (grub_cpio_dir): Fix constness of variable np.
8945 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8946 cpio or tar trailer is detected. This fixes a crash
8947 on open of a non existing file.
8949 2008-02-05 Bean <bean123ch@gmail.com>
8951 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8953 (grub_multiboot_load_elf64): Likewise.
8954 (grub_multiboot): Initialize mbi structure.
8956 * util/grub-fstest.c: Don't include unused header file script.h.
8958 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8960 (grub_fstest_SOURCES): Likewise.
8962 2008-02-05 Robert Millan <rmh@aybabtu.com>
8964 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8965 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8966 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8967 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8969 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8970 (translation_table): Replace hardcoded values with macros
8971 provided by `<grub/term.h>'.
8973 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8974 (keyboard_map): Correct/add a few values, with macros provided
8976 (keyboard_map_shift): Zero values that don't differ from their
8977 `keyboard_map' equivalents.
8978 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8979 Discard the second scan code that is always sent by Caps lock.
8980 Only use `keyboard_map_shift' when it provides a non-zero value,
8981 otherwise fallback to `keyboard_map'.
8983 2008-02-04 Bean <bean123ch@gmail.com>
8985 * Makefile.in (enable_grub_fstest): New variable.
8987 * conf/common.rmk (grub_fstest_init.lst): New rule.
8988 (grub_fstest_init.h): Likewise.
8989 (grub_fstest_init.c): Likewise.
8990 (util/grub-fstest.c_DEPENDENCIES): New variable.
8991 (grub_fstest_SOURCES): Likewise.
8993 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8995 * util/grub-fstest.c: New file.
8997 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8999 Make grub-setup handle a separate root device.
9001 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9002 so that the root device can be compared with the destination
9004 When embedding the core image, if the root and destination devices
9005 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9007 When not embedding, set ROOT_DRIVE to 0xFF.
9009 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9011 Add support for having a grub directory in a different drive. This
9012 is still only the data handling part.
9014 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9015 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9016 (grub_root_drive): New variable.
9018 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9019 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9020 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9023 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9025 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9027 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9029 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9030 is bogus, because PXE booting does not specify any drive
9033 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9034 am not sure if this is really correct.
9036 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9037 is always identical to the boot drive when booting from a CD.
9039 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9041 (root_drive): New variable.
9042 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9043 (setup_sectors): Push %dx right after popping it, because %dh will
9045 (copy_buffer): Restore %dx.
9047 2008-02-03 Robert Millan <rmh@aybabtu.com>
9049 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9050 use `cdboot.img' for cdrom images.
9052 2008-02-03 Robert Millan <rmh@aybabtu.com>
9054 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9055 only setup gfxterm when `font' command has succeeded.
9057 2008-02-03 Robert Millan <rmh@aybabtu.com>
9059 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9060 (grub_rescue_cmd_multiboot_loader)
9061 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9063 2008-02-03 Pavel Roskin <proski@gnu.org>
9065 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9066 %edx and %esi from stack only after grub_gate_a20() is called.
9067 grub_gate_a20() clobbers %edx.
9069 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9071 * configure.ac (AC_INIT): Bumped to 1.96.
9073 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9074 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9075 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9076 video/readers/png.c.
9078 2008-02-03 Bean <bean123ch@gmail.com>
9080 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9081 (cdboot_img_SOURCES): New variable.
9082 (cdboot_img_ASFLAGS): New variable.
9083 (cdboot_img_LDFLAGS): New variable.
9085 * boot/i386/pc/cdboot.S: New file.
9087 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9088 (cd_count): Likewise.
9089 (grub_biosdisk_get_drive): Add support for cd device.
9090 (grub_biosdisk_call_hook): Likewise.
9091 (grub_biosdisk_iterate): Likewise.
9092 (grub_biosdisk_open): Likewise.
9093 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9094 (grub_biosdisk_rw): Support reading from cd device.
9095 (GRUB_MOD_INIT): Iterate cd devices.
9097 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9098 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9099 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9101 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9103 2008-02-02 Robert Millan <rmh@aybabtu.com>
9105 * commands/read.c: New file.
9106 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9107 (read_mod_SOURCES): New variable.
9108 (read_mod_CFLAGS): Likewise.
9109 (read_mod_LDFLAGS): Likewise.
9111 2008-02-02 Robert Millan <rmh@aybabtu.com>
9113 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9114 determining whether menu has to be displayed.
9116 2008-02-02 Marco Gerards <marco@gnu.org>
9118 * bus/pci.c: New file.
9120 * include/grub/pci.h: Likewise.
9122 * include/grub/i386/pc/pci.h: Likewise.
9124 * commands/lspci.c: Likewise.
9126 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9128 (pci_mod_SOURCES): New variable.
9129 (pci_mod_CFLAGS): Likewise.
9130 (pci_mod_LDFLAGS): Likewise.
9131 (lspci_mod_SOURCES): Likewise.
9132 (lspci_mod_CFLAGS): Likewise.
9133 (lspci_mod_LDFLAGS): Likewise.
9135 2008-02-02 Bean <bean123ch@gmail.com>
9137 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9138 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9140 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9141 (grub_xfs_btree_node): New structure.
9142 (grub_xfs_btree_root): New structure.
9143 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9144 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9145 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9146 (GRUB_XFS_EXTENT_SIZE): Likewise.
9147 (grub_xfs_read_block): Support btree format type.
9148 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9149 Use directory block as basic unit.
9151 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9153 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9154 __attribute__ ((__regparm__ (1))).
9156 2008-02-01 Robert Millan <rmh@aybabtu.com>
9158 Correct a mistake in previous commit.
9160 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9162 (normal/command.c_DEPENDENCIES): New variable.
9164 2008-02-01 Robert Millan <rmh@aybabtu.com>
9166 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9168 (normal/command.c_DEPENDENCIES): New variable.
9169 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9170 * conf/i386-ieee1275.rmk: Likewise.
9171 * conf/i386-linuxbios.rmk: Likewise.
9172 * conf/i386-pc.rmk: Likewise.
9173 * conf/sparc64-ieee1275.rmk: Likewise.
9174 * conf/powerpc-ieee1275.rmk: Likewise.
9175 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9177 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9179 2008-02-01 Robert Millan <rmh@aybabtu.com>
9181 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9182 call at beginning of function.
9184 2008-01-31 Pavel Roskin <proski@gnu.org>
9186 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9187 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9188 (grub_mkrescue_SOURCES): Likewise.
9189 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9191 2008-01-30 Robert Millan <rmh@aybabtu.com>
9193 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9194 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9195 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9196 (grub_probe_SOURCES): ... to here.
9198 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9199 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9200 * conf/i386-ieee1275.rmk: Likewise.
9201 * conf/i386-linuxbios.rmk: Likewise.
9202 * conf/powerpc-ieee1275.rmk: Likewise.
9204 2008-01-30 Tristan Gingold <gingold@free.fr>
9206 * kern/rescue.c: Silently accept empty lines.
9208 2008-01-29 Bean <bean123ch@gmail.com>
9210 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9211 (real_code_2): Code cleanup and change comment style.
9212 (move_memory): Avoid using 32-bit address mode.
9214 2008-01-29 Bean <bean123ch@gmail.com>
9216 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9217 (png_mod_SOURCES): New variable.
9218 (png_mod_CFLAGS): Likewise.
9219 (png_mod_LDFLAGS): Likewise.
9221 * video/readers/png.c: New file.
9223 2008-01-28 Robert Millan <rmh@aybabtu.com>
9225 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9226 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9227 `ifndef GRUB_MOD_GAP' hack.
9228 * util/elf/grub-mkimage.c (add_segments): Likewise.
9230 2008-01-27 Robert Millan <rmh@aybabtu.com>
9232 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9233 `GRUB_MOD_GAP' for platforms in which it's not defined.
9234 * util/elf/grub-mkimage.c (add_segments): Likewise.
9236 2008-01-27 Robert Millan <rmh@aybabtu.com>
9238 Get grub-emu to build again (including parallel builds).
9240 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9242 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9243 (normal/execute.c_DEPENDENCIES): ... this, ...
9244 (grub-emu_DEPENDENCIES): ... and this.
9246 * conf/i386-efi.rmk: Likewise.
9247 * conf/i386-linuxbios.rmk: Likewise.
9248 * conf/i386-ieee1275.rmk: Likewise.
9249 * conf/powerpc-ieee1275.rmk: Likewise.
9250 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9252 2008-01-27 Robert Millan <rmh@aybabtu.com>
9254 * NEWS: Add a few items.
9256 2008-01-27 Robert Millan <rmh@aybabtu.com>
9258 Fix parallel builds with grub-emu. Based on earlier commit for
9259 grub-probe and grub-setup.
9261 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9262 (util/grub-emu.c_DEPENDENCIES): ... this.
9263 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9264 (util/grub-emu.c_DEPENDENCIES): ... this.
9265 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9266 (util/grub-emu.c_DEPENDENCIES): ... this.
9267 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9268 (util/grub-emu.c_DEPENDENCIES): ... this.
9269 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9270 (util/grub-emu.c_DEPENDENCIES): ... this.
9272 2008-01-27 Pavel Roskin <proski@gnu.org>
9274 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9275 to create a gap between _end and the modules added to the image
9276 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9277 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9278 * util/elf/grub-mkimage.c (add_segments): Likewise.
9280 2008-01-26 Pavel Roskin <proski@gnu.org>
9282 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9283 just return an error.
9285 2008-01-26 Bean <bean123ch@gmail.com>
9287 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9288 (grub_reiserfs_get_item): Save offset of the next item.
9289 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9291 2008-01-25 Robert Millan <rmh@aybabtu.com>
9293 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9294 make all filesystem sources appear together (possibly fixing omissions
9296 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9297 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9298 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9299 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9301 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9303 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9304 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9305 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9306 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9308 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9309 (probe): Add a sanity check to make sure of our ability to read
9310 requested files when probing for filesystem type.
9312 * genmk.rb: Update copyright year (2007).
9314 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9315 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9316 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9317 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9318 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9319 : Remove function prototypes.
9321 2008-01-25 Robert Millan <rmh@aybabtu.com>
9323 Revert my previous commits (based on wrong assumption of how grub_errno
9326 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9327 * kern/file.c (grub_file_open): Likewise.
9329 2008-01-24 Pavel Roskin <proski@gnu.org>
9331 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9332 that hang if GRUB tries to setup colors.
9333 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9334 colors for firmwares that don't support it.
9335 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9336 Recognize Open Hack'Ware, set flags to work around its
9339 2008-01-24 Robert Millan <rmh@aybabtu.com>
9341 * kern/file.c (grub_file_open): Do not account previous failures of
9342 unrelated functions when grub_errno is checked for.
9343 Reported by Oleg Strikov.
9345 2008-01-24 Bean <bean123ch@gmail.com>
9347 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9348 (grub_ufs_sblock): New member volume name.
9349 (grub_ufs_find_file): Fix string copy bug.
9350 (grub_ufs_label): Implement this function properly.
9352 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9353 (grub_hfs_iterate_records): Use the correct file number for extents
9354 and catalog file. Fix problem in next index calculation.
9355 (grub_hfs_find_node): Replace recursive function call with loop.
9356 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9358 2008-01-23 Robert Millan <rmh@aybabtu.com>
9360 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9361 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9362 (grub_multiboot2_real_boot): New function prototype.
9364 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9365 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9367 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9368 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9370 2008-01-23 Robert Millan <rmh@aybabtu.com>
9372 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9373 #ifdef'ed out grub_printf().
9375 2008-01-23 Robert Millan <rmh@aybabtu.com>
9377 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9378 grub_dprintf calls, since they make "debug=all" mode unusable.
9379 (grub_console_checkkey): Likewise.
9381 2008-01-23 Robert Millan <rmh@aybabtu.com>
9383 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9384 `term/i386/pc/at_keyboard.c'.
9385 (pkglib_MODULES): Add `serial.mod'.
9386 (serial_mod_SOURCES): New variable.
9387 (serial_mod_CFLAGS): Likewise.
9388 (serial_mod_LDFLAGS): Likewise.
9390 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9391 `<grub/powerpc/ieee1275/console.h>'.
9392 (grub_keyboard_controller_init): New function prototype.
9393 (grub_console_checkkey): Likewise.
9394 (grub_console_getkey): Likewise.
9396 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9399 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9400 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9402 2008-01-23 Robert Millan <rmh@aybabtu.com>
9404 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9405 present, "(memdisk)/boot/grub" becomes the default prefix.
9407 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9408 a memdisk tarball with all the modules. Add --overlay=DIR option that
9409 allows users to overlay additional files into the image.
9411 2008-01-23 Robert Millan <rmh@aybabtu.com>
9413 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9414 and `machine/memory.h'.
9415 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9416 (_multiboot_mod_SOURCES): New variable.
9417 (_multiboot_mod_CFLAGS): Likewise.
9418 (_multiboot_mod_LDFLAGS): Likewise.
9419 (multiboot_mod_SOURCES): Likewise.
9420 (multiboot_mod_CFLAGS): Likewise.
9421 (multiboot_mod_LDFLAGS): Likewise.
9423 * include/grub/i386/ieee1275/loader.h: New file.
9425 * include/grub/i386/ieee1275/machine.h: Likewise.
9427 * include/grub/i386/ieee1275/memory.h: Likewise.
9429 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9430 variable declaration.
9431 (grub_os_area_size): Likewise.
9433 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9434 (grub_lower_mem, grub_upper_mem): New variables.
9435 (grub_stop_floppy): New function (just to make
9436 grub_multiboot2_real_boot() happy).
9438 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9439 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9440 (grub_stop): New function.
9441 Include `"../realmode.S"' and `"../loader.S"'.
9443 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9444 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9446 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9447 rely on grub_multiboot2_real_boot() for final boot.
9449 2008-01-22 Robert Millan <rmh@aybabtu.com>
9451 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9452 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9453 device that doesn't look like an SD card.
9454 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9455 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9456 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9457 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9460 2008-01-22 Robert Millan <rmh@aybabtu.com>
9462 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9463 avoid claiming over our own code.
9465 2008-01-22 Bean <bean123ch@gmail.com>
9467 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9468 (jpeg_mod_SOURCES): New variable.
9469 (jpeg_mod_CFLAGS): Likewise.
9470 (jpeg_mod_LDFLAGS): Likewise.
9472 * video/readers/jpeg.c : New file.
9474 2008-01-22 Bean <bean123ch@gmail.com>
9476 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9477 there are no more items.
9479 2008-01-21 Robert Millan <rmh@aybabtu.com>
9481 * kern/mm.c (grub_mm_init_region): Improve debug message.
9483 2008-01-21 Robert Millan <rmh@aybabtu.com>
9485 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9486 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9488 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9490 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9491 Indicates start of upper memory.
9492 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9493 (generate_image): Abort when image size is big enough to corrupt
9496 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9497 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9498 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9499 instead of hardcoding 0xA0000.
9500 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9501 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9502 instead of hardcoding 0xA0000.
9504 2008-01-21 Robert Millan <rmh@aybabtu.com>
9506 * disk/memdisk.c (memdisk_size): New variable.
9507 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9509 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9510 image to dynamic memory.
9511 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9512 `memdisk_size'. Free memdisk block.
9514 2008-01-21 Robert Millan <rmh@aybabtu.com>
9516 Fix detection of very small filesystems (like tar).
9518 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9519 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9520 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9521 a problem with this disk).
9523 2008-01-21 Robert Millan <rmh@aybabtu.com>
9525 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9526 on grub_biosdisk_rw_standard() error.
9528 2008-01-21 Robert Millan <rmh@aybabtu.com>
9530 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9532 * kern/elf.c: Likewise.
9533 * kern/ieee1275/ieee1275.c: Likewise.
9534 * kern/powerpc/ieee1275/openfw.c: Likewise.
9535 * term/ieee1275/ofconsole.c: Likewise.
9537 2008-01-21 Robert Millan <rmh@aybabtu.com>
9539 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9541 * include/grub/kernel.h (grub_arch_memdisk_addr)
9542 (grub_arch_memdisk_size): Moved from here ...
9544 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9545 (grub_arch_memdisk_size): ... to here.
9547 2008-01-21 Robert Millan <rmh@aybabtu.com>
9549 Mostly based on bugfix from Bean.
9551 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9552 attribute with hook() parameter.
9553 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9555 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9556 attribute with hook() parameter.
9557 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9560 2008-01-21 Robert Millan <rmh@aybabtu.com>
9562 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9563 (pkglib_MODULES): Add `memdisk.mod'.
9564 (memdisk_mod_SOURCES): New variable.
9565 (memdisk_mod_CFLAGS): Likewise.
9566 (memdisk_mod_LDFLAGS): Likewise.
9568 * disk/memdisk.c: New file.
9570 * include/grub/disk.h (grub_disk_dev_id): Add
9571 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9573 * include/grub/i386/pc/kernel.h
9574 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9575 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9576 (grub_kernel_image_size): New variable declaration.
9577 (grub_total_module_size): Likewise.
9578 (grub_memdisk_image_size): Likewise.
9580 * include/grub/i386/pc/memory.h
9581 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9583 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9584 (grub_arch_memdisk_addr): New variable declaration.
9585 (grub_arch_memdisk_size): Likewise.
9587 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9588 (grub_arch_memdisk_size): Likewise.
9590 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9591 (codestart): Replace hardcoded `0x100000' with
9592 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9594 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9595 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9596 not NULL, append the contents of the file it refers to, at the end of
9597 the compressed kernel image. Initialize `grub_memdisk_image_size'
9598 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9599 (options): Add "memdisk"|'m' option.
9600 (main): Parse --memdisk|-m option, and pass user-provided path as
9601 parameter to generate_image().
9603 2008-01-20 Robert Millan <rmh@aybabtu.com>
9605 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9606 grub_dprintf() calls from here ...
9607 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9609 2008-01-20 Robert Millan <rmh@aybabtu.com>
9611 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9613 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9615 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9616 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9617 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9618 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9620 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9621 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9623 2008-01-19 Robert Millan <rmh@aybabtu.com>
9625 Get rid of confusing function (superseded by
9626 `grub_ieee1275_get_integer_property')
9627 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9629 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9631 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9632 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9633 in native endianness from grub_ieee1275_get_integer_property().
9635 2008-01-19 Robert Millan <rmh@aybabtu.com>
9637 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9638 command after "shut-down", since implementations differ on which
9639 the command for halt is.
9641 2008-01-19 Robert Millan <rmh@aybabtu.com>
9643 * include/grub/i386/linuxbios/console.h: Add header protection.
9644 (grub_keyboard_controller_init): New function prototype.
9645 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9646 (KEYBOARD_COMMAND_READ): Likewise.
9647 (KEYBOARD_COMMAND_WRITE): Likewise.
9648 (KEYBOARD_SCANCODE_SET1): Likewise.
9649 (grub_keyboard_controller_write): New function.
9650 (grub_keyboard_controller_read): Likewise.
9651 (grub_keyboard_controller_init): Likewise.
9653 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9654 (grub_console_init): On coreboot/LinuxBIOS, call
9655 grub_keyboard_controller_init().
9657 2008-01-19 Robert Millan <rmh@aybabtu.com>
9659 PowerPC changes provided by Pavel Roskin.
9661 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9662 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9663 don't rely on cmain() doing it.
9664 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9665 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9667 2008-01-16 Robert Millan <rmh@aybabtu.com>
9669 * include/grub/i386/linuxbios/memory.h
9670 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9671 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9672 receive `table_header' as argument. Instead, probe for it in the
9673 known memory ranges where it can be present.
9674 (grub_available_iterate): Do not pass a fixed `table_header' address
9675 to grub_linuxbios_table_iterate().
9677 2008-01-15 Robert Millan <rmh@aybabtu.com>
9679 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9680 * conf/i386-ieee1275.rmk: New file.
9681 * include/grub/i386/ieee1275/console.h: Likewise.
9682 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9683 * include/grub/i386/ieee1275/kernel.h: Likewise.
9684 * include/grub/i386/ieee1275/time.h: Likewise.
9685 * kern/i386/ieee1275/init.c: Likewise.
9686 * kern/i386/ieee1275/startup.S: Likewise.
9688 2008-01-15 Robert Millan <rmh@aybabtu.com>
9690 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9691 when pointers are 32-bit (but still do set it to one when they are
9694 2008-01-15 Robert Millan <rmh@aybabtu.com>
9696 * include/grub/ieee1275/ieee1275.h
9697 (grub_ieee1275_get_integer_property): New function prototype.
9699 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9700 (grub_ieee1275_get_integer_property): New function. Wraps around
9701 grub_ieee1275_get_property() to handle endianness.
9703 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9704 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9706 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9707 (grub_map): Likewise.
9708 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9710 2008-01-15 Bean <bean123ch@gmail.com>
9712 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9713 (grub_script_execute_cmdline): Reset grub_errno.
9715 * normal/main.c (read_config_file): Reset grub_errno.
9717 * normal/parse.y (script_init): New.
9718 (script): Move function and menuentry here.
9720 (command): Add delimiter at the end of command.
9721 (commands): Adjust to match the new command.
9722 (commandblock): Remove grub_script_lexer_record_start.
9723 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9724 (if): Use the new commands.
9726 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9728 2008-01-15 Robert Millan <rmh@aybabtu.com>
9730 * normal/menu.c (run_menu): Move timeout message from here ...
9731 (print_timeout): ... to here.
9732 (run_menu): Use print_timeout() once during initial draw to print
9733 the whole message, and again in every clock tick to update only
9734 the number of seconds.
9736 2008-01-15 Robert Millan <rmh@aybabtu.com>
9738 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9739 actual size of `available' from grub_ieee1275_get_property(), and
9740 restrict parsing to that bound.
9742 2008-01-15 Christian Franke <franke@computer.org>
9744 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9745 (argp_program_version): Remove variable.
9746 (argp_program_bug_address): Likewise.
9747 (options): Convert from struct argp_option to struct option.
9748 (struct arguments): Remove.
9749 (parse_opt): Remove.
9750 (usage): New function.
9751 (main): Replace struct args members by simple variables.
9752 Replace argp_parse() by getopt_long().
9753 Add switch to evaluate options.
9754 Add missing "(...)" around root_dev in prefix string.
9756 2008-01-14 Robert Millan <rmh@aybabtu.com>
9758 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9759 for grub_ieee1275_exit(), in order to improve portability.
9761 2008-01-14 Robert Millan <rmh@aybabtu.com>
9763 * util/grub.d/10_linux.in (prefix): Define.
9764 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9766 2008-01-13 Pavel Roskin <proski@gnu.org>
9768 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9769 grub_errno if no errors have been detected.
9771 2008-01-12 Robert Millan <rmh@aybabtu.com>
9773 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9774 (grub_util_get_dev_abstraction): New function prototype.
9776 * util/getroot.c: Include `<grub/util/getroot.h>'
9777 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9778 (grub_util_get_dev_abstraction): ... here (new function).
9780 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9781 `PRINT_ABSTRACTION'.
9782 (probe): Probe for abstraction type when requested.
9783 (main): Understand `--target=abstraction'.
9785 * util/i386/efi/grub-install.in: Add abstraction module to core
9786 image when it is found to be necessary.
9787 * util/i386/pc/grub-install.in: Likewise.
9788 * util/powerpc/ieee1275/grub-install.in: Likewise.
9790 * util/update-grub_lib.in (font_path): Return system path without
9791 converting to GRUB path.
9792 * util/update-grub.in: Convert system path returned by font_path()
9793 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9794 abstraction module is needed for loading fonts (if any). Export
9795 that as `GRUB_PRELOAD_MODULES'.
9796 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9799 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9801 Remove some unused code from reiserfs.
9803 * fs/reiserfs.c (struct grub_reiserfs_key)
9804 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9805 (struct grub_reiserfs_node_body): Removed.
9806 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9808 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9810 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9812 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9814 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9816 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9818 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9819 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9820 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9822 2008-01-10 Robert Millan <rmh@aybabtu.com>
9824 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9825 Determines if a file is garbage left by packaging systems, etc.
9826 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9827 for processing /etc/grub.d scripts.
9828 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9829 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9830 as a condition for processing Linux images.
9832 2008-01-10 Pavel Roskin <proski@gnu.org>
9834 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9835 to compile reiserfs.c on PowerPC.
9837 2008-01-10 Robert Millan <rmh@aybabtu.com>
9839 * kern/device.c (grub_device_iterate): Do not abort device iteration
9840 when one of the devices cannot be opened.
9841 * kern/disk.c (grub_disk_open): Do not account previous failures of
9842 unrelated functions when grub_errno is checked for.
9844 2008-01-08 Robert Millan <rmh@aybabtu.com>
9846 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9847 `! grub_linux_is_bzimage', change order of address comparison to make
9848 it more intuitive, and improve "too big zImage" error message.
9850 2008-01-08 Robert Millan <rmh@aybabtu.com>
9852 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9853 `$(update-grub_DATA)'.
9854 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9857 2008-01-07 Robert Millan <rmh@aybabtu.com>
9859 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9860 which instruction is modified by grub-setup during installation
9861 (since it wasn't obvious by only looking at this file).
9863 2008-01-07 Robert Millan <rmh@aybabtu.com>
9865 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9866 listing actual TODO items.
9868 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9870 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9872 (grub_reiserfs_get_key_offset): Likewise.
9873 (grub_reiserfs_set_key_offset): Likewise.
9874 (grub_reiserfs_set_key_type): Likewise.
9875 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9877 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9878 better to remove the bitfield version completely.
9880 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9882 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9883 allocated from the heap, due to the fshelp implementation.
9884 (grub_reiserfs_dir): Free NODE, due to the same reason.
9886 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9888 Mostly from Vincent Pelletier:
9890 * fs/reiserfs.c: New file.
9892 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9893 (reiserfs_mod_SOURCES): New variable.
9894 (reiserfs_mod_CFLAGS): Likewise.
9895 (reiserfs_mod_LDFLAGS): Likewise.
9897 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9898 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9899 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9902 2008-01-06 Robert Millan <rmh@aybabtu.com>
9904 * normal/color.c: Remove `<grub/env.h>'.
9906 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9908 * include/grub/normal.h: Include <grub/env.h>.
9910 2008-01-05 Robert Millan <rmh@aybabtu.com>
9912 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9913 usage example with `(hd0,1)'.
9914 Reported by Samuel Thibault.
9916 2008-01-05 Robert Millan <rmh@aybabtu.com>
9918 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9919 (grub_linux_boot_zimage): Rename to ...
9920 (grub_linux_boot): ... this.
9921 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9922 (grub_linux_boot_zimage): Conditionalize zImage copy.
9924 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9925 (grub_linux_boot_bzimage): Remove prototype.
9926 (grub_linux_boot_zimage): Rename to ...
9927 (grub_linux_boot): ... this.
9929 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9930 (grub_linux_boot): Remove function.
9932 2008-01-05 Robert Millan <rmh@aybabtu.com>
9934 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9935 (grub_env_write_color_highlight): Likewise.
9936 (grub_wait_after_message): Likewise.
9938 * normal/color.c: New file.
9940 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9941 (normal_mod_DEPENDENCIES): Likewise.
9943 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9944 (normal_mod_DEPENDENCIES): Likewise.
9946 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9947 (normal_mod_DEPENDENCIES): Likewise.
9949 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9950 (normal_mod_DEPENDENCIES): Likewise.
9952 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9953 for waiting after a message is printed.
9954 * normal/main.c (read_config_file): Likewise.
9955 (grub_normal_init): Register grub_env_write_color_normal() and
9956 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9957 `color_highlight' variables as global.
9959 * normal/menu.c (grub_wait_after_message): New function.
9960 (grub_color_menu_normal): New variable. Replaces ...
9961 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9962 (grub_color_menu_highlight): New variable. Replaces ...
9963 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9964 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9965 `GRUB_TERM_COLOR_STANDARD'.
9966 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9967 `normal_code' and `highlight_code' to `old_color_normal' and
9968 `old_color_highlight', respectively.
9969 (grub_menu_init_page): Update colors when drawing the menu, based on
9970 `menu_color_normal' and `menu_color_highlight' variables.
9971 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9972 a message is printed.
9974 2008-01-05 Robert Millan <rmh@aybabtu.com>
9976 * kern/env.c (grub_env_context_open): Propagate hooks for global
9977 variables to new context.
9979 * kern/main.c (grub_set_root_dev): Export `root' variable.
9981 2008-01-05 Robert Millan <rmh@aybabtu.com>
9983 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9984 discs unconditionally, since udev and others have options to provide
9987 2008-01-05 Robert Millan <rmh@aybabtu.com>
9989 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9991 2008-01-04 Christian Franke <franke@computer.org>
9993 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9996 2008-01-03 Pavel Roskin <proski@gnu.org>
9998 * kern/i386/linuxbios/init.c: Put "void" to all function
9999 declarations with no arguments.
10000 * kern/powerpc/ieee1275/init.c: Likewise.
10001 * term/i386/pc/at_keyboard.c: Likewise.
10002 * term/i386/pc/vga_text.c: Likewise.
10003 * util/grub-mkdevicemap.c: Likewise.
10005 2008-01-02 Robert Millan <rmh@aybabtu.com>
10007 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10008 message when loaded image is out of bounds.
10009 (grub_multiboot_load_elf64): Likewise.
10011 2008-01-02 Pavel Roskin <proski@gnu.org>
10013 * util/grub.d/10_linux.in: Try version without ".old" when
10014 looking for initrd. It's better to use initrd from the newer
10015 kernel of the same version than no initrd at all.
10017 2008-01-01 Robert Millan <rmh@aybabtu.com>
10019 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10021 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10023 * include/grub/video.h: Added grub_video_unmap_color and
10024 grub_video_get_active_render_target.
10025 (grub_video_adapter): Added unmap_color and get_active_render_target.
10027 * video/video.c: Added grub_video_unmap_color and
10028 grub_video_get_active_render_target.
10029 (grub_video_get_info): Changed method to accept NULL pointer as an
10030 argument to allow detection of active video adapter.
10032 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10033 grub_video_vbe_unmap_color_int.
10034 Added grub_video_vbe_unmap_color and
10035 grub_video_vbe_get_active_render_target.
10036 (grub_video_vbe_adapter): Added unmap_color and
10037 get_active_render_target.
10039 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10040 with grub_video_vbe_unmap_color_int.
10042 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10043 (DEFAULT_NORMAL_COLOR): Likewise.
10044 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10045 (DEFAULT_FG_COLOR): Removed.
10046 (DEFAULT_BG_COLOR): Likewise.
10047 (DEFAULT_CURSOR_COLOR): Changed value.
10048 (grub_virtual_screen): Added standard_color_setting,
10049 normal_color_setting, highlight_color_setting and term_color.
10050 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10051 (bitmap_width): Added.
10052 (bitmap_height): Likewise.
10053 (bitmap): Likewise.
10054 (set_term_color): Likewise.
10055 (grub_virtual_screen_setup): Changed to use new terminal coloring
10057 (grub_gfxterm_init): Added init for bitmap.
10058 (grub_gfxterm_fini): Added destroy for bitmap.
10059 (redraw_screen_rect): Updated to use background bitmap and new
10061 (scroll_up): Added optimization for case when there is no bitmap.
10062 (grub_gfxterm_cls): Fixed to use correct background color.
10063 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10065 (grub_virtual_screen_setcolor): Likewise.
10066 (grub_virtual_screen_getcolor): Added.
10067 (grub_gfxterm_background_image_cmd): Likewise.
10068 (grub_video_term): Added setcolor and getcolor.
10069 (MOD_INIT): Added registration of background_image command.
10070 (MOD_TERM): Added unregistration for background_image command.
10072 2007-12-30 Pavel Roskin <proski@gnu.org>
10074 * loader/multiboot_loader.c: Fix multiboot command
10075 unregistration. Fix all typos in the word "multiboot".
10077 2007-12-29 Pavel Roskin <proski@gnu.org>
10079 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10080 support for initrd names used in Fedora.
10082 2007-12-26 Bean <bean123ch@gmail.com>
10084 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10085 (cpio_mod_SOURCES): New variable.
10086 (cpio_mod_CFLAGS): Likewise.
10087 (cpio_mod_LDFLAGS): Likewise.
10089 * fs/cpio.c: New file.
10091 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10093 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10095 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10097 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10099 2007-12-25 Robert Millan <rmh@aybabtu.com>
10101 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10102 (grub_getcolor): New function.
10104 * kern/term.c (grub_getcolor): New function.
10105 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10106 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10107 (print_entry): Set normal and highlight colors to
10108 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10109 respectively, before printing and restore them to old
10111 (grub_menu_init_page): Likewise. Fill an additional colored space
10112 that would otherwise be left blank.
10114 * term/efi/console.c (grub_console_getcolor): New function.
10115 (struct grub_console_term.getcolor): New variable.
10116 * term/i386/pc/console.c (grub_console_getcolor): New function.
10117 (struct grub_console_term.getcolor): New variable.
10118 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10119 (struct grub_console_term.getcolor): New variable.
10121 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10122 (struct grub_console_term.setcolor): Remove variable.
10123 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10124 (struct grub_console_term.setcolor): Remove variable.
10125 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10126 (struct grub_console_term.setcolor): Remove variable.
10127 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10128 (struct grub_console_term.setcolor): Remove variable.
10130 2007-12-25 Robert Millan <rmh@aybabtu.com>
10132 * configure.ac: Search for possible unifont.hex locations, and
10133 define UNIFONT_HEX if found.
10135 * Makefile.in (UNIFONT_HEX): Define variable.
10136 (DATA): Rename to ...
10137 (PKGLIB): ... this. Update all users.
10138 (PKGDATA): New variable.
10139 (pkgdata_IMAGES): Rename to ...
10140 (pkglib_IMAGES): ... this. Update all users.
10141 (pkgdata_MODULES): Rename to ...
10142 (pkglib_MODULES): ... this. Update all users.
10143 (pkgdata_PROGRAMS): Rename to ...
10144 (pkglib_PROGRAMS): ... this. Update all users.
10145 (pkgdata_DATA): Rename to ...
10146 (pkglib_DATA): ... this. Update all users.
10147 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10148 (unicode.pff, ascii.pff): New rules.
10149 (all-local): Add `$(PKGDATA)' dependency.
10150 (install-local): Process `$(PKGDATA)'.
10152 * util/update-grub_lib.in (font_path): Search for *.pff files in
10153 a few more locations, including `${pkgdata}'.
10155 2007-12-23 Robert Millan <rmh@aybabtu.com>
10157 Patch from Bean <bean123ch@gmail.com>:
10158 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10161 2007-12-21 Bean <bean123ch@gmail.com>
10163 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10164 (ntfscomp_mod_SOURCES): New variable.
10165 (ntfscomp_mod_CFLAGS): Likewise.
10166 (ntfscomp_mod_LDFLAGS): Likewise.
10168 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10169 (grub_probe_SOURCES): Likewise.
10170 (grub_emu_SOURCES): Likewise.
10172 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10173 (grub_emu_SOURCES): Likewise.
10175 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10176 (grub_emu_SOURCES): Likewise.
10178 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10179 (grub_emu_SOURCES): Likewise.
10181 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10182 (read_run_list): Renamed to grub_ntfs_read_run_list.
10183 (decomp_nextvcn): Moved to ntfscomp.c.
10184 (decomp_getch): Likewise.
10185 (decomp_get16): Likewise.
10186 (decomp_block): Likewise.
10187 (read_block): Likewise.
10188 (read_data): Partially moved to ntfscomp.c.
10189 (fixup): Change unsigned to grub_uint16_t.
10190 (read_mft): Change unsigned long to grub_uint32_t.
10191 (read_attr): Likewise.
10192 (read_data): Likewise.
10193 (read_run_data): Likewise.
10194 (read_run_list): Likewise.
10195 (read_mft): Likewise.
10197 * fs/ntfscomp.c: New file.
10199 * include/grub/ntfs.h: New file.
10201 2007-12-16 Robert Millan <rmh@aybabtu.com>
10203 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10204 IDE disk check, since Linux is known to support 20 IDE disks.
10205 Reported by Colin Watson.
10207 2007-12-15 Bean <bean123ch@gmail.com>
10209 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10210 (lnxboot_img_SOURCES): New variable.
10211 (lnxboot_img_ASFLAGS): Likewise.
10212 (lnxboot_img_LDFLAGS): Likewise.
10214 * boot/i386/pc/lnxboot.S: New file.
10216 2007-11-24 Pavel Roskin <proski@gnu.org>
10218 * configure.ac: Test if '--build-id=none' is supported by the
10219 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10220 objcopy to generate incorrect binary files (binutils
10221 2.17.50.0.18-1 as shipped by Fedora 8).
10222 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10223 linking, so that build ID doesn't break the test.
10225 2007-11-24 Pavel Roskin <proski@gnu.org>
10227 * include/grub/i386/time.h: use "void" in the argument list
10228 of grub_cpu_idle().
10229 * include/grub/powerpc/time.h: Likewise.
10230 * include/grub/sparc64/time.h: Likewise.
10232 2007-11-18 Christian Franke <franke@computer.org>
10234 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10235 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10236 This fixes the problem that function keys did not work in grub-emu.
10238 2007-11-18 Christian Franke <franke@computer.org>
10240 * disk/host.c (grub_host_open): Remove attribute unused from
10241 name parameter. Add check for "host". This fixes the problem
10242 that grub-emu does not find partitions.
10244 2007-11-18 Christian Franke <franke@computer.org>
10246 * util/hostfs.c (is_dir): New function.
10247 (grub_hostfs_dir): Handle missing dirent.d_type case.
10248 (grub_hostfs_read): Add missing fseek().
10249 (grub_hostfs_label): Clear label pointer. This fixes a crash
10250 of grub-emu on "ls (host)".
10252 2007-11-18 Christian Franke <franke@computer.org>
10254 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10255 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10256 to 64 bit boundary by default.
10258 2007-11-18 Bean <bean123ch@gmail.com>
10260 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10261 (hexdump_mod_SOURCES): New variable.
10262 (hexdump_mod_CFLAGS): Likewise.
10263 (hexdump_mod_LDFLAGS): Likewise.
10265 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10267 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10269 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10273 * include/grub/hexdump.h: New file.
10275 * commands/hexdump.c: New file.
10277 2007-11-10 Robert Millan <rmh@aybabtu.com>
10279 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10280 in grub_outb() calls.
10281 (beep_on): Likewise.
10283 2007-11-10 Christian Franke <franke@computer.org>
10285 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10286 (grub_menu_run): Likewise.
10288 2007-11-10 Robert Millan <rmh@aybabtu.com>
10290 * include/grub/i386/efi/machine.h: New file.
10291 * include/grub/i386/linuxbios/machine.h: Likewise.
10292 * include/grub/i386/pc/machine.h: Likewise.
10293 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10294 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10296 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10297 (serial_hw_io_addr): New variable.
10298 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10299 instead of `(unsigned short *) 0x400'.
10301 2007-11-10 Bean <bean123ch@gmail.com>
10303 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10305 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10307 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10308 (vga_mod_SOURCES): Added.
10309 (vga_mod_CFLAGS): Likewise.
10310 (vga_mod_LDFLAGS): Likewise.
10312 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10314 (set_map_mask): Likewise.
10315 (set_read_map): Likewise.
10316 (set_read_address): Likewise.
10317 (vga_font): Removed variable.
10318 (get_vga_glyph): Removed function.
10319 (invalidate_char): Likewise.
10320 (write_char): Changed to use grub_font_get_glyph() for font
10322 (grub_vga_putchar): Likewise.
10323 (grub_vga_getcharwidth): Likewise.
10325 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10327 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10329 (pxeboot_img_LDFLAGS): Likewise.
10330 (diskboot_img_LDFLAGS): Likewise.
10331 (kernel_img_LDFLAGS): Likewise.
10333 2007-11-06 Robert Millan <rmh@aybabtu.com>
10335 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10336 in grub_outb() calls.
10337 (serial_hw_init): Likewise.
10339 2007-11-05 Robert Millan <rmh@aybabtu.com>
10341 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10342 spaces. Skip non-regular files.
10344 2007-11-05 Robert Millan <rmh@aybabtu.com>
10346 * kern/disk.c (grub_disk_firmware_fini)
10347 (grub_disk_firmware_is_tainted): New variables.
10349 * include/grub/disk.h (grub_disk_firmware_fini)
10350 (grub_disk_firmware_is_tainted): Likewise.
10352 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10353 (grub_disk_biosdisk_fini): ... to here.
10354 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10355 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10356 is set. Register grub_disk_biosdisk_fini() in
10357 `grub_disk_firmware_fini'.
10359 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10360 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10361 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10362 to finish existing firmware disk interface.
10364 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10365 (ata_mod_SOURCES): New variable.
10366 (ata_mod_CFLAGS): Likewise.
10367 (ata_mod_LDFLAGS): Likewise.
10369 2007-11-05 Robert Millan <rmh@aybabtu.com>
10371 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10372 (grub_ata_wait): Reimplement using grub_millisleep().
10374 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10375 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10377 2007-11-03 Marco Gerards <marco@gnu.org>
10379 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10380 (CRTC_ADDR_PORT): New macro.
10381 (CRTC_DATA_PORT): Likewise.
10382 (CRTC_CURSOR): Likewise.
10383 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10384 (CRTC_CURSOR_ADDR_LOW): Likewise.
10385 (update_cursor): New function.
10386 (grub_console_real_putchar): Call `update_cursor'.
10387 (grub_console_gotoxy): Likewise.
10388 (grub_console_cls): Set the default color when clearing the
10390 (grub_console_setcursor): Implemented.
10392 2007-11-03 Marco Gerards <marco@gnu.org>
10394 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10396 (grub_ata_pio_write): Likewise.
10398 (grub_atapi_identify): Wait after issuing an ATA command.
10399 (grub_atapi_packet): Likewise.
10400 (grub_ata_identify): Likewise.
10401 (grub_ata_readwrite): Likewise.
10403 2007-11-03 Marco Gerards <marco@gnu.org>
10405 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10406 (grub_ata_pio_write): Likewise.
10407 (grub_ata_readwrite): Use `grub_error', instead of
10408 returning `grub_errno'.
10410 2007-11-03 Marco Gerards <marco@gnu.org>
10412 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10413 grub_ata_pio_write once for every single sector, instead of for
10416 2007-10-31 Robert Millan <rmh@aybabtu.com>
10418 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10420 * conf/i386-linuxbios.rmk: New file.
10422 * kern/i386/pc/hardware.c: Likewise.
10423 * term/i386/pc/at_keyboard.c: Likewise.
10424 * term/i386/pc/vga_text.c: Likewise.
10426 * include/grub/i386/linuxbios/boot.h: Likewise.
10427 * include/grub/i386/linuxbios/console.h: Likewise.
10428 * include/grub/i386/linuxbios/init.h: Likewise.
10429 * include/grub/i386/linuxbios/kernel.h: Likewise.
10430 * include/grub/i386/linuxbios/loader.h: Likewise.
10431 * include/grub/i386/linuxbios/memory.h: Likewise.
10432 * include/grub/i386/linuxbios/serial.h: Likewise.
10433 * include/grub/i386/linuxbios/time.h: Likewise.
10435 * kern/i386/linuxbios/init.c: Likewise.
10436 * kern/i386/linuxbios/startup.S: Likewise.
10437 * kern/i386/linuxbios/table.c: Likewise.
10439 2007-10-31 Marco Gerards <marco@gnu.org>
10441 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10442 (ata_mod_SOURCES): New variable.
10443 (ata_mod_CFLAGS): Likewise.
10444 (ata_mod_LDFLAGS): Likewise.
10446 * disk/ata.c: New file.
10448 * include/grub/disk.h (grub_disk_dev_id): Add
10449 `GRUB_DISK_DEV_ATA_ID'.
10451 2007-10-31 Robert Millan <rmh@aybabtu.com>
10453 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10454 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10456 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10457 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10459 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10462 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10464 2007-10-27 Robert Millan <rmh@aybabtu.com>
10466 * include/grub/types.h (ULONG_MAX): Define macro.
10468 2007-10-22 Robert Millan <rmh@aybabtu.com>
10470 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10472 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10474 2007-10-22 Robert Millan <rmh@aybabtu.com>
10476 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10477 (pkgdata_MODULES): Add `biosdisk.mod'.
10478 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10481 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10482 (grub_biosdisk_init): Replace with ...
10483 (GRUB_MOD_INIT(biosdisk)): ... this.
10484 (grub_biosdisk_fini): Replace with ...
10485 (GRUB_MOD_FINI(biosdisk)): ... this.
10487 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10488 (grub_machine_init): Remove call to grub_biosdisk_init().
10489 (grub_machine_fini): Remove call to grub_machine_fini().
10491 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10493 2007-10-22 Robert Millan <rmh@aybabtu.com>
10495 * include/grub/time.h: New file.
10496 * include/grub/i386/time.h: Likewise.
10497 * include/grub/powerpc/time.h: Likewise.
10498 * include/grub/sparc64/time.h: Likewise.
10500 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10502 (KERNEL_MACHINE_TIME_HEADER): ... this.
10503 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10505 (KERNEL_MACHINE_TIME_HEADER): ... this.
10506 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10508 (KERNEL_MACHINE_TIME_HEADER): ... this.
10510 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10511 (grub_millisleep): New function.
10512 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10513 (grub_millisleep): New function.
10514 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10515 Remove `grub/machine/time.h' include.
10516 (grub_millisleep): New function.
10517 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10518 Remove `grub/machine/time.h' include.
10519 (grub_millisleep): New function.
10521 * include/grub/misc.h (grub_div_roundup): New function.
10523 * kern/misc.c: Include `<grub/time.h>'.
10524 (grub_millisleep_generic): New function.
10526 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10528 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10530 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10531 `machine/time.h'. Add `time.h'.
10532 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10534 2007-10-21 Robert Millan <rmh@aybabtu.com>
10536 * include/grub/misc.h (grub_max): New function.
10538 2007-10-21 Robert Millan <rmh@aybabtu.com>
10540 * util/misc.c (grub_util_info): Call fflush() before returning.
10542 2007-10-20 Robert Millan <rmh@aybabtu.com>
10544 * genmk.rb (Image): Copy `extra_flags' from here ...
10545 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10547 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10548 to `argc' and `args' arguments.
10550 2007-10-17 Robert Millan <rmh@aybabtu.com>
10552 * kern/i386/loader.S: New file.
10554 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10555 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10556 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10557 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10558 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10559 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10560 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10561 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10562 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10563 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10564 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10565 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10566 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10567 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10569 * kern/i386/realmode.S: New file.
10571 * kern/i386/pc/startup.S (protstack): Moved from here ...
10572 * kern/i386/realmode.S (protstack)... to here.
10573 * kern/i386/pc/startup.S (gdt): Moved from here ...
10574 * kern/i386/realmode.S (gdt)... to here.
10575 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10576 * kern/i386/realmode.S (prot_to_real)... to here.
10578 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10579 `kern/i386/realmode.S'.
10581 2007-10-17 Robert Millan <rmh@aybabtu.com>
10583 * include/grub/i386/loader.h: New file.
10585 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10586 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10587 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10588 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10589 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10590 * include/grub/i386/loader.h (grub_linux_prot_size)
10591 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10592 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10593 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10594 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10596 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10598 2007-10-15 Robert Millan <rmh@aybabtu.com>
10600 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10601 filesystem when dev->disk is unset.
10602 Do probe for filesystem even when dev->disk->has_partitions is set.
10603 In case a filesystem is found, always report it.
10604 In case it isn't, if dev->disk->has_partitions is set, report that
10605 a partition table was found instead of reporting that no filesystem
10606 could be identified.
10608 2007-10-12 Robert Millan <rmh@aybabtu.com>
10610 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10611 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10613 * include/grub/types.h (grub_host_to_target16): New macro.
10614 (grub_host_to_target32): Likewise.
10615 (grub_host_to_target64): Likewise.
10616 (grub_target_to_host16): Likewise.
10617 (grub_target_to_host32): Likewise.
10618 (grub_target_to_host64): Likewise.
10620 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10621 Renamed from to ...
10622 (GRUB_MOD_ALIGN): ...this. Update all users.
10624 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10625 grub_host_to_target32.
10626 Replace grub_be_to_cpu32 with grub_target_to_host32.
10627 (load_modules): Likewise.
10628 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10629 Replace grub_be_to_cpu32 with grub_target_to_host32.
10630 Replace grub_cpu_to_be16 with grub_host_to_target16.
10631 Replace grub_cpu_to_be32 grub_host_to_target32.
10633 2007-10-12 Robert Millan <rmh@aybabtu.com>
10635 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10636 * util/elf/grub-mkimage.c: ... here.
10638 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10639 `util/powerpc/ieee1275/grub-mkimage.c'.
10641 2007-10-07 Robert Millan <rmh@aybabtu.com>
10643 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10644 and make it easier to figure out.
10645 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10646 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10647 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10648 leave us with less than HEAP_MIN_SIZE total heap.
10649 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10651 2007-10-03 Robert Millan <rmh@aybabtu.com>
10653 * include/grub/i386/io.h: New file.
10654 * commands/i386/pc/play.c (inb): Removed.
10656 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10658 * term/i386/pc/serial.c (inb): Removed.
10660 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10662 * term/i386/pc/vga.c (inb): Removed.
10664 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10667 2007-10-02 Robert Millan <rmh@aybabtu.com>
10669 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10670 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10671 Reported by Marcin Kurek.
10673 2007-09-07 Robert Millan <rmh@aybabtu.com>
10675 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10676 SmartFirmware version updates (as released by Sven Luther), and avoid
10677 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10678 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10681 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10683 From Hitoshi Ozeki:
10684 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10685 when merging two regions.
10687 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10689 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10690 * normal/completion.c (grub_normal_do_completion): Likewise.
10691 Reported by Hitoshi Ozeki.
10693 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10695 Do not use devices at boot in chainloading.
10697 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10698 (boot_part_addr): Likewise.
10699 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10700 with BOOT_DRIVE and BOOT_PART_ADDR.
10701 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10702 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10704 2007-08-29 Robert Millan <rmh@aybabtu.com>
10706 Patch from Simon Peter <dn.tlp@gmx.net>:
10707 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10708 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10709 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10710 util/i386/pc/grub-setup.c_DEPENDENCIES.
10711 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10712 util/grub-probe.c_DEPENDENCIES.
10713 * conf/powerpc-ieee1275.rmk: Likewise.
10715 2007-08-28 Robert Millan <rmh@aybabtu.com>
10717 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10718 to tell grub-mkdevicemap how to name devices.
10719 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10722 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10723 util/i386/get_disk_name.c.
10724 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10725 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10726 util/ieee1275/get_disk_name.c.
10728 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10730 * DISTLIST: Add util/i386/get_disk_name.c and
10731 util/ieee1275/get_disk_name.c.
10733 * util/grub-mkdevicemap.c: Replace device naming logic with
10734 grub_util_get_disk_name() calls.
10736 2007-08-20 Robert Millan <rmh@aybabtu.com>
10738 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10739 (so that it works for both plural and singular quantities).
10741 2007-08-05 Robert Millan <rmh@aybabtu.com>
10743 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10744 so that [xz] isn't taken into account when determining order.
10746 2007-08-02 Marco Gerards <marco@gnu.org>
10748 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10749 `include/multiboot2.h', `include/grub/elfload.h',
10750 `include/multiboot.h', `include/grub/multiboot.h',
10751 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10752 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10753 `kern/elf.c', `loader/multiboot_loader.c',
10754 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10755 `loader/i386/pc/multiboot2.c',
10756 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10757 `util/i386/pc/grub-mkrescue.in'. Remove
10758 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10759 `include/grub/i386/pc/util/biosdisk.h' and
10760 `include/grub/powerpc/ieee1275/multiboot.h'.
10762 2007-08-02 Bean <bean123ch@gmail.com>
10764 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10765 (ntfs_mod_SOURCES): New variable.
10766 (ntfs_mod_CFLAGS): Likewise.
10767 (ntfs_mod_LDFLAGS): Likewise.
10769 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10770 (grub_probe_SOURCES): Likewise.
10771 (grub_emu_SOURCES): Likewise.
10773 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10774 (grub_emu_SOURCES): Likewise.
10776 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10777 (grub_emu_SOURCES): Likewise.
10779 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10781 * fs/ntfs.c: New file.
10783 2007-08-02 Bean <bean123ch@gmail.com>
10785 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10787 * file.h (grub_file): Likewise.
10789 * fshelp.h (grub_fshelp_read_file): Likewise.
10791 * util/i386/pc/grub-setup.c (setup): Likewise.
10792 (save_first_sector): Likewise.
10793 (save_blocklists): Likewise.
10795 * fs/affs.c (grub_affs_read_file): Likewise.
10797 * fs/ext2.c (grub_ext2_read_file): Likewise.
10799 * fs/fat.c (grub_fat_read_data): Likewise.
10801 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10803 * fs/hfs.c (grub_hfs_read_file): Likewise.
10805 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10807 * fs/jfs.c (grub_jfs_read_file): Likewise.
10809 * fs/minix.c (grub_minix_read_file): Likewise.
10811 * fs/sfs.c (grub_sfs_read_file): Likewise.
10813 * fs/ufs.c (grub_ufs_read_file): Likewise.
10815 * fs/xfs.c (grub_xfs_read_file): Likewise.
10817 * command/blocklist.c (read_blocklist): Likewise.
10818 (print_blocklist): Likewise.
10820 2007-08-02 Marco Gerards <marco@gnu.org>
10822 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10825 * disk/host.c: New file.
10827 * util/hostfs.c: Likewise.
10829 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10830 return `GRUB_ERR_BAD_FS'.
10831 * fs/sfs.c (grub_sfs_mount): Likewise.
10832 * fs/xfs.c (grub_xfs_mount): Likewise.
10834 * include/grub/disk.h (enum grub_disk_dev_id): Add
10835 `GRUB_DISK_DEVICE_HOST_ID'.
10837 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10839 2007-07-24 Jerone Young <jerone@gmail.com>
10841 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10842 modules for compilation.
10843 * conf/powerpc-ieee1275.rmk: Likewise.
10845 * include/multiboot.h: Move multiboot definitions to one file. Rename
10846 many definitions to not get grub specific.
10847 * include/multiboot2.h: Create header with multiboot 2 definitions.
10848 * include/grub/multiboot.h: Header for grub specific function
10849 prototypes and definitions.
10850 * include/grub/multiboot2.h: Likewise.
10851 * include/grub/multiboot_loader.h: Likewise.
10852 * include/grub/i386/pc/multiboot.h: Removed.
10853 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10855 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10856 and 2 to allow for one multiboot and module commands.
10857 * loader/multiboot2.c: Add multiboot2 functionality.
10858 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10859 and definition names.
10860 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10862 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10863 ieee1275 specific multiboot2 code.
10865 * kern/i386/pc/startup.S: Change headers and definition names for
10866 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10868 2007-07-22 Robert Millan <rmh@aybabtu.com>
10870 * geninitheader.sh: Process file specified in first parameter rather
10871 than hardcoding grub_modules_init.lst.
10872 * geninit.sh: Likewise. Also, construct header name dynamically rather
10873 than hardcoding grub_modules_init.h.
10875 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10876 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10877 grub_probe_init.[ch] and grub_setup_init.[ch].
10879 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10880 grub_modules_init.h with grub_emu_init.h.
10881 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10882 grub_probe_init.[ch] files.
10883 * conf/i386-efi.rmk: Likewise.
10884 * conf/i386-pc.rmk: Likewise.
10885 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10886 grub_setup_init.[ch] files.
10888 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10889 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10890 to initialize modules rather than a list of hardcoded functions.
10891 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10892 grub_init_all() to initialize modules rather than a list of hardcoded
10895 2007-07-22 Robert Millan <rmh@aybabtu.com>
10897 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10898 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10900 2007-07-22 Robert Millan <rmh@aybabtu.com>
10902 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10903 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10904 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10905 flag when running on SmartFirmware.
10906 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10907 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10910 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10911 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10912 rather than decreasing it.
10914 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10915 there's not enough space to do it, fail in the same way as when it
10916 can't be done because there are no partitions.
10918 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10919 when nvsetenv failed.
10921 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10923 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10924 because this rule is automatically generated.
10925 (grub-mkrescue): Removed for the same reason as above.
10927 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10929 Migrate to GNU General Public License Version 3.
10931 * COPYING: Replaced with the plain text version of GPLv3.
10933 * config.guess: Updated from gnulib.
10934 * config.sub: Likewise.
10936 * geninit.sh: Output a GPLv3 copyright notice.
10937 * geninitheader.sh: Likewise.
10938 * genmodsrc.sh: Likewise.
10939 * gensymlist.sh.in: Likewise.
10941 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10942 * boot/i386/pc/diskboot.S: Likewise.
10943 * boot/i386/pc/pxeboot.S: Likewise.
10944 * commands/blocklist.c: Likewise.
10945 * commands/boot.c: Likewise.
10946 * commands/cat.c: Likewise.
10947 * commands/cmp.c: Likewise.
10948 * commands/configfile.c: Likewise.
10949 * commands/echo.c: Likewise.
10950 * commands/help.c: Likewise.
10951 * commands/ls.c: Likewise.
10952 * commands/search.c: Likewise.
10953 * commands/terminal.c: Likewise.
10954 * commands/test.c: Likewise.
10955 * commands/videotest.c: Likewise.
10956 * commands/i386/cpuid.c: Likewise.
10957 * commands/i386/pc/halt.c: Likewise.
10958 * commands/i386/pc/play.c: Likewise.
10959 * commands/i386/pc/reboot.c: Likewise.
10960 * commands/i386/pc/vbeinfo.c: Likewise.
10961 * commands/i386/pc/vbetest.c: Likewise.
10962 * commands/ieee1275/halt.c: Likewise.
10963 * commands/ieee1275/reboot.c: Likewise.
10964 * commands/ieee1275/suspend.c: Likewise.
10965 * disk/loopback.c: Likewise.
10966 * disk/lvm.c: Likewise.
10967 * disk/raid.c: Likewise.
10968 * disk/efi/efidisk.c: Likewise.
10969 * disk/i386/pc/biosdisk.c: Likewise.
10970 * disk/ieee1275/ofdisk.c: Likewise.
10971 * font/manager.c: Likewise.
10972 * fs/affs.c: Likewise.
10973 * fs/ext2.c: Likewise.
10974 * fs/fat.c: Likewise.
10975 * fs/fshelp.c: Likewise.
10976 * fs/hfs.c: Likewise.
10977 * fs/hfsplus.c: Likewise.
10978 * fs/iso9660.c: Likewise.
10979 * fs/jfs.c: Likewise.
10980 * fs/minix.c: Likewise.
10981 * fs/sfs.c: Likewise.
10982 * fs/ufs.c: Likewise.
10983 * fs/xfs.c: Likewise.
10984 * hello/hello.c: Likewise.
10985 * include/grub/acorn_filecore.h: Likewise.
10986 * include/grub/arg.h: Likewise.
10987 * include/grub/bitmap.h: Likewise.
10988 * include/grub/boot.h: Likewise.
10989 * include/grub/cache.h: Likewise.
10990 * include/grub/device.h: Likewise.
10991 * include/grub/disk.h: Likewise.
10992 * include/grub/dl.h: Likewise.
10993 * include/grub/elfload.h: Likewise.
10994 * include/grub/env.h: Likewise.
10995 * include/grub/err.h: Likewise.
10996 * include/grub/file.h: Likewise.
10997 * include/grub/font.h: Likewise.
10998 * include/grub/fs.h: Likewise.
10999 * include/grub/fshelp.h: Likewise.
11000 * include/grub/gzio.h: Likewise.
11001 * include/grub/hfs.h: Likewise.
11002 * include/grub/kernel.h: Likewise.
11003 * include/grub/loader.h: Likewise.
11004 * include/grub/lvm.h: Likewise.
11005 * include/grub/misc.h: Likewise.
11006 * include/grub/mm.h: Likewise.
11007 * include/grub/net.h: Likewise.
11008 * include/grub/normal.h: Likewise.
11009 * include/grub/parser.h: Likewise.
11010 * include/grub/partition.h: Likewise.
11011 * include/grub/pc_partition.h: Likewise.
11012 * include/grub/raid.h: Likewise.
11013 * include/grub/rescue.h: Likewise.
11014 * include/grub/script.h: Likewise.
11015 * include/grub/setjmp.h: Likewise.
11016 * include/grub/symbol.h: Likewise.
11017 * include/grub/term.h: Likewise.
11018 * include/grub/terminfo.h: Likewise.
11019 * include/grub/tparm.h: Likewise.
11020 * include/grub/types.h: Likewise.
11021 * include/grub/video.h: Likewise.
11022 * include/grub/efi/api.h: Likewise.
11023 * include/grub/efi/chainloader.h: Likewise.
11024 * include/grub/efi/console.h: Likewise.
11025 * include/grub/efi/console_control.h: Likewise.
11026 * include/grub/efi/disk.h: Likewise.
11027 * include/grub/efi/efi.h: Likewise.
11028 * include/grub/efi/pe32.h: Likewise.
11029 * include/grub/efi/time.h: Likewise.
11030 * include/grub/i386/linux.h: Likewise.
11031 * include/grub/i386/setjmp.h: Likewise.
11032 * include/grub/i386/types.h: Likewise.
11033 * include/grub/i386/efi/kernel.h: Likewise.
11034 * include/grub/i386/efi/loader.h: Likewise.
11035 * include/grub/i386/efi/time.h: Likewise.
11036 * include/grub/i386/pc/biosdisk.h: Likewise.
11037 * include/grub/i386/pc/boot.h: Likewise.
11038 * include/grub/i386/pc/chainloader.h: Likewise.
11039 * include/grub/i386/pc/console.h: Likewise.
11040 * include/grub/i386/pc/init.h: Likewise.
11041 * include/grub/i386/pc/kernel.h: Likewise.
11042 * include/grub/i386/pc/loader.h: Likewise.
11043 * include/grub/i386/pc/memory.h: Likewise.
11044 * include/grub/i386/pc/multiboot.h: Likewise.
11045 * include/grub/i386/pc/serial.h: Likewise.
11046 * include/grub/i386/pc/time.h: Likewise.
11047 * include/grub/i386/pc/vbe.h: Likewise.
11048 * include/grub/i386/pc/vbeblit.h: Likewise.
11049 * include/grub/i386/pc/vbefill.h: Likewise.
11050 * include/grub/i386/pc/vbeutil.h: Likewise.
11051 * include/grub/i386/pc/vga.h: Likewise.
11052 * include/grub/ieee1275/ieee1275.h: Likewise.
11053 * include/grub/ieee1275/ofdisk.h: Likewise.
11054 * include/grub/powerpc/libgcc.h: Likewise.
11055 * include/grub/powerpc/setjmp.h: Likewise.
11056 * include/grub/powerpc/types.h: Likewise.
11057 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11058 * include/grub/powerpc/ieee1275/console.h: Likewise.
11059 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11060 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11061 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11062 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11063 * include/grub/powerpc/ieee1275/time.h: Likewise.
11064 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11065 * include/grub/sparc64/libgcc.h: Likewise.
11066 * include/grub/sparc64/setjmp.h: Likewise.
11067 * include/grub/sparc64/types.h: Likewise.
11068 * include/grub/sparc64/ieee1275/console.h: Likewise.
11069 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11070 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11071 * include/grub/sparc64/ieee1275/time.h: Likewise.
11072 * include/grub/util/biosdisk.h: Likewise.
11073 * include/grub/util/getroot.h: Likewise.
11074 * include/grub/util/lvm.h: Likewise.
11075 * include/grub/util/misc.h: Likewise.
11076 * include/grub/util/raid.h: Likewise.
11077 * include/grub/util/resolve.h: Likewise.
11078 * io/gzio.c: Likewise.
11079 * kern/device.c: Likewise.
11080 * kern/disk.c: Likewise.
11081 * kern/dl.c: Likewise.
11082 * kern/elf.c: Likewise.
11083 * kern/env.c: Likewise.
11084 * kern/err.c: Likewise.
11085 * kern/file.c: Likewise.
11086 * kern/fs.c: Likewise.
11087 * kern/loader.c: Likewise.
11088 * kern/main.c: Likewise.
11089 * kern/misc.c: Likewise.
11090 * kern/mm.c: Likewise.
11091 * kern/parser.c: Likewise.
11092 * kern/partition.c: Likewise.
11093 * kern/rescue.c: Likewise.
11094 * kern/term.c: Likewise.
11095 * kern/efi/efi.c: Likewise.
11096 * kern/efi/init.c: Likewise.
11097 * kern/efi/mm.c: Likewise.
11098 * kern/i386/dl.c: Likewise.
11099 * kern/i386/efi/init.c: Likewise.
11100 * kern/i386/efi/startup.S: Likewise.
11101 * kern/i386/pc/init.c: Likewise.
11102 * kern/i386/pc/lzo1x.S: Likewise.
11103 * kern/i386/pc/startup.S: Likewise.
11104 * kern/ieee1275/ieee1275.c: Likewise.
11105 * kern/powerpc/cache.S: Likewise.
11106 * kern/powerpc/dl.c: Likewise.
11107 * kern/powerpc/ieee1275/cmain.c: Likewise.
11108 * kern/powerpc/ieee1275/crt0.S: Likewise.
11109 * kern/powerpc/ieee1275/init.c: Likewise.
11110 * kern/powerpc/ieee1275/openfw.c: Likewise.
11111 * kern/sparc64/cache.S: Likewise.
11112 * kern/sparc64/dl.c: Likewise.
11113 * kern/sparc64/ieee1275/init.c: Likewise.
11114 * kern/sparc64/ieee1275/openfw.c: Likewise.
11115 * loader/efi/chainloader.c: Likewise.
11116 * loader/efi/chainloader_normal.c: Likewise.
11117 * loader/i386/efi/linux.c: Likewise.
11118 * loader/i386/efi/linux_normal.c: Likewise.
11119 * loader/i386/pc/chainloader.c: Likewise.
11120 * loader/i386/pc/chainloader_normal.c: Likewise.
11121 * loader/i386/pc/linux.c: Likewise.
11122 * loader/i386/pc/linux_normal.c: Likewise.
11123 * loader/i386/pc/multiboot.c: Likewise.
11124 * loader/i386/pc/multiboot_normal.c: Likewise.
11125 * loader/powerpc/ieee1275/linux.c: Likewise.
11126 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11127 * normal/arg.c: Likewise.
11128 * normal/cmdline.c: Likewise.
11129 * normal/command.c: Likewise.
11130 * normal/completion.c: Likewise.
11131 * normal/execute.c: Likewise.
11132 * normal/function.c: Likewise.
11133 * normal/lexer.c: Likewise.
11134 * normal/main.c: Likewise.
11135 * normal/menu.c: Likewise.
11136 * normal/menu_entry.c: Likewise.
11137 * normal/misc.c: Likewise.
11138 * normal/parser.y: Likewise.
11139 * normal/script.c: Likewise.
11140 * normal/i386/setjmp.S: Likewise.
11141 * normal/powerpc/setjmp.S: Likewise.
11142 * normal/sparc64/setjmp.S: Likewise.
11143 * partmap/acorn.c: Likewise.
11144 * partmap/amiga.c: Likewise.
11145 * partmap/apple.c: Likewise.
11146 * partmap/gpt.c: Likewise.
11147 * partmap/pc.c: Likewise.
11148 * partmap/sun.c: Likewise.
11149 * term/gfxterm.c: Likewise.
11150 * term/terminfo.c: Likewise.
11151 * term/efi/console.c: Likewise.
11152 * term/i386/pc/console.c: Likewise.
11153 * term/i386/pc/serial.c: Likewise.
11154 * term/i386/pc/vesafb.c: Likewise.
11155 * term/i386/pc/vga.c: Likewise.
11156 * term/ieee1275/ofconsole.c: Likewise.
11157 * util/biosdisk.c: Likewise.
11158 * util/console.c: Likewise.
11159 * util/genmoddep.c: Likewise.
11160 * util/getroot.c: Likewise.
11161 * util/grub-emu.c: Likewise.
11162 * util/grub-mkdevicemap.c: Likewise.
11163 * util/grub-probe.c: Likewise.
11164 * util/lvm.c: Likewise.
11165 * util/misc.c: Likewise.
11166 * util/raid.c: Likewise.
11167 * util/resolve.c: Likewise.
11168 * util/update-grub.in: Likewise.
11169 * util/update-grub_lib.in: Likewise.
11170 * util/grub.d/00_header.in: Likewise.
11171 * util/grub.d/10_hurd.in: Likewise.
11172 * util/grub.d/10_linux.in: Likewise.
11173 * util/i386/efi/grub-install.in: Likewise.
11174 * util/i386/efi/grub-mkimage.c: Likewise.
11175 * util/i386/pc/grub-install.in: Likewise.
11176 * util/i386/pc/grub-mkimage.c: Likewise.
11177 * util/i386/pc/grub-mkrescue.in: Likewise.
11178 * util/i386/pc/grub-setup.c: Likewise.
11179 * util/i386/pc/misc.c: Likewise.
11180 * util/powerpc/ieee1275/grub-install.in: Likewise.
11181 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11182 * util/powerpc/ieee1275/misc.c: Likewise.
11183 * video/bitmap.c: Likewise.
11184 * video/video.c: Likewise.
11185 * video/i386/pc/vbe.c: Likewise.
11186 * video/i386/pc/vbeblit.c: Likewise.
11187 * video/i386/pc/vbefill.c: Likewise.
11188 * video/i386/pc/vbeutil.c: Likewise.
11189 * video/readers/tga.c: Likewise.
11191 2007-07-02 Robert Millan <rmh@aybabtu.com>
11193 * conf/i386-efi.rmk: Replace obsolete reference to
11194 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11195 with util/getroot.c.
11196 * conf/powerpc-ieee1275.rmk: Likewise.
11197 * conf/sparc64-ieee1275.rmk: Likewise.
11199 * util/grub-emu.c (main): Fix unchecked pointer handling.
11201 2007-07-02 Robert Millan <rmh@aybabtu.com>
11203 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11204 invocation to fail, in order to support partition-less media.
11206 * util/i386/pc/grub-install.in: Likewise.
11208 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11209 which fs or partmap modules are needed (akin to its sister scripts).
11211 Also use grub-probe to get rid of unportable /proc/mounts check.
11213 Print the same informational message that the other scripts do, before
11216 2007-06-23 Robert Millan <rmh@aybabtu.com>
11218 * util/update-grub_lib.in (font_path): New function. Determine whether
11219 a font file can be found and, if so, echo the GRUB path to it.
11221 * util/update-grub.in: Handle multiple terminals depending on user
11222 input, platform availability and font file presence. Propagate
11223 variables of our findings to /etc/grub.d/ children.
11225 * util/grub.d/00_header.in: Handle multiple terminals, based on
11226 environment setup by update-grub.
11228 2007-06-23 Robert Millan <rmh@aybabtu.com>
11230 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11232 2007-06-21 Robert Millan <rmh@aybabtu.com>
11234 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11235 indicate end of data section in kernel image.
11236 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11237 GRUB_KERNEL_MACHINE_DATA_END.
11239 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11241 * kern/i386/efi/startup.S: Likewise.
11243 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11244 during image generation. Implement --prefix option to override this
11246 * util/i386/efi/grub-mkimage.c: Likewise.
11248 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11249 code to make path relative to its root into a separate function.
11251 * util/i386/pc/grub-install.in: Use newly provided
11252 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11253 pass the result to grub-install --prefix.
11255 2007-06-13 Robert Millan <rmh@aybabtu.com>
11257 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11258 DEFAULT_DEVICE_MAP.
11259 * util/grub-emu.c: Use above definitions from misc.h instead of
11261 * util/grub-mkdevicemap.c: Likewise.
11262 * util/i386/pc/grub-setup.c: Likewise.
11263 * util/grub-probe.c: Likewise.
11264 (probe): Abort with grub_util_error() when either
11265 grub_guess_root_device or grub_util_get_grub_dev fails.
11267 2007-06-12 Robert Millan <rmh@aybabtu.com>
11269 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11270 "pager" assignment.
11271 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11273 * util/grub-probe.c (probe): Likewise for "drive_name".
11275 2007-06-11 Robert Millan <rmh@aybabtu.com>
11277 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11278 not just the cdrom one.
11280 2007-06-11 Robert Millan <rmh@aybabtu.com>
11282 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11283 Add --pkglibdir=DIR option to override pkglibdir.
11284 Mention --image-type=TYPE in help output.
11285 Fix --grub-mkimage (it was a no-op).
11286 Abort gracefully when no parameter is given.
11288 2007-06-11 Robert Millan <rmh@aybabtu.com>
11290 * util/i386/pc/grub-mkrescue.in: New file.
11291 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11292 * Makefile.in: Handle bin_SCRIPTS.
11294 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11296 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11297 list of video modes.
11299 2007-06-06 Robert Millan <rmh@aybabtu.com>
11301 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11302 file doesn't exist, or if it is in a filesystem grub can't read.
11304 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11305 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11306 header comment to fit in 80 columns when the variables are resolved.
11308 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11309 could be identified by update-grub. Remove redundant check for
11310 unifont.pff existence (since convert_system_path_to_grub_path now
11313 2007-06-04 Robert Millan <rmh@aybabtu.com>
11315 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11317 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11319 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11321 2007-06-04 Robert Millan <rmh@aybabtu.com>
11323 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11325 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11326 grub_apple_partition_map_fini.
11329 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11330 to access >2 TiB disks).
11332 Print disk->total_sectors with %llu instead of %lu, since this
11333 variable is always 64-bit (prevents wrong disk size from being displayed
11334 on either >2 TiB disk or big-endian CPU).
11336 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11337 into a generic case that supports all (sane) partition maps.
11339 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11342 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11343 and grub_apple_partition_map_fini() after that.
11345 2007-06-01 Robert Millan <rmh@aybabtu.com>
11347 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11349 * util/grub.d/00_header.in: Only enable gfxterm when
11350 convert_system_path_to_grub_path() succeeds.
11352 2007-05-20 Robert Millan <rmh@aybabtu.com>
11354 * util/update-grub_lib.in: New file.
11355 * DISTLIST: Add update-grub_lib.in.
11356 * conf/common.rmk: Generate update-grub_lib and install it in
11358 * Makefile.in: Add install routine for $(lib_DATA).
11360 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11361 function provided by update-grub_lib to support arbitrary paths of
11363 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11364 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11366 2007-05-19 Robert Millan <rmh@aybabtu.com>
11368 * commands/i386/cpuid.c: New module.
11369 * DISTLIST: Add it.
11370 * conf/i386-efi.rmk: Enable cpuid.mod.
11371 * conf/i386-pc.rmk: Likewise.
11373 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11375 * kern/disk.c (grub_disk_read): Check return value of
11378 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11380 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11382 * disk/raid.c (grub_raid_open): Likewise.
11384 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11386 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11387 stack instead of on the heap.
11389 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11390 before doing a read on it.
11392 * configure.ac: Only use -fno-stack-protector for the target
11395 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11397 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11398 __attribute_ ((unused)) to mode_type argument.
11400 * util/getroot.c (grub_guess_root_device): Fix #endif.
11402 * kern/misc.c (memcmp): Fix prototype.
11404 * include/grub/partition.h [GRUB_UTIL]
11405 (grub_gpt_partition_map_init): Add prototype.
11406 (grub_gpt_partition_map_fini): Likewise.
11408 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11409 at the right place.
11411 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11412 (grub_fat_read_data): Likewise.
11413 (grub_fat_find_dir): Likewise.
11415 * font/manager.c (find_glyph): Make table a const.
11416 (grub_font_get_glyph): Remove bitmap from if statement.
11418 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11420 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11421 code, first search for device in /dev/mapper, then in /dev.
11422 (grub_util_get_grub_dev): New function.
11423 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11425 * util/grub-probe.c (probe): Remove check for RAID, call
11426 grub_util_get_grub_dev() instead of
11427 grub_util_biosdisk_get_grub_dev().
11428 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11429 grub_util_biosdisk_get_grub_dev().
11430 * util/i386/pc/grub-setup.c (main): Likewise.
11432 2007-05-16 Robert Millan <rmh@aybabtu.com>
11434 * DISTLIST: Update for the latest changes.
11435 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11436 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11437 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11438 grub/util/biosdisk.h.
11439 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11440 grub/util/biosdisk.h.
11442 2007-05-16 Robert Millan <rmh@aybabtu.com>
11444 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11446 2007-05-16 Robert Millan <rmh@aybabtu.com>
11448 * util/i386/efi/grub-install.in: New.
11449 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11450 newly added grub-install.
11451 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11453 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11454 grub/util/biosdisk.h.
11455 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11456 grub/util/biosdisk.h.
11458 2007-05-16 Robert Millan <rmh@aybabtu.com>
11460 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11461 * include/grub/util/biosdisk.h: ... here.
11462 * util/i386/pc/biosdisk.c: Moved to ...
11463 * util/biosdisk.c: ... here.
11464 * util/i386/pc/getroot.c: Moved to ...
11465 * util/getroot.c: ... here.
11466 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11467 * util/grub-mkdevicemap.c: ... here.
11468 * util/i386/pc/grub-probe.c: Moved to ...
11469 * util/grub-probe.c: ... here.
11471 2007-05-15 Robert Millan <rmh@aybabtu.com>
11473 * util/update-grub.in: Remove duplicated line in grub.cfg header
11476 2007-05-13 Robert Millan <rmh@aybabtu.com>
11478 * util/update-grub.in: Fix a few assumptions about the devices holding
11479 /, /boot and /boot/grub being the same.
11480 * util/grub.d/00_header.in: Likewise.
11481 * util/grub.d/10_hurd.in: Likewise.
11482 * util/grub.d/10_linux.in: Likewise.
11484 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11485 patterns. Use that to define the `.old' suffix as older than `'.
11487 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11489 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11490 the grub.cfg header message.
11492 2007-05-11 Robert Millan <rmh@aybabtu.com>
11494 * util/update-grub.in: Create device.map if it doesn't already exist,
11495 before attempting to run grub-probe.
11496 Check for grub-probe and grub-mkdevicemap with the same code
11497 grub-install is using.
11500 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11502 * Makefile.in: Add the datarootdir autoconf variable.
11504 2007-05-09 Robert Millan <rmh@aybabtu.com>
11506 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11507 fail gracefully if dev->disk->partition == NULL.
11509 2007-05-07 Robert Millan <rmh@aybabtu.com>
11511 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11512 determine partition map module.
11513 * util/i386/pc/grub-install.in: Use this feature to decide which
11514 partition module to load, instead of hardcoding pc and gpt.
11516 2007-05-07 Robert Millan <rmh@aybabtu.com>
11518 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11519 source directory differs from build directory.
11521 2007-05-05 Robert Millan <rmh@aybabtu.com>
11523 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11526 2007-05-05 Robert Millan <rmh@aybabtu.com>
11528 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11530 2007-05-05 Robert Millan <rmh@aybabtu.com>
11532 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11533 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11535 2007-05-05 Robert Millan <rmh@aybabtu.com>
11537 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11538 (grub_probe_SOURCES): Likewise.
11539 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11540 GPT and initialize dos_part and bsd_part accordingly.
11541 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11543 (main): Activate gpt module for use during partition identification,
11544 and deactivate it afterwards.
11545 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11546 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11547 partition identification, and deactivate it afterwards.
11549 2007-05-05 Robert Millan <rmh@aybabtu.com>
11551 * term/i386/pc/console.c (grub_console_fini): Call
11552 grub_term_set_current() before grub_term_unregister().
11554 2007-05-04 Robert Millan <rmh@aybabtu.com>
11556 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11557 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11558 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11559 and update-grub_DATA.
11560 * conf/common.rmk: Build and install update-grub components.
11561 * conf/common.mk: Regenerate.
11562 * util/update-grub.in: New. Core of update-grub.
11563 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11564 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11565 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11566 * util/grub.d/README: New. Document grub.d directory layout.
11568 2007-05-01 Robert Millan <rmh@aybabtu.com>
11570 * util/grub-emu.c: Move initialization functions
11571 grub_util_biosdisk_init() and grub_init_all() before
11572 grub_util_biosdisk_get_grub_dev(), which relies on them.
11574 2007-04-19 Robert Millan <rmh@aybabtu.com>
11576 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11579 2007-04-18 Jerone Young <jerone@gmail.com>
11581 * kernel/elf.c: Add missing parenthesis for conditional statement
11584 2007-04-10 Jerone Young <jerone@gmail.com>
11586 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11587 continue on and look for device node with real device name.
11589 2007-04-10 Jerone Young <jerone@gmail.com>
11591 * configure.ac: Add argument for autoconf to use transformation
11593 * Makefile.in: Add autoconf package transformation code.
11594 * util/i386/pc/grub-install.in: Likewise.
11595 * util/powerpc/ieee1275/grub-install.in: Likewise.
11597 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11599 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11600 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11601 (EXT2_REVISION): Likewise.
11602 (EXT2_INODE_SIZE): Likewise.
11603 (struct grub_ext2_block_group): Added a missing member
11605 (grub_ext2_read_inode): Divide by the inode size in a superblock
11606 instead of 128 to obtain INODES_PER_BLOCK.
11607 Use the macro EXT2_INODE_SIZE instead of directly using
11608 SBLOCK->INODE_SIZE.
11610 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11612 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11613 superblock instead of the structure size to compute an
11614 offset. This fixes the problem that GRUB could not read a
11615 filesystem when inode size is different from 128-byte.
11617 2007-03-05 Marco Gerards <marco@gnu.org>
11619 * normal/main.c (read_config_file): When "menu" is not set, create
11620 an initial context.
11622 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11624 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11625 (HEAP_LIMIT): New macro.
11626 (grub_claim_heap): Claim memory up to `heaplimit'.
11628 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11630 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11631 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11632 (_start): Likewise.
11633 (grub_arch_modules_addr): Return address after `_end'.
11634 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11635 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11636 (add_segments): Calculate `_end' from phdr size and location.
11637 (ALIGN_UP): Moved to ...
11638 * include/grub/misc.h: here.
11639 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11641 (GRUB_IEEE1275_MODULE_BASE): Removed.
11643 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11645 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11648 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11650 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11652 (grub_elf64_load_hook_t): Likewise.
11653 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11656 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11658 * kern/mm.c: Update copyright.
11659 (grub_mm_debug): Correct syntax error.
11660 (grub_mm_dump_free): New function.
11661 (grub_debug_free): Call `grub_free'.
11662 * include/grub/mm.h: Update copyright.
11663 (grub_mm_dump_free): Add declaration.
11665 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11667 * include/grub/ieee1275/ieee1275.h: Update copyright.
11668 * kern/powerpc/ieee1275/init.c: Likewise.
11669 * kern/powerpc/ieee1275/openfw.c: Likewise.
11671 * loader/powerpc/ieee1275/linux.c: Likewise.
11672 * include/grub/elfload.h: Likewise.
11673 * kern/elf.c: Likewise.
11674 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11676 (grub_elf64_load): Likewise.
11677 (grub_elf32_load_segment): Move to a nested function.
11678 (grub_elf64_load_segment): Likewise.
11680 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11682 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11684 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11685 (grub_heap_len): Likewise.
11686 (HEAP_SIZE): New macro.
11687 (grub_claim_heap): New function.
11688 (grub_machine_init): Don't claim heap directly. Call
11690 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11691 (grub_available_iterate): New function.
11693 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11695 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11696 * configure.ac: Use it for testing the HOST and TARGET compilers.
11698 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11700 * Makefile.in (enable_grub_emu): New variable.
11701 * configure.ac (--enable-grub-emu): New option.
11702 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11703 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11704 * conf/i386-pc.rmk: Likewise.
11705 * conf/powerpc-ieee1275.rmk: Likewise.
11706 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11708 2006-12-12 Marco Gerards <marco@gnu.org>
11710 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11712 * kern/env.c (grub_env_unset): Don't free the member `value' when
11713 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11716 * normal/main.c (current_menu): Removed.
11717 (free_menu): Unset the `menu' environment variable.
11718 (grub_normal_menu_addentry): Make use of the environment variable
11719 `menu', instead of using the global `current_menu'. Allocate
11720 memory for the sourcecode of this entry.
11721 (read_config_file): New argument `nested', changed all callers.
11722 Only in the case of a new context, initialize a new menu. Set the
11723 `menu' environment variable.
11724 (grub_normal_execute): Don't set and unset the environment
11725 variable `menu' here anymore. Only free the menu when leaving the
11728 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11731 2006-12-11 Marco Gerards <marco@gnu.org>
11733 * normal/menu_entry.c (run): Fix off by one bug so the last line
11734 is executed. Move the loader check to outside the loop.
11736 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11738 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11740 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11742 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11743 the number of sectors. Reported by Andrey Shuvikov
11744 <mr_hyro@yahoo.com>.
11746 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11748 * kern/disk.c (grub_disk_read): When there is a read error, always
11749 try to read only the necessary data.
11751 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11753 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11755 [GRUB_UTIL] (grub_raid_fini): Likewise.
11756 [GRUB_UTIL] (grub_lvm_init): Likewise.
11757 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11758 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11759 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11760 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11761 and grub_raid_fini().
11763 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11765 * include/grub/types.h (__unused): Rename to UNUSED.
11766 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11767 (grub_elf64_size): Likewise.
11769 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11771 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11772 grub_error_push and grub_error_pop in the error-handling path.
11773 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11776 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11778 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11779 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11781 (kernel_elf_SOURCES): Likewise.
11782 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11783 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11784 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11785 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11786 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11787 (elf_mod_SOURCES): New variable.
11788 (elf_mod_CFLAGS): Likewise.
11789 (elf_mod_LDFLAGS): Likewise.
11790 * include/grub/types.h (__unused): New macro.
11791 * include/grub/elfload.h: New file.
11792 * kern/elf.c: Likewise.
11793 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11794 (ELF32_LOADMASK): New macro.
11795 (ELF64_LOADMASK): Likewise.
11796 (vmlinux): Removed.
11797 (grub_linux_load32): New function.
11798 (grub_linux_load64): Likewise.
11799 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11800 Use grub_elf_t instead of grub_file_t.
11802 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11804 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11805 `catch_result' to struct set_color_args.
11807 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11809 * normal/menu.c: Include grub/script.h.
11810 * normal/menu_entry.c: Likewise.
11811 * include/grub/normal.h: Do not include grub/script.h.
11813 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11815 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11817 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11819 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11821 (grub_disk_close): Print debug messages when closing a disk.
11822 (grub_disk_read): Print debug messages when disk read fails.
11823 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11825 * kern/partition.c: Include misc.h.
11826 (grub_partition_iterate): Print debug messages when detecting
11829 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11831 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11833 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11835 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11837 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11838 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11840 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11842 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11843 instead of sizeof(lv). Patch by Michael Guntsche.
11845 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11847 * disk/lvm.c: Rename VGS to VG_LIST.
11848 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11849 (grub_lvm_open): Likewise.
11850 Thanks to Michael Guntsche for finding this bug.
11852 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11854 * configure.ac (AC_INIT): Bumped to 1.95.
11856 2006-10-14 Robert Millan <rmh@aybabtu.com>
11858 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11859 with "/dev/.static/dev/md".
11861 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11863 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11864 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11865 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11866 DRIVE_NAME are always freed.
11868 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11869 DOS_PART, as a DOS partition is counted from one instead of zero
11870 now. Reported by Robert Millan.
11872 2006-10-14 Robert Millan <rmh@aybabtu.com>
11874 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11875 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11876 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11877 string returned by grub_guess_root_device.
11878 * util/i386/pc/grub-setup.c: Likewise.
11879 * util/i386/pc/grub-probefs.c: Likewise.
11881 * util/i386/pc/grub-probefs.c: Rename to ...
11882 * util/i386/pc/grub-probe.c: ... this.
11883 * DISTLIST: Remove grub-probefs, add grub-probe.
11884 * conf/i386-efi.rmk: Likewise.
11885 * conf/i386-pc.rmk: Likewise.
11886 * util/i386/pc/grub-install.in: Likewise.
11888 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11889 choose which information we want to print.
11891 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11893 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11894 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11895 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11896 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11897 video/readers/tga.c and video/i386/pc/vbeutil.c.
11899 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11901 Added support for RAID and LVM.
11903 * disk/lvm.c: New file.
11904 * disk/raid.c: Likewise.
11905 * include/grub/lvm.h: Likewise.
11906 * include/grub/raid.h: Likewise.
11907 * include/grub/util/lvm.h: Likewise.
11908 * include/grub/util/raid.h: Likewise.
11909 * util/lvm.c: Likewise.
11910 * util/raid.c: Likewise.
11912 * include/grub/disk.h (grub_disk_dev_id): Add
11913 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11914 (grub_disk_get_size): New prototype.
11915 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11916 returns a partition.
11917 (grub_disk_get_size): New function.
11919 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11920 verbatim if grub_install_dos_part is -2.
11922 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11925 * util/i386/pc/grub-setup.c (setup): New argument
11926 MUST_EMBED. Force embedding of GRUB when the argument is
11927 true. Close FILE before returning.
11928 (main): Add support for RAID and LVM.
11930 * conf/common.rmk: Add RAID and LVM modules.
11931 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11933 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11935 * kern/misc.c (grub_strstr): New function.
11936 * include/grub/misc.h (grub_strstr): New prototype.
11938 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11940 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11942 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11944 * kern/misc.c (grub_strtoull): Guess the base only if not
11947 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11949 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11952 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11954 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11956 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11957 Remove `flags' argument. All callers changed.
11958 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11959 (IEEE1275_IHANDLE_INVALID): New variable.
11960 (IEEE1275_CELL_INVALID): New variable.
11961 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11962 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11963 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11964 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11965 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11966 codes from Open Firmware. All callers updated.
11967 (grub_ieee1275_next_property): Directly return Open Firmware return
11969 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11970 Standardize error checking from `grub_ieee1275_get_property'.
11971 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11972 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11974 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11976 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11977 `instance_to_package_args' to `instance_to_path_args'.
11979 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11980 `grub_ieee1275_chosen'.
11982 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11983 `grub_ieee1275_interpret'.
11985 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11987 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11989 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11991 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11992 (__cmpdi): Likewise.
11994 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11995 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11998 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12000 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12001 to type `grub_ssize_t'.
12002 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12004 2006-09-22 Marco Gerards <marco@gnu.org>
12006 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12009 2006-09-22 Marco Gerards <marco@gnu.org>
12011 * commands/echo.c: New file.
12013 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12015 * conf/common.rmk (echo_mod_SOURCES): New variable.
12016 (echo_mod_CFLAGS): Likewise.
12017 (echo_mod_LDFLAGS): Likewise.
12019 2006-09-22 Marco Gerards <marco@gnu.org>
12021 * normal/main.c (get_line): Malloc memory instead of using
12022 preallocated memory. Removed the arguments `cmdline' and
12023 `max_len'. Updated all callers.
12025 2006-09-22 Marco Gerards <marco@gnu.org>
12027 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12028 (normal_mod_DEPENDENCIES): Likewise.
12030 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12031 (normal_mod_DEPENDENCIES): Likewise.
12033 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12035 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12037 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12039 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12040 (normal_mod_DEPENDENCIES): Likewise.
12041 * conf/i386-pc.mk: Regenerate.
12042 * conf/i386-efi.mk: Likewise
12043 * conf/common.mk: Likewise.
12044 * conf/powerpc-ieee1275.mk: Likewise.
12045 * conf/sparc64-ieee1275.mk: Likewise.
12047 2006-09-22 Robert Millan <rmh@aybabtu.com>
12049 Sync with i386 version.
12050 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12051 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12053 2006-09-21 Robert Millan <rmh@aybabtu.com>
12055 Import from GRUB Legacy (lib/device.c):
12056 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12057 (init_device_map) [__linux__]: Add support for I2O devices.
12059 2006-09-14 Marco Gerards <marco@gnu.org>
12061 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12064 2006-09-14 Robert Millan <rmh@aybabtu.com>
12066 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12069 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12071 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12072 before adding it to device.map.
12074 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12076 * genmk.rb: Let GCC generate dependencies the first time it
12077 compiles a file; using the -MD option.
12078 * conf/common.mk: Regenerate.
12079 * conf/i386-pc.mk: Likewise.
12080 * conf/i386-efi.mk: Likewise.
12081 * conf/powerpc-ieee1275.mk: Likewise.
12082 * conf/sparc64-ieee1275.mk: Likewise.
12084 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12086 Move the prototypes of grub_setjmp and grub_longjmp to
12087 cpu/setjmp.h, so that each architecture may specify different
12090 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12091 (grub_longjmp): Likewise.
12092 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12093 (grub_longjmp): Likewise.
12094 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12095 (grub_longjmp): Likewise.
12097 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12098 [!GRUB_UTIL] (grub_longjmp): Removed.
12100 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12102 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12103 "color!" method does not return any value.
12105 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12107 * include/grub/bitmap.h: New file.
12109 * include/grub/i386/pc/vbeutil.h: Likewise.
12111 * video/bitmap.c: Likewise.
12113 * video/readers/tga.c: Likewise.
12115 * video/i386/pc/vbeutil.c: Likewise.
12117 * commands/videotest.c: Code cleanup and updated to reflect to new
12120 * term/gfxterm.c: Likewise.
12122 * video/video.c: Likewise.
12124 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12125 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12126 (bitmap_mod_SOURCES): New entry.
12127 (bitmap_mod_CFLAGS): Likewise.
12128 (bitmap_mod_LDFLAGS): Likewise.
12129 (tga_mod_SOURCES): Likewise.
12130 (tga_mod_CFLAGS): Likewise.
12131 (tga_mod_LDFLAGS): Likewise.
12133 * include/grub/video.h (grub_video_blit_operators): New enum type.
12134 (grub_video_render_target): Changed as forward declaration and moved
12135 actual definition to be video driver specific.
12136 (grub_video_adapter.blit_bitmap): Added blitting operator.
12137 (grub_video_adapter.blit_render_target): Likewise.
12138 (grub_video_blit_bitmap): Likewise.
12139 (grub_video_blit_render_target): Likewise.
12141 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12142 driver specific render target definition.
12143 (grub_video_vbe_map_rgba): Added driver internal helper.
12144 (grub_video_vbe_unmap_color): Updated to use
12145 grub_video_i386_vbeblit_info.
12146 (grub_video_vbe_get_video_ptr): Likewise.
12148 * include/grub/i386/pc/vbeblit.h
12149 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12150 grub_video_i386_vbeblit_info.
12151 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12152 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12153 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12154 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12155 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12156 (grub_video_i386_vbeblit_index_index): Likewise.
12157 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12158 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12159 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12160 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12162 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12165 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12166 include/grub/i386/pc/vbeblit.h.
12168 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12169 Updated to use grub_video_i386_vbeblit_info.
12170 (grub_video_i386_vbefill_R8G8B8): Likewise.
12171 (grub_video_i386_vbefill_index): Likewise.
12172 (grub_video_i386_vbefill): Added generic filler.
12174 * video/i386/pc/vbefill.c: Updated to reflect changes on
12175 include/grub/i386/pc/vbefill.h.
12177 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12178 grub_video_i386_vbeblit_info.
12179 (grub_video_vbe_unmap_color): Likewise.
12180 (grub_video_vbe_blit_glyph): Likewise.
12181 (grub_video_vbe_scroll): Likewise.
12182 (grub_video_vbe_draw_pixel): Removed function.
12183 (grub_video_vbe_get_pixel): Likewise.
12184 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12185 updated code to use it.
12186 (common_blitter): Added common blitter for render target and bitmap.
12187 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12188 (grub_video_vbe_blit_render_target): Likewise.
12190 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12192 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12193 is in text mode if there is no console control protocol instance
12196 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12198 * include/grub/video.h: Code cleanup.
12200 * include/grub/i386/pc/vbe.h: Likewise.
12202 * video/i386/pc/vbe.c: Likewise.
12204 * video/i386/pc/vbeblit.c: Likewise.
12206 * video/i386/pc/vbefill.c: Likewise.
12208 * video/video.c: Likewise. Also added more comments.
12210 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12212 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12213 (struct grub_biosdisk_dap): Likewise.
12215 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12216 linkage settings for all functions.
12218 2006-07-12 Marco Gerards <marco@gnu.org>
12220 * configure.ac (--enable-mm-debug): Fix typo.
12222 * genkernsyms.sh.in: Use proper quoting for `CC'.
12224 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12226 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12227 (normal_mod_ASFLAGS): Remove "-m32".
12229 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12231 * util/misc.c: Include config.h.
12232 [!HAVE_MEMALIGN]: Do not include malloc.h.
12233 (grub_memalign): Use posix_memalign, if present. Then, use
12234 memalign, if present. Otherwise, emit an error.
12236 * util/grub-emu.c: Do not include malloc.h.
12238 * include/grub/util/misc.h: Include unistd.h. This is required for
12239 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12240 D. Eades III <hde@foobar-qux.org>.
12242 * configure.ac (AC_GNU_SOURCE): Added.
12243 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12246 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12248 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12249 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12251 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12253 * include/grub/types.h (grub_host_addr_t): Rename to
12254 grub_target_addr_t.
12255 (grub_host_off_t): Rename to grub_target_off_t.
12256 (grub_host_size_t): Rename to grub_target_size_t.
12257 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12258 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12260 * include/grub/kernel.h (struct grub_module_header): Change type
12261 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12262 (grub_module_info): Likewise.
12264 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12266 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12267 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12268 Velazquez <jesus.velazquez@gmail.com>.
12270 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12272 Count partitions from 1 instead of 0 in the string representation
12273 of partitions. Still use 0-based internally.
12275 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12276 (sun_partition_map_iterate): Use grub_partition_t instead of
12277 struct grub_partition *. Cast DESC->START_CYLINDER to
12278 grub_uint64_t after converting the endian.
12279 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12280 (sun_partition_map_get_name): Add 1 to P->INDEX.
12282 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12284 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12286 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12287 zero instead of one.
12288 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12289 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12291 * partmap/apple.c (apple_partition_map_iterate): Change the type
12292 of POS to unsigned.
12293 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12294 (apple_partition_map_get_name): Add 1 into P->INDEX.
12296 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12297 of POS to unsigned.
12298 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12299 calculate the offset of a partition.
12300 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12301 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12303 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12304 SECTOR to grub_disk_addr_t.
12305 (acorn_partition_map_iterate): Likewise.
12306 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12307 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12309 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12311 * kern/i386/pc/init.c (make_install_device): Add 1 into
12312 GRUB_INSTALL_DOS_PART.
12314 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12317 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12319 Clean up the code to support 64-bit addressing in disks and
12320 files. This change is not enough for filesystems yet.
12322 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12323 type of "start" to grub_uint64_t.
12324 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12325 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12326 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12329 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12330 to grub_disk_addr_t.
12332 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12335 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12337 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12340 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12342 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12344 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12346 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12347 to grub_off_t, to detect an error from grub_file_seek.
12348 (grub_multiboot_load_elf32): Likewise.
12350 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12351 maximum unsigned long value when an overflow is detected.
12352 (grub_strtoull): New function.
12353 (grub_divmod64): Likewise.
12354 (grub_lltoa): use grub_divmod64.
12356 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12358 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12359 the pointer to next character. Use grub_strtoull instead of
12361 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12362 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12365 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12366 return value is signed.
12367 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12368 test if OFFSET is less than zero, as OFFSET is unsigned now.
12370 * kern/disk.c (struct grub_disk_cache): Change the type of
12371 "sector" to grub_disk_addr_t.
12372 (grub_disk_cache_get_index): Change the type of SECTOR to
12373 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12374 unsigned after shifting.
12375 (grub_disk_cache_invalidate): Change the type of SECTOR to
12377 (grub_disk_cache_unlock): Likewise.
12378 (grub_disk_cache_store): Likewise.
12379 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12380 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12381 grub_disk_addr_t and grub_uint64_t, respectively.
12382 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12383 body, as the value of OFFSET is tweaked by
12384 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12385 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12387 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12388 body, as the value of OFFSET is tweaked by
12389 grub_disk_check_range. Change the types of LEN and N to
12392 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12393 and "saved_offset" to grub_off_t.
12394 (test_header): Cast BUF to char *.
12395 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12397 (grub_gzio_read): Change the types of OFFSET and SIZE to
12398 grub_off_t and grub_size_t, respectively.
12400 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12402 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12403 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12404 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12405 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12406 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12408 * include/grub/types.h (grub_off_t): Unconditionally set to
12410 (grub_disk_addr_t): Changed to grub_uint64_t.
12412 * include/grub/partition.h (struct grub_partition): Change the
12413 types of "start", "len" and "offset" to grub_disk_addr_t,
12414 grub_uint64_t and grub_disk_addr_t, respectively.
12415 (grub_partition_get_start): Return grub_disk_addr_t.
12416 (grub_partition_get_len): Return grub_uint64_t.
12418 * include/grub/misc.h (grub_strtoull): New prototype.
12419 (grub_divmod64): Likewise.
12421 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12422 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12423 grub_off_t, respectively.
12424 All callers and references changed.
12426 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12427 grub_size_t in "read".
12428 All callers and references changed.
12430 * include/grub/file.h (struct grub_file): Change the types of
12431 "offset" and "size" to grub_off_t and grub_off_t,
12432 respectively. Change the type of SECTOR to grub_disk_addr_t in
12434 (grub_file_read): Change the type of LEN to grub_size_t.
12435 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12437 (grub_file_size): Return grub_off_t.
12438 (grub_file_tell): Likewise.
12439 All callers and references changed.
12441 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12442 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12444 (struct grub_disk): Change the type of "total_sectors" to
12445 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12447 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12448 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12449 (grub_disk_write): Likewise.
12450 All callers and references changed.
12452 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12453 char * for grub_strncmp to silence gcc.
12454 (grub_iso9660_mount): Likewise.
12455 (grub_iso9660_mount): Likewise.
12456 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12458 (grub_iso9660_iterate_dir): Likewise.
12459 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12461 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12462 LEN to grub_disk_addr_t and grub_size_t, respectively.
12464 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12466 * fs/jfs.c (grub_jfs_read_file): Likewise.
12468 * fs/minix.c (grub_jfs_read_file): Likewise.
12470 * fs/sfs.c (grub_jfs_read_file): Likewise.
12472 * fs/ufs.c (grub_jfs_read_file): Likewise.
12474 * fs/xfs.c (grub_jfs_read_file): Likewise.
12476 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12477 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12480 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12481 BLKNR to -1 instead of returning GRUB_ERRNO.
12482 (grub_ext2_read_file): Change the types of SECTOR and
12483 LEN to grub_disk_addr_t and grub_size_t, respectively.
12485 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12486 LEN to grub_disk_addr_t and grub_size_t, respectively.
12488 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12491 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12492 string. Do not cast SECTOR explicitly.
12494 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12495 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12496 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12497 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12498 over 2TB and LBA mode is not supported, raise an error.
12499 (get_safe_sectors): New function.
12500 (grub_biosdisk_read): Use get_safe_sectors.
12501 (grub_biosdisk_write): Likewise.
12503 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12504 (grub_efidisk_write): Likewise.
12506 * disk/loopback.c (delete_loopback): Cosmetic changes.
12507 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12509 (grub_loopback_open): Likewise.
12510 (grub_loopback_read): Likewise. Also, change the type of POS to
12511 grub_off_t, and fix the usage of grub_memset.
12513 * commands/i386/pc/play.c: Include grub/machine/time.h.
12515 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12518 * commands/configfile.c: Include grub/env.h.
12520 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12521 GRUB_ERRNO directly instead. Change the type of POS to
12522 grub_off_t. Follow the coding standard.
12524 * commands/blocklist.c: Include grub/partition.h.
12525 (grub_cmd_blocklist): Return an error if the underlying device is
12526 not a disk. Take the starting sector of a partition into account,
12527 if a partition is used.
12529 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12531 (lba_mode): Support 64-bit addresses.
12532 (chs_mode): Likewise.
12533 (copy_buffer): Adapted to the new offsets of a length field and a
12535 (blocklist_default_start): Allocate 64-bit space.
12537 * boot/i386/pc/boot.S (force_lba): Removed.
12538 (boot_drive): Moved to under KERNEL_SECTOR.
12539 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12541 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12543 (lba_mode): Refactored to support a 64-bit address. More size
12545 (setup_sectors): Likewise.
12547 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12549 * DISTLIST: Added include/grub/i386/linux.h. Removed
12550 include/grub/i386/pc/linux.h
12552 * configure.ac (AC_INIT): Bumped to 1.94.
12554 * config.guess: Updated from gnulib.
12555 * config.sub: Likewise.
12556 * install-sh: Likewise.
12557 * mkinstalldirs: Likewise.
12559 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12561 * conf/common.rmk (grub_modules_init.lst): Depended on
12562 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12565 * genmk.rb (PModule::rule): Reverted the previous change.
12567 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12569 * conf/common.rmk (grub_modules_init.lst): Depends on
12570 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12571 that the target does not exist before producing.
12572 (grub_modules_init.h): Remove the target before generating.
12573 (grub_emu_init.c): Likewise.
12575 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12577 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12579 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12580 for the target-specific tests. Make sure that we also have the
12581 up-to-date target variables for those tests.
12583 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12585 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12586 (PModule::rule): Likewise.
12588 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12590 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12591 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12592 target-specific flags should be prefixed.
12593 (PModule::rule): Likewise.
12595 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12597 * configure.ac (CMP): Check if cmp is available explicitly.
12599 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12601 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12602 (target_cpu): New variable.
12603 (pkglibdir): Use target_cpu instead of host_cpu.
12605 * util/i386/pc/grub-install.in (host_cpu): Removed.
12606 (target_cpu): New variable.
12607 (pkglibdir): Use target_cpu instead of host_cpu.
12609 * util/genmoddep.c: Removed.
12611 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12612 instead of GRUB_HOST_SIZEOF_VOID_P.
12613 * kern/dl.c: Likewise.
12615 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12617 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12618 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12619 (GRUB_TARGET_SIZEOF_LONG): ... this.
12620 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12621 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12622 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12624 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12625 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12626 (GRUB_TARGET_SIZEOF_LONG): ... this.
12627 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12628 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12629 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12631 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12632 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12633 (GRUB_TARGET_SIZEOF_LONG): ... this.
12634 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12635 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12637 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12638 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12639 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12640 instead of GRUB_HOST_SIZEOF_LONG.
12641 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12642 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12643 GRUB_CPU_WORDS_BIGENDIAN.
12644 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12645 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12648 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12649 (genmoddep_SOURCES): Likewise.
12650 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12651 (genmoddep_SOURCES): Likewise.
12652 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12653 (genmoddep_SOURCES): Likewise.
12654 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12656 (genmoddep_SOURCES): Likewise.
12658 * genmoddep.awk: New file.
12660 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12661 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12662 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12663 (PModule::rule): Likewise.
12664 (Program::rule): Likewise.
12665 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12666 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12669 * configure.ac: Rewritten intensively to use host and target
12670 instead of build and host, respectively.
12672 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12673 (host_cpu): Removed.
12674 (target_cpu): New variable.
12675 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12676 (BUILD_CC): Removed.
12677 (BUILD_CFLAGS): Likewise.
12678 (BUILD_CPPFLAGS): Likewise.
12679 (TARGET_CC): New variable.
12680 (TARGET_CFLAGS): Likewise.
12681 (TARGET_CPPFLAGS): Likewise.
12682 (TARGET_LDFLAGS): Likewise.
12684 (include): Use target_cpu instead of host_cpu.
12685 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12687 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12689 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12691 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12692 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12693 field 'false' to 'exec_on_false'.
12694 (grub_script_create_cmdif): Renamed argument names to reflect above
12697 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12699 * normal/script.c (grub_script_create_cmdif): Likewise.
12701 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12703 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12705 (grub_hfsplus_btree_recptr): Likewise.
12706 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12707 FILEBLOCK both to pass a block number and store next block
12709 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12710 overflow file correctly. Specify errors appropriately, because
12711 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12712 grub_hfsplus_btree_recptr to get the pointer to a found key.
12713 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12716 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12718 (_linux_mod_SOURCES): New variable.
12719 (_linux_mod_CFLAGS): Likewise.
12720 (_linux_mod_LDFLAGS): Likewise.
12721 (linux_mod_SOURCES): Likewise.
12722 (linux_mod_CFLAGS): Likewise.
12723 (linux_mod_LDFLAGS): Likewise.
12725 * DISTLIST: Added loader/i386/efi/linux.c,
12726 loader/i386/efi/linux_normal.c and
12727 include/grub/i386/efi/loader.h.
12729 * loader/i386/efi/linux.c: New file.
12730 * loader/i386/efi/linux_normal.c: Likewise.
12731 * include/grub/i386/efi/loader.h: Likewise.
12733 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12735 * commands/blocklist.c: New file.
12737 * DISTLIST: Added commands/blocklist.c.
12739 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12740 color for the background, and a darker color for the foreground.
12741 (grub_console_checkkey): Return READ_KEY.
12742 (grub_console_cls): Set the background to
12743 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12745 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12747 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12748 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12750 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12753 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12754 BG. The spec is wrong again.
12756 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12758 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12760 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12761 commands/blocklist.c.
12762 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12764 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12765 (blocklist_mod_SOURCES): New variable.
12766 (blocklist_mod_CFLAGS): Likewise.
12767 (blocklist_mod_LDFLAGS): Likewise.
12769 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12771 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12773 (lba_mode): Use %eax more intensively to reduce the code size.
12775 2006-05-20 Marco Gerards <marco@gnu.org>
12777 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12779 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12781 (script): Accept leading newlines.
12782 (newlines): New rule to describe 0 or more newlines.
12783 (commands): Accept `command' with trailing newline. Fixed the
12784 order in which arguments were passed to `grub_script_add_cmd'.
12785 Accept commands separated by newlines.
12786 (function): Changed to accept newlines.
12787 (menuentry) Rewritten.
12789 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12790 front of the list, instead of to the end.
12792 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12794 * util/i386/pc/grub-install.in (bindir): New variable.
12795 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12796 Shaver <lbgwjl@gmail.com>.
12798 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12800 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12801 grub/machine/linux.h
12802 * loader/i386/pc/linux.c: Likewise.
12804 * include/grub/i386/pc/linux.h: Moved to ...
12805 * include/grub/i386/linux.h: ... here.
12807 * include/grub/i386/linux.h (struct linux_kernel_params): New
12810 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12812 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12814 (grub_video_vbe_blit_glyph): Likewise.
12815 (grub_video_vbe_blit_bitmap): Likewise.
12816 (grub_video_vbe_blit_render_target): Likewise.
12818 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12820 * configure.ac (--with-platform): Properly quote the square
12823 2006-05-08 Marco Gerards <marco@gnu.org>
12825 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12827 (kernel_elf_HEADERS): ...to this. Updated all users.
12828 (grubof_symlist.c): Renamed from this...
12829 (kernel_elf_symlist.c): ...to this. Updated all users.
12830 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12831 (grubof_SOURCES): Renamed from this...
12832 (kernel_elf_SOURCES): ...to this.
12833 (grubof_HEADERS): Renamed from this...
12834 (kernel_elf_HEADERS): ...to this.
12835 (grubof_CFLAGS): Renamed from this...
12836 (kernel_elf_CFLAGS): ...to this.
12837 (grubof_ASFLAGS): Renamed from this...
12838 (kernel_elf_ASFLAGS): ...to this.
12839 (grubof_LDFLAGS): Renamed from this...
12840 (kernel_elf_LDFLAGS): ...to this.
12842 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12844 (kernel_elf_HEADERS): ...to this. Updated all users.
12845 (grubof_symlist.c): Renamed from this...
12846 (kernel_elf_symlist.c): ...to this. Updated all users.
12847 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12848 (grubof_SOURCES): Renamed from this...
12849 (kernel_elf_SOURCES): ...to this.
12850 (grubof_HEADERS): Renamed from this...
12851 (kernel_elf_HEADERS): ...to this.
12852 (grubof_CFLAGS): Renamed from this...
12853 (kernel_elf_CFLAGS): ...to this.
12854 (grubof_ASFLAGS): Renamed from this...
12855 (kernel_elf_ASFLAGS): ...to this.
12856 (grubof_LDFLAGS): Renamed from this...
12857 (kernel_elf_LDFLAGS): ...to this.
12859 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12860 `kernel.elf' instead of `grubof'.
12862 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12864 Add --with-platform to configure. Use pkglibdir instead of
12865 pkgdatadir. This is reported by Roger Leigh.
12867 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12868 (host_vendor): Likewise.
12869 (host_os): Likewise.
12870 (pkgdatadir): Likewise.
12871 (platform): New variable.
12872 (pkglibdir): Likewise.
12873 Use PKGLIBDIR instead of PKGDATADIR.
12875 * util/i386/pc/grub-install.in (datadir): Removed.
12876 (host_vendor): Likewise.
12877 (host_os): Likewise.
12878 (pkgdatadir): Likewise.
12879 (platform): New variable.
12880 (pkglibdir): Likewise.
12881 Use PKGLIBDIR instead of PKGDATADIR.
12883 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12884 instead of GRUB_DATADIR.
12886 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12888 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12891 * configure.ac (--with-platform): New option.
12892 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12894 * Makefile.in: Include a makefile based on PLATFORM instead of
12896 (pkgdatadir): Not appended by the machine type.
12897 (pkglibdir): Appended by the machine type.
12898 (host_vendor): Removed.
12899 (platform): New variable.
12900 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12901 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12902 (uninstall): Likewise.
12904 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12906 Use the environment context in the menu. Remove the commands
12907 "default" and "timeout", and use variables instead.
12909 * normal/menu.c: Include grub/env.h.
12910 (print_entry): Cast TITLE to silence gcc.
12911 (get_timeout): New function.
12912 (set_timeout): Likewise.
12913 (get_entry_number): Likewise.
12914 (run_menu): Use a default entry, a fallback entry and a timeout
12915 in the environment variables "default", "fallback" and
12916 "timeout". Also, tweak the default entry if it is not within the
12917 current menu entries.
12918 (grub_menu_run): Use a fallback entry in the environment variable
12921 * normal/main.c (read_config_file): Do not initialize
12922 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12924 (grub_normal_execute): Use a data slot to store the menu.
12926 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12927 fallback_entry and timeout.
12928 (struct grub_menu_list): Removed.
12929 (grub_menu_list_t): Likewise.
12930 (struct grub_context): Likewise.
12931 (grub_context_t): Likewise.
12932 (grub_context_get): Likewise.
12933 (grub_context_get_current_menu): Likewise.
12934 (grub_context_push_menu): Likewise.
12935 (grub_context_pop_menu): Likewise.
12936 (grub_default_init): Likewise.
12937 (grub_default_fini): Likewise.
12938 (grub_timeout_init): Likewise.
12939 (grub_timeout_fini): Likewise.
12941 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12943 (normal_mod_SOURCES): Removed normal/context.c.
12945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12946 commands/default.c, commands/timeout.c and normal/context.c.
12947 (normal_mod_SOURCES): Removed normal/context.c.
12949 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12950 commands/timeout.c and normal/context.c.
12951 (normal_mod_SOURCES): Removed normal/context.c.
12953 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12954 commands/default.c, commands/timeout.c and normal/context.c.
12955 (normal_mod_SOURCES): Removed normal/context.c.
12957 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12959 (default_mod_SOURCES): Removed.
12960 (default_mod_CFLAGS): Likewise.
12961 (default_mod_LDFLAGS): Likewise.
12962 (timeout_mod_SOURCES): Removed.
12963 (timeout_mod_CFLAGS): Likewise.
12964 (timeout_mod_LDFLAGS): Likewise.
12966 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12969 * commands/default.c: Removed.
12970 * commands/timeout.c: Likewise.
12971 * normal/context.c: Likewise.
12973 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12975 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12977 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12979 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12980 "next" to "prev" for readability.
12981 (struct grub_env_sorted_var): New struct.
12982 (grub_env_context): Renamed to ...
12983 (initial_context): ... this.
12984 (grub_env_var_context): Renamed to ...
12985 (current_context): ... this.
12986 (grub_env_find): Look only at CURRENT_CONTEXT.
12987 (grub_env_context_open): Rewritten to copy exported variables from
12989 (grub_env_context_close): Rewritten according to the new
12990 scheme. Also, add an assertion to prevent the initial context from
12992 (grub_env_insert): Removed the code for the sorted list.
12993 (grub_env_remove): Likewise.
12994 (grub_env_export): Simply mark the variable with
12995 GRUB_ENV_VAR_GLOBAL.
12996 (grub_env_set): A cosmetic change for naming consistency.
12997 (grub_env_get): Likewise.
12998 (grub_env_unset): Likewise.
12999 (grub_env_iterate): Rewritten to sort variables within this
13001 (grub_register_variable_hook): Fixed for naming consistency. Call
13002 grub_env_find again, only if NAME is not found at the first time.
13003 (mangle_data_slot_name): New function.
13004 (grub_env_set_data_slot): Likewise.
13005 (grub_env_get_data_slot): Likewise.
13006 (grub_env_unset_data_slot): Likewise.
13008 * include/grub/env.h (grub_env_var_type): New enum.
13009 (GRUB_ENV_VAR_LOCAL): New constant.
13010 (GRUB_ENV_VAR_GLOBAL): Likewise.
13011 (GRUB_ENV_VAR_DATA): Likewise.
13012 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13014 (grub_env_set): Replace VAR with NAME for consistency.
13015 (grub_register_variable_hook): Likewise.
13016 (grub_env_export): Specify the name of the argument.
13017 (grub_env_set_data_slot): New prototype.
13018 (grub_env_get_data_slot): Likewise.
13019 (grub_env_unset_data_slot): Likewise.
13021 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13023 Extend the loader so that GRUB can accept a loader which comes
13024 back to GRUB when a loaded image exits. Also, this change adds
13025 support for a chainloader on EFI.
13027 * term/efi/console.c: Include grub/misc.h.
13028 (grub_console_checkkey): Display a scan code on the top for
13029 debugging. This will be removed once the EFI port gets stable.
13030 Correct the scan code mapping.
13032 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13033 allocate memory from larger regions, in order to reduce the number
13034 of allocated regions. Otherwise, the MacOSX loader panics.
13035 (filter_memory_map): Avoid less than 1MB for compatibility with
13037 (add_memory_regions): Allocate from the tail of a region, if
13038 possible, to avoid allocating a region near to 1MB, for the MacOSX
13041 * kern/efi/init.c (grub_efi_set_prefix): Specify
13042 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13044 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13045 argument IMAGE_HANDLE and specify it to get a loaded image.
13046 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13047 grub_efi_get_loaded_image.
13048 (grub_efi_get_filename): Divide the length by the size of
13050 (grub_efi_get_device_path): New function.
13051 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13052 the length by the size of grub_efi_char16_t for a file path device
13055 * kern/loader.c (grub_loader_noreturn): New variable.
13056 (grub_loader_set): Accept a new argument NORETURN. Set
13057 GRUB_LOADER_NORETURN to NORETURN.
13058 All callers changed.
13059 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13062 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13064 (grub_efi_get_loaded_image): Take an argument to specify an image
13067 * include/grub/loader.h (grub_loader_set): Added one more argument
13070 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13071 instead of grub_efi_open_protocol.
13072 (grub_efidisk_get_device_name): Likewise.
13073 (grub_efidisk_close): Print a newline.
13074 (grub_efidisk_get_device_handle): Fixed to use
13075 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13076 GRUB_EFI_DEVICE_PATH_TYPE.
13078 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13079 * kern/efi/efi.c (device_path_guid): ... here.
13081 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13083 (kernel_mod_HEADERS): Added efi/disk.h.
13084 (_chain_mod_SOURCES): New variable.
13085 (_chain_mod_CFLAGS): Likewise.
13086 (_chain_mod_LDFLAGS): Likewise.
13087 (chain_mod_SOURCES): Likewise.
13088 (chain_mod_CFLAGS): Likewise.
13089 (chain_mod_LDFLAGS): Likewise.
13091 * DISTLIST: Added include/grub/efi/chainloader.h,
13092 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13094 * include/grub/efi/chainloader.h: New file.
13095 * loader/efi/chainloader.c: Likewise.
13096 * loader/efi/chainloader_normal.c: Likewise.
13098 2006-04-30 Marco Gerards <marco@gnu.org>
13100 * commands/configfile.c (grub_cmd_source): New function.
13101 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13102 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13104 2006-04-30 Marco Gerards <marco@gnu.org>
13106 * normal/execute.c (grub_script_execute_cmd): Change the return
13107 type to `grub_err_t'. Correctly return the error.
13108 (grub_script_execute_cmdline): In case a command line is not a
13109 command or a function, try to interpret it as an assignment.
13111 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13113 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13114 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13115 skip a node whose name is obviously invalid as UTF-16,
13116 i.e. contains a NUL character. Stop the iteration when the last
13117 directory entry is found. Instead of using the return value of
13118 grub_hfsplus_btree_iterate_node, store the value in RET and use
13119 it, because the iterator can be stopped by the last directory
13122 2006-04-30 Marco Gerards <marco@gnu.org>
13124 * include/grub/env.h (grub_env_export): New prototype. Reported
13125 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13127 2006-04-30 Marco Gerards <marco@gnu.org>
13129 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13130 size of the extents in a catalog file record.
13132 2006-04-29 Marco Gerards <marco@gnu.org>
13134 * commands/configfile.c (grub_cmd_configfile): Execute the
13135 configfile within its own context.
13137 * include/grub/env.h (grub_env_context_open): New prototype.
13138 (grub_env_context_close): Likewise.
13140 * kern/env.c (grub_env): Removed.
13141 (grub_env_sorted): Likewise.
13142 (grub_env_context): New variable.
13143 (grub_env_var_context): Likewise.
13144 (grub_env_find): Search both the active context and the global
13146 (grub_env_context_open): New function.
13147 (grub_env_context_close): Likewise.
13148 (grub_env_insert): Likewise.
13149 (grub_env_remove): Likewise.
13150 (grub_env_export): Likewise.
13151 (grub_env_set): Changed to use helper functions to avoid code
13153 (grub_env_iterate): Rewritten so both the current context and the
13154 global context are being used.
13156 * normal/command.c (export_command): New function.
13157 (grub_command_init): Register the `export' function.
13159 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13161 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13162 explicitly to suppress gcc's warnings.
13163 * fs/fat.c (grub_fat_find_dir): Likewise.
13164 (grub_fat_label): Likewise.
13165 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13166 (grub_xfs_mount): Likewise.
13167 (grub_xfs_label): Likewise.
13168 * fs/affs.c (grub_affs_mount): Likewise.
13169 (grub_affs_label): Likewise.
13170 (grub_affs_iterate_dir): Likewise.
13171 * fs/sfs.c (grub_sfs_mount): Likewise.
13172 (grub_sfs_iterate_dir): Likewise.
13173 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13174 * fs/hfs.c (grub_hfs_mount): Likewise.
13175 (grub_hfs_cmp_catkeys): Likewise.
13176 (grub_hfs_find_dir): Likewise.
13177 (grub_hfs_dir): Likewise.
13178 (grub_hfs_label): Likewise.
13179 * fs/jfs.c (grub_jfs_mount): Likewise.
13180 (grub_jfs_opendir): Likewise.
13181 (grub_jfs_getent): Likewise.
13182 (grub_jfs_lookup_symlink): Likewise.
13183 (grub_jfs_label): Likewise.
13184 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13185 (grub_hfsplus_iterate_dir): Likewise.
13186 (grub_hfsplus_btree_iterate_node): Made static.
13188 * util/grub-emu.c (prefix): New variable.
13189 (grub_machine_set_prefix): New function.
13190 (main): Do not set the environment variable "prefix" here. Only
13191 set PREFIX, which is used later by grub_machine_set_prefix.
13193 * include/grub/video.h: Do not include grub/symbol.h.
13194 (grub_video_register): Not exported. This symbol is not defined in
13196 (grub_video_unregister): Likewise.
13197 (grub_video_iterate): Likewise.
13198 (grub_video_setup): Likewise.
13199 (grub_video_restore): Likewise.
13200 (grub_video_get_info): Likewise.
13201 (grub_video_get_blit_format): Likewise.
13202 (grub_video_set_palette): Likewise.
13203 (grub_video_get_palette): Likewise.
13204 (grub_video_set_viewport): Likewise.
13205 (grub_video_get_viewport): Likewise.
13206 (grub_video_map_color): Likewise.
13207 (grub_video_map_rgb): Likewise.
13208 (grub_video_map_rgba): Likewise.
13209 (grub_video_fill_rect): Likewise.
13210 (grub_video_blit_glyph): Likewise.
13211 (grub_video_blit_bitmap): Likewise.
13212 (grub_video_blit_render_target): Likewise.
13213 (grub_video_scroll): Likewise.
13214 (grub_video_swap_buffers): Likewise.
13215 (grub_video_create_render_target): Likewise.
13216 (grub_video_delete_render_target): Likewise.
13217 (grub_video_set_active_render_target): Likewise.
13219 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13221 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13223 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13224 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13225 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13226 instead of $(srcdir)/genkernsyms.sh.
13228 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13229 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13230 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13231 instead of $(srcdir)/genkernsyms.sh.
13233 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13234 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13235 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13236 instead of $(srcdir)/genkernsyms.sh.
13238 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13239 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13240 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13241 instead of $(srcdir)/genkernsyms.sh.
13243 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13246 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13248 (gensymlist.sh): New target.
13249 (genkernsyms.sh): Likewise.
13251 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13252 genkernsyms.sh.in and gensymlist.sh.in.
13254 * genkernsyms.sh: Removed.
13255 * gensymlist.sh: Likewise.
13257 * genkernsyms.sh.in: New file.
13258 * gensymlist.sh.in: Likewise.
13260 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13262 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13263 clobber "prefix", since we may have already set it manually.
13265 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13267 * kern/misc.c (abort): New alias for grub_abort.
13269 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13271 A new machine-specific function "grub_machine_set_prefix" is
13272 defined. This is called after loading modules, so that a prefix
13273 initialization can use modules. Also, this change adds an
13274 intensive debugging feature for the memory manager via the
13275 configure option "--enable-mm-debug".
13277 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13280 * kern/sparc64/ieee1275/init.c (abort): Removed.
13281 (grub_stop): Likewise.
13282 (grub_exit): New function.
13283 (grub_set_prefix): Renamed to ...
13284 (grub_machine_set_prefix): ... this.
13285 (grub_machine_init): Do not call grub_set_prefix.
13287 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13288 (grub_machine_set_prefix): ... this.
13289 (grub_machine_init): Do not call grub_set_prefix.
13291 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13292 (grub_machine_init): Do not set the prefix here.
13294 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13296 * kern/efi/init.c: Include grub/mm.h.
13297 (grub_efi_set_prefix): New function.
13299 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13300 (grub_efi_get_filename): New function.
13301 (grub_print_device_path): Renamed to ...
13302 (grub_efi_print_device_path): ... this.
13304 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13305 [MM_DEBUG] (grub_realloc): Likewise.
13306 [MM_DEBUG] (grub_free): Likewise.
13307 [MM_DEBUG] (grub_memalign): Likewise.
13308 [MM_DEBUG] (grub_mm_debug): New variable.
13309 [MM_DEBUG] (grub_debug_malloc): New function.
13310 [MM_DEBUG] (grub_debug_free): New function.
13311 [MM_DEBUG] (grub_debug_realloc): New function.
13312 [MM_DEBUG] (grub_debug_memalign): New function.
13314 * kern/misc.c (grub_abort): Print a newline to distinguish
13317 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13318 grub_set_root_dev after loading modules. This is necessary when
13319 setting a prefix depends on modules.
13321 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13322 (grub_efi_print_device_path): ... this.
13323 (grub_efi_get_filename): New prototype.
13324 (grub_efi_set_prefix): Likewise.
13326 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13328 (grub_efidisk_get_device_handle): New prototype.
13329 (grub_efidisk_get_device_name): Likewise.
13331 * include/grub/mm.h: Include config.h.
13332 (MM_DEBUG): Removed.
13333 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13334 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13335 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13336 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13337 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13338 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13339 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13340 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13341 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13343 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13345 * disk/efi/efidisk.c: Include grub/partition.h.
13346 (iterate_child_devices): New function.
13347 (add_device): First, compare only last device path nodes, so that
13348 devices are sorted by the types.
13349 (grub_efidisk_get_device_handle): New function.
13350 (grub_efidisk_get_device_name): Likewise.
13352 * configure.ac (--enable-mm-debug): New option to enable the
13353 memory manager debugging feature. This makes the binary much
13354 bigger, so is disabled by default.
13356 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13358 Use grub_abort instead of grub_stop, and grub_exit must be
13359 define in each architecture now. Also, this change adds support
13362 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13363 (grub_getkey): New function.
13364 (grub_term_get_current): Likewise.
13366 * util/i386/pc/grub-setup.c: Include grub/term.h.
13367 (grub_getkey): New function.
13368 (grub_term_get_current): Likewise.
13370 * util/misc.c (grub_stop): Renamed to ...
13371 (grub_exit): ... this.
13373 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13374 (grub_exit): ... this.
13375 (grub_machine_init): Use grub_abort instead of abort.
13376 (grub_stop): Removed.
13378 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13381 * kern/i386/pc/startup.S (grub_exit): New function.
13382 (cold_reboot): New label.
13384 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13385 (grub_efi_init): Call grub_efidisk_init.
13386 (grub_efi_fini): Call grub_efidisk_fini.
13388 * kern/efi/efi.c: Include grub/mm.h.
13389 (grub_efi_console_control_guid): Renamed to ...
13390 (console_control_guid): ... this.
13391 (grub_efi_loaded_image_guid): Renamed to ...
13392 (loaded_image_guid): ... this.
13393 (grub_efi_locate_handle): New function.
13394 (grub_efi_open_protocol): Likewise.
13395 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13396 GRUB_EFI_CONSOLE_CONTROL_GUID.
13397 (grub_efi_exit): Removed.
13398 (grub_stop): Likewise.
13399 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13400 (grub_exit): New function.
13401 (grub_print_device_path): Likewise.
13403 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13404 (grub_enter_rescue_mode): Register "exit".
13406 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13407 (grub_abort): New function.
13409 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13411 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13413 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13415 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13416 (grub_print_device_path): New prototype.
13417 (grub_efi_locate_handle): Likewise.
13418 (grub_efi_open_protocol): Likewise.
13420 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13421 * disk/efi/efidisk.c: Likewise.
13423 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13425 * include/grub/efi/console_control.h
13426 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13428 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13429 last 8 bytes as an array.
13430 (GRUB_EFI_DISK_IO_GUID): New macro.
13431 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13432 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13433 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13435 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13436 (struct grub_efi_device_path): Rename the member "sub_type" to
13438 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13439 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13440 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13441 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13442 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13443 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13444 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13445 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13446 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13447 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13448 (struct grub_efi_pci_device_path): New structure.
13449 (grub_efi_pci_device_path_t): New type.
13450 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13451 (struct grub_efi_pccard_device_path): New structure.
13452 (grub_efi_pccard_device_path_t): New type.
13453 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13454 (struct grub_efi_memory_mapped_device_path): New structure.
13455 (grub_efi_memory_mapped_device_path_t): New type.
13456 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13457 (struct grub_efi_vendor_device_path): New structure.
13458 (grub_efi_vendor_device_path_t): New type.
13459 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13460 (struct grub_efi_controller_device_path): New structure.
13461 (grub_efi_controller_device_path_t): New type.
13462 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13463 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13464 (struct grub_efi_acpi_device_path): New structure.
13465 (grub_efi_acpi_device_path_t): New type.
13466 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13467 (struct grub_efi_expanded_acpi_device_path): New structure.
13468 (grub_efi_expanded_acpi_device_path_t): New type.
13469 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13470 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13471 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13472 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13473 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13474 (struct grub_efi_atapi_device_path): New structure.
13475 (grub_efi_atapi_device_path_t): New type.
13476 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13477 (struct grub_efi_fibre_channel_device_path): New structure.
13478 (grub_efi_fibre_channel_device_path_t): New type.
13479 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13480 (struct grub_efi_1394_device_path): New structure.
13481 (grub_efi_1394_device_path_t): New type.
13482 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13483 (struct grub_efi_usb_device_path): New structure.
13484 (grub_efi_usb_device_path_t): New type.
13485 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13486 (struct grub_efi_usb_class_device_path): New structure.
13487 (grub_efi_usb_class_device_path_t): New type.
13488 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13489 (struct grub_efi_i2o_device_path): New structure.
13490 (grub_efi_i2o_device_path_t): New type.
13491 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13492 (struct grub_efi_mac_address_device_path): New structure.
13493 (grub_efi_mac_address_device_path_t): New type.
13494 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13495 (struct grub_efi_ipv4_device_path): New structure.
13496 (grub_efi_ipv4_device_path_t): New type.
13497 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13498 (struct grub_efi_ipv6_device_path): New structure.
13499 (grub_efi_ipv6_device_path_t): New type.
13500 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13501 (struct grub_efi_infiniband_device_path): New structure.
13502 (grub_efi_infiniband_device_path_t): New type.
13503 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13504 (struct grub_efi_uart_device_path): New structure.
13505 (grub_efi_uart_device_path_t): New type.
13506 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13507 (struct grub_efi_vendor_messaging_device_path): New structure.
13508 (grub_efi_vendor_messaging_device_path_t): New type.
13509 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13510 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13511 (struct grub_efi_hard_drive_device_path): New structure.
13512 (grub_efi_hard_drive_device_path_t): New type.
13513 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13514 (struct grub_efi_cdrom_device_path): New structure.
13515 (grub_efi_cdrom_device_path_t): New type.
13516 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13517 (struct grub_efi_vendor_media_device_path): New structure.
13518 (grub_efi_vendor_media_device_path_t): New type.
13519 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13520 (struct grub_efi_file_path_device_path): New structure.
13521 (grub_efi_file_path_device_path_t): New type.
13522 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13523 (struct grub_efi_protocol_device_path): New structure.
13524 (grub_efi_protocol_device_path_t): New type.
13525 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13526 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13527 (struct grub_efi_bios_device_path): New structure.
13528 (grub_efi_bios_device_path_t): New type.
13529 (struct grub_efi_disk_io): New structure.
13530 (grub_efi_disk_io_t): New type.
13531 (struct grub_efi_block_io_media): New structure.
13532 (grub_efi_block_io_media_t): New type.
13533 (struct grub_efi_block_io): New structure.
13534 (grub_efi_block_io_t): New type.
13536 * include/grub/misc.h (grub_stop): Removed.
13537 (grub_exit): New prototype.
13538 (grub_abort): Likewise.
13540 * include/grub/disk.h (enum grub_disk_dev_id): Added
13541 GRUB_DISK_DEVICE_EFIDISK_ID.
13543 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13544 disk/efi/efidisk.c.
13545 (kernel_syms.lst): Remove the target if an error occurs.
13547 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13549 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13550 as it was simply too buggy.
13552 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13554 * kern/misc.c (grub_lltoa): New function.
13555 (grub_vsprintf): Added support for the long long suffix,
13558 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13560 * Makefile.in (LDFLAGS): Add variable.
13561 (LD): Remove variable.
13562 * configure.ac: Add -m32 to LDFLAGS.
13563 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13564 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13565 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13566 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13567 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13569 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13570 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13571 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13573 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13575 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13576 length for unknown glyph.
13578 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13580 Add support for pre-loaded modules into the EFI port.
13582 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13583 completely. Accept one more argument DIR. The caller has changed.
13585 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13587 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13588 (grub_efi_loaded_image_guid): New variable.
13589 (grub_efi_get_loaded_image): New function.
13590 (grub_arch_modules_addr): Likewise.
13592 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13595 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13596 (struct grub_efi_loaded_image): New structure.
13597 (grub_efi_loaded_image_t): New type.
13599 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13601 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13602 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13603 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13605 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13607 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13609 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13611 * DISTLIST: Added include/grub/efi/console.h,
13612 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13613 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13615 * include/grub/efi/console.h: New file.
13616 * include/grub/efi/time.h: Likewise.
13617 * include/grub/i386/efi/kernel.h: Likewise.
13618 * kern/efi/init.c: Likewise.
13619 * kern/efi/mm.c: Likewise.
13620 * term/efi/console.c: Likewise.
13622 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13623 (grub_stop): Removed.
13624 (grub_get_rtc): Likewise.
13625 (grub_machine_init): Simply call grub_efi_init.
13626 (grub_machine_fini): Call grub_efi_fini.
13628 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13629 (grub_efi_output_string): Removed.
13630 (grub_efi_stall): New function.
13631 (grub_stop): Likewise.
13632 (grub_get_rtc): Likewise.
13634 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13635 (grub_efi_stall): New prototype.
13636 (grub_efi_allocate_pages): Likewise.
13637 (grub_efi_free_pages): Likewise.
13638 (grub_efi_get_memory_map): Likewise.
13639 (grub_efi_mm_init): Likewise.
13640 (grub_efi_mm_fini): Likewise.
13641 (grub_efi_init): Likewise.
13642 (grub_efi_fini): Likewise.
13644 * include/grub/i386/efi/time.h: Do not include
13645 grub/symbol.h. Include grub/efi/time.h.
13646 (GRUB_TICKS_PER_SECOND): Removed.
13647 (grub_get_rtc): Likewise.
13649 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13650 Added padding. The EFI spec is buggy.
13651 (GRUB_EFI_BLACK): New macro.
13652 (GRUB_EFI_BLUE): Likewise.
13653 (GRUB_EFI_GREEN): Likewise.
13654 (GRUB_EFI_CYAN): Likewise.
13655 (GRUB_EFI_RED): Likewise.
13656 (GRUB_EFI_MAGENTA): Likewise.
13657 (GRUB_EFI_BROWN): Likewise.
13658 (GRUB_EFI_LIGHTGRAY): Likewise.
13659 (GRUB_EFI_BRIGHT): Likewise.
13660 (GRUB_EFI_DARKGRAY): Likewise.
13661 (GRUB_EFI_LIGHTBLUE): Likewise.
13662 (GRUB_EFI_LIGHTGREEN): Likewise.
13663 (GRUB_EFI_LIGHTCYAN): Likewise.
13664 (GRUB_EFI_LIGHTRED): Likewise.
13665 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13666 (GRUB_EFI_YELLOW): Likewise.
13667 (GRUB_EFI_WHITE): Likewise.
13668 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13669 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13670 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13671 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13672 (GRUB_EFI_BACKGROUND_RED): Likewise.
13673 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13674 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13675 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13676 (GRUB_EFI_TEXT_ATTR): Likewise.
13678 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13679 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13680 (kernel_mod_HEADERS): Added efi/time.h.
13682 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13684 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13685 include/grub/efi/api.h, include/grub/efi/console_control.h,
13686 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13687 include/grub/i386/efi/time.h, kern/efi/efi.c,
13688 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13689 and util/i386/efi/grub-mkimage.c.
13691 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13693 * genmk.rb (PModule#rule): Do not export symbols if
13694 #{prefix}_EXPORTS is set to "no".
13696 * conf/i386-efi.mk: New file.
13697 * conf/i386-efi.rmk: Likewise.
13698 * include/grub/efi/api.h: Likewise.
13699 * include/grub/efi/console_control.h: Likewise.
13700 * include/grub/efi/efi.h: Likewise.
13701 * include/grub/efi/pe32.h: Likewise.
13702 * include/grub/i386/efi/time.h: Likewise.
13703 * kern/efi/efi.c: Likewise.
13704 * kern/i386/efi/init.c: Likewise.
13705 * kern/i386/efi/startup.S: Likewise.
13706 * util/i386/efi/grub-mkimage.c: Likewise.
13708 2006-04-17 Marco Gerards <marco@gnu.org>
13710 * include/grub/script.h: Include <grub/parser.h> and
13711 "grub_script.tab.h".
13712 (struct grub_lexer_param): New struct.
13713 (struct grub_parser_param): Likewise.
13714 (grub_script_create_arglist): Pass the state in an argument.
13715 (grub_script_add_arglist): Likewise.
13716 (grub_script_create_cmdline): Likewise.
13717 (grub_script_create_cmdblock): Likewise.
13718 (grub_script_create_cmdif): Likewise.
13719 (grub_script_create_cmdmenu): Likewise.
13720 (grub_script_add_cmd): Likewise.
13721 (grub_script_arg_add): Likewise.
13722 (grub_script_lexer_ref): Likewise.
13723 (grub_script_lexer_deref): Likewise.
13724 (grub_script_lexer_record_start): Likewise.
13725 (grub_script_lexer_record_stop): Likewise.
13726 (grub_script_mem_record): Likewise.
13727 (grub_script_mem_record_stop): Likewise.
13728 (grub_script_malloc): Likewise.
13729 (grub_script_yylex): Likewise.
13730 (grub_script_yyparse): Likewise.
13731 (grub_script_yyerror): Likewise.
13732 (grub_script_yylex): Likewise.
13733 (grub_script_lexer_init): Return the state.
13735 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13736 (grub_script_lexer_done): Likewise.
13737 (grub_script_lexer_getline): Likewise.
13738 (grub_script_lexer_refs): Likewise.
13739 (script): Likewise.
13740 (newscript): Likewise.
13741 (record): Likewise.
13742 (recording): Likewise.
13743 (recordpos): Likewise.
13744 (recordlen): Likewise.
13745 (grub_script_lexer_init): Return the state instead of setting
13747 (grub_script_lexer_ref): Use the newly added argument for state
13748 instead of globals.
13749 (grub_script_lexer_deref): Likewise.
13750 (grub_script_lexer_record_start): Likewise.
13751 (grub_script_lexer_record_stop): Likewise.
13752 (recordchar): Likewise.
13753 (nextchar): Likewise.
13754 (grub_script_yylex2): Likewise.
13755 (grub_script_yylex): Likewise.
13756 (grub_script_yyerror): Likewise.
13758 * normal/parser.y (func_mem): Removed variable.
13759 (menu_entry): Likewise.
13761 (%lex-param): New parser option.
13762 (%parse-param): Likewise.
13763 (script): Always return the AST.
13764 (argument): Pass the state around.
13765 (arguments): Likewise.
13766 (grubcmd): Likewise.
13767 (commands): Likewise.
13768 (function): Likewise.
13769 (menuentry): Likewise.
13770 (if_statement): Likewise.
13773 * normal/script.c (grub_script_memused): Removed variable.
13774 (grub_script_parsed): Likewise.
13775 (grub_script_malloc): Added a state argument. Use that instead of
13777 (grub_script_mem_record): Likewise.
13778 (grub_script_mem_record_stop): Likewise.
13779 (grub_script_arg_add): Likewise.
13780 (grub_script_add_arglist): Likewise.
13781 (grub_script_create_cmdline): Likewise.
13782 (grub_script_create_cmdif): Likewise.
13783 (grub_script_create_cmdmenu): Likewise.
13784 (grub_script_add_cmd): Likewise.
13785 (grub_script_parse): Setup the state before calling the parser.
13787 2006-04-16 Marco Gerards <marco@gnu.org>
13789 * normal/command.c (grub_command_init): Remove the title command.
13791 * normal/lexer.c (grub_script_yylex): Renamed from this...
13792 (grub_script_yylex2): ... to this.
13793 (grub_script_yylex): New function. Temporary
13794 introduced to filter some tokens.
13795 (grub_script_yyerror): Print a newline.
13797 * normal/main.c (read_config_file): Output information about the
13798 lines that contain errors. Wait for a key after all lines have
13799 been processed. Don't return an empty menu.
13801 * normal/parser.y (func_mem): Don't initialize.
13802 (menu_entry): Likewise.
13803 (err): New variable.
13804 (script): Don't return anything when an error was encountered.
13805 (ws, returns): Removed rules.
13806 (argument): Disabled concatenated variable support.
13807 (arguments): Remove explicit separators.
13808 (grubcmd): Likewise.
13809 (function): Likewise.
13810 (menuentry): Likewise.
13812 (commands): Likewise. Add error handling.
13814 * normal/script.c (grub_script_create_cmdline): If
13815 `grub_script_parsed' is 0, assume the parser encountered an error.
13817 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13819 * configure.ac: Add support for EFI. Fix the typo
13820 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13822 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13824 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13825 foreign multibyte characters should be shown correctly.
13827 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13829 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13831 (read_config_file): Made it to close file before returning.
13833 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13835 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13836 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13837 video/i386/pc/vbefill.c.
13839 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13840 video/i386/pc/vbefill.c.
13842 * include/grub/video.h (grub_video_blit_format): New enum.
13843 (grub_video_mode_info): Added new member blit_format.
13844 (grub_video_get_blit_format): New function prototype.
13846 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13847 function prototype.
13848 (grub_video_vbe_map_rgb): Likewise.
13849 (grub_video_vbe_unmap_color): Likewise.
13851 * include/grub/i386/pc/vbeblit.h: New file.
13853 * include/grub/i386/pc/vbefill.h: New file.
13855 * video/video.c (grub_video_get_blit_format): New function.
13856 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13857 (grub_video_vbe_map_rgb): Likewise.
13858 (grub_video_vbe_unmap_color): Likewise.
13860 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13862 (grub_video_vbe_blit_render_target): Changed to use more optimized
13864 (grub_video_vbe_setup): Added detection for optimized settings.
13865 (grub_video_vbe_create_render_target): Likewise.
13867 * video/i386/pc/vbeblit.c: New file.
13869 * video/i386/pc/vbefill.c: New file.
13871 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13873 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13876 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13877 parsing to support both hex and dec ranges. If filename was missing
13878 show usage information.
13880 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13882 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13883 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13885 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13886 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13887 (video_mod_SOURCES): Added.
13888 (video_mod_CFLAGS): Likewise.
13889 (video_mod_LDFLAGS): Likewise.
13890 (gfxterm_mod_SOURCES): Likewise.
13891 (gfxterm_mod_CFLAGS): Likewise.
13892 (gfxterm_mod_LDFLAGS): Likewise.
13893 (videotest_mod_SOURCES): Likewise.
13894 (videotest_mod_CFLAGS): Likewise.
13895 (videotest_mod_LDFLAGS): Likewise.
13896 (vesafb_mod_SOURCES): Removed.
13897 (vesafb_mod_CFLAGS): Likewise.
13898 (vesafb_mod_LDFLAGS): Likewise.
13899 (vga_mod_SOURCES): Likewise.
13900 (vga_mod_CFLAGS): Likewise.
13901 (vga_mod_LDFLAGS): Likewise.
13903 * commands/videotest.c: New file.
13905 * font/manager.c (fill_with_default_glyph): Modified to use
13907 (grub_font_get_glyph): Likewise.
13908 (fontmanager): Renamed from this...
13909 (font_manager): ... to this.
13911 * include/grub/font.h (grub_font_glyph): Added new structure.
13912 (grub_font_get_glyph): Modified to use grub_font_glyph.
13914 * include/grub/misc.h (grub_abs): Added as inline function.
13916 * include/grub/video.h: New file.
13918 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13919 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13920 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13921 (grub_vbe_get_controller_info): Renamed from this...
13922 (grub_vbe_bios_get_controller_info): ... to this.
13923 (grub_vbe_get_mode_info): Renamed from this...
13924 (grub_vbe_bios_get_mode_info): ... to this.
13925 (grub_vbe_set_mode): Renamed from this...
13926 (grub_vbe_bios_set_mode): ... to this.
13927 (grub_vbe_get_mode): Renamed from this...
13928 (grub_vbe_bios_get_mode): ... to this.
13929 (grub_vbe_set_memory_window): Renamed from this...
13930 (grub_vbe_bios_set_memory_window): ... to this.
13931 (grub_vbe_get_memory_window): Renamed from this...
13932 (grub_vbe_bios_get_memory_window): ... to this.
13933 (grub_vbe_set_scanline_length): Renamed from this...
13934 (grub_vbe_set_scanline_length): ... to this.
13935 (grub_vbe_get_scanline_length): Renamed from this...
13936 (grub_vbe_bios_get_scanline_length): ... to this.
13937 (grub_vbe_set_display_start): Renamed from this...
13938 (grub_vbe_bios_set_display_start): ... to this.
13939 (grub_vbe_get_display_start): Renamed from this...
13940 (grub_vbe_bios_get_display_start): ... to this.
13941 (grub_vbe_set_palette_data): Renamed from this...
13942 (grub_vbe_bios_set_palette_data): ... to this.
13943 (grub_vbe_set_pixel_rgb): Removed.
13944 (grub_vbe_set_pixel_index): Likewise.
13946 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13948 (grub_vbe_bios_get_controller_info): ... to this.
13949 (grub_vbe_get_mode_info): Renamed from this...
13950 (grub_vbe_bios_get_mode_info): ... to this.
13951 (grub_vbe_set_mode): Renamed from this...
13952 (grub_vbe_bios_set_mode): ... to this.
13953 (grub_vbe_get_mode): Renamed from this...
13954 (grub_vbe_bios_get_mode): ... to this.
13955 (grub_vbe_set_memory_window): Renamed from this...
13956 (grub_vbe_bios_set_memory_window): ... to this.
13957 (grub_vbe_get_memory_window): Renamed from this...
13958 (grub_vbe_bios_get_memory_window): ... to this.
13959 (grub_vbe_set_scanline_length): Renamed from this...
13960 (grub_vbe_set_scanline_length): ... to this.
13961 (grub_vbe_get_scanline_length): Renamed from this...
13962 (grub_vbe_bios_get_scanline_length): ... to this.
13963 (grub_vbe_set_display_start): Renamed from this...
13964 (grub_vbe_bios_set_display_start): ... to this.
13965 (grub_vbe_get_display_start): Renamed from this...
13966 (grub_vbe_bios_get_display_start): ... to this.
13967 (grub_vbe_set_palette_data): Renamed from this...
13968 (grub_vbe_bios_set_palette_data): ... to this.
13969 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13970 getting corrupted after calling it. Added more pushes and pops.
13971 (grub_vbe_bios_set_mode): Likewise.
13972 (grub_vbe_bios_get_mode): Likewise.
13973 (grub_vbe_bios_get_memory_window): Likewise.
13974 (grub_vbe_bios_set_scanline_length): Likewise.
13975 (grub_vbe_bios_get_scanline_length): Likewise.
13976 (grub_vbe_bios_get_display_start): Likewise.
13977 (grub_vbe_bios_set_palette_data): Likewise.
13979 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13980 (cl_insert): Likewise.
13981 (cl_delete): Likewise.
13983 * term/gfxterm.c: New file.
13985 * term/i386/pc/vesafb.c: Removed file.
13987 * video/video.c: New file.
13989 * video/i386/pc/vbe.c (real2pm): Added new function.
13990 (grub_video_vbe_draw_pixel): Likewise.
13991 (grub_video_vbe_get_video_ptr): Likewise.
13992 (grub_video_vbe_get_pixel): Likewise
13993 (grub_video_vbe_init): Likewise.
13994 (grub_video_vbe_fini): Likewise.
13995 (grub_video_vbe_setup): Likewise.
13996 (grub_video_vbe_get_info): Likewise.
13997 (grub_video_vbe_set_palette): Likewise.
13998 (grub_video_vbe_get_palette): Likewise.
13999 (grub_video_vbe_set_viewport): Likewise.
14000 (grub_video_vbe_get_viewport): Likewise.
14001 (grub_video_vbe_map_color): Likewise.
14002 (grub_video_vbe_map_rgb): Likewise.
14003 (grub_video_vbe_map_rgba): Likewise.
14004 (grub_video_vbe_unmap_color): Likewise.
14005 (grub_video_vbe_fill_rect): Likewise.
14006 (grub_video_vbe_blit_glyph): Likewise.
14007 (grub_video_vbe_blit_bitmap): Likewise.
14008 (grub_video_vbe_blit_render_target): Likewise.
14009 (grub_video_vbe_scroll): Likewise.
14010 (grub_video_vbe_swap_buffers): Likewise.
14011 (grub_video_vbe_create_render_target): Likewise.
14012 (grub_video_vbe_delete_render_target): Likewise.
14013 (grub_video_vbe_set_active_render_target): Likewise.
14014 (grub_vbe_set_pixel_rgb): Remove function.
14015 (grub_vbe_set_pixel_index): Likewise.
14016 (index_color_mode): Remove static variable.
14017 (active_mode): Likewise.
14018 (framebuffer): Likewise.
14019 (bytes_per_scan_line): Likewise.
14020 (grub_video_vbe_adapter): Added new static variable.
14021 (framebuffer): Likewise.
14022 (render_target): Likewise.
14023 (initial_mode): Likewise.
14024 (mode_in_use): Likewise.
14025 (mode_list): Likewise.
14027 2006-03-10 Marco Gerards <marco@gnu.org>
14029 * configure.ac (AC_INIT): Bumped to 1.93.
14031 * DISTLIST: Added `include/grub/hfs.h'.
14033 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14035 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14036 18H, which might help the BIOS falling back to next boot media.
14038 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14040 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14041 Poe Chen <poe.poechen@gmail.com>.
14043 2006-01-17 Marco Gerards <marco@gnu.org>
14045 * include/grub/normal.h: Include <grub/script.h>.
14046 (grub_command_list): Removed struct.
14047 (grub_command_list_t): Removed type.
14048 (grub_menu_entry): Remove members `num' and `command_list'. Add
14049 members `commands' and `sourcecode'.
14050 * include/grub/script.h: Add inclusion guards.
14051 (grub_script_cmd_menuentry): New struct.
14052 (grub_script_execute_menuentry): New prototype.
14053 (grub_script_lexer_record_start): Likewise.
14054 (grub_script_lexer_record_stop): Likewise.
14055 * normal/execute.c (grub_script_execute_menuentry): New function.
14056 * normal/lexer.c (record, recording, recordpos, recordlen): New
14058 (grub_script_lexer_record_start): New function.
14059 (grub_script_lexer_record_stop): Likewise.
14060 (recordchar): Likewise.
14061 (nextchar): Likewise.
14062 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14063 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14064 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14065 (current_menu): New variable.
14066 (free_menu): Mainly rewritten.
14067 (grub_normal_menu_addentry): New function.
14068 (read_config_file): Rewritten.
14069 * normal/menu.c (run_menu_entry): Mainly rewritten.
14070 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14072 (run): Mainly rewritten.
14073 * normal/parser.y (menu_entry): New variable.
14074 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14075 (menuentry): New rule.
14076 (command): Add `menuentry'.
14077 (if_statement): Allow additional returns before `fi'.
14078 * normal/script.c (grub_script_create_cmdmenu): New function.
14080 2006-01-03 Marco Gerards <marco@gnu.org>
14082 * INSTALL: GNU Bison is required.
14083 * configure.ac: Rewritten the test to detect Bison.
14084 * Makefile.in (YACC): New variable. Reported by Xun Sun
14085 <xun.sun.cn@gmail.com>.
14087 2006-01-03 Marco Gerards <marco@gnu.org>
14089 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14090 the HFS+ filesystem to filesystem blocks.
14091 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14092 GCC warning is silenced.
14094 2006-01-03 Marco Gerards <marco@gnu.org>
14096 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14097 read from disk from big endian to host byte order.
14099 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14101 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14103 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14104 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14105 embedded HFS+ filesystem.
14106 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14107 (grub_hfs_sblock): Move from here...
14108 * include/grub/hfs.h: To here... New file.
14109 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14111 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14113 (grub_hfsplus_volheader): Change type of member `magic' to
14115 (grub_hfsplus_data): Add new member `embedded_offset'.
14116 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14118 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14119 Calculate the offset.
14121 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14123 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14125 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14127 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14129 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14130 ENV->NAME is NULL after allocating ENV->VALUE.
14132 2005-12-25 Marco Gerards <marco@gnu.org>
14134 * kern/env.c (grub_env_set): Rewritten the error handling code.
14136 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14138 * geninit.sh: Made more robust, and more portable.
14140 2005-12-25 Marco Gerards <marco@gnu.org>
14142 Add support for Apple HFS+ filesystems.
14144 * fs/hfsplus.c: New file.
14146 * DISTLIST: Added `fs/hfsplus.c'.
14148 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14149 (hfsplus_mod_SOURCES): New variable.
14150 (hfsplus_mod_CFLAGS): Likewise.
14151 (hfsplus_mod_LDFLAGS): Likewise.
14152 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14153 (grub_setup_SOURCES): Likewise.
14154 (grub_mkdevicemap_SOURCES): Likewise.
14155 (grub_emu_SOURCES): Likewise.
14156 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14158 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14160 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14162 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14164 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14165 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14166 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14167 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14168 normal/lexer.c, normal/parser.y, normal/script.c, and
14170 Removed kern/sparc64/cache.c.
14172 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14173 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14176 * configure.ac (AC_INIT): Bumped to 1.92.
14178 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14180 * kern/err.c (grub_error_push): Added new function to support error
14182 (grub_error_pop): Likewise.
14183 (grub_error_stack_items): New local variable to support error stacks.
14184 (grub_error_stack_pos): Likewise.
14185 (grub_error_stack_assert): Likewise.
14186 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14188 (grub_print_error): Added support to print errors from error stack.
14190 * include/grub/err.h (grub_error_push): Added function prototype.
14191 (grub_error_pop): Likewise.
14193 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14195 * configure.ac: Accept `powerpc64' as host_cpu.
14196 (amd64): Rename to `biarch32'.
14198 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14199 non-cacheline-aligned addresses.
14201 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14202 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14203 if `size' is non-zero.
14205 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14207 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14208 and `cd' to make sure the filename is not prefixed with a
14210 (pkgdata_MODULES): Add `gpt.mod'.
14211 (gpt_mod_SOURCES): New variable.
14212 (gpt_mod_CFLAGS): Likewise.
14213 (gpt_mod_LDFLAGS): Likewise.
14215 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14217 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14220 * partmap/gpt.c: New file.
14222 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14223 GPT partition map is detected.
14225 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14227 * commands/i386/pc/play.c: New file.
14228 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14229 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14232 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14234 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14235 ((unused))' to silence gcc warning.
14237 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14239 * configure.ac: Correct `AC_PROG_YACC' test.
14241 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14243 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14244 check before installing files.
14246 2005-11-22 Mike Small <smallm@panix.com>
14248 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14249 number regex so multidigit numbers are recognized correctly.
14251 2005-11-22 Mike Small <smallm@panix.com>
14253 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14254 debugging message before attempting to claim memory.
14255 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14256 multiple addresses in case of failure.
14258 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14260 * term/tparm.c (get_space): Remove empty `if' statement.
14262 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14264 * kern/parser.c (check_varstate): Rename `state' to 's'.
14266 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14268 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14269 variable definitions to the beginning of each function. Sort stack
14271 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14272 `buf' argument to `char *'.
14274 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14276 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14277 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14278 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14279 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14280 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14281 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14282 configfile.mod, search.mod, gzio.mod and test.mod.
14283 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14284 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14285 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14286 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14287 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14288 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14289 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14290 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14291 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14292 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14293 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14294 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14295 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14296 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14297 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14298 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14299 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14300 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14301 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14302 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14303 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14304 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14305 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14307 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14309 (pkgdata_MODULES): Add test.mod.
14311 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14313 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14314 appending to variables with "+=".
14315 (PModule): Use full pathname to generate *.lst filenames.
14317 * Makefile.in: Fixed list rules moved from genmk.rb.
14318 (.DELETE_ON_ERROR): New special target.
14319 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14321 * conf/i386-pc.rmk: Include conf/common.mk.
14322 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14323 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14324 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14325 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14326 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14327 configfile.mod, search.mod, gzio.mod and test.mod.
14328 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14329 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14330 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14331 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14332 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14333 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14334 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14335 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14336 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14337 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14338 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14339 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14340 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14341 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14342 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14343 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14344 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14345 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14346 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14347 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14348 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14349 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14350 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14352 * conf/common.rmk: ... to here. New file.
14354 * conf/common.mk: New file.
14356 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14358 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14359 (grub_script.tab.c): ... here.
14361 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14362 (grub_script.tab.c): ... here.
14364 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14365 (grub_script.tab.c): ... here.
14367 * normal/command.c (grub_command_find): Fixed a memory leak of
14368 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14370 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14372 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14373 "@" which marks the start of a comment on ARM.
14374 (VARIABLE): Likewise.
14376 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14378 Add support for Linux/ADFS partition tables.
14380 * partmap/acorn.c: New file.
14382 * include/grub/acorn_filecore.h: Likewise.
14384 * DISTLIST: Added `partmap/acorn.c' and
14385 `include/grub/acorn_filecore.h'.
14387 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14389 (pkgdata_MODULES): Add `acorn.mod'.
14390 (acorn_mod_SOURCES): New variable.
14391 (acorn_mod_CFLAGS): Likewise.
14393 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14395 (pkgdata_MODULES): Add `acorn.mod'.
14396 (acorn_mod_SOURCES): New variable.
14397 (acorn_mod_CFLAGS): Likewise.
14399 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14400 (pkgdata_MODULES): Add `acorn.mod'.
14401 (acorn_mod_SOURCES): New variable.
14402 (acorn_mod_CFLAGS): Likewise.
14403 (acorn_mod_LDFLAGS): Likewise.
14405 * include/types.h (grub_disk_addr_t): New typedef.
14407 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14409 * geninit.sh: New file.
14411 * geninitheader.sh: Likewise.
14413 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14414 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14415 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14416 * commands/configfile.c (grub_configfile_init)
14417 (grub_configfile_fini): Likewise.
14418 * commands/default.c (grub_default_init, grub_default_fini):
14420 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14421 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14422 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14423 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14425 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14426 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14428 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14429 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14431 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14433 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14435 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14436 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14437 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14438 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14439 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14440 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14441 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14442 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14443 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14444 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14445 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14446 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14447 * partmap/amiga.c (grub_amiga_partition_map_init)
14448 (grub_amiga_partition_map_fini): Likewise.
14449 * partmap/apple.c (grub_apple_partition_map_init)
14450 (grub_apple_partition_map_fini): Likewise.
14451 * partmap/pc.c (grub_pc_partition_map_init)
14452 (grub_pc_partition_map_fini): Likewise.
14453 * partmap/sun.c (grub_sun_partition_map_init,
14454 grub_sun_partition_map_fini): Likewise.
14455 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14458 * util/grub-emu.c: Include <grub_modules_init.h>.
14459 (main): Don't initialize and de-initialize any modules directly,
14460 use `grub_init_all' and `grub_fini_all' instead.
14462 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14463 `grub_vesafb_mod_init'.
14464 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14466 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14467 `grub_vga_mod_init'. Updated all users.
14468 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14470 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14471 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14474 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14475 Generate a function to initialize the module in utilities.
14476 Updated all callers.
14477 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14478 initialize the module in utilities. Updated all callers.
14480 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14482 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14483 escape sequence and a literal ^L to clear the screen.
14485 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14486 when returning from Open Firmware.
14488 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14490 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14491 (grub_ofconsole_height): Likewise.
14492 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14493 manually insert a '\n'.
14494 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14495 `grub_ofconsole_height'. Return early if these are already set.
14497 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14499 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14500 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14501 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14502 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14503 and `normal/script.c'.
14504 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14505 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14506 (test_mod_SOURCES): New variable.
14507 (test_mod_CFLAGS): Likewise.
14508 (test_mod_LDFLAGS): Likewise.
14509 (pkgdata_MODULES): Add `test.mod'.
14510 (grub_script.tab.c): New rule.
14511 (grub_script.tab.h): Likewise.
14513 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14516 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14517 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14518 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14519 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14520 (test_mod_SOURCES): New variable.
14521 (test_mod_CFLAGS): Likewise.
14522 (pkgdata_MODULES): Add `test.mod'.
14523 (grub_script.tab.c): New rule.
14524 (grub_script.tab.h): Likewise.
14526 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14528 Add initial scripting support.
14530 * commands/test.c: New file.
14531 * include/grub/script.h: Likewise.
14532 * normal/execute.c: Likewise.
14533 * normal/function.c: Likewise.
14534 * normal/lexer.c: Likewise.
14535 * normal/parser.y: Likewise.
14536 * normal/script.c: Likewise.
14538 * configure.ac: Add `AC_PROG_YACC' test.
14540 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14541 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14542 `normal/function.c' and `normal/script.c'.
14543 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14544 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14545 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14547 (pkgdata_MODULES): Add `test.mod'.
14548 (grub_script.tab.c): New rule.
14549 (grub_script.tab.h): Likewise.
14551 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14553 * include/grub/normal.h (grub_test_init): New prototype.
14554 (grub_test_fini): Likewise.
14556 * normal/command.c: Include <grub/script.h>.
14557 (grub_command_execute): Rewritten.
14559 * util/grub-emu.c (main): Call `grub_test_init' and
14562 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14564 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14566 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14567 there are no pending characters.
14569 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14571 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14572 `grub_strndup' to drop device arguments. Replace unnecessary
14573 `grub_strndup' with `grub_strdup'.
14575 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14577 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14578 `debug' environment variable has been set.
14580 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14582 * Makefile.in (install-local): Use $(DATA).
14583 (uninstall): Likewise.
14584 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14585 (sbin_UTILITIES): ... to here.
14586 (sbin_SCRIPTS): New variable.
14587 (grub_install_SOURCES): New variable.
14588 * util/powerpc/ieee1275/grub-install.in: New file.
14589 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14591 (add_segments): Call `grub_util_get_path'.
14593 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14595 From Timothy Baldwin:
14596 * commands/ls.c (grub_ls_list_files): Close FILE with
14598 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14600 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14602 * include/grub/parser.h: New file.
14604 * kern/parser.c: Likewise.
14606 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14607 (grub_setup_SOURCES): Likewise.
14608 (grub_probefs_SOURCES): Likewise.
14609 (grub_emu_SOURCES): Likewise.
14610 (kernel_img_HEADERS): Add `parser.h'.
14612 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14613 (grub_emu_SOURCES): Add `kern/parser.c'.
14614 (grubof_SOURCES): Likewise.
14616 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14617 (grubof_SOURCES): Add `kern/parser.c'.
14619 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14621 * kern/misc.c (grub_split_cmdline): Removed function.
14623 * kern/rescue.c: Include <grub/parser.h>.
14624 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14625 of `grub_split_cmdline'.
14627 * normal/command.c: Include <grub/parser.h>.
14628 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14629 of `grub_split_cmdline'.
14631 * normal/completion.c: Include <grub/parser.h>.
14632 (cmdline_state): New variable.
14633 (iterate_dir): End the filename with a quote depending on the
14634 command line state.
14635 (get_state): new function.
14636 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14637 split the arguments and determine the current argument. When the
14638 argument string is not quoted, escape all spaces.
14640 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14642 * normal/sparc64/setjmp.S: New file.
14644 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14646 * include/grub/sparc64/libgcc.h: New file.
14647 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14648 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14649 normal/sparc64/setjmp.c.
14651 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14653 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14654 * kern/sparc64/cache.S: New file.
14655 * kern/sparc64/cache.c: Removed.
14656 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14657 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14659 (COMMON_LDFLAGS): Add -melf64_sparc.
14660 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14661 (grubof_SOURCES): Use cache.S instead of cache.c.
14662 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14663 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14664 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14666 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14667 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14668 (linux_mod_CFLAGS): Commented out.
14669 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14670 out because module isn't built.
14671 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14672 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14673 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14674 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14675 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14676 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14677 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14678 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14679 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14680 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14681 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14682 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14683 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14684 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14686 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14688 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14689 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14690 longer, because HFS should not be used on PC.
14692 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14694 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14695 consistently within the loop.
14697 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14699 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14700 directory can not be read.
14702 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14704 * configure.ac (AC_INIT): Increase the version number to 1.91.
14706 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14707 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14708 term/i386/pc/serial.c.
14710 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14712 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14713 file size must be permitted.
14715 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14716 between %ah and %al.
14718 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14720 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14722 Call the hook with a NUL-terminated filename.
14723 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14726 * kern/term.c (cursor_state): New variable.
14727 (grub_term_set_current): Reset the cursor state on a new
14729 (grub_setcursor): Rewritten to use CURSOR_STATE.
14730 (grub_getcursor): New function.
14732 * include/grub/term.h (grub_getcursor): New prototype.
14734 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14735 integers on ARM. Reported by Timothy Baldwin
14736 <T.E.Baldwin99@members.leeds.ac.uk>.
14738 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14740 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14742 (grub_sfs_dir): Likewise.
14744 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14746 Add support for the SFS filesystem.
14748 * fs/sfs.c: New file.
14750 * DISTLIST: Added `fs/sfs.c'.
14752 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14753 (grub_probefs_SOURCES): Likewise.
14754 (grub_emu_SOURCES): Likewise.
14755 (pkgdata_MODULES): Add `sfs.mod'.
14756 (sfs_mod_SOURCES): New variable.
14757 (sfs_mod_CFLAGS): Likewise.
14758 (sfs_mod_LDFLAGS): Likewise.
14760 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14761 (pkgdata_MODULES): Add `sfs.mod'.
14762 (sfs_mod_SOURCES): New variable.
14763 (sfs_mod_CFLAGS): Likewise.
14765 * util/grub-emu.c (main): Call `grub_sfs_init' and
14768 * include/grub/fs.h (grub_sfs_init): New prototype.
14769 (grub_sfs_fini): Likewise.
14771 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14773 Add support for the AFFS filesystem.
14775 * fs/affs.c: New file.
14777 * DISTLIST: Added `fs/affs.c'.
14779 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14780 (grub_probefs_SOURCES): Likewise.
14781 (grub_emu_SOURCES): Likewise.
14782 (pkgdata_MODULES): Add `affs.mod'.
14783 (affs_mod_SOURCES): New variable.
14784 (affs_mod_CFLAGS): Likewise.
14785 (affs_mod_LDFLAGS): Likewise.
14787 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14788 (pkgdata_MODULES): Add `affs.mod'.
14789 (affs_mod_SOURCES): New variable.
14790 (affs_mod_CFLAGS): Likewise.
14792 * util/grub-emu.c (main): Call `grub_affs_init' and
14795 * include/grub/fs.h (grub_affs_init): New prototype.
14796 (grub_affs_fini): Likewise.
14798 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14800 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14802 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14804 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14807 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14810 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14811 (COMMON_LDFLAGS): New variable.
14812 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14813 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14814 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14815 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14816 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14817 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14818 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14819 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14820 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14821 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14822 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14823 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14824 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14825 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14826 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14828 (normal_mod_ASFLAGS): Add `-m32'.
14830 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14831 (grub_host_size_t, grub_host_ssize_t): New types.
14832 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14833 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14834 `GRUB_HOST_SIZEOF_VOID_P'.
14836 * include/grub/kernel.h (struct grub_module_header): Type of
14837 member offset changed to `grub_host_off_t'. Type of member size
14838 changed to `grub_host_size_t'.
14839 (struct grub_module_info): Type of member offset changed to
14840 `grub_host_off_t'. Type of member size changed to
14841 `grub_host_size_t'.
14843 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14845 Make GRUB's kernel compliant to Multiboot Specification.
14847 * kern/i386/pc/startup.S (multiboot_header): New label.
14848 (multiboot_entry): Likewise.
14849 (multiboot_trampoline): Likewise.
14851 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14852 Increased to 0x4A0.
14854 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14855 put parentheses after a question mark.
14856 [!GRUB_UTIL] (my_mod): New variable.
14858 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14860 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14862 Adds support for the XFS filesystem. Btrees are not supported
14865 * fs/xfs.c: New file.
14867 * DISTLIST: Added `fs/xfs.c'.
14869 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14870 (grub_probefs_SOURCES): Likewise.
14871 (grub_emu_SOURCES): Likewise.
14872 (pkgdata_MODULES): Add `xfs.mod'.
14873 (xfs_mod_SOURCES): New variable.
14874 (xfs_mod_CFLAGS): Likewise.
14876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14877 (pkgdata_MODULES): Add `xfs.mod'.
14878 (xfs_mod_SOURCES): New variable.
14879 (xfs_mod_CFLAGS): Likewise.
14881 * util/grub-emu.c (main): Call `grub_xfs_init' and
14884 * include/grub/fs.h (grub_xfs_init): New prototype.
14885 (grub_xfs_fini): Likewise.
14888 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14890 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14891 color modes, allow greater than 16 colors to be configured as
14894 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14896 * normal/completion.c (complete_arguments): Add the qualifier
14897 const into OPTIONS.
14899 From Omniflux <omniflux+lists@omniflux.com>:
14900 * include/grub/terminfo.h: New file.
14901 * include/grub/tparm.h: Likewise.
14902 * include/grub/i386/pc/serial.h: Likewise.
14903 * term/terminfo.c: Likewise.
14904 * term/tparm.c: Likewise.
14905 * term/i386/pc/serial.c: Likewise.
14906 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14908 (terminfo_mod_SOURCES): New variable.
14909 (terminfo_mod_CFLAGS): Likewise.
14910 (serial_mod_SOURCES): Likewise.
14911 (serial_mod_CFLAGS): Likewise.
14913 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14915 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14916 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14917 and kern/powerpc/ieee1275/cmain.c, respectively.
14919 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14920 * kern/powerpc/ieee1275/crt0.S: ... here.
14922 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14923 * kern/powerpc/ieee1275/cmain.c: ... here.
14925 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14926 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14927 instead of boot/powerpc/ieee1275/crt0.S and
14928 boot/powerpc/ieee1275/cmain.c, respectively.
14930 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14931 sectors. It was not used anyway.
14933 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14935 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14936 `unused parameter' warning.
14938 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14940 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14942 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14945 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14947 * include/grub/normal.h (enum grub_completion_type): Added
14948 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14950 * normal/cmdline.c (print_completion): Handle
14951 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14952 * normal/menu_entry.c (store_completion): Likewise.
14954 * normal/completion.c (complete_arguments): New function.
14955 (grub_normal_do_completion): Call `complete_arguments' when the
14956 current words start with a dash.
14958 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14960 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14961 `gzio.mod' instead of `io.mod').
14963 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14965 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14966 (DISTDIRS): Added io and video.
14967 Rewrite the search routine to make an output consistently.
14969 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14970 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14971 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14972 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14973 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14974 util/powerpc/ieee1275/misc.c.
14976 * include/grub/gzio.h: New file.
14977 * io/gzio.c: Likewise.
14979 * kern/file.c (grub_file_close): Call grub_device_close only if
14980 FILE->DEVICE is not NULL.
14982 * include/grub/mm.h [!NULL] (NULL): New macro.
14984 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14987 (pkgdata_MODULES): Added gzio.mod.
14988 (gzio_mod_SOURCES): New variable.
14989 (gzio_mod_CFLAGS): Likewise.
14991 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14992 (pkgdata_MODULES): Added gzio.mod.
14993 (gzio_mod_SOURCES): New variable.
14994 (gzio_mod_CFLAGS): Likewise.
14996 * commands/cat.c: Include grub/gzio.h.
14997 (grub_cmd_cat): Use grub_gzfile_open instead of
15000 * commands/cmp.c: Include grub/gzio.h.
15001 (grub_cmd_cmp): Use grub_gzfile_open instead of
15004 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15005 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15007 (grub_rescue_cmd_module): Likewise.
15009 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15011 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15012 kern/sparc64/ieee1275/init.c because it contains _start.
15013 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15015 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15017 * configure.ac: Add support for sparc64 host with ieee1275
15019 * configure: Generated from configure.ac.
15020 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15022 (grub_ofdisk_read): Likewise.
15023 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15024 pointers as (void *) to remove a warning.
15025 (grub_ofdisk_close): Likewise.
15026 (grub_ofdisk_read): Likewise.
15027 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15028 returns, so make it return void to remove a warning.
15029 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15030 Corresponding prototype change.
15031 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15032 values, and cast the pointers as (void *) to remove a warning.
15033 (grub_mm_dump): Likewise.
15034 * conf/sparc64-ieee1275.mk: New file.
15035 * conf/sparc64-ieee1275.rmk: Likewise.
15036 * include/grub/sparc64/setjmp.h: Likewise.
15037 * include/grub/sparc64/types.h: Likewise.
15038 * include/grub/sparc64/ieee1275/console.h: Likewise.
15039 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15040 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15041 * include/grub/sparc64/ieee1275/time.h: Likewise.
15042 * kern/sparc64/cache.c: Likewise.
15043 * kern/sparc64/dl.c: Likewise.
15044 * kern/sparc64/ieee1275/init.c: Likewise.
15045 * kern/sparc64/ieee1275/openfw.c: Likewise.
15047 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15049 * util/console.c (grub_ncurses_putchar): If C is greater than
15050 0x7f, set C to a question mark.
15051 (grub_ncurses_getcharwidth): New function.
15052 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15055 * normal/menu.c (print_entry): Made aware of Unicode. First,
15056 convert TITLE to UCS-4, and predict the cursor position by
15059 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15061 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15063 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15065 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15066 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15069 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15070 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15071 grub_strcpy and grub_strlen. Take it into account that a space
15072 character is inserted as a delimiter.
15074 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15076 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15077 invalid magic in the error.
15079 * commands/search.c: New file.
15081 * util/grub-emu.c (main): Call grub_search_init and
15084 * kern/rescue.c (grub_rescue_print_disks): Removed.
15085 (grub_rescue_print_devices): New function.
15086 (grub_rescue_cmd_ls): Use grub_device_iterate with
15087 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15088 grub_rescue_print_disks.
15090 * kern/partition.c (grub_partition_iterate): Return the result of
15091 PARTMAP->ITERATE instead of GRUB_ERRNO.
15093 * kern/device.c: Include grub/partition.h.
15094 (grub_device_iterate): New function.
15096 * include/grub/partition.h (grub_partition_iterate): Return int
15097 instead of grub_err_t.
15099 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15101 [GRUB_UTIL] (grub_search_fini): Likewise.
15103 * include/grub/device.h (grub_device_iterate): New prototype.
15105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15107 (pkgdata_MODULES): Added search.mod.
15108 (search_mod_SOURCES): New variable.
15109 (search_mod_CFLAGS): Likewise.
15111 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15112 (pkgdata_MODULES): Added search.mod.
15113 (search_mod_SOURCES): New variable.
15114 (search_mod_CFLAGS): Likewise.
15116 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15117 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15118 All callers changed.
15120 * DISTLIST: Added commands/search.c.
15122 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15124 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15126 (grub_getcharwidth): New function.
15128 * kern/misc.c (grub_utf8_to_ucs4): New function.
15130 * include/grub/term.h (struct grub_term): Added a new member
15132 (grub_getcharwidth): New prototype.
15134 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15136 * term/i386/pc/console.c (map_char): New function. Segregated from
15137 grub_console_putchar.
15138 (grub_console_putchar): Use map_char.
15139 (grub_console_getcharwidth): New function.
15140 (grub_console_term): Specified grub_console_getcharwidth as
15143 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15144 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15146 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15148 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15149 on grub_strtoul completely.
15150 (write_char): Declare local variables in the beginning of the
15152 (grub_vesafb_getcharwidth): New function.
15153 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15156 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15158 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15159 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15160 commands/i386/pc/vbetest.c.
15162 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15163 call grub_vbe_get_controller_info again, because the returned
15164 information is volatile.
15165 (grub_vbe_set_video_mode): Mostly rewritten.
15166 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15167 grub_vbe_status_t correctly.
15168 (grub_vbe_get_video_mode_info): Likewise.
15169 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15170 several if statements.
15172 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15173 * commands/i386/pc/vbeinfo.c: ... this.
15175 * commands/i386/pc/vbe_test.c: Renamed to ...
15176 * commands/i386/pc/vbetest.c: ... this.
15178 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15180 (grub_cmd_vbeinfo): ... this. Save video modes before
15181 iterating. Skip a video mode, if it is not available, not enough
15182 information is given or it is monochrome. Show the memory
15183 model. Leave the interpretation of MODEVAR to grub_strtoul
15185 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15186 (GRUB_MOD_FINI): Likewise.
15188 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15189 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15190 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15191 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15192 grub_strtoul completely.
15193 (real2pm): Removed.
15194 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15195 (GRUB_MOD_FINI): Likewise.
15197 * normal/misc.c: Include grub/mm.h.
15199 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15200 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15201 (vbe_list_modes_mod_SOURCES): Removed.
15202 (vbe_list_modes_mod_CFLAGS): Likewise.
15203 (vbe_test_mod_SOURCES): Likewise.
15204 (vbe_test_mod_CFLAGS): Likewise.
15205 (vbeinfo_mod_SOURCES): New variable.
15206 (vbeinfo_mod_CFLAGS): Likewise.
15207 (vbetest_mod_SOURCES): Likewise.
15208 (vbetest_mod_CFLAGS): Likewise.
15210 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15212 * normal/misc.c: New file.
15214 * DISTLIST: Added normal/misc.c.
15216 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15217 DISK to HOOK. Call HOOK with DISK.
15218 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15219 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15220 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15222 * normal/menu_entry.c (struct screen): Added a new member
15223 "completion_shown".
15224 (completion_buffer): New global variable.
15225 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15226 (store_completion): New function.
15227 (complete): Likewise.
15228 (clear_completions): Likewise.
15229 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15230 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15231 a tab, call complete.
15233 * normal/completion.c (disk_dev): Removed.
15234 (print_simple_completion): Likewise.
15235 (print_partition_completion): Likewise.
15236 (print_func): New global variable.
15237 (add_completion): Do not take the arguments WHAT or PRINT any
15238 longer. Added a new argument TYPE. Instead of printing directly,
15239 call PRINT_FUNC if not NULL.
15240 All callers changed.
15241 (complete_device): Use a local variable DEV instead of
15242 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15243 (grub_normal_do_completion): Take a new argument HOOK. Do not
15244 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15245 empty string, return NULL instead.
15246 All callers changed.
15248 * normal/cmdline.c (print_completion): New function.
15250 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15252 All callers changed.
15254 * kern/disk.c (grub_print_partinfo): Removed.
15256 * include/grub/partition.h (struct grub_partition_map): Add a new
15257 argument DISK into HOOK of ITERATE.
15258 (grub_partition_iterate): Add a new argument DISK to HOOK.
15260 * include/grub/normal.h (enum grub_completion_type): New enum.
15261 (grub_completion_type_t): New type.
15262 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15263 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15264 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15265 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15266 (grub_normal_do_completion): Added a new argument HOOK.
15267 (grub_normal_print_device_info): New prototype.
15269 * include/grub/disk.h (grub_print_partinfo): Removed.
15271 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15272 (normal_mod_SOURCES): Likewise.
15273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15274 (normal_mod_SOURCES): Likewise.
15276 * commands/ls.c (grub_ls_list_disks): Use
15277 grub_normal_print_device_info instead of grub_print_partinfo. Free
15279 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15280 duplicating the code.
15282 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15284 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15285 follow GCS more precisely.
15286 * commands/i386/pc/vbe_test.c: Likewise.
15287 * include/grub/i386/pc/vbe.h: Likewise.
15288 * term/i386/pc/vesafb.c: Likewise.
15289 * video/i386/pc/vbe.c: Likewise.
15291 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15293 * DISTLIST: Added term/i386/pc/vesafb.c
15294 DISTLIST: Added video/i386/pc/vbe.c
15295 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15296 DISTLIST: Added commands/i386/pc/vbe_test.c.
15297 * commands/i386/pc/vbe_list_modes.c: New file.
15298 * commands/i386/pc/vbe_test.c: Likewise.
15299 * term/i386/pc/vesafb.c: Likewise.
15300 * video/i386/pc/vbe.c: Likewise.
15301 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15302 (grub_vbe_probe) Added prototype.
15303 (grub_vbe_set_video_mode) Likewise.
15304 (grub_vbe_get_video_mode) Likewise.
15305 (grub_vbe_get_video_mode_info) Likewise.
15306 (grub_vbe_set_pixel_rgb) Likewise.
15307 (grub_vbe_set_pixel_index) Likewise.
15308 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15309 (pkgdata_MODULES): Added vesafb.mod.
15310 (pkgdata_MODULES): Added vbe_list_modes.mod.
15311 (pkgdata_MODULES): Added vbe_test.mod.
15312 (vbe_mod_SOURCES): Added.
15313 (vbe_mod_CFLAGS): Likewise.
15314 (vesafb_mod_SOURCES): Likewise.
15315 (vesafb_mod_CFLAGS): Likewise.
15316 (vbe_list_modes_mod_SOURCES): Likewise.
15317 (vbe_list_modes_mod_CFLAGS): Likewise.
15318 (vbe_test_mod_SOURCES): Likewise.
15319 (vbe_test_mod_CFLAGS): Likewise.
15321 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15323 * normal/command.c (grub_command_execute): If INTERACTIVE is
15324 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15325 CMDLINE. Disable the pager if INTERACTIVE is true.
15326 All callers are changed.
15328 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15329 before reading a config file.
15330 * normal/main.c (read_config_file): Even if a command is not
15331 found, register it if it is within an entry.
15333 * util/grub-emu.c: Include sys/types.h and unistd.h.
15334 (options): Added --hold.
15335 (struct arguments): Added a new member "hold".
15336 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15338 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15339 cleared by a debugger, if it is not zero.
15341 * include/grub/normal.h (grub_command_execute): Add an argument
15344 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15346 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15348 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15350 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15351 program with another one, because the old one didn't detect a bug
15352 in gcc-3.4. Always use regparm 2, because the new test is still
15353 not enough for gcc-4.0. Someone must investigate a simple test
15354 case which detects a bug in gcc-4.0.
15356 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15358 * DISTLIST: Added normal/completion.c.
15360 * normal/completion.c: New file.
15362 * term/i386/pc/console.c (grub_console_getwh): New function.
15363 (grub_console_term): Assign grub_console_getwh to getwh.
15365 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15366 function is defined in normal/completion.c as
15367 grub_normal_do_completion.
15368 (grub_cmdline_get): Use grub_normal_do_completion instead of
15371 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15372 returns non-zero, otherwise return 0.
15373 (grub_partition_iterate): First, probe the partition map. Then,
15374 call ITERATE only for this partition map.
15376 * kern/misc.c (grub_strncmp): Rewritten.
15378 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15379 returns non-zero. Otherwise return 0.
15381 * include/grub/partition.h (grub_partition_map_iterate): Return
15382 int instead of void.
15384 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15386 * include/grub/misc.h (grub_strncmp): Change the type of N to
15389 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15392 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15393 unsigned explicitly before comparing it with I.
15395 * kern/main.c (grub_env_write_root): Add the attribute unused into
15398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15399 normal/completion.c.
15400 (normal_mod_SOURCES): Likewise.
15401 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15402 (normal_mod_SOURCES): Likewise.
15404 * normal/command.c (grub_iterate_commands): If ITERATE returns
15405 non-zero, return one immediately.
15407 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15409 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15410 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15412 (grub_vbe_get_controller_info): New function.
15413 (grub_vbe_get_mode_info): Likewise.
15414 (grub_vbe_set_mode): Likewise.
15415 (grub_vbe_get_mode): Likewise.
15416 (grub_vbe_set_memory_window): Likewise.
15417 (grub_vbe_get_memory_window): Likewise.
15418 (grub_vbe_set_scanline_length): Likewise.
15419 (grub_vbe_get_scanline_length): Likewise.
15420 (grub_vbe_set_display_start): Likewise.
15421 (grub_vbe_get_display_start): Likewise.
15422 (grub_vbe_set_palette_data): Likewise.
15423 * include/grub/i386/pc/vbe.h: New file.
15425 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15427 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15428 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15429 * DISTLIST: Likewise.
15430 * kern/ieee1275/of.c: Moved to ...
15431 * kern/ieee1275/ieee1275.c: ... here.
15433 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15435 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15436 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15437 Pass 0 as `end' parameter to grub_strtoul().
15439 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15441 * include/grub/powerpc/ieee1275/console.h: Do not include
15442 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15444 (grub_console_cur_color): Remove i386-specific prototype.
15445 (grub_console_real_putchar): Likewise.
15446 (grub_console_checkkey): Likewise.
15447 (grub_console_getkey): Likewise.
15448 (grub_console_getxy): Likewise.
15449 (grub_console_gotoxy): Likewise.
15450 (grub_console_cls): Likewise.
15451 (grub_console_setcursor): Likewise.
15452 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15453 Include <grub/machine/console.h>.
15454 * term/ieee1275/ofconsole.c: Likewise.
15456 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15458 * Makefile.in (LIBLZO): New variable.
15460 * configure.ac: Check for LZO version 2.
15462 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15463 lzo/lzo1x.h instead of lzo1x.h.
15465 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15468 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15469 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15471 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15472 copying the data from PARTITION to P.
15474 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15476 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15477 negative, unload the module.
15479 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15480 map is "pc_partition_map" but not "pc".
15481 (usage): Fix the description. The options are --boot-image and
15482 --core-image but not --boot-file or --core-file.
15483 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15484 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15487 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15488 --core-file. Specify INSTALL_DEVICE as an argument.
15490 * util/console.c: Include config.h.
15491 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15492 [HAVE_NCURSES_H]: Include ncurses.h.
15493 [HAVE_CURSES_H]: Include curses.h.
15494 [!A_NORMAL] (A_NORMAL): Defined as zero.
15495 [!A_STANDOUT] (A_STANDOUT): Likewise.
15497 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15499 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15501 * configure.ac: Check for curses libraries and headers.
15503 * Makefile.in (LIBCURSES): New variable.
15505 * genmk.rb (Script::rule): Set the executable bits.
15507 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15508 name of the PC partition map is "pc_partition_map" but not "pc".
15510 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15512 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15513 (modules): Likewise.
15514 (usage): Added descriptions for --modules and --grub-probefs.
15515 Handle --modules and --grub-probefs. Save the arguments in MODULES
15516 and GRUB_PROBEFS, respectively.
15517 Auto-detect a filesystem module against GRUBDIR. If the result is
15518 empty and modules are not specified explicitly, abort the
15519 installation. Add the result to MODULES.
15521 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15522 disk/powerpc/ieee1275/ofdisk.c,
15523 include/grub/powerpc/ieee1275/init.h and
15524 term/powerpc/ieee1275/ofconsole.c.
15525 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15526 term/ieee1275/ofconsole.c.
15528 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15530 * COPYING: Upgraded to the latest version. Only the address of the
15531 FSF office has changed.
15533 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15535 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15536 kern/ieee1275.c with kern/ieee1275/of.c.
15538 * kern/ieee1275.c: Moved to ...
15539 * kern/ieee1275/of.c: ... here.
15541 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15543 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15546 * config.guess: Updated to the latest version from gnulib.
15547 * config.sub: Likewise.
15548 * install.sh: Likewise.
15549 * mkinstalldirs: Likewise.
15551 * include/grub/console.h: Removed. This file is arch-specific. Do
15552 not put this in include/grub.
15554 * include/grub/i386/pc/console.h: Resurrected.
15556 * util/console.c: Include grub/machine/console.h instead of
15558 * util/grub-emu.c: Likewise.
15560 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15562 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15565 From Vincent Pelletier <subdino2004@yahoo.fr>
15566 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15567 Redefined to use grub_getwh.
15568 (grub_term): New member named getwh.
15569 (grub_getwh): New prototype.
15570 * kern/term.c (grub_getwh): New function.
15571 * term/i386/pc/console.c (grub_console_getwh): New function.
15572 (grub_console_term): New member `getwh'.
15573 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15574 (grub_vga_term): New member `getwh'.
15575 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15577 (grub_ofconsole_getw): New function.
15578 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15579 (grub_ofconsole_term): New field named getwh and new initial
15582 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15584 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15585 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15586 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15587 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15588 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15589 of <grub/machine/ieee1275.h>.
15590 * commands/ieee1275/reboot.c: Likewise.
15591 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15592 * kern/ieee1275.c: ... to here. All users updated. Change all
15593 parameter structs to use new type `grub_ieee1275_cell_t'.
15594 * term/powerpc/ieee1275/ofconsole.c: Move ...
15595 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15596 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15597 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15598 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15600 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15601 Remove unused prototypes. All users updated.
15602 * include/grub/powerpc/ieee1275/console.h: Removed.
15603 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15604 `grub_ieee1275_cell_t'.
15605 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15606 Cast comparisons with -1 to the correct type.
15607 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15608 type to match `grub_ieee1275_entry_fn'.
15610 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15612 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15614 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15615 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15617 (grub_probefs_SOURCES): New variable.
15619 * util/i386/pc/grub-probefs.c: New file.
15621 * util/i386/pc/grub-setup.c (main): Call
15622 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15623 grub_hfs_init and grub_jfs_init to initialize the system. Call
15624 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15625 grub_pc_partition_map_fini to finish the system.
15627 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15629 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15631 (grub_multiboot_load_elf32): Likewise.
15632 (grub_multiboot_is_elf64): Likewise.
15633 (grub_multiboot_load_elf64): Likewise.
15634 (grub_multiboot_load_elf): Likewise.
15635 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15636 an ELF32 or ELF64 file.
15637 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15639 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15640 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15641 NULL before calling FS->LABEL.
15642 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15643 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15644 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15645 before calling FS->LABEL.
15647 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15649 * util/i386/pc/grub-install.in (datadir): New variable.
15651 (pkgdatadir): New variable.
15652 (pkglibdir): Removed.
15654 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15656 * DISTLIST: Added util/i386/pc/grub-install.in.
15658 * util/i386/pc/grub-install.in: New file.
15660 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15661 (grub_install_SOURCES): Likewise.
15663 * genmk.rb: Added support for scripts.
15664 (Script): New class.
15665 (scripts): New variable.
15667 * Makefile.in (install-local): Install sbin_SCRIPTS by
15669 (uninstall): Remove sbin_SCRIPTS.
15671 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15672 device, try to get a GRUB device by
15673 grub_util_biosdisk_get_grub_dev.
15676 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15677 description for --device-map.
15679 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15681 Change the semantics of variable hooks. They now return strings
15682 instead of error values.
15684 * util/i386/pc/grub-setup.c: Include grub/env.h.
15685 (setup): Use grub_device_set_root instead of grub_env_set.
15687 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15688 grub_env_get instead of grub_device_set_root and
15689 grub_device_get_root, respectively.
15691 * kern/main.c (grub_env_write_root): New function.
15692 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15693 grub_env_set instead of grub_device_set_root.
15695 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15697 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15698 rather than calling ENV->WRITE_HOOK afterwards.
15699 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15700 passing a pointer of a pointer.
15701 (grub_register_variable_hook): Change the types of "read_hook" and
15702 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15704 Allocate the default empty string on the heap, because this string
15705 may be freed later.
15707 * kern/device.c: Include grub/env.h.
15708 (grub_device_set_root): Removed.
15709 (grub_device_get_root): Likewise.
15710 (grub_device_open): Use grub_env_get instead of
15711 grub_device_get_root.
15713 * include/grub/env.h (grub_env_read_hook_t): New type.
15714 (grub_env_write_hook_t): Likewise.
15715 (grub_env_var): Change the types of "read_hook" and "write_hook"
15716 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15717 (grub_register_variable_hook): Likewise.
15719 * include/grub/device.h (grub_device_set_root): Removed.
15720 (grub_device_set_root): Likewise.
15722 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15723 make sure that DIRNAME terminates with '/', so that
15724 grub_fat_find_dir will fail if PATH is not a directory.
15726 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15728 Use the qualifier auto for print_files and print_files_long.
15729 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15731 Put a newline only if there is no error.
15732 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15735 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15737 * kern/partition.c (grub_partition_probe): Initialize PART to
15738 NULL. Otherwise, when no partition map is registered, this returns
15741 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15743 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15744 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15747 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15749 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15750 information on each device, if it does not have partitions. Print
15751 "Device" instead of "Disk", because this function is not specific
15754 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15755 static to ensure that it is put on the memory rather than a
15758 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15760 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15761 (grub_cat_init): Likewise.
15762 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15763 (options): Likewise.
15764 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15765 (grub_configfile_init): Likewise.
15766 * font/manager.c (GRUB_MOD_INIT): Likewise.
15767 * commands/help.c (GRUB_MOD_INIT): Likewise.
15768 (grub_help_init): Likewise.
15769 * normal/command.c (grub_command_init): Likewise.
15770 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15771 * disk/loopback.c (grub_loop_init): Likewise.
15772 (GRUB_MOD_INIT): Likewise.
15773 * commands/ls.c (grub_ls_init): Likewise.
15774 (GRUB_MOD_INIT): Likewise.
15775 (options): Likewise.
15776 * commands/boot.c (grub_boot_init): Likewise.
15777 (GRUB_MOD_INIT): Likewise.
15778 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15779 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15780 (GRUB_MOD_INIT): Likewise.
15781 * commands/cmp.c (grub_cmp_init): Likewise.
15782 (GRUB_MOD_INIT): Likewise.
15784 * normal/arg.c: Use <> instead of "" to include header files.
15785 (SHORT_ARG_HELP): New macro.
15786 (SHORT_ARG_USAGE): Likewise.
15787 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15788 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15790 (find_short): Check if C is 'h' or 'u' explicitly.
15791 (grub_arg_show_help): Use space characters instead of tabs. Treat
15792 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15793 are shown with --help and --usage only if they are not used for
15794 the command itself.
15795 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15798 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15799 const into "longarg". Change the type of "shortarg" to int.
15801 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15803 * boot/i386/pc/boot.S (boot_drive_check): New label.
15805 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15808 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15809 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15811 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15813 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15814 When turning off Gate A20, skip the check and return immediately,
15815 because this is not fatal usually.
15817 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15819 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15820 be 0x7C00 instead of 0x8000.
15822 * boot/i386/pc/pxeboot.S: Rewritten.
15824 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15826 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15829 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15831 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15832 robustness. This routine now supports a BIOS call and System
15833 Control Port A to modify the gate A20.
15835 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15836 Increased to 0x440.
15838 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15840 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15841 device path and resulting ihandle.
15842 (grub_ofdisk_close): dprintf the ihandle being closed.
15843 (grub_ofdisk_read): dprintf function parameters.
15844 * kern/mm.c (grub_mm_init_region): Likewise.
15845 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15846 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15847 size, and boot arguments.
15848 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15849 before loading into memory.
15850 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15851 before loading into memory.
15853 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15855 * kern/mm.c: Added much documentation.
15856 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15857 8, set to 5 instead of 8.
15859 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15861 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15863 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15864 (grub_mkdevicemap_SOURCES): New variable.
15866 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15867 lib/device.c of GRUB Legacy.
15869 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15871 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15872 instead of PATH is NULL.
15874 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15876 * commands/cmp.c (BUFFER_SIZE): New macro.
15877 (grub_cmd_cmp): Close the right file at the right time. Compare
15878 only data just read. Don't report files of different size as
15879 identical. Dynamically allocate buffers. Move variable
15880 declarations at the beginning of function.
15882 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15884 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15887 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15889 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15890 when backspace is pressed at beginning of line.
15892 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15894 * DISTLIST: Added genfslist.sh.
15896 * normal/main.c (fs_module_list): New variable.
15897 (autoload_fs_module): New function.
15898 (read_fs_list): Likewise.
15899 (grub_normal_execute): Call read_fs_list.
15901 * kern/fs.c (grub_fs_autoload_hook): New variable.
15902 (grub_fs_probe): Added support for auto-loading.
15904 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15905 (grub_fs_module_list_t): New type.
15907 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15908 (grub_fs_autoload_hook): New prototype.
15910 * genfslist.sh: New file.
15912 * genmk.rb: Added a rule to generate a filesystem list.
15914 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15916 * configure.ac: Fix the test for cross-compiling.
15918 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15919 define GRUB_UTIL anymore.
15921 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15922 so this function works on other systems than just big endian.
15923 (load_modules): Likewise.
15924 (add_segments): Likewise.
15926 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15928 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15929 contains `l' modifier, get a long from va_arg().
15931 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15933 * kern/mm.c (grub_free): If the next free block which is being
15934 merged is the first free block, set the first block to the block
15936 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15938 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15940 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15941 `grub_ieee1275_chosen'.
15943 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15945 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15946 (grub_ieee1275_chosen): New variable.
15947 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15949 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15950 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15951 Rename first argument to `phandle' for consistency.
15952 (grub_ieee1275_get_property_length): Likewise.
15953 (grub_ieee1275_next_property): Likewise. Change type of first argument
15954 to grub_ieee1275_phandle_t.
15955 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15956 Move export next to declaration.
15957 (grub_ieee1275_chosen): New variable.
15958 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15959 Correct cosmetic typo.
15960 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15961 `grub_ieee1275_chosen'.
15962 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15963 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15964 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15965 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15966 `grub_ieee1275_chosen'.
15968 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15970 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15972 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15973 /chosen/bootargs as "variable=value" pairs.
15975 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15977 * include/grub/misc.h (grub_dprintf): New macro.
15978 (grub_real_dprintf): New prototype.
15979 (grub_strword): Likewise.
15980 (grub_iswordseparator): Likewise.
15981 * kern/misc.c (grub_real_dprintf): New function.
15982 (grub_strword): Likewise.
15983 (grub_iswordseparator): Likewise.
15985 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15987 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15988 (roundup): Remove macro.
15989 (grub_ieee1275_flags): Make static.
15990 (grub_ieee1275_realmode): Remove.
15991 (grub_ieee1275_test_flag): New function.
15992 (grub_ieee1275_set_flag): Likewise.
15993 (find_options): Rename to `grub_ieee1275_find_options'; update
15994 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15995 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15996 (cmain): New prototype.
15997 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15998 `grub_ieee1275_flags' directly.
15999 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16000 machine/biosdisk.h.
16001 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16002 Don't include grub/machine/init.h.
16003 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16004 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16006 (grub_ieee1275_realmode): Likewise.
16007 (grub_ieee1275_flag): New enum.
16008 (grub_ieee1275_test_flag): New prototype.
16009 (grub_ieee1275_set_flag): New prototype.
16010 * include/grub/powerpc/ieee1275/init.h: Remove file.
16011 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16012 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16013 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16014 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16016 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16017 `grub_ieee1275_test_flag'.
16018 (grub_ieee1275_encode_devname): Likewise.
16020 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16022 * include/grub/powerpc/ieee1275/ieee1275.h
16023 (grub_ieee1275_encode_devname): New prototype.
16024 (grub_ieee1275_get_filename): Likewise.
16025 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16027 (grub_set_prefix): Likewise.
16028 (grub_machine_init): Call grub_set_prefix.
16029 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16030 (grub_parse_type): New enum.
16031 (grub_ieee1275_get_devargs): New function.
16032 (grub_ieee1275_get_devname): Likewise.
16033 (grub_ieee1275_parse_args): Likewise.
16034 (grub_ieee1275_get_filename): Likewise.
16035 (grub_ieee1275_encode_devname): Likewise.
16037 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16039 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16040 `grub_loader_unset'.
16042 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16044 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16045 instead of grub_ieee1275_interpret.
16046 (grub_halt_init): New function.
16047 (grub_halt_fini): Likewise.
16048 (GRUB_MOD_INIT): Correct message grammar.
16049 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16050 instead of grub_ieee1275_interpret.
16051 (grub_reboot_init): New function.
16052 (grub_reboot_fini): Likewise.
16053 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16054 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16055 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16056 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16057 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16059 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16061 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16063 (grub_halt): Likewise.
16064 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16065 (cmain): Remove __attribute__((unused)).
16066 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16067 (grub_heap_len): Likewise.
16068 (grub_machine_fini): New function.
16069 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16070 (grub_halt): Likewise.
16071 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16073 * util/powerpc/ieee1275/misc.c: New file.
16075 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16077 * DISTLIST: New file.
16078 * gendistlist.sh: Likewise.
16080 * Makefile.in (COMMON_DISTFILES): Removed.
16081 (BOOT_DISTFILES): Likewise.
16082 (CONF_DISTFILES): Likewise.
16083 (DISK_DISTFILES): Likewise.
16084 (FS_DISTFILES): Likewise.
16085 (INCLUDE_DISTFILES): Likewise.
16086 (KERN_DISTFILES): Likewise.
16087 (LOADER_DISTFILES): Likewise.
16088 (TERM_DISTFILES): Likewise.
16089 (UTIL_DISTFILES): Likewise.
16090 (DISTFILES): Likewise.
16091 (uninstall): Uninstall files in $(pkgdata_DATA).
16092 (DISTLIST): New target.
16093 (distdir): Use the contents of the file DISTLIST to get a list of
16096 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16098 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16099 descriptor. This is ported from GRUB Legacy.
16101 * gencmdlist.sh: Added an extra semicolon to make it work with
16102 old sed versions. Reported by Robert Bihlmeyer
16103 <robbe@orcus.priv.at>.
16105 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16107 Automatic loading of commands is supported.
16109 * normal/main.c (read_command_list): New function.
16110 (grub_normal_execute): Call read_command_list.
16112 * normal/command.c (grub_register_command): Return zero or CMD.
16113 Allocate CMD->NAME from the heap.
16114 Initialize CMD->MODULE_NAME to zero.
16115 Find the same name as well. If the same command is found and it is
16116 a dummy command, overwrite members. If it is not a dummy command,
16118 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16119 (grub_command_find): If a dummy command is found, load a module
16120 and retry to find a command only once.
16122 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16123 make sure that each command is loaded.
16125 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16127 (struct grub_command): Remove const from the member `name'.
16128 Add a new member `module_name'.
16129 (grub_register_command): Return grub_command_t.
16131 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16132 sure that each command is loaded.
16134 * genmk.rb (PModule::rule): Specify a module name without the
16135 suffix ".mod" to gencmdlist.sh.
16137 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16139 * gencmdlist.sh: New file.
16141 * genmk.rb (PModule::rule): Generate a rule for a command list.
16143 Generate command.lst from $(COMMANDFILES).
16145 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16146 (DATA): Added $(pkgdata_DATA).
16147 (install-local): Install files in $(pkgdata_DATA).
16149 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16151 * term/i386/pc/vga.c (debug_command): Removed.
16152 (GRUB_MOD_INIT): Do not register the command "debug".
16154 From Hollis Blanchard:
16155 * commands/configfile.c: New file.
16156 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16157 commands/configfile.c.
16158 (pkgdata_MODULES): Added configfile.mod.
16159 (configfile_mod_SOURCES): New variable.
16160 (configfile_mod_CFLAGS): Likewise.
16161 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16162 commands/configfile.c.
16163 (pkgdata_MODULES): Added configfile.mod.
16164 (configfile_mod_SOURCES): New variable.
16165 (configfile_mod_CFLAGS): Likewise.
16166 * util/grub-emu.c (main): Call grub_configfile_init and
16167 grub_configfile_fini.
16168 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16170 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16172 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16174 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16177 * commands/help.c (grub_cmd_help): Do not print newlines after
16178 the last command in print_command_help.
16180 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16182 * commands/default.h: New file.
16183 * commands/timeout.h: Likewise.
16184 * normal/context.c: Likewise.
16186 * util/misc.c: Do not include sys/times.h.
16187 Include sys/time.h and grub/machine/time.h.
16188 (grub_get_rtc): Rewritten with gettimeofday.
16190 * util/grub-emu.c (main): Call grub_default_init and
16191 grub_timeout_init before grub_normal_init, and call
16192 grub_timeout_fini and grub_default_fini after grub_main.
16194 * util/console.c (grub_ncurses_checkkey): Return the read
16197 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16200 * normal/main.c (read_config_file): Push MENU. If this fails,
16201 print an error and wait for a user input.
16202 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16203 If a menu is empty or an error occurs, pop MENU.
16204 (grub_normal_execute): Pop and free MENU after grub_menu_run
16207 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16209 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16211 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16213 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16215 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16218 * include/grub/normal.h (struct grub_menu_list): New struct.
16219 (grub_menu_list_t): New type.
16220 (struct grub_context): New struct.
16221 (grub_context_t): New type.
16222 (grub_register_command): Got rid of EXPORT_FUNC.
16223 (grub_unregister_command): Likewise.
16224 (grub_context_get): New prototype.
16225 (grub_context_get_current_menu): Likewise.
16226 (grub_context_push_menu): Likewise.
16227 (grub_context_pop_menu): Likewise.
16228 [GRUB_UTIL] (grub_default_init): Likewise.
16229 [GRUB_UTIL] (grub_default_fini): Likewise.
16230 [GRUB_UTIL] (grub_timeout_init): Likewise.
16231 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16233 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16234 commands/timeout.c and normal/context.c.
16235 (pkgdata_MODULES): Added default.mod and timeout.mod.
16236 (normal_mod_SOURCES): Added normal/context.c.
16237 (default_mod_SOURCES): New variable.
16238 (default_mod_CFLAGS): Likewise.
16239 (timeout_mod_SOURCES): Likewise.
16240 (timeout_mod_CFLAGS): Likewise.
16241 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16243 (pkgdata_MODULES): Added default.mod and timeout.mod.
16244 (normal_mod_SOURCES): Added normal/context.c.
16245 (default_mod_SOURCES): New variable.
16246 (default_mod_CFLAGS): Likewise.
16247 (timeout_mod_SOURCES): Likewise.
16248 (timeout_mod_CFLAGS): Likewise.
16250 * Makefile.in (all-local): Added $(MKFILES).
16252 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16254 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16255 (grub_emu_SOURCES): Likewise.
16256 (pkgdata_MODULES): Add `sun.mod'.
16257 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16260 (pkgdata_MODULES): Add `sun.mod'.
16261 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16262 * include/grub/partition.h (grub_sun_partition_map_init): New
16264 (grub_sun_partition_map_fini): Likewise.
16265 * partmap/sun.c: New file.
16266 * util/grub-emu.c (main): Initialize and de-initialize the sun
16267 partitionmap support.
16269 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16271 This implements an Emacs-like menu entry editor.
16273 * normal/menu_entry.c: New file.
16275 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16276 characters to ASCII.
16277 (saved_char): New variable.
16278 (grub_ncurses_checkkey): Rewritten completely.
16279 (grub_ncurses_getkey): Likewise.
16280 (grub_ncurses_init): Call raw instead of cbreak.
16282 * normal/menu.c (print_entry): Do not put a space.
16283 (init_page): Renamed to ...
16284 (grub_menu_init_page): ... this. All callers changed.
16285 (edit_menu_entry): Removed.
16286 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16288 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16290 * kern/misc.c (grub_vprintf): Call grub_refresh.
16292 * normal/menu.c (DISP_LEFT): Renamed to ...
16293 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16294 * normal/menu.c (DISP_UP): Renamed to ...
16295 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16296 * normal/menu.c (DISP_RIGHT): Renamed to ...
16297 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16298 * normal/menu.c (DISP_DOWN): Renamed to ...
16299 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16300 * normal/menu.c (DISP_HLINE): Renamed to ...
16301 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16302 * normal/menu.c (DISP_VLINE): Renamed to ...
16303 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16304 * normal/menu.c (DISP_UL): Renamed to ...
16305 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16306 * normal/menu.c (DISP_UR): Renamed to ...
16307 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16308 * normal/menu.c (DISP_LL): Renamed to ...
16309 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16310 * normal/menu.c (DISP_LR): Renamed to ...
16311 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16312 * normal/menu.c (TERM_WIDTH): Renamed to ...
16313 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16314 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16315 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16316 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16317 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16318 * normal/menu.c (TERM_MARGIN): Renamed to ...
16319 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16320 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16321 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16322 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16323 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16324 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16325 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16326 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16327 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16328 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16329 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16330 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16331 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16332 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16333 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16334 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16335 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16336 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16337 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16338 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16339 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16340 All callers changed.
16342 * include/grub/normal.h: New prototype.
16344 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16345 normal/menu_entry.c.
16346 (normal_mod_SOURCES): Likewise.
16347 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16348 (normal_mod_SOURCES): Likewise.
16350 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16352 * include/grub/normal.h (grub_halt_init): New prototype.
16353 (grub_halt_fini): Likewise.
16354 (grub_reboot_init): Likewise.
16355 (grub_reboot_fini): Likewise.
16357 * util/grub-emu.c: Include signal.h.
16358 (main_env): New global variable.
16359 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16361 (grub_machine_fini): New function.
16362 (main): Call grub_halt_init and grub_reboot_init before
16363 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16364 Call setjmp with MAIN_ENV to go back afterwards.
16365 Call grub_machine_fini right before return.
16367 * include/grub/util/misc.h: Include setjmp.h.
16368 (main_env): New prototype.
16370 * include/grub/kernel.h (grub_machine_fini): New prototype.
16371 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16372 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16374 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16375 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16376 * term/i386/pc/console.c (grub_console_fini): Likewise.
16378 * util/i386/pc/misc.c: New file.
16380 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16381 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16382 commands/i386/pc/reboot.c.
16384 2005-02-14 Guillem Jover <guillem@hadrons.org>
16386 * include/grub/dl.h (grub_dl_check_header): New prototype.
16387 (grub_arch_dl_check_header): Change return type to grub_err_t,
16388 remove size parameter and export function. Update all callers.
16389 * kern/dl.c (grub_dl_check_header): New function.
16390 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16391 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16392 are inside the core.
16393 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16394 independent ELF header checks.
16395 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16396 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16397 `grub_dl_check_header' instead of explicit checks. Check for the
16399 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16400 `grub_dl_check_header' instead of explicit checks. Remove arch
16401 specific ELF header checks.
16403 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16406 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16408 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16409 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16411 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16413 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16414 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16415 (part_map_iterate): Clear `grub_errno' and return 0 if
16416 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16417 * partmap/amiga.c (amiga_partition_map_iterate): Return
16418 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16419 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16421 2005-02-01 Guillem Jover <guillem@hadrons.org>
16423 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16426 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16428 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16430 (grub_rescue_cmd_linux): New prototype.
16431 (grub_rescue_cmd_initrd): Likewise.
16432 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16434 (grub_linux_release_mem): Release the memory for the initrd.
16435 (grub_load_linux): Renamed from this...
16436 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16437 Changed `entry' not to be static. Loop over memory regions to
16438 find another one when the default fails.
16439 (grub_rescue_cmd_initrd): New function.
16440 (grub_linux_init): Remove function.
16441 (grub_linux_fini): Likewise.
16442 (GRUB_MOD_INIT): Register `initrd'.
16443 (GRUB_MOD_FINI): Unregister `initrd'.
16444 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16446 (grub_linux_normal_fini): Likewise.
16447 (GRUB_MOD_INIT): Register `initrd'.
16448 (GRUB_MOD_FINI): Unregister `initrd'.
16450 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16452 * commands/help.c: New file.
16453 * normal/arg.c (show_help): Renamed to...
16454 (grub_arg_show_help): ... this.
16455 * commands/i386/pc/halt.c: New file.
16456 * commands/i386/pc/reboot.c: Likewise.
16457 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16458 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16459 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16460 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16464 (pkgdata_MODULES): Add `help.mod'.
16465 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16466 * grub/i386/pc/init.h (grub_reboot): New prototype.
16467 (grub_halt): Likewise.
16468 * include/grub/normal.h (grub_arg_show_help): New prototype.
16469 (grub_help_init): Likewise.
16470 (grub_help_fini): Likewise.
16471 * util/grub-emu.c (main): Initialize and deinitialize the help
16474 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16476 * normal/command.c (grub_command_init): Fixed the description of
16477 the `set' and `unset' commands.
16479 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16481 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16483 * commands/ieee1275/halt.c: New file.
16484 * commands/ieee1275/reboot.c: Likewise.
16485 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16486 `__attribute__ ((unused))'. Some GCS related fixed.
16487 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16488 (grub_suspend_fini): Likewise.
16489 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16491 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16492 (halt_mod_CFLAGS): New variables.
16493 * include/grub/powerpc/ieee1275/ieee1275.h
16494 (grub_ieee1275_interpret): New prototype.
16496 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16498 * include/grub/misc.h (memmove): New prototype.
16499 (memcpy): Likewise.
16501 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16503 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16504 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16506 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16508 * kern/misc.c (grub_strndup): Function rewritten.
16510 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16512 * normal/menu.c (TERM_WIDTH): Macro redefined.
16513 (TERM_TOP_BORDER_Y): Likewise.
16514 (draw_border): Replaced while-loop by a for-loop. Make the number
16515 of lines consistent with the number of lines displayed in
16516 print_entries. Added a margin below the rectangle.
16517 (print_entry): Make the entry fit in the rectangle.
16518 (print_entries): Display the scroll arrows next to the right
16521 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16523 * fs/minix.c (grub_minix_find_file): Reserve more space for
16524 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16525 `grub_strncpy' to copy `path' into it.
16527 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16529 Add the loopback device, a device via which files can be accessed
16532 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16533 (pkgdata_MODULES): Add loopback.mod.
16534 (loopback_mod_SOURCES): New variable.
16535 (loopback_mod_CFLAGS): Likewise.
16536 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16538 (pkgdata_MODULES): Add loopback.mod.
16539 (loopback_mod_SOURCES): New variable.
16540 (loopback_mod_CFLAGS): Likewise.
16541 * disk/loopback.c: new file.
16542 * include/grub/normal.h (grub_loop_init): New prototype.
16543 (grub_loop_fini): New prototype.
16544 * util/grub-emu.c (main): Initialize and de-initialize loopback
16546 * include/grub/disk.h (grub_disk_dev_id): Add
16547 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16549 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16551 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16553 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16554 (suspend_mod_SOURCES): New variable.
16555 (suspend_mod_CFLAGS): Likewise.
16556 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16558 * commands/ieee1275/suspend.c: New file.
16560 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16562 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16563 ((unused))' to `__attribute__ ((used))'.
16564 (GRUB_MOD_FINI): Likewise.
16565 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16566 * genmk.rb (PModule): Assign space to common symbols when linking
16569 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16571 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16572 `unsigned' arguments to `grub_size_t'.
16573 (grub_malloc): Likewise.
16574 (grub_realloc): Likewise.
16575 (grub_memalign): Likewise.
16576 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16577 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16578 * util/misc.c (grub_malloc): Likewise.
16579 (grub_realloc): Likewise.
16580 * kern/mm.c (get_header_from_pointer): Change the casts to
16581 `unsigned' into a cast to `grub_size_t'.
16583 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16584 point to `currnode' when `currnode' is changed.
16586 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16587 Schottelius <nico-linux@schottelius.org>.
16589 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16591 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16592 (note_path): Remove variable.
16593 (GRUB_IEEE1275_NOTE_NAME): New macro.
16594 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16595 (grub_ieee1275_note_hdr): New structure.
16596 (grub_ieee1275_note_desc): Likewise.
16597 (grub_ieee1275_note): Likewise.
16598 (load_note): Remove `dir' argument. All callers updated. Remove
16599 `note_img' and `path'. Do not load a file from `note_path'.
16600 Initialize a struct grub_ieee1275_note and write that to `out'.
16601 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16603 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16605 * util/misc.c (grub_util_read_image): Revert last change. It
16606 called `grub_util_read_at', which seeks from the beginning of the
16609 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16611 * TODO: Add note about endianness in grub-mkimage.
16612 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16614 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16615 (grub_mkimage_SOURCES): New target.
16616 * include/grub/kernel.h (grub_start_addr): Remove variable.
16617 (grub_end_addr): Likewise.
16618 (grub_total_module_size): Likewise.
16619 (grub_kernel_image_size): Likewise.
16620 (GRUB_MODULE_MAGIC): New constant.
16621 (grub_module_info): New structure.
16622 (grub_arch_modules_addr): New prototype.
16623 (grub_get_end_addr): Remove prototype.
16624 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16625 * include/grub/powerpc/ieee1275/kernel.h: New file.
16626 * include/grub/util/misc.h (grub_util_get_fp_size): New
16628 (grub_util_read_at): Likewise.
16629 (grub_util_write_image_at): Likewise.
16630 * kern/main.c (grub_get_end_addr): Remove function.
16631 (grub_load_modules): Call grub_arch_modules_addr instead of using
16632 grub_end_addr. Look for a grub_module_info struct in memory. Use
16633 the grub_module_info fields instead of calling grub_get_end_addr
16634 as loop conditions. Move grub_add_unused_region code here.
16635 (grub_add_unused_region): Remove function.
16636 * kern/i386/pc/init.c: Include grub/cache.h.
16637 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16638 one call to add_mem_region.
16639 (grub_arch_modules_addr): New function.
16640 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16641 (grub_total_module_size): Likewise.
16642 Include grub/machine/kernel.h.
16643 (grub_arch_modules_addr): New function.
16644 * util/grub-emu.c (grub_end_addr): Remove variable.
16645 (grub_total_module_size): Likewise.
16646 (grub_arch_modules_addr): New function.
16647 * util/misc.c: Include unistd.h.
16648 (grub_util_get_fp_size): New function.
16649 (grub_util_read_at): Likewise.
16650 (grub_util_write_image_at): Likewise.
16651 (grub_util_read_image): Call grub_util_read_at.
16652 (grub_util_write_image): Call grub_util_write_image_at.
16653 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16654 additional memory in kernel_img for a struct grub_module_info.
16655 Fill in that grub_module_info.
16656 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16658 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16660 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16662 * include/grub/powerpc/ieee1275/ieee1275.h
16663 (grub_ieee1275_milliseconds): New prototype.
16664 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16666 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16667 grub_ieee1275_milliseconds.
16669 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16671 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16673 (find_options): New function.
16674 (cmain): Call find_options.
16675 * include/grub/powerpc/ieee1275/ieee1275.h
16676 (grub_ieee1275_realmode): New extern variable.
16677 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16678 grub_map if grub_ieee1275_realmode is false.
16680 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16682 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16683 lines are inserted and make it work like readline. Reported by
16684 Vincent Pelletier <subdino2004@yahoo.fr>.
16686 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16688 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16691 `kern/powerpc/cache.S'.
16693 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16695 * genmk.rb: Handle the `Program' class in the main loop. Written
16696 by Johan Rydberg <jrydberg@gnu.org>.
16697 (Program): New class.
16698 (programs): New variable.
16699 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16700 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16701 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16702 (help_arch): Function removed.
16703 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16704 `powerpc/libgcc.h' and `loader.h'.
16705 (pkgdata_PROGRAMS): New variable.
16706 (sbin_UTILITIES): Variable removed.
16707 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16708 (grubof_SOURCES): Variable re-defined so it only includes the
16709 core functionality.
16710 (grubof_CFLAGS): Remove `-DGRUBOF'.
16711 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16712 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16713 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16714 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16715 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16716 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16717 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16718 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16719 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16720 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16721 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16722 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16723 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16724 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16725 (pc_mod_CFLAGS): New variables.
16726 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16727 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16728 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16729 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16731 * include/grub/i386/pc/init.h (grub_os_area_addr)
16732 (rub_os_area_size): ... to here.
16733 * include/grub/powerpc/ieee1275/ieee1275.h
16734 (grub_ieee1275_entry_fn): Export symbol.
16735 * include/grub/powerpc/ieee1275/init.h: New file.
16736 * include/grub/powerpc/libgcc.h: Likewise.
16737 * include/grub/cache.h: Likewise.
16738 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16739 <hollis@penguinppc.org>.
16740 * kern/dl.c: Include <grub/cache.h>.
16741 (grub_dl_flush_cache): New function.
16742 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16744 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16745 (grub_console_init): Removed prototypes.
16746 (grub_machine_init): Don't initialize the modules anymore.
16747 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16749 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16750 Macro undef removed.
16751 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16752 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16753 relocation `R_PPC_REL32'. Return an error when the relocation is
16755 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16756 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16757 * util/misc.c (grub_arch_sync_caches): Likewise.
16759 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16761 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16762 `symlist.c', add `grubof_symlist.c'.
16763 (symlist.c): Variable removed.
16764 (grubof_HEADERS): Variable added.
16765 (grubof_symlist.c): New target.
16766 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16767 `kernel_img_HEADERS'.
16768 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16769 * kern/powerpc/dl.c: New file.
16770 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16772 (grub_arch_dl_relocate_symbols): Likewise.
16773 (grub_register_exported_symbols): Likewise.
16775 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16777 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16778 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16779 to fail instead. Reported by Vincent Pelletier
16780 <subdino2004@yahoo.fr>.
16782 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16783 it is not allocated. Reported by Vincent Pelletier
16784 <subdino2004@yahoo.fr>.
16786 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16787 output so the output looks better.
16789 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16791 Modulize the partition map support and add support for the amiga
16794 * commands/ls.c: Include <grub/partition.h> instead of
16795 <grub/machine/partition.h>.
16796 * kern/disk.c: Likewise.
16797 * kern/rescue.c: Likewise.
16798 * loader/i386/pc/chainloader.c: Likewise.
16799 * normal/cmdline.c: Likewise.
16800 * kern/powerpc/ieee1275/init.c: Likewise.
16801 (grub_machine_init): Call `grub_pc_partition_map_init',
16802 `grub_amiga_partition_map_init' and
16803 `grub_apple_partition_map_init'.
16804 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16805 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16806 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16807 `partition.h' and `pc_partition.h'.
16808 (grub_setup_SOURCES): Remove
16809 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16810 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16811 (grub_emu_SOURCES): Likewise.
16812 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16813 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16814 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16815 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16816 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16817 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16818 (grubof_SOURCES): Likewise.
16819 * disk/i386/pc/partition.c: File removed.
16820 * disk/powerpc/ieee1275/partition.c: Likewise.
16821 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16822 * include/grub/i386/pc/partition.h: Likewise.
16823 * kern/partition.c: New file.
16824 * partmap/amiga.c: Likewise.
16825 * partmap/apple.c: Likewise.
16826 * partmap/pc.c: Likewise.
16827 * include/grub/partition.h: Likewise..
16828 * include/grub/pc_partition.h: Likewise.
16829 * util/grub-emu.c: Include <grub/partition.h> instead of
16830 <grub/machine/partition.h>.
16831 (main): Call `grub_pc_partition_map_init',
16832 `grub_amiga_partition_map_init' and
16833 `grub_apple_partition_map_init' and deinitialize afterwards.
16834 * util/i386/pc/biosdisk.c: Include `#include
16835 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16836 `<grub/machine/partition.h>'.
16837 * util/i386/pc/grub-setup.c: Likewise.
16838 * util/i386/pc/biosdisk.c: Likewise.
16839 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16840 partition information in case of a PC partition.
16841 * util/i386/pc/grub-setup.c: Include `#include
16842 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16843 `<grub/machine/partition.h>'.
16844 (setup): Only access the PC specific partition information in case
16847 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16849 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16850 (grub_longjmp): Likewise.
16851 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16853 * normal/powerpc/setjmp.S: New file.
16854 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16855 `normal/powerpc/setjmp.S'.
16856 (grubof_CFLAGS): Add `-DGRUBOF'.
16857 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16858 [GRUB_UTIL && !GRUBOF].
16860 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16862 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16863 property named `name'. Correctly handle the error returned by
16864 `grub_ieee1275_finddevice' if a device can not be opened.
16866 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16868 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16869 `actual' for negativity.
16870 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16873 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16875 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16876 (PAGE_OFFSET): New macro.
16877 (CRTC_ADDR_PORT): Likewise.
16878 (CRTC_DATA_PORT): Likewise.
16879 (START_ADDR_HIGH_REGISTER): Likewise.
16880 (START_ADDR_LOW_REGISTER): Likewise.
16881 (GRAPHICS_ADDR_PORT): Likewise.
16882 (GRAPHICS_DATA_PORT): Likewise.
16883 (READ_MAP_REGISTER): Likewise.
16884 (INPUT_STATUS1_REGISTER): Likewise.
16885 (INPUT_STATUS1_VERTR_BIT): Likewise.
16886 (page): New variable.
16887 (wait_vretrace): New function.
16888 (set_read_map): Likewise.
16889 (set_start_address): Likewise.
16890 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16892 (check_vga_mem): Take the page into account.
16893 (write_char): Likewise.
16894 (write_cursor): Likewise.
16895 (scroll_up): Likewise. Copy the page to the page that is not
16896 shown and switch between both pages.
16897 (grub_vga_putchar): Fix off by one error.
16898 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16901 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16903 Add support for iso9660 (including rockridge).
16905 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16906 (iso9660_mod_SOURCES): New variable.
16907 (iso9660_mod_CFLAGS): Likewise.
16908 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16909 * include/grub/fs.h (grub_iso9660_init): New prototype.
16910 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16911 * fs/iso9660.c: New file.
16913 * include/grub/misc.h (grub_strncat): New prototype.
16914 * kern/misc.c (grub_strncat): New function.
16916 * fs/hfs.c (grub_hfs_mount): Translate the error
16917 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16918 * fs/jfs.c (grub_jfs_mount): Likewise.
16919 * fs/ufs.c (grub_ufs_mount): Likewise.
16921 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16923 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16924 which initialized BAT registers.
16925 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16926 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16928 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16929 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16931 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16932 (grub_mapclaim): Likewise.
16933 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16934 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16937 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16939 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16940 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16941 -ffreestanding and -msoft-float.
16943 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16945 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16946 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16947 set in grub_ieee1275_flags.
16949 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16951 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16953 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16954 grub_console_init first.
16955 Change the memory range used for grub_ieee1275_claim and
16956 grub_mm_init_region.
16957 Print an error message if the claim fails.
16958 Include <grub/misc.h>.
16960 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16962 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16963 Call grub_children_iterate for device nodes of type `scsi',
16965 (grub_ofdisk_open): Remove manual device alias resolution.
16966 Fix memory leak when device cannot be opened.
16967 * include/grub/powerpc/ieee1275/ieee1275.h
16968 (grub_children_iterate): New prototype.
16969 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16971 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16972 Return -1 if args.size was -1.
16974 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16976 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16977 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16978 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16979 Open Firmware's memory for it; claim memory from _start to _end.
16980 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16981 (_end): New extern.
16982 (_start): Zero BSS from __bss_start to _end.
16983 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16985 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16987 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16989 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16990 -1 if args.base was -1.
16992 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16994 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16995 escape sequence instead of a literal ^L. Also call
16996 grub_ofconsole_gotoxy.
16998 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17000 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17001 void * arguments to grub_addr_t. All callers updated. Also make
17002 the `result' argument optional.
17003 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17004 All callers updated.
17006 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17008 * commands/ls.c (grub_ls_list_files): Use the string following the
17009 initial ')', if present, as the filesystem path.
17010 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17012 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17014 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17016 Make the source code of the menu interface more readable.
17018 * normal/menu.c: Include grub/mm.h.
17019 (TERM_WIDTH): New macro.
17020 (TERM_HEIGHT): Likewise.
17021 (TERM_INFO_HEIGHT): Likewise.
17022 (TERM_MARGIN): Likewise.
17023 (TERM_SCROLL_WIDTH): Likewise.
17024 (TERM_TOP_BORDER_Y): Likewise.
17025 (TERM_LEFT_BORDER_X): Likewise.
17026 (TERM_BORDER_WIDTH): Likewise.
17027 (TERM_MESSAGE_HEIGHT): Likewise.
17028 (TERM_BORDER_HEIGHT): Likewise.
17029 (TERM_NUM_ENTRIES): Likewise.
17030 (TERM_FIRST_ENTRY_Y): Likewise.
17031 (TERM_ENTRY_WIDTH): Likewise.
17032 (TERM_CURSOR_X): Likewise.
17033 (draw_border): Use macros instead of magic numbers.
17034 (print_entry): Likewise.
17035 (print_entries): Likewise.
17036 (run_menu): Likewise. Also, handle the key 'e'.
17037 (run_menu_entry): Ignore empty command lines.
17038 (print_message): Added a new argument EDIT. If EDIT is true,
17039 print a different message.
17040 (init_page): Likewise.
17041 (edit_menu_entry): New function. Not implemented yet.
17043 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17045 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17046 can be loaded from normal mode.
17048 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17050 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17051 (multiboot_mod_CFLAGS): New variables.
17052 * loader/i386/pc/linux_normal.c: New file.
17053 * loader/i386/pc/multiboot_normal.c: Likewise.
17055 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17056 attribute `unused'.
17058 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17059 `fdiro' to read the mode information from instead of `diro'.
17061 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17062 looking up a symlink.
17064 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17066 * normal/command.c (grub_command_execute): Don't parse the
17067 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17068 flags of the command.
17070 * normal/menu.c (grub_menu_run): Fix typo.
17072 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17074 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17076 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17077 `y + 1' instead of `y - 1'.
17079 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17081 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17083 From Hollis Blanchard <hollis@penguinppc.org>:
17084 * kern/misc.c (memmove): New alias for grub_memmove.
17085 (memcmp): New alias for grub_memcmp.
17086 (memset): New alias for grub_memset.
17087 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17088 Change "int handle" to "grub_ieee1275_phandle_t handle".
17089 * include/grub/powerpc/ieee1275/ieee1275.h
17090 (grub_ieee1275_get_property): Likewise.
17092 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17094 Added normal mode command `chainloader' as module chain.mod, which
17095 depends on normal.mod and _chain.mod.
17097 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17098 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17099 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17101 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17102 but arguments parsing moved to ...
17103 (grub_chainloader_cmd): ... here. New function.
17104 * include/grub/i386/pc/chainloader.h: New file.
17105 * loader/i386/pc/chainloader_normal.c: Likewise.
17107 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17109 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17110 (grub_mkimage_LDFLAGS): Likewise.
17111 (grub_emu_SOURCES): Likewise.
17112 (kernel_img_HEADERS): Added fshelp.h.
17113 * fs/ext2.c: Include <grub/fshelp.h>.
17114 (FILETYPE_REG): New macro.
17115 (FILETYPE_INO_REG): Likewise.
17116 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17118 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17120 (grub_fshelp_node): New struct.
17121 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17123 (grub_ext2_get_file_block): Removed function.
17124 (grub_ext2_read_block): New function.
17125 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17126 This function was written.
17127 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17128 (grub_ext2_find_file): Removed function.
17129 (grub_ext2_read_symlink): New function.
17130 (grub_ext2_iterate_dir): Likewise.
17131 (grub_ext2_open): Rewritten.
17132 (grub_ext2_dir): Rewritten.
17133 * include/grub/fshelp.h: New file.
17134 * fs/fshelp.c: Likewise.
17136 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17138 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17139 (print_message): Add a missing newline.
17140 (run_menu): Added timeout support.
17141 (run_menu_entry): New local function.
17142 (grub_menu_run): Added support for booting.
17144 * kern/loader.c (grub_loader_is_loaded): New function.
17146 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17147 (grub_get_rtc): Exported.
17149 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17150 (grub_get_rtc): Exported.
17152 * include/grub/normal.h (struct grub_command_list): Remove
17153 constant from the member `command'.
17155 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17157 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17159 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17161 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17163 Add support for the JFS filesystem.
17165 * fs/jfs.c: New file.
17166 * include/grub/fs.h (grub_jfs_init): New prototype.
17167 (grub_jfs_fini): New prototype.
17168 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17169 (grub_emu_SOURCES): Likewise.
17170 (pkgdata_MODULES): Add jfs.mod.
17171 (jfs_mod_SOURCES): New variable.
17172 (jfs_mod_CFLAGS): Likewise.
17173 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17174 (grubof_SOURCES): Likewise.
17175 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17177 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17178 endian to the host endian.
17179 (grub_fat_utf16_to_utf8): Move function from there...
17180 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17181 the endianness of the source string anymore.
17182 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17184 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17186 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17187 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17188 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17189 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17191 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17192 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17193 for `node_found' and `it_dir'.
17194 (grub_hfs_dir): Add prototype for `dir_hook'.
17196 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17197 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17198 and `indir32' to silence a gcc warning.
17200 * include/grub/fs.h (grub_hfs_init): New prototype.
17201 (grub_hfs_fini): Likewise.
17204 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17206 Each disk device has its own id now. This is useful to make use
17207 of multiple disk devices.
17209 * include/grub/disk.h (grub_disk_dev_id): New enum.
17210 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17211 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17213 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17214 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17216 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17217 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17219 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17220 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17222 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17223 "id" which is used by the cache manager.
17225 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17228 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17230 * fs/hfs.c: New file.
17231 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17232 (grub_emu_SOURCES): Likewise.
17233 (pkgdata_MODULES): Add hfs.mod.
17234 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17235 (grubof_SOURCES): Likewise.
17236 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17238 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17239 * kern/misc.c (grub_strncasecmp): Add function.
17241 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17243 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17246 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17247 (grub_ext2_dir): In case the directory entry type is unknown, read
17250 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17252 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17253 grub_load_linux instead of grub_rescue_cmd_linux as second
17254 argument of grub_rescue_register_command.
17256 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17258 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17260 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17262 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17263 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17264 `loader/powerpc/ieee1275/linux.c',
17265 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17266 * include/grub/powerpc/ieee1275/ieee1275.h
17267 (grub_ieee1275_release): New prototype.
17268 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17269 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17270 normal, boot, linux and linux_normal.
17271 * loader/powerpc/ieee1275/linux.c: New file.
17272 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17274 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17276 * normal/arg.c (grub_arg_parse): Correct error handling after
17277 reallocating the argumentlist (check if `argl' is not null instead
17278 of checking if `args' is not null).
17279 * kern/mm.c (grub_realloc): Return the same pointer when using the
17280 same region, instead of returning the header address.
17282 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17284 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17285 one block instead of two when looking for the initial partition.
17286 (grub_partition_probe): Initialize the local variable `p' with 0.
17287 Use base 10 for the grub_strtoul call.
17288 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17289 need for one local variable.
17290 (grub_strtoul): Don't add the new value to `num', instead of that
17293 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17295 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17296 (pxeboot_img_SOURCES): New variable.
17297 (pxeboot_img_ASFLAGS): Likewise.
17298 (pxeboot_img_LDFLAGS): Likewise.
17299 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17300 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17301 <lode_leroy@hotmail.com>.
17303 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17305 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17306 there was no input.
17308 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17310 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17311 the history buffer logic.
17313 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17315 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17316 (FILETYPE_INO_SYMLINK): New macros.
17317 (grub_ext2_find_file): Check if the node is a directory using the
17318 inode stat information instead of using the filetype in the
17319 dirent. Exclude the first character of an absolute symlink.
17320 (grub_ext2_dir): Mask out the filetype part of the mode member of
17323 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17325 Add support for UFS version 1 and 2. Add support for the minix
17326 filesystem version 1 and 2, both the variants with 14 and 30 long
17329 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17331 (grub_emu_SOURCES): Likewise.
17332 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17333 (ufs_mod_SOURCES): New variable.
17334 (ufs_mod_CFLAGS): Likewise.
17335 (minix_mod_SOURCES): Likewise.
17336 (minix_mod_CFLAGS): Likewise.
17337 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17339 (grubof_SOURCES): Likewise.
17340 * fs/ufs.c: New file.
17341 * fs/minix.c: New file.
17342 * include/grub/fs.h (grub_ufs_init): New prototype.
17343 (grub_ufs_fini): Likewise.
17344 (grub_minix_init): Likewise.
17345 (grub_minix_fini): Likewise.
17346 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17349 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17351 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17352 commands/ls.c, commands/terminal.c, commands/boot.c,
17353 commands/cmp.c and commands/cat.c.
17354 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17356 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17359 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17361 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17362 and grub_, respectively. Because the conversion is trivial and
17363 mechanical, I omit the details here. Please refer to the CVS
17364 if you need more information.
17366 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17368 * include/pupa: Renamed to ...
17369 * include/grub: ... this.
17370 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17371 * util/i386/pc/grub-mkimage.c: ... this.
17372 * util/i386/pc/pupa-setup.c: Renamed to ...
17373 * util/i386/pc/grub-setup.c: ... this.
17374 * util/pupa-emu.c: Renamed to ...
17375 * util/grub-emu.c: ... this.
17377 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17379 Add support for the newworld apple macintosh (PPC). This has been
17380 tested on the powerbook 2000 only. It only adds support for
17381 generic ieee1275 functions, console and disk support. This should
17382 be easy to port to other architectures with support for Open
17385 * configure.ac: Accept the powerpc as host_cpu. In the case of
17386 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17387 specific tests are only executed while building for the i386.
17388 Inverse test for crosscompile.
17389 * genmk.rb (Utility): Allow assembler files.
17390 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17391 * conf/powerpc-ieee1275.rmk: New file.
17392 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17393 * disk/powerpc/ieee1275/partition.c: Likewise.
17394 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17395 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17396 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17397 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17398 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17399 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17400 * include/pupa/powerpc/ieee1275/loader.h
17401 * include/pupa/powerpc/setjmp.h: Likewise.
17402 * include/pupa/powerpc/types.h: Likewise.
17403 * kern/powerpc/ieee1275/init.c: Likewise.
17404 * kern/powerpc/ieee1275/openfw.c: Likewise.
17405 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17407 These files were written by Johan Rydberg
17408 (jrydberg@night.trouble.net) and I only modified them slightly.
17410 * boot/powerpc/ieee1275/cmain.c: New file.
17411 * boot/powerpc/ieee1275/crt0.S: Likewise.
17412 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17413 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17415 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17417 * Makefile.in: Update copyright.
17418 * genmodsrc.sh: Likewise.
17419 * gensymlist.sh: Likewise.
17420 * term/i386/pc/vga.c: Indent correctly.
17422 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17423 bugreporting address.
17424 * util/i386/pc/pupa-setup.c (usage): Likewise,
17425 (main): Call pupa_ext2_init and pupa_ext2_fini.
17427 * fs/fat.c (log2): Renamed to ...
17428 (fat_log2): ... this.
17429 All callers changed.
17430 * kern/misc.c (memcpy): Alias to pupa_memmove.
17431 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17433 * util/console.c (pupa_ncurses_fini): Return 0.
17435 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17436 Move fail label here.
17437 [__GNU__]: Don't warn when using stat.
17438 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17439 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17440 long int. Use strtol instead of strtoul.
17442 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17444 * commands/boot.c: New file.
17445 * commands/cat.c: Likewise.
17446 * commands/cmp.c: Likewise.
17447 * commands/ls.c: Likewise.
17448 * commands/terminal.c: Likewise.
17449 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17450 (pupa_register_command): Changed interface to match the new
17452 (pupa_command_execute): Changed (almost rewritten) so it uses
17453 pupa_split_command. Added support for setting variables using the
17455 (rescue_command): Changed to work with the new argument parser.
17456 (terminal_command): Moved from here to commands/terminal.c.
17457 (set_command): New function.
17458 (unset_command): New function.
17459 (insmod_command): New function.
17460 (rmmod_command): New function.
17461 (lsmod_command): New function.
17462 (pupa_command_init): Don't initialize the command terminal
17463 anymore. Initialize the commands set, unset, insmod, rmmod and
17465 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17466 (kernel_img_HEADERS): Add arg.h and env.h.
17467 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17468 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17469 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17471 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17473 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17474 (boot_mod_SOURCES): New variable.
17475 (terminal_mod_SOURCES): Likewise.
17476 (ls_mod_SOURCES): Likewise.
17477 (cmp_mod_SOURCES): Likewise.
17478 (cat_mod_SOURCES): Likewise.
17480 * normal/arg.c: New file.
17481 * kern/env.c: Likewise.
17482 * include/pupa/arg.h: Likewise.
17483 * include/pupa/env.h: Likewise.
17484 * font/manager.c (font_command): Changed to match argument parsing
17486 (PUPA_MOD_INIT): Likewise.
17487 * hello/hello.c (pupa_cmd_hello): Likewise.
17488 (PUPA_MOD_INIT): Likewise.
17489 * include/pupa/disk.h: Include <pupa/device.h>.
17490 (pupa_print_partinfo): New prototype.
17491 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17492 (pupa_dl_get_prefix): Likewise.
17493 * include/pupa/misc.h: Include <pupa/err.h>.
17494 (pupa_isgraph): New prototype.
17495 (pupa_isdigit): Likewise.
17496 (pupa_split_cmdline): Likewise.
17497 * include/pupa/normal.h: Include <pupa/arg.h>.
17498 (pupa_command): Changed the prototype of the member `func' to
17499 match the argument parsing interface. Added member `options'.
17500 (pupa_register_command): Updated to match function.
17501 (pupa_arg_parse): New prototype.
17502 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17503 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17504 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17505 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17506 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17507 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17508 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17509 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17510 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17511 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17512 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17513 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17514 * kern/disk.c: Include <pupa/file.h>.
17515 (pupa_print_partinfo): New function.
17516 * kern/dl.c: Include <pupa/env.h>.
17517 (pupa_dl_dir): Variable removed.
17518 (pupa_dl_load): Use the environment variable `prefix' instead of
17519 the variable pupa_dl_dir.
17520 (pupa_dl_set_prefix): Function removed.
17521 (pupa_dl_get_prefix): Likewise.
17522 * kern/i386/pc/init.c: Include <pupa/env.h>.
17523 (pupa_machine_init): Use the environment variable `prefix' instead of
17524 using pupa_dl_set_prefix to set the prefix.
17525 * kern/main.c: Include <pupa/env.h>.
17526 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17527 using pupa_dl_get_prefix to get the prefix.
17528 * kern/misc.c: Include <pupa/env.h>.
17529 (pupa_isdigit): New function.
17530 (pupa_isgraph): Likewise.
17531 (pupa_ftoa): Likewise.
17532 (pupa_vsprintf): Added support for printing values of the type
17533 `double'. Make it possible to format variable output when using
17534 formatting like `%1.2%f'.
17535 (pupa_split_cmdline): New function.
17536 * kern/rescue.c: Include <pupa/env.h>.
17537 (next_word): Removed function.
17538 (pupa_rescue_cmd_prefix): Likewise.
17539 (pupa_rescue_cmd_set): New function.
17540 (pupa_rescue_cmd_unset): New function.
17541 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17542 split the command line instead of splitting it here. Added
17543 support for setting variables using the syntax `foo=bar'. Don't
17544 initialize the prefix command anymore. Initialized the set and
17546 * normal/cmdline.c: Include <pupa/env.h>.
17547 (pupa_tab_complete): Added prototypes for print_simple_completion,
17548 print_partition_completion, add_completion, iterate_commands,
17549 iterate_dev, iterate_part and iterate_dir. Moved code to print
17550 partition information from here to kern/disk.c.
17551 (pupa_cmdline_run): Don't check if the function exists anymore.
17552 * normal/main.c: Include <pupa/env.h>.
17553 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17554 instead of using pupa_dl_get_prefix to get the prefix.
17555 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17556 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17558 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17559 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17560 ((unused))' to silence a gcc warning.
17561 (pupa_vga_setcolor): Likewise.
17562 (debug_command): Changed to match argument parsing
17564 * util/pupa-emu.c: Include <pupa/env.h>.
17565 (options): Added 0's for unused fields to silence a gcc warning.
17567 (main): Use the environment variable `prefix' instead of using
17568 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17569 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17572 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17573 * util/misc.c: Include <malloc.h>.
17574 (pupa_malloc): Rewritten so errors are correctly reported.
17575 (pupa_realloc): Likewise.
17576 (pupa_memalign): Likewise.
17577 (pupa_mm_init_region): Declare unused variables with
17578 `__attribute__ ((unused))' to silence a gcc warning.
17579 * normal/i386/setjmp.S: Remove tab at the end of the file to
17580 silence a gcc warning.
17581 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17582 variables with `__attribute__ ((unused))' to silence a gcc
17584 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17585 local variable i unsigned to silence a gcc warning.
17587 * kern/term.c: Include <pupa/misc.h>.
17588 (pupa_more_lines): New variable.
17589 (pupa_more): Likewise.
17590 (pupa_putcode): When the pager is active pause at the end of every
17592 (pupa_set_more): New function.
17593 * include/pupa/term.h (pupa_set_more): New prototype.
17596 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17598 Now this project is GRUB 2 rather than PUPA. The location of
17599 the CVS repository was moved to GRUB's.
17601 * configure.ac: Use bug-grub as the reporting address.
17602 Use GRUB instead of PUPA.
17603 Change the version number to 1.90.
17605 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17607 * genkernsyms.sh: Updated copyright information.
17608 * genmk.rb: Likewise.
17609 * genmodsrc.sh: Likewise.
17610 * gensymlist.sh: Likewise.
17611 * boot/i386/pc/boot.S: Likewise.
17612 * boot/i386/pc/diskboot.S: Likewise.
17613 * disk/i386/pc/biosdisk.c: Likewise.
17614 * disk/i386/pc/partition.c: Likewise.
17615 * font/manager.c: Likewise.
17616 * fs/ext2.c: Likewise.
17617 * fs/fat.c: Likewise.
17618 * include/pupa/boot.h: Likewise.
17619 * include/pupa/device.h: Likewise.
17620 * include/pupa/disk.h: Likewise.
17621 * include/pupa/dl.h: Likewise.
17622 * include/pupa/elf.h: Likewise.
17623 * include/pupa/err.h: Likewise.
17624 * include/pupa/file.h: Likewise.
17625 * include/pupa/font.h: Likewise.
17626 * include/pupa/fs.h: Likewise.
17627 * include/pupa/kernel.h: Likewise.
17628 * include/pupa/loader.h: Likewise.
17629 * include/pupa/misc.h: Likewise.
17630 * include/pupa/mm.h: Likewise.
17631 * include/pupa/net.h: Likewise.
17632 * include/pupa/normal.h: Likewise.
17633 * include/pupa/rescue.h: Likewise.
17634 * include/pupa/setjmp.h: Likewise.
17635 * include/pupa/symbol.h: Likewise.
17636 * include/pupa/term.h: Likewise.
17637 * include/pupa/types.h: Likewise.
17638 * include/pupa/i386/setjmp.h: Likewise.
17639 * include/pupa/i386/types.h: Likewise.
17640 * include/pupa/i386/pc/biosdisk.h: Likewise.
17641 * include/pupa/i386/pc/boot.h: Likewise.
17642 * include/pupa/i386/pc/console.h: Likewise.
17643 * include/pupa/i386/pc/init.h: Likewise.
17644 * include/pupa/i386/pc/kernel.h: Likewise.
17645 * include/pupa/i386/pc/linux.h: Likewise.
17646 * include/pupa/i386/pc/loader.h: Likewise.
17647 * include/pupa/i386/pc/memory.h: Likewise.
17648 * include/pupa/i386/pc/multiboot.h: Likewise.
17649 * include/pupa/i386/pc/partition.h: Likewise.
17650 * include/pupa/i386/pc/time.h: Likewise.
17651 * include/pupa/i386/pc/vga.h: Likewise.
17652 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17653 * include/pupa/util/getroot.h: Likewise.
17654 * include/pupa/util/misc.h: Likewise.
17655 * include/pupa/util/resolve.h: Likewise.
17656 * kern/device.c: Likewise.
17657 * kern/disk.c: Likewise.
17658 * kern/dl.c: Likewise.
17659 * kern/err.c: Likewise.
17660 * kern/file.c: Likewise.
17661 * kern/fs.c: Likewise.
17662 * kern/loader.c: Likewise.
17663 * kern/main.c: Likewise.
17664 * kern/misc.c: Likewise.
17665 * kern/mm.c: Likewise.
17666 * kern/rescue.c: Likewise.
17667 * kern/term.c: Likewise.
17668 * kern/i386/dl.c: Likewise.
17669 * kern/i386/pc/init.c: Likewise.
17670 * kern/i386/pc/lzo1x.S: Likewise.
17671 * kern/i386/pc/startup.S: Likewise.
17672 * loader/i386/pc/chainloader.c: Likewise.
17673 * loader/i386/pc/linux.c: Likewise.
17674 * loader/i386/pc/multiboot.c: Likewise.
17675 * normal/cmdline.c: Likewise.
17676 * normal/command.c: Likewise.
17677 * normal/main.c: Likewise.
17678 * normal/menu.c: Likewise.
17679 * normal/i386/setjmp.S: Likewise.
17680 * term/i386/pc/console.c: Likewise.
17681 * term/i386/pc/vga.c: Likewise.
17682 * util/console.c: Likewise.
17683 * util/genmoddep.c: Likewise.
17684 * util/misc.c: Likewise.
17685 * util/pupa-emu.c: Likewise.
17686 * util/resolve.c: Likewise.
17687 * util/unifont2pff.rb: Likewise.
17688 * util/i386/pc/biosdisk.c: Likewise.
17689 * util/i386/pc/getroot.c: Likewise.
17690 * util/i386/pc/pupa-mkimage.c: Likewise.
17691 * util/i386/pc/pupa-setup.c: Likewise.
17693 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17695 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17696 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17697 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17698 reading and reset it after reading.
17699 (pupa_ext2_close): Return PUPA_ERR_NONE.
17701 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17703 (struct linux_kernel_header): Add kernel_version and
17705 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17706 pupa_file_read succeeds.
17707 (pupa_rescue_cmd_initrd): Implement.
17709 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17711 * fs/ext2.c (pupa_ext2_label): New function.
17712 (pupa_ext2_fs): Added label.
17713 * fs/fat.c (pupa_fat_label): New function.
17714 (pupa_fat_fs): Added label.
17715 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17717 * kern/misc.c (pupa_strndup): New function.
17718 * include/pupa/misc.h (pupa_strndup): New prototype.
17720 * include/pupa/normal.h: Include <pupa/err.h>.
17721 (pupa_set_history): New prototype.
17722 (pupa_iterate_commands): New prototype.
17723 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17724 <pupa/disk.h>, <pupa/file.h>.
17725 (hist_size): New variable.
17726 (hist_lines): Likewise.
17727 (hist_end): Likewise.
17728 (hist_used): Likewise.
17729 (pupa_set_history): New function.
17730 (pupa_history_get): Likewise.
17731 (pupa_history_add): Likewise.
17732 (pupa_history_replace): Likewise.
17733 (pupa_tab_complete): Likewise.
17734 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17735 completion shows partitionnames while completing partitions, this
17736 feature was suggested by Jeff Bailey.
17737 * normal/command.c (pupa_iterate_commands): New function.
17738 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17739 (pupa_normal_init): Initialize history buffer.
17740 (PUPA_MOD_INIT): Likewise.
17741 (pupa_normal_fini): Free the history buffer.
17742 (PUPA_MOD_FINI): Likewise.
17744 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17747 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17748 * configure.ac [i386]: Check for regparam bug.
17749 (NESTED_FUNC_ATTR) [! i386]: Defined.
17751 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17753 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17754 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17755 (pupa_emu_SOURCES): New variable.
17756 (pupa_emu_LDFLAGS): Likewise.
17757 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17758 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17759 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17760 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17761 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17762 (pupa_jmp_buf): New typedef.
17763 (pupa_setjmp) [PUPA_UTIL]: New macro.
17764 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17765 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17766 (pupa_refresh): New prototype.
17767 * include/pupa/util/getroot.h: New file.
17768 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17770 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17771 (pupa_rescue_cmd_cat): Likewise.
17772 (pupa_rescue_cmd_ls): Likewise.
17773 (pupa_rescue_cmd_testload): Likewise.
17774 (pupa_rescue_cmd_lsmod): Likewise.
17775 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17776 * normal/menu.c (run_menu): Likewise.
17777 * kern/term.c (pupa_cls): Likewise.
17778 (pupa_refresh): New function.
17779 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17780 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17781 * util/console.c: New file.
17783 * util/i386/pc/getroot.c: New file.
17784 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17785 (pupa_putchar): New function.
17786 (pupa_refresh): Likewise.
17787 (xgetcwd): Function moved to ...
17788 (strip_extra_slashes): Likewise.
17789 (get_prefix): Likewise.
17790 * util/i386/pc/getroot.c: ... here.
17791 (find_root_device): Function moved and renamed to...
17792 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17793 Changed all callers.
17794 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17796 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17797 Changed all callers.
17798 * util/misc.c (pupa_memalign): New function.
17799 (pupa_mm_init_region): Likewise.
17800 (pupa_register_exported_symbols): Likewise.
17801 (pupa_putchar): Function removed.
17802 * util/pupa-emu.c: New file.
17804 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17806 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17807 (_multiboot_mod_SOURCES): New variable.
17808 (_multiboot_mod_CFLAGS): Likewise.
17809 * loader/i386/pc/multiboot.c: New file.
17810 * include/pupa/i386/pc/multiboot.h: Likewise.
17811 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17812 (pupa_multiboot_real_boot): New function.
17813 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17814 (pupa_multiboot_real_boot): New prototype.
17815 (pupa_rescue_cmd_multiboot): Likewise
17816 (pupa_rescue_cmd_module): Likewise.
17818 * kern/loader.c (pupa_loader_set): Continue when
17819 pupa_loader_unload_func() fails.
17820 (pupa_loader_unset): New function.
17821 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17823 * kern/misc.c (pupa_stpcpy): New function.
17824 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17826 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17828 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17829 for available extensions.
17831 * include/pupa/i386/pc/time.h: New file.
17832 * kern/disk.c: Include <pupa/machine/time.h>.
17833 (PUPA_CACHE_TIMEOUT): New macro.
17834 (pupa_last_time): New variable.
17835 (pupa_disk_open): Flush the cache when there was a timeout.
17836 (pupa_disk_close): Reset the timer.
17837 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17839 * util/misc.c: Include <sys/times.h>
17840 (pupa_get_rtc): New function.
17842 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17844 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17846 (pupa_ext2_get_file_block): Use blocks member.
17848 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17849 first block. Return -1 instead of pupa_errno on error.
17851 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17853 * README: In the pupa-mkimage example use _chain instead of chain
17854 and ext2 instead of fat.
17855 * TODO: Replace ext2fs with jfs as an example. Add an item for
17856 adding journal playback for ext2fs.
17857 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17858 (pkgdata_MODULES): Added ext2.mod.
17859 (ext2_mod_SOURCES): New variable.
17860 (ext2_mod_CFLAGS): Likewise.
17861 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17862 * include/pupa/misc.h (pupa_strncpy): New prototype.
17863 (pupa_strcat): Likewise.
17864 (pupa_strncmp): Likewise.
17865 * kern/misc.c (pupa_strcat): Enable function.
17866 (pupa_strncpy): New function.
17867 (pupa_strncmp): Likewise.
17868 * fs/ext2.c: New file.
17870 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17871 when the read failed before retrying.
17872 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17873 (_FILE_OFFSET_BITS): Likewise.
17874 * configure.ac: Added AC_SYS_LARGEFILE.
17876 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17878 * genmk.rb (PModule#rule): Make sure to get only symbol names
17879 from the output of nm.
17880 Reported by Robert Millan <zeratul2@wanadoo.es>.
17882 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17884 I forgot to check in these changes for a long time. This adds
17885 incomplete support for VGA console, and this is still very
17886 buggy. Also, a lot of consideration is required for I18N,
17887 UNICODE, and VGA font issues. Therefore, assume that this is
17888 such that "better than nothing".
17890 * font/manager.c: New file.
17891 * include/pupa/font.h: Likewise.
17892 * include/pupa/i386/pc/vga.h: Likewise.
17893 * term/i386/pc/vga.c: Likewise.
17894 * util/unifont2pff.rb: Likewise.
17896 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17897 (pkgdata_MODULES): Added vga.mod and font.mod.
17898 (vga_mod_SOURCES): New variables.
17899 (vga_mod_CFLAGS): Likewise.
17900 (font_mod_SOURCES): Likewise.
17901 (font_mod_CFLAGS): Likewise.
17903 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17905 * include/pupa/term.h: Include pupa/err.h.
17906 (struct pupa_term): Added init and fini.
17907 Changed the argument of putchar to pupa_uint32_t.
17909 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17910 (pupa_console_real_putchar): New prototype.
17911 (pupa_console_putchar): Removed.
17912 (pupa_console_checkkey): Exported.
17913 (pupa_console_getkey): Likewise.
17915 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17918 * kern/term.c (pupa_term_set_current): Rewritten.
17919 (pupa_putchar): Likewise.
17920 (pupa_putcode): New function.
17922 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17923 (pupa_console_real_putchar): ... this.
17924 (pupa_vga_set_mode): New function.
17925 (pupa_vga_get_font): Likewise.
17927 * normal/command.c: Include pupa/term.h.
17928 (terminal_command): New function.
17929 (pupa_command_init): Register the command "terminal".
17931 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17932 (DISP_UP): Likewise.
17933 (DISP_RIGHT): Likewise.
17934 (DISP_DOWN): Likewise.
17935 (DISP_HLINE): Likewise.
17936 (DISP_VLINE): Likewise.
17937 (DISP_UL): Likewise.
17938 (DISP_UR): Likewise.
17939 (DISP_LL): Likewise.
17940 (DISP_LR): Likewise.
17942 * term/i386/pc/console.c (pupa_console_putchar): New function.
17944 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17946 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17947 FIX. Reverse the path_list.
17949 * include/pupa/normal.h: Export pupa_register_command and
17950 pupa_unregister_command.
17952 * hello/hello.c (pupa_cmd_hello): New module.
17953 * conf/i386-pc.rmk: Added hello.mod.
17955 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17957 * kern/i386/pc/lzo1x.S: New file.
17959 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17960 (compress_kernel): New variable.
17961 (generate_image): Heavily modified to support compressing a
17962 large part of the core image.
17964 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17966 (pupa_util_load_image): New function.
17968 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17969 (pupa_compressed_size): New variable.
17970 (codestart): Enable Gate A20 here.
17971 Decompress the compressed part of the core image.
17972 Rearrange the code to put functions and variables which are
17973 required for initialization in the non-compressed part.
17976 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17979 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17981 * include/pupa/i386/pc/kernel.h
17982 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17983 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17984 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17985 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17986 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17988 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17990 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17991 (Utility#rule): Likewise.
17993 * configure.ac: Check if LZO is available.
17995 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17997 * include/pupa/normal.h: New file.
17998 * include/pupa/setjmp.h: Likewise.
17999 * include/pupa/i386/setjmp.h: Likewise.
18000 * normal/cmdline.c: Likewise.
18001 * normal/command.c: Likewise.
18002 * normal/main.c: Likewise.
18003 * normal/menu.c: Likewise.
18004 * normal/i386/setjmp.S: Likewise.
18006 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18007 (pupa_rescue_cmd_initrd): Likewise.
18009 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18012 * kern/i386/pc/startup.S (translation_table): New variable.
18013 (translate_keycode): New function.
18014 (pupa_console_getkey): Call translate_keycode.
18016 * kern/rescue.c (attempt_normal_mode): New function.
18017 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18018 it failed, print a message.
18020 * kern/mm.c (pupa_real_malloc): Print more information when a
18021 free magic is broken.
18022 (pupa_free): If the first free header is not free actually, set
18025 * kern/main.c (pupa_load_normal_mode): Just load the module
18027 (pupa_main): Don't print the message
18028 "Entering into rescue mode..." here.
18030 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18032 (pupa_rescue_cmd_initrd): Likewise.
18033 (pupa_rescue_cmd_initrd): Likewise.
18035 * include/pupa/symbol.h (FUNCTION): Specify the type.
18036 (VARIABLE): Likewise.
18038 * include/pupa/err.h (pupa_err_t): Added
18039 PUPA_ERR_UNKNOWN_COMMAND.
18041 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18042 (pupa_dl_get_prefix): Likewise.
18044 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18045 Added _chain.mod and _linux.mod instead of chain.mod and
18047 (chain_mod_SOURCES): Renamed to ...
18048 (_chain_mod_SOURCES): ... this.
18049 (chain_mod_CFLAGS): Renamed to ...
18050 (_chain_mod_CFLAGS): ... this.
18051 (linux_mod_SOURCES): Renamed to ...
18052 (_linux_mod_SOURCES): ... this.
18053 (linux_mod_CFLAGS): Renamed to ...
18054 (_linux_mod_CFLAGS): ... this.
18055 (normal_mod_SOURCES): New variable.
18056 (normal_mod_CFLAGS): Likewise.
18057 (normal_mod_ASFLAGS): Likewise.
18059 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18061 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18064 * kern/dl.c (pupa_dl_ref): Refer depending modules
18066 (pupa_dl_unref): Unrefer depending modules recursively.
18067 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18068 a module is unloaded before one depending on that module is
18070 (pupa_dl_unload): Unload depending modules explicitly,
18073 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18075 * include/pupa/i386/pc/linux.h: New file.
18076 * loader/i386/pc/linux.c: Likewise.
18078 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18080 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18081 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18082 of PUPA_CHAINLOADER_BOOT_SECTOR.
18084 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18085 (pupa_linux_prot_size): New variable.
18086 (pupa_linux_tmp_addr): Likewise.
18087 (pupa_linux_real_addr): Likewise.
18088 (pupa_linux_boot_zimage): New function.
18089 (pupa_linux_boot_bzimage): Likewise.
18091 * kern/i386/pc/init.c (struct mem_region): New structure.
18092 (MAX_REGIONS): New macro.
18093 (mem_regions): New variable.
18094 (num_regions): Likewise.
18095 (pupa_os_area_addr): Likewise.
18096 (pupa_os_area_size): Likewise.
18097 (pupa_lower_mem): Likewise.
18098 (pupa_upper_mem): Likewise.
18099 (add_mem_region): New function.
18100 (compact_mem_regions): Likewise.
18101 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18102 the size of the conventional memory and that of so-called upper
18103 memory (before the first memory hole).
18104 Instead of adding each found region to free memory, use
18105 add_mem_region and add them after removing overlaps.
18106 Also, add only 1/4 of the upper memory to free memory. The rest
18107 is used for loading OS images. Maybe this is ad hoc, but this
18108 makes it much easier to relocate OS images when booting.
18110 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18111 (pupa_enter_rescue_mode): Don't register initrd and module.
18113 * kern/mm.c: Include pupa/dl.h.
18115 * kern/main.c: Include pupa/file.h and pupa/device.h.
18117 * kern/loader.c (pupa_loader_load_module_func): Removed.
18118 (pupa_loader_load_module): Likewise.
18120 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18123 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18124 (pupa_linux_tmp_addr): Likewise.
18125 (pupa_linux_real_addr): Likewise.
18126 (pupa_linux_boot_zimage): Likewise.
18127 (pupa_linux_boot_bzimage): Likewise.
18129 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18130 (pupa_upper_mem): Likewise.
18131 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18132 module is too dangerous.
18134 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18135 (pupa_os_area_size): Likewise.
18136 (pupa_loader_set): Remove the first argument. Loader doesn't
18137 manage modules or initrd any longer.
18138 (pupa_loader_load_module): Removed.
18140 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18141 (linux_mod_SOURCES): New variable.
18142 (linux_mod_CFLAGS): Likewise.
18144 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18146 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18147 the length of a blocklist correctly.
18149 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18150 Use ioctl only if the OS file is a block device.
18151 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18152 not very useful for normal files.
18154 * kern/main.c (pupa_set_root_dev): New function.
18155 (pupa_load_normal_mode): Likewise.
18156 (pupa_main): Call those above.
18158 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18161 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18163 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18165 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18166 (setup): Configure the installed partition information and the
18169 * loader/i386/pc/chainloader.c (my_mod): New variable.
18170 (pupa_chainloader_unload): New function.
18171 (pupa_rescue_cmd_chainloader): Refer itself.
18172 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18174 * kern/i386/pc/startup.S (install_partition): Removed.
18175 (version_string): Likewise.
18176 (config_file): Likewise.
18177 (pupa_install_dos_part): New variable.
18178 (pupa_install_bsd_part): Likewise.
18179 (pupa_prefix): Likewise.
18180 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18182 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18184 (make_install_device): New function.
18185 (pupa_machine_init): Set the dl prefix.
18187 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18188 (buf): Renamed to ...
18189 (linebuf): ... this.
18190 (pupa_rescue_cmd_prefix): New function.
18191 (pupa_rescue_cmd_insmod): Likewise.
18192 (pupa_rescue_cmd_rmmod): Likewise.
18193 (pupa_rescue_cmd_lsmod): Likewise.
18194 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18197 * kern/mm.c (pupa_memalign): If failed even after invalidating
18198 disk caches, unload unneeded modules and retry.
18200 * kern/misc.c (pupa_memmove): New function.
18201 (pupa_memcpy): Removed.
18202 (pupa_strcpy): New function.
18203 (pupa_itoa): Made static.
18205 * kern/dl.c (pupa_dl_iterate): New function.
18206 (pupa_dl_ref): Likewise.
18207 (pupa_dl_unref): Likewise.
18208 (pupa_dl_unload): Return if succeeded or not.
18209 (pupa_dl_unload_unneeded): New function.
18210 (pupa_dl_unload_all): Likewise.
18211 (pupa_dl_init): Renamed to ...
18212 (pupa_dl_set_prefix): ... this.
18213 (pupa_dl_get_prefix): New function.
18215 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18216 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18217 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18218 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18219 (pupa_install_dos_part): Declared.
18220 (pupa_install_bsd_part): Likewise.
18221 (pupa_prefix): Likewise.
18222 (pupa_boot_drive): Likewise.
18224 * include/pupa/types.h: Fix a typo.
18226 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18228 (pupa_memmove): Declared.
18229 (pupa_strcpy): Likewise.
18231 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18232 pupa_mod_init takes one argument, its own module.
18233 (pupa_dl_unload_unneeded): Declared.
18234 (pupa_dl_unload_all): Likewise.
18235 (pupa_dl_ref): Likewise.
18236 (pupa_dl_unref): Likewise.
18237 (pupa_dl_iterate): Likewise.
18238 (pupa_dl_init): Renamed to ...
18239 (pupa_dl_set_prefix): ... this.
18240 (pupa_dl_get_prefix): Declared.
18242 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18243 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18245 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18246 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18248 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18249 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18251 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18253 * util/i386/pc/pupa-setup.c (setup): Define the internal
18254 function find_first_partition_start at the top level, because GCC
18255 3.0.x cannot compile internal functions in deeper scopes
18257 (find_root_device): Use lstat instead of stat.
18258 Don't follow symbolic links.
18259 Fix the path-constructing code.
18261 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18262 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18263 by a BLKGETSIZE ioctl first, because block devices don't fill
18264 the member st_mode of the structure stat on Linux.
18265 [__linux__] (linux_find_partition): Use a temporary buffer
18266 REAL_DEV for the working space. Copy it to DEV before returning.
18267 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18268 buffer cache consistent.
18269 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18270 strncmp. The previous value was merely wrong.
18271 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18273 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18274 FAT size is 12. The previous value was merely wrong.
18276 * kern/main.c (pupa_main): Don't split the starting message from
18279 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18280 LF, because BIOS goes crazy about character attributes in this
18283 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18285 * include/i386/pc/util/biosdisk.h: New file.
18286 * util/i386/pc/biosdisk.c: Likewise.
18287 * util/i386/pc/pupa-setup.c: Likewise.
18289 * Makefile.in (INCLUDE_DISTFILES): Added
18290 include/pupa/i386/pc/util/biosdisk.h.
18291 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18292 directory util/i386/pc.
18293 (install-local): Added a rule for sbin_UTILITIES.
18294 (uninstall): Likewise.
18296 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18298 * util/misc.c (xrealloc): New function.
18299 (pupa_malloc): Likewise.
18300 (pupa_free): Likewise.
18301 (pupa_realloc): Likewise.
18302 (pupa_stop): Likewise.
18303 (pupa_putchar): Likewise.
18305 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18307 * include/pupa/util/misc.h (xrealloc): Declared.
18309 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18311 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18312 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18314 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18315 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18317 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18318 way should be implemented.
18319 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18321 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18322 the size of NAME for safety.
18323 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18326 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18327 (pupa_setup_SOURCES): Likewise.
18329 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18331 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18333 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18334 bunch of pushl's from pusha, because this destroys the return
18337 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18339 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18340 This means that any missing prototypes could be fatal. Also, you
18341 must take care when writing assembly code. See the comments at
18342 the beginning of startup.S, for more details.
18344 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18345 compilation mechanism.
18346 (pupa_chainloader_real_boot): Likewise.
18347 (pupa_biosdisk_rw_int13_extensions): Likewise.
18348 (pupa_biosdisk_rw_standard): Likewise.
18349 (pupa_biosdisk_check_int13_extensions): Likewise.
18350 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18351 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18352 (pupa_get_memsize): Likewise.
18353 (pupa_get_mmap_entry): Likewise.
18354 (pupa_console_putchar): Likewise.
18355 (pupa_console_setcursor): Likewise.
18356 (pupa_getrtsecs): Use pushl instead of push.
18358 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18359 memory instead of the stack for a mmap entry, because some
18360 BIOSes may ignore the maximum size and overflow.
18362 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18364 * genmk.rb (PModule#rule): Compile automatically generated
18365 sources with module-specific CFLAGS as well as other sources.
18367 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18369 * configure.ac: Check ld.
18370 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18371 respectively, before checking endianness and sizes.
18373 * Makefile.in (LD): New variable.
18375 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18377 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18379 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18381 * Changelog: New file.