1 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
5 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
6 (grub_ufs_uuid): New function.
7 (grub_ufs_fs): add .uuid
9 2009-07-21 Pavel Roskin <proski@gnu.org>
11 * kern/dl.c (grub_dl_check_header): Make static.
13 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
15 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
16 add drivemap for Vista. It breaks Windows 7.
18 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
20 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
23 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
27 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
28 (grub_fstest_SOURCES): Likewise.
29 (pkglib_MODULES): Add befs.mod.
30 (befs_mod_SOURCES): New variable.
31 (befs_mod_CFLAGS): Likewise.
32 (befs_mod_LDFLAGS): Likewise.
33 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
34 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
35 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
36 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
37 (grub_setup_SOURCES): Likewise.
38 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
39 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
40 (grub_setup_SOURCES): Likewise.
41 * fs/befs.c: New file.
42 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
43 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
44 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
45 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
46 (B_KEY_INDEX_ALIGN): New declaration.
47 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
48 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
49 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
50 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
51 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
52 (grub_afs_mount) [MODE_BFS]: Likewise.
53 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
54 (grub_afs_fs): Use GRUB_AFS_FSNAME
55 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
56 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
57 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
58 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
60 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
62 * util/getroot.c (find_root_device): Add support for MacOSX.
63 * util/hostdisk.c: Likewise.
65 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
67 * font/font.c (find_glyph): Check whether a font is present to avoid
70 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
72 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
74 2009-07-20 Pavel Roskin <proski@gnu.org>
76 * configure.ac: Trim excessively wordy excuses.
78 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
80 Add symlink, mtime and label support to AtheFS.
82 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
83 (grub_afs_iterate_dir): Handle symlinks.
84 (grub_afs_open): Use grub_afs_read_symlink.
85 (grub_afs_dir): Likewise.
87 (grub_afs_label): New function.
88 (grub_afs_fs): Add grub_afs_label.
89 (grub_afs_read_symlink): New function.
91 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
95 * fs/afs.c: Fix comments style.
96 (grub_afs_blockrun): Declare as packed.
97 (grub_afs_datastream): Likewise.
98 (grub_afs_bnode): Likewise.
99 (grub_afs_btree): Likewise.
100 (grub_afs_sblock): Likewise.
101 Declare `name' as char.
102 (grub_afs_inode): Declare as packed.
103 Change void *vnode to grub_uint32_t unused.
104 (grub_afs_iterate_dir): Check that key_size is positive.
105 (grub_afs_mount): Don't read superblock twice.
106 (grub_afs_dir): Don't free node in case of error,
107 grub_fshelp_find_file already handles this.
108 (grub_afs_open): Likewise.
110 2009-07-19 Pavel Roskin <proski@gnu.org>
112 * Makefile.in: Remove LIBLZO and enable_lzo.
113 * conf/i386-pc.rmk: Remove lzo support.
114 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
115 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
117 * kern/i386/pc/lzo1x.S: Remove.
118 * kern/i386/pc/startup.S: Remove lzo support.
119 * util/i386/pc/grub-mkimage.c: Likewise.
121 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
123 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
124 * fs/xfs.c (grub_xfs_dir): Likewise.
125 * fs/afs.c (grub_afs_dir): Likewise.
126 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
127 (grub_iso9660_open): Likewise.
128 * fs/jfs.c (grub_jfs_open): Likewise.
129 * fs/ext2.c (grub_ext2_dir): Likewise.
130 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
131 * script/sh/lexer.c (grub_script_yylex): Likewise.
133 2009-07-16 Pavel Roskin <proski@gnu.org>
135 * configure.ac: Never add "-c" to CFLAGS.
137 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
139 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
140 grub_cv_cc_efiemu should be used.
142 * configure.ac: Typo fixes.
144 * kern/mm.c (grub_zalloc): New function.
145 (grub_debug_zalloc): Likewise.
146 * include/grub/mm.h: Declare grub_zalloc() and
148 * util/misc.c (grub_zalloc): New function.
149 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
150 instead of grub_malloc(), remove unneeded initializations.
151 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
152 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
153 * commands/parttool.c (grub_cmd_parttool): Likewise.
154 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
155 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
156 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
157 * disk/usbms.c (grub_usbms_finddevs): Likewise.
158 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
159 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
160 (grub_cmd_efiemu_pnvram): Likewise.
161 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
162 * fs/iso9660.c (grub_iso9660_mount): Likewise.
163 (grub_iso9660_iterate_dir): Likewise.
164 * fs/jfs.c (grub_jfs_opendir): Likewise.
165 * fs/ntfs.c (list_file): Likewise.
166 (grub_ntfs_mount): Likewise.
167 * kern/disk.c (grub_disk_open): Likewise.
168 * kern/dl.c (grub_dl_load_core): Likewise.
169 * kern/elf.c (grub_elf_file): Likewise.
170 * kern/env.c (grub_env_context_open): Likewise.
171 (grub_env_set): Likewise.
172 (grub_env_set_data_slot): Likewise.
173 * kern/file.c (grub_file_open): Likewise.
174 * kern/fs.c (grub_fs_blocklist_open): Likewise.
175 * loader/i386/multiboot.c (grub_module): Likewise.
176 * loader/xnu.c (grub_xnu_create_key): Likewise.
177 (grub_xnu_create_value): Likewise.
178 * normal/main.c (grub_normal_add_menu_entry): Likewise.
179 (read_config_file): Likewise.
180 * normal/menu_entry.c (make_screen): Likewise.
181 * partmap/sun.c (sun_partition_map_iterate): Likewise.
182 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
183 * script/sh/script.c (grub_script_parse): Likewise.
184 * video/bitmap.c (grub_video_bitmap_create): Likewise.
185 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
186 * video/readers/png.c (grub_png_output_byte): Likewise.
187 (grub_video_reader_png): Likewise.
189 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
191 Enable all targets that can be built by default
193 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
194 grub-mkfont and grub-fstest if they can be built
196 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
198 Fix hang and segmentation fault in grub-emu-usb
200 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
201 * util/usb.c (grub_libusb_devices): likewise
202 (grub_libusb_init): rename to ...
203 (GRUB_MOD_INIT (libusb)):...this
204 (grub_libusb_fini): rename to ..
205 (GRUB_MOD_FINI (libusb)):...this
206 * disk/usbms.c (grub_usbms_transfer): fix retry logic
207 * include/grub/disk.h (grub_raid_init): removed, it's useless
208 (grub_raid_fini): likewise
209 (grub_lvm_init): likewise
210 (grub_lvm_fini): likewise
211 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
214 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
218 * Makefile.in (LIBUSB): new macro
219 * genmk.rb (Utility/print_tail): new method
220 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
221 (top level): call util.print_tail at the end.
223 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
225 Make FreeBSD accept zpool.cache
227 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
228 type is /boot/zfs/zpool.cache
230 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
234 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
235 correct wrong typedef
236 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
238 2009-07-15 Pavel Roskin <proski@gnu.org>
240 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
241 * kern/disk.c (struct grub_disk_cache): Likewise.
243 * commands/probe.c (options): Typo fix.
245 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
246 Increase to 0x5a to accommodate FAT32. Adjust other offsets
248 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
250 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
251 the end of "Error" to make the message more readable.
253 * boot/i386/pc/boot.S (kernel_segment): Remove.
254 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
257 * boot/i386/pc/boot.S (boot_version): Remove.
258 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
261 * include/grub/i386/pc/boot.h: Sort all offsets.
262 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
263 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
264 * boot/i386/pc/boot.S: Assert location of every offset listed in
265 include/grub/i386/pc/boot.h.
267 2009-07-13 Pavel Roskin <proski@gnu.org>
269 * include/grub/i386/coreboot/machine.h: Rename
270 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
271 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
272 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
274 * kern/dl.c: Force native word size to suppress warnings when
277 * kern/device.c (grub_device_iterate): Change struct part_ent to
278 hold the name, not a pointer to it. Use one grub_malloc() per
279 partition, not two. Free partition_name if grub_malloc() fails.
280 Set ents to NULL only before grub_partition_iterate() is called.
282 2009-07-11 Bean <bean123ch@gmail.com>
284 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
287 2009-07-10 Bean <bean123ch@gmail.com>
288 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
290 * kern/ieee1275/openfw.c (grub_children_iterate)
291 (grub_devalias_iterate): Fix size evaluation for property or path
292 strings, which was broken since r2132.
294 2009-07-07 Pavel Roskin <proski@gnu.org>
296 * commands/search.c (search_file): Merge into ...
297 (search_fs): ... this. Accept search type as argument.
298 (grub_cmd_search): Pass search type to search_fs().
300 * include/grub/util/console.h: New file.
301 * util/console.c: Use it instead of grub/machine/console.h.
302 * util/grub-emu.c: Likewise.
304 * lib/arg.c (find_long_option): Remove.
305 (find_long): Add `len' argument, make `s' const char *.
306 (grub_arg_parse): Parse long options in place, not in a
309 2009-07-06 Pavel Roskin <proski@gnu.org>
311 * commands/search.c (search_fs): Fix potential NULL pointer
314 * commands/search.c (search_fs): Replace QUID macro with quid_fn
317 2009-07-06 Daniel Mierswa <impulze@impulze.org>
319 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
322 2009-07-05 Pavel Roskin <proski@gnu.org>
324 * include/grub/i386/linux.h (struct linux_kernel_params):
325 Restore padding3, it's still needed.
327 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
329 * util/osdetect.lua: Likewise.
331 2009-07-05 Bean <bean123ch@gmail.com>
333 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
335 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
336 (grub_lua_getenv): Likewise.
337 (grub_lua_setenv): Likewise.
338 (save_errno): New function.
339 (push_result): Likewise.
340 (grub_lua_enum_device): Likewise.
341 (grub_lua_enum_file): Likewise.
342 (grub_lua_file_open): Likewise.
343 (grub_lua_file_close): Likewise.
344 (grub_lua_file_seek): Likewise.
345 (grub_lua_file_read): Likewise.
346 (grub_lua_file_getline): Likewise.
347 (grub_lua_file_getsize): Likewise.
348 (grub_lua_file_getpos): Likewise.
349 (grub_lua_file_eof): Likewise.
350 (grub_lua_file_exist): Likewise.
351 (grub_lua_add_menu): Likewise.
353 * script/lua/grub_lua.h (isupper): New inline function.
356 (isxdigit): Likewise.
357 (strcspn): Change to normal function.
358 (strpbkr): New function declaration.
361 * script/lua/grub_main.c (scan_str): New function.
366 * script/lua/linit.c (lualibs): Enable the string library.
368 * util/osdetect.lua: New file.
370 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
372 * include/grub/i386/linux.h (struct linux_kernel_params): Add
373 `capabilities' member.
375 2009-07-02 Pavel Roskin <proski@gnu.org>
377 * genparttoollist.sh: Add missing newline at the end.
379 2009-07-01 Pavel Roskin <proski@gnu.org>
381 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
383 * util/hostdisk.c (open_device): Remove `const' from
384 `sysctl_size', as sysctlbyname() can change it (in this case it
385 doesn't actually happen).
387 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
388 using signed long int constants.
390 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
391 constant to avoid a warning on FreeBSD.
393 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
396 * Makefile.in: Install include/grub/machine symlink.
398 * Makefile.in: When installing symlinks, use "cp -fR", which
399 works on FreeBSD and MacOSX.
400 From Yves Blusseau <cl7m42e02@sneakemail.com>
402 * kern/dl.c (grub_dl_resolve_symbol): Make static.
403 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
405 * util/misc.c: Move grub_reboot() and grub_halt() ...
406 * util/grub-emu.c: ... here. Make main_env static.
407 * include/grub/util/misc.h: Remove main_env.
409 * kern/mm.c: Use correct format to print size_t.
411 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
412 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
413 * kern/powerpc/dl.c: Likewise.
414 * kern/sparc64/dl.c: Likewise.
415 * kern/x86_64/dl.c: Likewise.
417 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
419 Fix grub-emu build on sparc64-ieee1275.
421 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
424 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
426 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
427 (grub_reboot, grub_halt): New functions.
429 * util/i386/pc/misc.c: Delete. Update all users.
430 * util/sparc64/ieee1275/misc.c: Likewise.
431 * util/powerpc/ieee1275/misc.c: Likewise.
433 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
435 * conf/i386.rmk (setjmp_mod_SOURCES)
436 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
437 * conf/common.rmk (setjmp_mod_SOURCES)
438 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
439 to use $(target_cpu).
440 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
441 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
442 * conf/powerpc-ieee1275.rmk: Likewise.
443 * conf/sparc64-ieee1275.rmk: Likewise.
445 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
446 $(target_cpu) for kern/$(target_cpu)/dl.c.
447 * conf/i386-efi.rmk: Likewise.
448 * conf/i386-ieee1275.rmk: Likewise.
449 * conf/x86_64-efi.rmk: Likewise.
450 * conf/i386-coreboot.rmk: Likewise.
451 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
452 $(target_cpu) for kern/$(target_cpu)/dl.c and for
453 kern/$(target_cpu)/cache.S.
454 * conf/sparc64-ieee1275.rmk: Likewise.
456 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
458 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
459 type to `grub_uint8_t', and adjust `padding9' accordingly.
461 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
463 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
465 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
466 assembly in final jump, using register constraints.
468 (grub_linux_boot): For text mode, initialize `have_vga' using
469 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
471 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
472 right before the final jump.
474 Set `video_mode' to 0x3.
476 Document initialization of `video_page', `video_mode' and
479 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
481 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
482 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
483 and set GRUB_LINUX_FLAG_QUIET appropriately.
485 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
487 Fix build on Debian / sparc.
489 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
491 2009-06-28 Pavel Roskin <proski@gnu.org>
493 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
496 * util/grub.d/10_linux.in: Match SUSE style initrd names.
498 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
500 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
503 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
507 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
508 file can't be opened. grub_file_open() is already supposed to set
509 grub_errno / grub_errmsg appropriately.
510 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
512 2009-06-27 Pavel Roskin <proski@gnu.org>
513 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
515 * include/grub/dl.h: Include grub/elf.h.
516 (struct grub_dl): Add symtab field.
517 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
518 GRUB_MODULES_MACHINE_READONLY.
519 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
520 of the header for read-only modules.
521 (grub_dl_unload): Free mod->symtab for read-only modules.
522 * kern/i386/dl.c: Use mod->symtab.
523 * kern/powerpc/dl.c: Likewise.
524 * kern/sparc64/dl.c: Likewise.
525 * kern/x86_64/dl.c: Likewise.
527 * conf/i386-qemu.rmk: New file.
528 * kern/i386/qemu/startup.S: Likewise.
529 * kern/i386/qemu/mmap.c: Likewise.
530 * boot/i386/qemu/boot.S: Likewise.
531 * include/grub/i386/qemu/time.h: Likewise.
532 * include/grub/i386/qemu/serial.h: Likewise.
533 * include/grub/i386/qemu/kernel.h: Likewise.
534 * include/grub/i386/qemu/console.h: Likewise.
535 * include/grub/i386/qemu/boot.h: Likewise.
536 * include/grub/i386/qemu/init.h: Likewise.
537 * include/grub/i386/qemu/machine.h: Likewise.
538 * include/grub/i386/qemu/loader.h: Likewise.
539 * include/grub/i386/qemu/memory.h: Likewise.
541 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
542 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
543 [qemu] (pkglib_IMAGES): Add `boot.img'.
544 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
545 [qemu] (boot_img_FORMAT): New variables.
546 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
547 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
548 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
549 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
550 [qemu] (kernel_img_FORMAT): New variables.
552 * configure.ac: Recognise `i386-qemu'.
554 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
555 (for no compression).
556 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
557 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
558 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
559 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
562 2009-06-27 Pavel Roskin <proski@gnu.org>
564 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
566 * efiemu/prepare32.c: Likewise.
567 * efiemu/prepare64.c: Likewise.
569 2009-06-26 Pavel Roskin <proski@gnu.org>
571 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
572 * include/grub/elf.h: Define symbols without "32" or "64" based
573 on GRUB_TARGET_WORDSIZE.
574 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
575 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
577 * efiemu/loadcore64.c: Likewise.
578 * loader/i386/bsd32.c: Likewise.
579 * loader/i386/bsd64.c: Likewise.
580 * kern/dl.c: Remove own ELF definitions.
581 * util/i386/efi/grub-mkimage.c: Likewise.
583 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
585 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
586 segment 0x0 unconditionally, because the reference generated by
587 GAS is an absolute address.
589 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
591 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
592 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
594 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
596 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
597 indexes. Check for -f explicitly.
598 (search_file): Improve error message.
599 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
601 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
603 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
604 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
606 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
608 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
609 * conf/i386-ieee1275.rmk: Likewise.
610 * conf/i386-coreboot.rmk: Likewise.
612 * kern/i386/pc/startup.S (grub_stop): Remove function.
613 * kern/i386/ieee1275/startup.S: Likewise.
614 * kern/i386/coreboot/startup.S: Likewise.
615 * kern/i386/misc.S (grub_stop): New function.
617 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
619 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
620 * kern/i386/realmode.S (real_to_prot): ... to here.
622 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
624 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
626 (kernel_elf_SOURCES): Rename to ...
627 (kernel_img_SOURCES): ... this.
628 (kernel_elf_HEADERS): Rename to ...
629 (kernel_img_HEADERS): ... this. Update all users.
630 (kernel_elf_ASFLAGS): Rename to ...
631 (kernel_img_ASFLAGS): ... this.
632 (kernel_elf_CFLAGS): Rename to ...
633 (kernel_img_CFLAGS): ... this.
634 (kernel_elf_LDFLAGS): Rename to ...
635 (kernel_img_LDFLAGS): ... this.
636 * conf/i386-coreboot.rmk: Likewise.
637 * conf/powerpc-ieee1275.rmk: Likewise.
639 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
642 2009-06-21 Pavel Roskin <proski@gnu.org>
644 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
645 to match nested functions.
646 * loader/sparc64/ieee1275/linux.c: Likewise.
648 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
650 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
652 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
655 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
657 Fix asm file handling on ELF, and remove workarounds.
659 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
660 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
661 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
662 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
664 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
668 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
669 and loader/i386/bsd64.c
670 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
671 (FREEBSD_MODTYPE_ELF_MODULE): New definition
672 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
673 (grub_freebsd_load_elfmodule32): New declaration
674 (grub_freebsd_load_elfmoduleobj64): Likewise
675 (grub_freebsd_load_elf_meta32): Likewise
676 (grub_freebsd_load_elf_meta64): Likewise
677 (grub_freebsd_add_meta): Likewise
678 (grub_freebsd_add_meta_module): Likewise
679 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
680 (grub_freebsd_add_meta_module): Likewise and move module-specific
681 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
682 (grub_cmd_freebsd): Add elf-kernel specific parts
683 based on grub_freebsd_add_meta_module
684 (grub_cmd_freebsd_module): Add type parsing moved from
685 grub_freebsd_add_meta_module
686 (grub_cmd_freebsd_module_elf): New function
687 (cmd_freebsd_module_elf): New variable
688 (GRUB_MOD_INIT): Register freebsd_module_elf
689 * loader/i386/bsd32.c: New file
690 * loader/i386/bsd64.c: Likewise
691 * loader/i386/bsdXX.c: Likewise
692 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
693 (grub_elf64_load): Likewise
694 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
696 (grub_elf64_load_hook_t): Likewise
698 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
700 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
702 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
703 don't write a menu entry for recovery mode.
705 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
707 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
708 after it's no longer needed.
710 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
712 * include/grub/i386/loader.h (grub_linux_prot_size)
713 (grub_linux_tmp_addr, grub_linux_real_addr)
714 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
716 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
717 common grub_util_info() call to ...
718 (generate_image): ... here.
719 Fix use of uninitialized memory, comparison of signed with
720 unsigned integers and memory leak.
721 Remove bogus module address message.
723 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
725 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
727 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
729 2009-06-19 Pavel Roskin <proski@gnu.org>
731 * configure.ac: Remove stray AC_MSG_CHECKING.
733 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
735 * disk/scsi.c (grub_scsi_open): use continue instead of big if
737 2009-06-18 Pavel Roskin <proski@gnu.org>
739 * conf/common.rmk: Add fs_file.mod.
740 * disk/fs_file.c: New file.
741 * include/grub/disk.h (enum grub_disk_dev_id): Add
742 GRUB_DISK_DEVICE_FILE_ID.
744 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
746 Fix build with Apple's toolchain. Part 2
748 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
751 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
753 Fix build with Apple's toolchain. Part 1
755 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
757 * configure.ac: remove a leftover AC_MSG_RESULT
758 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
761 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
765 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
766 (decomp_block): initialize ch
767 use grub_memcpy instead of memcpy
769 2009-06-17 Pavel Roskin <proski@gnu.org>
771 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
772 version, use declarations needed to use vga_text as the startup
775 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
776 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
778 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
779 and grub_at_keyboard_fini(), it's done on module load and
782 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
784 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
786 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
788 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
792 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
793 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
794 (grub_script_yylex): don't segfault on unterminated script
795 newline terminates command and variable
797 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
799 avoid double grub_adjust_range call. Bug reported by David Simner
801 * kern/disk.c (grub_disk_write): change to raw disk access before
804 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
806 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
807 spaces, for the benefit of help2man.
808 * util/i386/efi/grub-mkimage.c (usage): Likewise.
810 2009-06-16 Pavel Roskin <proski@gnu.org>
812 * kern/i386/halt.c: Include grub/machine/init.h.
813 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
815 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
817 * util/grub.d/30_os-prober.in: Use ${root} in the generated
820 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
822 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
825 2009-06-16 Pavel Roskin <proski@gnu.org>
827 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
828 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
829 save %dx, we only need %dl and we never change it.
830 * boot/i386/pc/cdboot.S: Don't set the root drive.
831 * boot/i386/pc/pxeboot.S: Likewise.
832 * include/grub/i386/pc/boot.h: Remove
833 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
834 GRUB_BOOT_MACHINE_DRIVE_CHECK.
835 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
836 * kern/i386/pc/init.c (make_install_device): Remove references
838 * kern/i386/pc/startup.S: Likewise.
839 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
841 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
845 * commands/xnu_uuid.c: new file
846 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
847 (xnu_uuid_mod_SOURCES): new variable
848 (xnu_uuid_mod_CFLAGS): likewise
849 (xnu_uuid_mod_LDFLAGS): likewise
850 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
851 * conf/i386-ieee1275.rmk: likewise
852 * conf/i386-pc.rmk: likewise
853 * conf/powerpc-ieee1275.rmk: likewise
854 * conf/sparc64-ieee1275.rmk: likewise
855 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
857 2009-06-16 Pavel Roskin <proski@gnu.org>
859 * configure.ac: Avoid '==' in test command, it's not portable.
861 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
865 * commands/probe.c: new file
866 * conf/common.rmk (pkglib_MODULES): add probe.mod
867 (probe_mod_SOURCES): new variable
868 (probe_mod_CFLAGS): likewise
869 (probe_mod_LDFLAGS): likewise
870 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
871 * conf/i386-ieee1275.rmk: likewise
872 * conf/i386-pc.rmk: likewise
873 * conf/powerpc-ieee1275.rmk: likewise
874 * conf/sparc64-ieee1275.rmk: likewise
876 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
878 Fix handling of string like \"hello\" and "a
881 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
882 (grub_script_yylex): fix parsing of quoting, escaping and newline
884 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
886 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
889 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
891 * util/grub-mkconfig.in: Fix parsing of --output option.
893 2009-06-12 Pavel Roskin <proski@gnu.org>
895 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
896 genmk.rb don't need to be generated or installed.
898 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
900 * commands/i386/pc/drivemap_int13h.S: add more comments
902 2009-06-11 Pavel Roskin <proski@gnu.org>
904 * Makefile.in (uninstall): Uninstall manuals.
906 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
907 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
908 and update-grub_lib in two places.
909 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
911 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
914 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
915 `entry_lo' to fix variable shadowing.
917 2009-06-11 Christian Franke <franke@computer.org>
919 * kern/misc.c (__enable_execute_stack): Add missing return type
920 to prevent gcc warning.
922 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
924 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
926 2009-06-11 Pavel Roskin <proski@gnu.org>
928 * Makefile.in: Don't rely on any scripts being executable.
929 Always use $(SHELL) to run shell scripts.
931 * configure.ac: Always define ___main if using -nostdlib. This
932 fixes tests on Cygwin.
934 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
938 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
939 is in bytes and not in blocks
941 2009-06-11 Pavel Roskin <proski@gnu.org>
943 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
946 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
948 * util/grub.d/30_os-prober.in: Fix a comment. Source
949 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
950 to set the root device. Place drivemap command in the generated
953 2009-06-11 Pavel Roskin <proski@gnu.org>
955 * configure.ac: Remove host_m32. Issues with 64-bit utilities
956 have long been resolved.
958 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
960 * util/grub.d/10_linux.in: Capitalise "Linux".
962 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
964 2009-06-11 Pavel Roskin <proski@gnu.org>
966 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
967 fix a gcc warning and ensure that the function won't ever exit.
969 * kern/i386/ieee1275/init.c: Add missing prototype for
972 * loader/ieee1275/multiboot2.c [__i386__]: Include
973 grub/cpu/multiboot.h.
975 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
976 casts to short - they are not portable and cause warnings. Fix
977 use of uninitialized values in input_buf. Use ARRAY_SIZE.
979 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
983 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
985 (grub_get_root_biosnumber_saved): new variable
986 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
987 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
988 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
989 %dx after the call if necessary
990 * conf/common.rmk (pkglib_MODULES): remove boot.mod
991 (boot_mod_SOURCES): remove
992 (boot_mod_CFLAGS): remove
993 (boot_mod_LDFLAGS): remove
994 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
995 (boot_mod_SOURCES): new variable
996 (boot_mod_CFLAGS): likewise
997 (boot_mod_LDFLAGS): likewise
998 * conf/i386-efi.rmk: likewise
999 * conf/i386-ieee1275.rmk: likewise
1000 * conf/i386-pc.rmk: likewise
1001 * conf/powerpc-ieee1275.rmk: likewise
1002 * conf/sparc64-ieee1275.rmk: likewise
1003 * conf/x86_64-efi.rmk: likewise
1004 * include/grub/i386/pc/biosnum.h: new file
1005 * lib/i386/pc/biosnum.c: likewise
1006 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1007 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1008 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1010 2009-06-10 Pavel Roskin <proski@gnu.org>
1012 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1013 Use separate variables. Read only the file size at the end, but
1014 not the checksum that we don't use.
1016 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1019 * kern/ieee1275/openfw.c: Remove libc includes.
1020 * kern/ieee1275/cmain.c: Likewise.
1021 * include/grub/ieee1275/ieee1275.h: Likewise.
1023 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1026 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1028 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1029 `genparttoollist.sh'.
1030 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1031 Add `*.sh' to the list find searches for and change `mdate.sh'
1034 2009-06-10 Pavel Roskin <proski@gnu.org>
1036 * include/grub/multiboot2.h: Provide compatibility defines for
1038 * include/multiboot2.h: Include stdint.h only if needed, using
1040 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1042 * loader/ieee1275/multiboot2.c: Likewise.
1043 * loader/multiboot2.c: Likewise.
1044 * loader/multiboot_loader.c: Likewise.
1046 * configure.ac: Use -nostdlib when probing for the target. It
1047 should not be required to have libc for the target.
1049 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1050 they fail without libc headers for the target.
1051 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1053 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1054 preprocessor conditionals.
1056 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1057 build system doesn't need to be aware of the tar.c internals.
1059 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1061 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1063 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1065 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1066 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1068 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1070 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1071 aren't available if ata.mod gets used.
1073 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1075 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1076 initialising controller.
1077 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1079 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1081 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1082 to choose between ata and biosdisk module on i386-pc.
1084 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1086 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1087 Subclass and Programming Interface fields in terms of the 3 byte
1088 Class Code register.
1089 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1091 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1092 interface is OHCI. Add grub_dprintf for symmetry with
1094 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1095 interface is UHCI. Add interf variable for programming
1096 interface. Print interface with class/subclass.
1098 * bus/usb/ohci.c: Set interf with correct field.
1100 * bus/usb/uhci.c: Remove unneeded doubled lines.
1101 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1102 Remove whitespace inside comment.
1104 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1106 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1107 as fallback an equivalent option without depth.
1109 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1111 Not fail if unable to retrieve C/H/S on LBA disks
1113 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1114 if unable to retrieve C/H/S on LBA disks
1116 2009-06-08 Pavel Roskin <proski@gnu.org>
1118 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1121 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1123 * Makefile.in (uninstall): Remove all $lib_DATA files.
1125 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1127 Bugfix: install on partitionless device
1129 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1132 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1134 * Makefile.in (uninstall): Remove all $include_DATA files.
1136 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1138 * commands/true.c: New file. Implement the true and false commands.
1139 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1140 (true_mod_SOURCES): New variable.
1141 (true_mod_CFLAGS): Likewise.
1142 (true_mod_LDFLAGS): Likewise.
1144 2009-06-05 Colin D Bennett <colin@gibibit.com>
1146 Optimized font character lookup using binary search instead of linear
1147 search. Fonts now are required to have the character index ordered by
1150 * font/font.c (load_font_index): Verify that fonts have ordered
1152 (find_glyph): Use binary search instead of linear search to find a
1153 character in a font.
1155 2009-06-05 Michael Scherer <misc@mandriva.org>
1157 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1158 uses case sensitive btree.
1159 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1160 only for case insensitive filesystems.
1162 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1164 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1165 * conf/common.rmk (search_mod_CFLAGS): likewise
1167 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1169 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1170 compensate a compiler bug
1172 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1174 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1177 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1179 Definitions for creating asm symbols with Apple's CC
1181 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1182 [APPLE_CC] (VARIABLE): likewise
1184 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1186 Disable lnxboot.img when compiled
1189 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1190 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1191 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1192 [! APPLE_CC] (CODE_LENG): skip
1193 [! APPLE_CC] (setup_sects): likewise
1194 [! APPLE_CC]: skip filling
1196 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1198 Address in trampolines based on 32-bit registers when compiled
1201 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1203 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1205 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1207 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1209 * kern/misc.c [APPLE_CC] (memcpy): new function
1210 [APPLE_CC] (memmove): likewise
1211 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1212 (memcpy): define alias conditionally on !APPLE_CC
1215 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1216 APPLE_CC are defined
1217 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1218 (grub_assert_fail): make prototype conditional
1220 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1222 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1224 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1226 (CLEANFILES): add grub-macho2img
1227 (grub_macho2img_SOURCES): new variable
1228 * kern/i386/pc/startup.S (bss_start): new variable
1230 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1231 * util/grub-macho2img.c: new file
1233 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1235 Use objconv when compiling with Apple's CC
1237 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1238 (efiemu64.o): likewise
1239 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1240 when compiling with Apple's CC
1241 (efiemu64_s.o): likewise
1242 * configure.ac: check for objconv when compiling with Apple's CC
1243 * genmk.rb: use objconv for modules when compiled with Apple's CC
1245 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1247 Define segment as well as section when compiling with
1250 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1251 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1252 (efiemu_convert_pointer): likewise
1253 (efiemu_set_virtual_address_map): likewise
1254 (efiemu_convert_pointer): likewise
1255 (efiemu_getcrc32): likewise
1256 (init_crc32_table): likewise
1258 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1259 (GRUB_MOD_DEP): likewise
1261 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1263 Allow a compilation without -mcmodel=large
1265 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1266 when compiled without -mcmodel=large
1267 (filter_memory_map): remove memory post 4 GiB when compiled
1268 without -mcmodel=large
1269 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1270 TARGET_CFLAGS when -mcmodel=large isn't supported
1272 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1274 Remove nested functions in efiemu core
1276 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1278 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1280 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1282 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1284 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1286 (grub_cpu_is_tsc_supported): likewise
1287 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1289 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1291 Absolute addressing through constant with Apple's cc
1293 * kern/i386/pc/startup.S: Define necessary constants
1294 and address through it when using ABS with Apple's CC
1295 * boot/i386/pc/diskboot.S: likewise
1296 * boot/i386/pc/boot.S: likewise
1297 * boot/i386/pc/lnxboot.S: likewise
1298 * boot/i386/pc/cdboot.S: likewise
1299 * mmap/i386/pc/mmap_helper.S: likewise
1300 * commands/i386/pc/drivemap_int13h.S: likewise
1302 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1304 Check if compiler is apple cc
1306 * Makefile.in (ASFLAGS): new variable
1307 (TARGET_ASFLAGS): likewise
1308 (TARGET_MODULE_FORMAT): likewise
1309 (TARGET_APPLE_CC): likewise
1311 (TARGET_IMG_CFLAGS): likewise
1312 (TARGET_CPPFLAGS): add includedir
1313 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1314 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1315 Check for linker script only if compiler isn't Apple's CC
1316 (TARGET_MODULE_FORMAT): set
1317 (TARGET_APPLE_CC): likewise
1318 (TARGET_ASFLAGS): likewise
1320 Check for objcopy only if compiler isn't Apple's CC
1321 Check for BSS symbol only if compiler isn't Apple's CC
1322 * genmk.rb: adapt nm options if we use Apple's utils
1323 * aclocal.m4 (grub_apple_cc): new test
1324 (grub_apple_target_cc): likewise
1326 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1328 Simplify sed expressions and improve awk
1330 * Makefile.in (install-local): simplify sed expression
1331 * gencmdlist.sh: likewise
1332 * genmoddep.awk: avoid adding module as a dependency of itself
1334 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1336 Add missing start symbols
1338 * boot/i386/pc/boot.S: add start
1339 * boot/i386/pc/pxeboot.S: likewise
1341 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1343 Fix wrong assumptions with grub-mkimage on EFI
1345 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1346 (relocate_addresses): consider both r_addend and value at offset
1347 (make_mods_section): zerofill modinfo and header
1348 (convert_elf): write prefix here
1350 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1352 Use .asciz instead of .string
1354 * i386/pc/diskboot.S: use .asciz instead of .string
1355 * i386/pc/boot.S: likewise
1356 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1357 (GRUB_MOD_NAME): likewise
1359 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1363 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1364 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1365 (grub_video_setup): remove
1366 (grub_video_set_mode): new prototype
1367 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1369 (linux_vesafb_res): compile only on PCBIOS
1370 (grub_linux_boot): support gfxpayload
1371 * loader/i386/pc/xnu.c (video_hook): new function
1372 (grub_xnu_set_video): support gfxpayload
1373 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1374 (DEFAULT_VIDEO_HEIGHT): likewise
1375 (DEFAULT_VIDEO_FLAGS): likewise
1376 (DEFAULT_VIDEO_MODE): new definition
1377 (video_hook): new function
1378 (grub_gfxterm_init): use grub_video_set_mode
1379 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1381 * video/video.c (grub_video_setup): removed
1382 (grub_video_set_mode): new function based on grub_gfxterm_init and
1385 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1387 Avoid calling biosdisk in drivemap
1389 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1390 (revparse_biosdisk): likewise
1391 (list_mappings): derive name from id directly
1392 (grub_cmd_drivemap): use tryparse_diskstring
1394 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1398 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1399 (grub_lexer_param): add tokenonhold
1400 (grub_script_create_cmdline): remove cmdline. All callers updated
1401 (grub_script_function_create): make functionname
1402 grub_script_arg. All callers updated
1403 (grub_script_execute_argument_to_string): new prototype
1404 * kern/parser.c (state_transitions): reorder
1405 (grub_parser_cmdline_state): fix a bug and make more compact
1406 * script/sh/execute.c (grub_script_execute_argument_to_string):
1408 (grub_script_execute_cmdline): use new format
1409 * script/sh/function.c (grub_script_function_create): make functionname
1410 grub_script_arg. All callers updated
1411 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1412 (grub_script_yylex): remove
1413 (grub_script_yylex2): renamed to ...
1414 (grub_script_yylex): ...renamed
1415 parse the expressions like a${b}c
1416 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1417 (GRUB_PARSER_TOKEN_VAR): remove
1418 (GRUB_PARSER_TOKEN_NAME): likewise
1419 ("if"): declare as typeless
1421 ("function"): likewise
1426 (argument): likewise
1427 (script): accept empty scripts and make exit on error
1428 (arguments): use GRUB_PARSER_TOKEN_ARG
1429 (function): likewise
1430 (command): move error handling to script
1431 (menuentry): move grub_script_lexer_ref before
1432 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1433 argument. All callers updated
1435 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1437 Prevent GRUB from probing floppies during boot.
1439 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1440 * commands/search.c (options): Add --no-floppy.
1441 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1442 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1443 --no-floppy when searching for UUIDs.
1445 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1447 Simplify the code duplication in commands/search.c.
1449 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1450 (search_fs): ... this. Update all users.
1452 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1454 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1456 2009-05-28 Pavel Roskin <proski@gnu.org>
1458 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1459 Remove the original symlink explicitly.
1461 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1462 just one slash. That's how grub_fshelp_find_file() does it.
1464 2009-05-26 Pavel Roskin <proski@gnu.org>
1466 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1469 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1472 2009-05-25 Christian Franke <franke@computer.org>
1474 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1476 (grub_atapi_identify): Add wait after drive select.
1477 (grub_ata_identify): Do more strict status register check before
1478 calling grub_atapi_identify (). Suppress error message if status
1479 register is 0x00 after command failure. Add status register
1480 check after PIO read to avoid bogus identify due to stuck DRQ.
1481 Thanks to Pavel Roskin for testing.
1482 (grub_device_initialize): Remove unsafe status register check.
1483 Thanks to 'phcoder' for problem report and patch.
1484 Prevent sign extension in debug message.
1486 2009-05-23 Colin D Bennett <colin@gibibit.com>
1488 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1489 definition file, and functions defined in `normal/menu.c' have had
1490 their prototypes moved to `include/grub/menu.h' for consistency.
1492 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1494 (grub_menu_get_entry): Likewise.
1495 (grub_menu_get_timeout): Likewise.
1496 (grub_menu_set_timeout): Likewise.
1497 (grub_menu_execute_entry): Likewise.
1498 (grub_menu_execute_with_fallback): Likewise.
1499 (grub_menu_entry_run): Likewise.
1501 * include/grub/normal.h: Re-ordered and grouped function
1502 prototypes by file that the function is defined in.
1503 (grub_menu_execute_callback): Removed; moved to menu.h.
1504 (grub_menu_get_entry): Likewise.
1505 (grub_menu_get_timeout): Likewise.
1506 (grub_menu_set_timeout): Likewise.
1507 (grub_menu_execute_entry): Likewise.
1508 (grub_menu_execute_with_fallback): Likewise.
1509 (grub_menu_entry_run): Likewise.
1510 (grub_menu_addentry): Renamed from this ...
1511 (grub_normal_add_menu_entry): ... to this.
1513 * normal/main.c (grub_menu_addentry): Renamed from this ...
1514 (grub_normal_add_menu_entry): ... to this.
1516 * script/sh/execute.c (grub_script_execute_menuentry): Update
1517 reference to renamed grub_menu_addentry function.
1519 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1521 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1523 2009-05-22 Pavel Roskin <proski@gnu.org>
1525 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1526 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1527 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1528 compiling for the i386 targets, but not for the utilities.
1530 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1532 (grub_root_drive): Likewise.
1533 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1535 (grub_root_drive): Change size to byte.
1536 (grub_start_addr): Remove.
1537 (grub_end_addr): Likewise.
1538 (grub_apm_bios_info): Likewise.
1540 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1542 * normal/i386: Remove.
1543 * normal/powerpc: Likewise.
1544 * normal/sparc64: Likewise.
1545 * normal/x86_64: Likewise.
1547 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1549 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1550 * loader/i386/linux_trampoline.S: Fix indentation
1551 * loader/i386/xnu_helper.S: Likewise
1553 2009-05-18 Colin D Bennett <colin@gibibit.com>
1555 Display error messages when parsing a Lua statement fails.
1556 Previously, executing a syntactically invalid statement like
1557 ")foo" or "bar;" would silently fail.
1559 * script/lua/grub_main.c (handle_lua_error): New function.
1560 (grub_lua_parse_line): Improved reporting of Lua parser and
1563 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1565 Remove -Werror which causes build to fail on some systems
1567 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1568 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1569 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1571 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1573 trampoline for linux on 64-bit platform
1575 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1576 loader/i386/efi/linux_trampoline.S
1577 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1579 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1581 * loader/i386/linux_trampoline.S: moved here
1582 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1584 (jumpvector): removed
1585 (grub_linux_trampoline_start): new declaration
1586 (grub_linux_trampoline_end): likewise
1587 (grub_linux_boot): use trampoline when on 64-bit platform
1588 * loader/i386/linux.c: likewise
1590 2009-05-16 Pavel Roskin <proski@gnu.org>
1592 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1593 const to avoid a warning.
1594 (grub_lua_setenv): Likewise.
1595 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1596 lmsg to fix a warning.
1598 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1600 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1601 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1602 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1603 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1604 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1605 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1606 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1607 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1609 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1611 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1613 2009-05-16 Bean <bean123ch@gmail.com>
1615 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1616 (lua_mod_SOURCES): New variable.
1617 (lua_mod_CFLAGS): Likewise.
1618 (lua_mod_LDFLAGS): Likewise.
1620 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1621 (setjmp_mod_SOURCES): New variable.
1622 (setjmp_mod_CFLAGS): Likewise.
1623 (setjmp_LDFLAGS): Likewise.
1625 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1626 (setjmp_mod_SOURCES): New variable.
1627 (setjmp_mod_CFLAGS): Likewise.
1628 (setjmp_LDFLAGS): Likewise.
1630 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1631 (setjmp_mod_SOURCES): New variable.
1632 (setjmp_mod_CFLAGS): Likewise.
1633 (setjmp_LDFLAGS): Likewise.
1635 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1636 (setjmp_mod_SOURCES): New variable.
1637 (setjmp_mod_CFLAGS): Likewise.
1638 (setjmp_LDFLAGS): Likewise.
1640 * normal/i386/setjmp.S: Moved from here ...
1641 * lib/i386/setjmp.S: ... Moved here
1642 * normal/x86_64/setjmp.S: Moved from here ...
1643 * lib/x86_64/setjmp.S: ... Moved here
1644 * normal/powerpc/setjmp.S: Moved from here ...
1645 * lib/powerpc/setjmp.S: ... Moved here
1646 * normal/sparc64/setjmp.S: Moved from here ...
1647 * lib/sparc64/setjmp.S: ... Moved here
1649 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1650 returns_twice in mingw.
1652 * script/lua/grub_lib.c: New file.
1653 * script/lua/grub_lib.h: Likewise.
1654 * script/lua/grub_lua.h: Likewise.
1655 * script/lua/grub_main.c: Likewise.
1656 * script/lua/lapi.c: Likewise.
1657 * script/lua/lapi.h: Likewise.
1658 * script/lua/lauxlib.c: Likewise.
1659 * script/lua/lauxlib.h: Likewise.
1660 * script/lua/lbaselib.c: Likewise.
1661 * script/lua/lcode.c: Likewise.
1662 * script/lua/lcode.h: Likewise.
1663 * script/lua/ldblib.c: Likewise.
1664 * script/lua/ldebug.c: Likewise.
1665 * script/lua/ldebug.h: Likewise.
1666 * script/lua/ldo.c: Likewise.
1667 * script/lua/ldo.h: Likewise.
1668 * script/lua/ldump.c: Likewise.
1669 * script/lua/lfunc.c: Likewise.
1670 * script/lua/lfunc.h: Likewise.
1671 * script/lua/lgc.c: Likewise.
1672 * script/lua/lgc.h: Likewise.
1673 * script/lua/linit.c: Likewise.
1674 * script/lua/liolib.c: Likewise.
1675 * script/lua/llex.c: Likewise.
1676 * script/lua/llex.h: Likewise.
1677 * script/lua/llimits.h: Likewise.
1678 * script/lua/lmathlib.c: Likewise.
1679 * script/lua/lmem.c: Likewise.
1680 * script/lua/lmem.h: Likewise.
1681 * script/lua/loadlib.c: Likewise.
1682 * script/lua/lobject.c: Likewise.
1683 * script/lua/lobject.h: Likewise.
1684 * script/lua/lopcodes.c: Likewise.
1685 * script/lua/lopcodes.h: Likewise.
1686 * script/lua/loslib.c: Likewise.
1687 * script/lua/lparser.c: Likewise.
1688 * script/lua/lparser.h: Likewise.
1689 * script/lua/lstate.c: Likewise.
1690 * script/lua/lstate.h: Likewise.
1691 * script/lua/lstring.c: Likewise.
1692 * script/lua/lstring.h: Likewise.
1693 * script/lua/lstrlib.c: Likewise.
1694 * script/lua/ltable.c: Likewise.
1695 * script/lua/ltable.h: Likewise.
1696 * script/lua/ltablib.c: Likewise.
1697 * script/lua/ltm.c: Likewise.
1698 * script/lua/ltm.h: Likewise.
1699 * script/lua/lua.h: Likewise.
1700 * script/lua/luaconf.h: Likewise.
1701 * script/lua/lualib.h: Likewise.
1702 * script/lua/lundump.c: Likewise.
1703 * script/lua/lundump.h: Likewise.
1704 * script/lua/lvm.c: Likewise.
1705 * script/lua/lvm.h: Likewise.
1706 * script/lua/lzio.c: Likewise.
1707 * script/lua/lzio.h: Likewise.
1709 2009-05-16 Bean <bean123ch@gmail.com>
1711 * include/grub/kernel.h (grub_module_header_types): Add type
1714 * kern/main.c (grub_load_config): New function.
1715 (grub_main): Call grub_load_config to read boot config.
1717 * grub-mkimage (generate_image): New parameter config_path.
1718 (options): New option --config.
1719 (main): Parse --config option, and pass it to generate_image.
1721 2009-05-14 Christian Franke <franke@computer.org>
1723 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1724 This fixes build on Cygwin.
1726 2009-05-14 Pavel Roskin <proski@gnu.org>
1728 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1729 jump. This saves two bytes, so the typical case of 2 swapped
1730 drives would fit 32 bytes.
1732 2009-05-13 Pavel Roskin <proski@gnu.org>
1734 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1735 grub_uint32_t to avoid a warning.
1737 * loader/i386/linux.c (allocate_pages): When assigning
1738 real_mode_mem, cast through grub_size_t to fix a warning. The
1739 code already makes sure that the value would fit a pointer.
1740 (grub_linux_setup_video): Cast render_target->data to
1741 grub_size_t to fix a warning.
1743 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1745 * commands/i386/pc/drivemap.c: New file - implement drivemap
1747 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1748 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1750 2009-05-13 Pavel Roskin <proski@gnu.org>
1752 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1753 embedding_area_exists.
1755 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1757 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1758 it easier to understand / work with.
1759 Improve warning messages for cases where there's no embedding area,
1760 or when it is too small (or core.img too large).
1762 2009-05-13 Pavel Roskin <proski@gnu.org>
1764 * loader/i386/pc/multiboot2.c: Add necessary includes for
1765 grub_multiboot2_real_boot().
1767 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1768 PX record is always little-endian. We only need the lower 2
1771 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1772 facilitate code reuse.
1773 (grub_cpio_mount): Use "struct head", not a char buffer. This
1774 fixes a warning reported by gcc 4.4.
1776 * kernel/disk.c (grub_disk_read): Use void pointer for the
1778 (grub_disk_write): Use const void pointer for the buffer.
1779 Adjust all callers. Remove unnecessary casts.
1781 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1783 * util/i386/pc/grub-install.in: Update copyright year.
1785 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1789 * commands/gptsync.c: new file
1790 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1791 (gptsync_mod_SOURCES): new variable
1792 (gptsync_mod_CFLAGS): likewise
1793 (gptsync_mod_LDFLAGS): likewise
1794 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1796 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1797 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1798 * conf/i386-ieee1275.rmk: likewise
1799 * conf/i386-pc.rmk: likewise
1800 * conf/powerpc-ieee1275.rmk: likewise
1802 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1806 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1807 (grub_dl_ref): likewise
1809 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1811 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1812 split in two functions (one for msdos and one for gpt).
1814 2009-05-08 Pavel Roskin <proski@gnu.org>
1816 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1819 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1820 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1821 Initialize them with -1. Add sanity check for bad1. Eliminate
1824 2009-05-08 David S. Miller <davem@davemloft.net>
1826 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1828 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1830 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1833 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1835 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1836 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1838 2009-05-05 David S. Miller <davem@davemloft.net>
1840 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1842 2009-05-05 Pavel Roskin <proski@gnu.org>
1844 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1845 of grub_dl_ref() and grub_dl_unref().
1846 * commands/parttool.c: Remove preprocessor conditionals around
1847 grub_dl_ref() and grub_dl_unref().
1848 * fs/affs.c: Likewise.
1849 * fs/afs.c: Likewise.
1850 * fs/cpio.c: Likewise.
1851 * fs/ext2.c: Likewise.
1852 * fs/fat.c: Likewise.
1853 * fs/hfs.c: Likewise.
1854 * fs/hfsplus.c: Likewise.
1855 * fs/iso9660.c: Likewise.
1856 * fs/jfs.c: Likewise.
1857 * fs/minix.c: Likewise.
1858 * fs/ntfs.c: Likewise.
1859 * fs/reiserfs.c: Likewise.
1860 * fs/sfs.c: Likewise.
1861 * fs/udf.c: Likewise.
1862 * fs/ufs.c: Likewise.
1863 * fs/xfs.c: Likewise.
1864 * include/grub/dl.h: Likewise.
1865 * loader/xnu.c: Likewise.
1867 2009-05-04 Pavel Roskin <proski@gnu.org>
1869 * commands/acpi.c: Remove unused variable my_mod.
1870 * partmap/amiga.c: Likewise.
1871 * partmap/apple.c: Likewise.
1872 * partmap/gpt.c: Likewise.
1873 * partmap/pc.c: Likewise.
1874 * partmap/sun.c: Likewise.
1875 * term/gfxterm.c: Likewise.
1876 * term/i386/pc/vesafb.c: Likewise.
1877 * term/i386/pc/vga.c: Likewise.
1879 2009-05-04 David S. Miller <davem@davemloft.net>
1881 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1882 pointer args to grub_ieee1275_get_property().
1884 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1886 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1887 devices, and do not traverse down under controller nodes.
1889 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1890 (grub_ofdisk_open): Use it to un-escape "," characters.
1891 * kern/disk.c (find_part_sep): New.
1892 (grub_disk_open): Use it to find the first non-escaped ','
1893 character in the disk name.
1894 * util/ieee1275/devicemap.c (escape_of_path): New.
1895 (grub_util_emit_devicemap_entry): Use it.
1896 * util/sparc64/ieee1275/grub-install.in: Update script to
1897 strip partition specifiers properly by not triggering on
1898 '\' escaped ',' characters.
1900 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1902 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1904 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1906 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1907 on documentation from Wikipedia).
1909 2009-05-04 Pavel Roskin <proski@gnu.org>
1911 * disk/ata.c: Spelling fixes.
1912 * disk/raid.c: Likewise.
1913 * disk/usbms.c: Likewise.
1914 * disk/dmraid_nvidia.c: Likewise.
1915 * kern/ieee1275/openfw.c: Likewise.
1916 * kern/ieee1275/init.c: Likewise.
1917 * kern/ieee1275/cmain.c: Likewise.
1918 * boot/i386/pc/cdboot.S: Likewise.
1919 * video/readers/png.c: Likewise.
1920 * video/i386/pc/vbe.c: Likewise.
1921 * fs/udf.c: Likewise.
1922 * fs/hfs.c: Likewise.
1923 * fs/reiserfs.c: Likewise.
1924 * efiemu/runtime/efiemu.c: Likewise.
1925 * efiemu/main.c: Likewise.
1926 * efiemu/mm.c: Likewise.
1927 * include/grub/elf.h: Likewise.
1928 * include/grub/xnu.h: Likewise.
1929 * include/grub/usbdesc.h: Likewise.
1930 * include/grub/usb.h: Likewise.
1931 * include/grub/script_sh.h: Likewise.
1932 * include/grub/lib/LzmaEnc.h: Likewise.
1933 * include/grub/efiemu/efiemu.h: Likewise.
1934 * include/grub/command.h: Likewise.
1935 * normal/menu.c: Likewise.
1936 * normal/main.c: Likewise.
1937 * normal/datetime.c: Likewise.
1938 * bus/usb/uhci.c: Likewise.
1939 * mmap/i386/uppermem.c: Likewise.
1940 * mmap/mmap.c: Likewise.
1941 * commands/acpi.c: Likewise.
1942 * commands/test.c: Likewise.
1943 * partmap/apple.c: Likewise.
1944 * font/font.c: Likewise.
1945 * loader/sparc64/ieee1275/linux.c: Likewise.
1946 * loader/macho.c: Likewise.
1947 * loader/i386/bsd_trampoline.S: Likewise.
1948 * loader/i386/bsd.c: Likewise.
1949 * loader/xnu.c: Likewise.
1950 * term/i386/pc/vesafb.c: Likewise.
1951 * term/usb_keyboard.c: Likewise.
1952 * util/resolve.c: Likewise.
1953 * util/getroot.c: Likewise.
1955 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1957 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1959 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1961 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1964 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1966 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1967 parameter only available on BIOS.
1969 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1971 Removed wrong semicolon in declaration
1973 * grub/misc.h (grub_dprintf): remove semicolon
1975 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1977 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1978 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1979 is done by grub_cmd_linux() now).
1980 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1981 restore video to text mode.
1982 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1983 indicates lack of "vga=" parameter. "vga=0" is mapped to
1984 `GRUB_LINUX_VID_MODE_NORMAL'.
1986 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1988 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1989 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1990 and `normal/script.c'. Add `kern/rescue_reader.c',
1991 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1992 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1993 `grub_script.tab.c'.
1995 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1996 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1997 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1998 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1999 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2001 * Makefile.in: Remove duplicated 2008 in Copyright line.
2003 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2005 * util/misc.c (grub_util_warn): New function. Emits a warning
2007 * include/grub/util/misc.h (grub_util_warn): New declaration.
2009 * util/i386/pc/grub-install.in: Understand --force and pass it down
2012 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2014 (setup): Improve error messages and add warnings when requested to
2015 install in odd layouts. Refuse to install using blocklists unless
2018 2009-05-04 martin f. krafft <madduck@madduck.net>
2020 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2022 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2024 Updated copyright year
2026 * fs/hfsplus.c: updated copyright year
2028 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2032 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2033 in the space previously used by unused3
2034 (grub_hfsplus_uuid): new function
2035 (grub_hfsplus_fs): added uuid field
2037 2009-05-03 Pavel Roskin <proski@gnu.org>
2039 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2040 suppress warnings. It's no longer needed.
2041 * disk/host.c: Likewise.
2042 * disk/ata_pthru.c: Likewise.
2043 * disk/loopback.c: Likewise.
2044 * hook/datehook.c: Likewise.
2045 * parttool/pcpart.c: Likewise.
2046 * fs/i386/pc/pxe.c: Likewise.
2047 * fs/ntfscomp.c: Likewise.
2048 * efiemu/main.c: Likewise.
2049 * mmap/mmap.c: Likewise.
2050 * commands/crc.c: Likewise.
2051 * commands/hexdump.c: Likewise.
2052 * commands/hdparm.c: Likewise.
2053 * commands/acpi.c: Likewise.
2054 * commands/echo.c: Likewise.
2055 * commands/minicmd.c: Likewise.
2056 * commands/blocklist.c: Likewise.
2057 * commands/memrw.c: Likewise.
2058 * commands/loadenv.c: Likewise.
2059 * commands/usbtest.c: Likewise.
2060 * commands/lsmmap.c: Likewise.
2061 * commands/boot.c: Likewise.
2062 * commands/parttool.c: Likewise.
2063 * commands/configfile.c: Likewise.
2064 * commands/search.c: Likewise.
2065 * commands/ieee1275/suspend.c: Likewise.
2066 * commands/cat.c: Likewise.
2067 * commands/i386/pc/pxecmd.c: Likewise.
2068 * commands/i386/pc/play.c: Likewise.
2069 * commands/i386/pc/halt.c: Likewise.
2070 * commands/i386/pc/vbeinfo.c: Likewise.
2071 * commands/i386/pc/vbetest.c: Likewise.
2072 * commands/lspci.c: Likewise.
2073 * commands/date.c: Likewise.
2074 * commands/handler.c: Likewise.
2075 * commands/ls.c: Likewise.
2076 * commands/test.c: Likewise.
2077 * commands/cmp.c: Likewise.
2078 * commands/efi/loadbios.c: Likewise.
2079 * commands/efi/fixvideo.c: Likewise.
2080 * commands/halt.c: Likewise.
2081 * commands/help.c: Likewise.
2082 * commands/reboot.c: Likewise.
2083 * hello/hello.c: Likewise.
2084 * script/sh/main.c: Likewise.
2085 * loader/xnu.c: Likewise.
2086 * term/terminfo.c: Likewise.
2087 * term/i386/pc/serial.c: Likewise.
2088 * term/usb_keyboard.c: Likewise.
2090 2009-05-03 David S. Miller <davem@davemloft.net>
2092 * normal/menu.c: Include grub/parser.h
2094 2009-05-03 Pavel Roskin <proski@gnu.org>
2096 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2098 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2099 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2101 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2102 efiemu??.o doesn't exist.
2103 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2106 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2108 FreeBSD 64-bit support
2110 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2111 and loader/i386/bsd_trampoline.S
2112 (bsd_mod_ASFLAGS): new variable
2113 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2114 (FREEBSD_MODTYPE_KERNEL64): likewise
2115 (grub_bsd64_trampoline_start): likewise
2116 (grub_bsd64_trampoline_end): likewise
2117 (grub_bsd64_trampoline_selfjump): likewise
2118 (grub_bsd64_trampoline_gdt): likewise
2119 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2120 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2121 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2122 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2123 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2125 * loader/i386/bsd_pagetable.c: new file
2126 * loader/i386/bsd_trampoline.S: likewise
2127 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2128 (ALIGN_VAR): likewise
2129 (entry_hi): new variable
2130 (kern_end_mdofs): likewise
2131 (is_64bit): likewise
2132 (grub_freebsd_add_meta): use ALIGN_VAR
2133 (grub_e820_mmap): new declaration
2134 (grub_freebsd_add_mmap): new function
2135 (grub_freebsd_add_meta_module): support 64 bit kernels
2136 (grub_freebsd_list_modules): use ALIGN_VAR
2137 (gdt_descriptor): new declaration
2138 (grub_freebsd_boot): support 64 bit kernels
2139 (grub_bsd_elf64_hook): new function
2140 (grub_bsd_load_elf): support elf64
2142 2009-05-03 Bean <bean123ch@gmail.com>
2144 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2145 after we get the result of if statement.
2147 2009-05-03 Bean <bean123ch@gmail.com>
2149 * Makefile.in (enable_efiemu): New variable.
2151 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2153 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2155 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2156 path, add -mno-red-zone option.
2157 (efiemu64_s.o): Likewise.
2158 (efiemu64.o): Use macro $^ for source file.
2160 * configure.ac (--enable-efiemu): New option.
2162 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2166 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2167 (pkglib_MODULES): add xnu.mod
2168 (xnu_mod_SOURCES): new variable
2169 (xnu_mod_CFLAGS): likewise
2170 (xnu_mod_LDFLAGS): likewise
2171 (xnu_mod_ASFLAGS): likewise
2172 * conf/i386-pc.rmk: likewise
2173 * conf/x86_64-efi.rmk: likewise
2174 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2176 * include/grub/i386/macho.h: new file
2177 * include/grub/i386/xnu.h: likewise
2178 * include/grub/macho.h: likewise
2179 * include/grub/machoload.h: likewise
2180 * include/grub/x86_64/macho.h: likewise
2181 * include/grub/x86_64/xnu.h: likewise
2182 * include/grub/xnu.h: likewise
2183 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2184 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2185 * loader/i386/efi/xnu.c: new file
2186 * loader/i386/pc/xnu.c: likewise
2187 * loader/i386/xnu.c: likewise
2188 * loader/i386/xnu_helper.S: likewise
2189 * loader/macho.c: likewise
2190 * loader/xnu.c: likewise
2191 * loader/xnu_resume.c: likewise
2192 * util/grub-dumpdevtree: likewise
2193 * include/grub/i386/pit.h: include grub/err.h
2194 (grub_pit_wait): export
2195 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2197 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2201 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2202 _linux_efi, linux_efi.
2203 new files in grub-emu
2204 new targets efiemu32.o and efiemu64.o
2205 * loader/linux_normal_efiemu.c: likewise
2206 * loader/i386/efi/linux.c: added preliminary efiemu support
2207 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2209 * include/grub/autoefi.h: new file
2210 * include/grub/i386/efiemu.h: likewise
2211 * include/grub/i386/pc/efiemu.h: likewise
2212 * include/grub/efi/api.h: add LL suffix when necessary
2213 new definitions relating to tables
2214 * include/grub/efiemu/efiemu.h: new file
2215 * include/grub/efiemu/runtime.h: likewise
2216 * efiemu/prepare.c: likewise
2217 * efiemu/loadcore_common.c: likewise
2218 * efiemu/loadcore64.c: likewise
2219 * efiemu/runtime/efiemu.sh: likewise
2220 * efiemu/runtime/efiemu.S: likewise
2221 * efiemu/runtime/efiemu.c: likewise
2222 * efiemu/runtime/config.h: likewise
2223 * efiemu/prepare32.c: likewise
2224 * efiemu/main.c: likewise
2225 * efiemu/modules/pnvram.c: likewise
2226 * efiemu/modules/i386: likewise
2227 * efiemu/modules/i386/pc: likewise
2228 * efiemu/modules/acpi.c: likewise
2229 * efiemu/i386/pc/cfgtables.c: likewise
2230 * efiemu/i386/loadcore64.c: likewise
2231 * efiemu/i386/loadcore32.c: likewise
2232 * efiemu/prepare64.c: likewise
2233 * efiemu/loadcore.c: likewise
2234 * efiemu/symbols.c: likewise
2235 * efiemu/mm.c: likewise
2236 * efiemu/loadcore32.c: likewise
2238 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2242 * commands/acpi.c: new file
2243 * commands/i386/pc/acpi.c: likewise
2244 * commands/efi/acpi.c: likewise
2245 * include/grub/acpi.h: likewise
2246 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2247 (acpi_mod_SOURCES): new variable
2248 (acpi_mod_CFLAGS): likewise
2249 (acpi_mod_LDFLAGS): likewise
2250 * conf/i386-efi.rmk: likewise
2251 * conf/x86_64-efi.rmk: likewise
2253 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2255 Missing part from mmap patch
2257 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2258 (grub_mmap_unregister)
2259 (grub_mmap_free_and_unregister): use grub_mmap_register
2261 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2265 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2266 * loader/i386/linux.c (find_mmap_size): likewise
2267 (allocate_pages): likewise
2268 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2269 (grub_fill_multiboot_mmap): likewise
2270 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2271 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2272 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2273 (OPENBSD_MMAP_RESERVED): likewise
2274 * include/grub/i386/pc/memory.h: include grub/memory.h
2275 (grub_lower_mem): removed
2276 (grub_upper_mem): likewise
2277 (GRUB_MACHINE_MEMORY_ACPI): new definition
2278 (GRUB_MACHINE_MEMORY_NVS): likewise
2279 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2280 (GRUB_MACHINE_MEMORY_HOLE): likewise
2281 (grub_machine_mmap_register): likewise
2282 (grub_machine_mmap_unregister): likewise
2283 (grub_machine_get_upper): likewise
2284 (grub_machine_get_lower): likewise
2285 (grub_machine_get_post64): likewise
2286 * include/grub/i386/efi/memory.h: new file
2287 * include/grub/x86_64/efi/memory.h: likewise
2288 * include/grub/efi/memory.h: likewise
2289 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2290 (mmap_mod_SOURCES): new variable
2291 (mmap_mod_LDFLAGS): likewise
2292 (mmap_mod_ASFLAGS): likewise
2293 * conf/i386-coreboot.rmk: likewise
2294 * conf/i386-ieee1275.rmk: likewise
2295 * conf/i386-efi.rmk: likewise
2296 * conf/x86_64-efi.rmk: likewise
2297 * include/grub/types.h (UINT_TO_PTR): new macro
2298 (PTR_TO_UINT32): likewise
2299 (PTR_TO_UINT64): likewise
2300 * include/grub/memory.h: new file
2301 * mmap/i386/pc/mmap.c: likewise
2302 * mmap/i386/pc/mmap_helper.S: likewise
2303 * mmap/i386/uppermem.c: likewise
2304 * mmap/mmap.c: likewise
2305 * mmap/efi/mmap.c: likewise
2306 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2308 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2309 (grub_upper_mem): likewise
2310 (grub_machine_init): don't use grub_upper_mem,
2311 make grub_lower_mem local
2312 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2313 grub_mmap_iterate and grub_mmap_get_upper
2314 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2316 2009-05-02 Bean <bean123ch@gmail.com>
2318 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2320 (pkglib_MODULES): Add normal.mod and sh.mod.
2321 (normal_SOURCES): New variable.
2322 (normal_mod_CFLAGS): Likewise.
2323 (normal_mod_LDFLAGS): Likewise.
2324 (sh_mod_SOURCES): Likewise.
2325 (sh_mod_CFLAGS): Likewise.
2326 (sh_mod_LDFLAGS): Likewise.
2328 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2329 script/sh/lexer.c_DEPENDENCIES.
2330 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2331 kern/rescue_reader.c and kern/rescue_parser.c.
2332 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2333 (grub_emu_SOURCES): Change source files.
2334 (pkglib_MODULES): Remove normal.mod.
2335 (normal_SOURCES): Removed.
2336 (normal_mod_CFLAGS): Likewise.
2337 (normal_mod_LDFLAGS): Likewise.
2338 * conf/i386-coreboot.rmk: Likewise.
2339 * conf/i386-efi.rmk: Likewise.
2340 * conf/i386-ieee1276.rmk: Likewise.
2341 * conf/powerpc-ieee1275.rmk: Likewise.
2342 * conf/sparc64-ieee1275.rmk: Likewise.
2343 * conf/x86_64-efi.rmk: Likewise.
2345 * include/grub/command.h (grub_command_execute): New inline function.
2347 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2349 * include/grub/normal.h: Remove <grub/setjmp.h>.
2350 (grub_fs_module_list): Moved to normal/autofs.c.
2351 (grub_exit_env): Removed.
2352 (grub_command_execute): Likewise.
2353 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2355 (read_command_list): New function declaration.
2356 (read_fs_list): Likewise.
2358 * include/parser.h: Include <grub/reader.h>.
2359 (grub_parser_split_cmdline): Change type of getline parameter.
2360 (grub_parser): New structure.
2361 (grub_parser_class): New variable.
2362 (grub_parser_execute): New function declaration.
2363 (grub_register_rescue_parser): Likewise.
2364 (grub_parser_register): New inline function.
2365 (grub_parser_unregister): Likewise.
2366 (grub_parser_get_current): Likewise.
2367 (grub_parser_set_current): Likewise.
2369 * include/grub/reader.h: New file.
2370 * kern/reader.c: Likewise.
2371 * kern/rescue_parser.c: Likewise.
2372 * kern/rescue_reader.c: Likewise.
2373 * normal/autofs.c: Likewise.
2374 * normal/dyncmd.c: Likewise.
2376 * include/grub/rescue.h: Removed.
2377 * normal/command.h: Likewise.
2379 * include/grub/script.h: Moved to ...
2380 * include/grub/script_sh.h: ... Moved here.
2381 * normal/execute.c: Moved to ...
2382 * script/sh/execute.c: ... Moved here.
2383 * normal/function.c: Moved to ...
2384 * script/sh/function.c: ... Moved here.
2385 * normal/lexer.c: Moved to ...
2386 * script/sh/lexer.c: ... Moved here.
2387 * normal/parser.y: Moved to ...
2388 * script/sh/parser.y: ... Moved here.
2389 * normal/script.c: Moved to ...
2390 * script/sh/script.c: ... Moved here.
2392 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2394 (grub_exit_env): Removed.
2395 (fs_module_list): Moved to normal/autofs.c.
2396 (grub_file_getline): Don't handle comment here.
2397 (free_menu): Skip removed field entry->commands.
2398 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2400 (read_config_file): Removed nested parameter, change getline function.
2401 (grub_enter_normal_mode): Removed.
2402 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2403 (read_command_list): Likewise.
2404 (autoload_fs_module): Moved to normal/autofs.c.
2405 (read_fs_list): Likewise.
2406 (reader_nested): New variable.
2407 (grub_normal_execute): Run parser.sh to switch to sh parser.
2408 (grub_cmd_rescue): Removed.
2409 (cmd_normal): Removed.
2410 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2412 (grub_cmdline_run): New function.
2413 (grub_normal_reader_init): Likewise.
2414 (grub_normal_read_line): Likewise.
2415 (grub_env_write_pager): Likewise.
2416 (cmdline): New variable.
2417 (grub_normal_reader): Likewise.
2418 (GRUB_MOD_INIT): Register normal reader and set as current, register
2419 pager hook, register normal command with grub_register_command_prio,
2420 so that it won't show up in command.lst.
2421 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2422 grub_fs_autoload_hook.
2424 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2425 (grub_menu_execute_entry): Replace grub_script_execute with
2426 grub_parser_execute, change parameter to grub_command_execute.
2428 * normal/menu_text.c: Remove <grub/script.h>.
2430 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2431 and <grub/parser.h>.
2432 (run): Change editor_getline to use new parser interface. Change
2433 parameter to grub_command_execute.
2435 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2436 <grub/reader.h> and <grub/parser.h>.
2437 (grub_load_normal_mode): Execute normal command.
2438 (grub_main): Call grub_register_core_commands,
2439 grub_register_rescue_parser and grub_register_rescue_reader, use
2440 grub_reader_loop to enter input loop.
2442 * kern/parser.c (grub_parser_split_cmdline): Change type of
2444 (grub_parser_class): New variable.
2445 (grub_parser_execute): New function.
2447 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2448 * loader/multiboot2.c: Likewise.
2449 * loader/sparc64/ieee1275/linux.c: Likewise.
2451 * util/grub-emu.c (read_command_list): New dummy function.
2453 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2455 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2456 count to 16 for CCISS and IDA.
2458 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2460 * normal/menu_text.c (grub_wait_after_message): Print a newline
2461 after waiting for user input.
2463 * loader/i386/linux.c: Include `<grub/normal.h>'.
2464 (grub_cmd_linux): Improve the error message about `ask' mode, by
2465 waiting for user input so it's not missed (we can do this, since
2466 user requested interaction).
2468 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2470 Added missing lst to grub-mkrescue
2472 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2473 and ${input_dir}/parttool.lst
2475 2009-04-30 David S. Miller <davem@davemloft.net>
2477 * util/hostdisk.c (device_is_wholedisk): New function.
2478 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2479 zero only if device_is_wholedisk() returns true.
2481 * util/hostdisk.c (convert_system_partition_to_system_disk):
2482 Handle virtual disk devices named /dev/vdiskX as found on sparc
2485 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2486 lettered partition specifier is found, convert to numbered.
2488 2009-04-29 David S. Miller <davem@davemloft.net>
2490 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2491 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2493 * normal/command.c: Add missing newline at end of file.
2495 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2497 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2498 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2499 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2500 ihandles have a 32-bit type but need to be stored in a "void *".
2502 2009-04-28 Pavel Roskin <proski@gnu.org>
2504 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2505 not disk. Adjust all dependencies.
2506 (grub_fs_uuid_close): Use grub_device_close(), not
2509 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2510 parent's partition, don't copy it by reference, as it gets freed
2513 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2515 Preboot hooks support
2517 * commands/boot.c (struct grub_preboot_t): new declaration
2518 (preboots_head): new variable
2519 (preboots_tail): likewise
2520 (grub_loader_register_preboot_hook): new function
2521 (grub_loader_unregister_preboot_hook): likewise
2522 (grub_loader_set): launch preboot hooks
2523 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2524 (grub_loader_register_preboot_hook): new declaration
2525 (grub_loader_unregister_preboot_hook): likewise
2527 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2531 * disk/scsi.c (grub_scsi_open): added missing cast when
2532 calling grub_dprintf
2534 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2536 Bug and warning fixes
2538 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2540 * commands/test.c (test_parse): fixed bug with file tests and corrected
2541 declaration of find_file
2543 2009-04-26 Pavel Roskin <proski@gnu.org>
2545 * Makefile.in: Don't install empty manual pages if help2man is
2546 missing. Use help2man option for output, not shell redirection.
2548 2009-04-26 David S. Miller <davem@davemloft.net>
2550 * util/grub-mkdevicemap.c (make_device_map): Add missing
2551 NESTED_FUNC_ATTR to process_device().
2553 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2557 * commands/test.c: rewritten to use bash-like test
2559 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2561 Parttool autoloading and improvements
2563 * Makefile.in (pkglib_DATA): add parttool.lst
2564 (parttool.lst): new target
2565 * genmk.rb: generate parttool-*
2566 (CLEANFILES): add #{parttool}
2567 (PARTTOOLFILES): new variable
2568 * genparttoollist.sh: new file
2569 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2570 (grub_pcpart_type): likewise
2571 * commands/parttool.c (helpmsg): new variable
2572 (grub_cmd_parttool): output help if not enough arguments are supplied
2574 (GRUB_MOD_INIT(parttool)): use helpmsg
2576 2009-04-24 David S. Miller <davem@davemloft.net>
2578 Avoiding opening same device multiple times in device iterator.
2580 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2581 and use it to build a list of partitions in iterate_disk() and
2582 iterate_partition().
2584 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2587 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2588 grub_devalias_iterate() result instead of unconditional 0.
2589 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2590 Also, capture hook return value, either directly or via
2591 grub_children_iterate(), and propagate to caller.
2592 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2593 grub_children_iterate): Return value is now 'int' instead of
2595 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2596 like a proper iterator, stopping when hooks return non-zero.
2597 (grub_devalias_iterate): Likewise.
2599 2009-04-23 David S. Miller <davem@davemloft.net>
2601 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2603 2009-04-22 David S. Miller <davem@davemloft.net>
2605 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2606 is larger than address_cells, use that value for address_cells too.
2608 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2609 IEEE1275_MAX_PATH_LEN): Define.
2610 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2611 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2612 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2613 'devtype'. Explicitly NULL terminate devalias expansion.
2615 * util/sparc64/ieee1275/misc.c: New file.
2616 * util/sparc64/ieee1275/grub-setup.c: New file.
2617 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2618 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2619 * util/sparc64/ieee1275/grub-install.in: New file.
2620 * util/ieee1275/ofpath.c: New file.
2621 * util/ieee1275/devicemap.c: New file.
2622 * util/devicemap.c: New file.
2623 * util/deviceiter.c: New file.
2624 * kern/sparc64/ieee1275/init.c: New file.
2625 * include/grub/util/ofpath.h: New file.
2626 * include/grub/util/deviceiter.h: New file.
2627 * util/grub-mkdevicemap.c: Include deviceiter.h.
2628 Implement using grub_util_emit_devicemap_entry and
2629 grub_util_iterate_devices.
2630 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2631 util/devicemap.c into grub-mkdevicemap
2632 * conf/i386-efi.rmk: Likewise.
2633 * conf/i386-ieee1275.rmk: Likewise.
2634 * conf/i386-pc.rmk: Likewise.
2635 * conf/powerpc-ieee1275.rmk: Likewise.
2636 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2637 images and installation utilities. Build kernel as image
2638 instead of as elf binary. Use common rules as much as possible.
2640 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2642 Correct GPT definition
2644 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2647 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2649 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2651 2009-04-19 David S. Miller <davem@davemloft.net>
2653 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2654 (grub_rescue_cmd_linux): Rename to...
2655 (grub_cmd_linux): and fix prototype.
2656 (grub_rescue_cmd_initrd): Rename to...
2657 (grub_cmd_initrd): and fix prototype.
2658 (cmd_linux, cmd_initrd): New.
2659 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2660 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2662 2009-04-17 Pavel Roskin <proski@gnu.org>
2664 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2666 (grub_ohci_transfer): Likewise.
2668 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2670 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2671 return without a value. Fix inconsistent indentation.
2673 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2674 match struct grub_fs.
2676 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2677 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2678 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2679 * commands/lspci.c (grub_lspci_iter): Likewise.
2681 2009-04-16 Bean <bean123ch@gmail.com>
2683 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2686 2009-04-15 Pavel Roskin <proski@gnu.org>
2688 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2689 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2690 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2693 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2695 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2696 that no multiple data or metadata areas are supported and `Unknown
2699 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2701 Move loader out of the kernel
2703 * kern/loader.c: moved to ...
2704 * commands/boot.c: ... moved here
2705 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2706 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2707 * include/grub/kernel.h (grub_machine_fini): export
2708 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2709 (grub_loader_set): likewise
2710 (grub_loader_unset): likewise
2711 (grub_loader_boot): likewise
2712 * conf/common.rmk: new module boot.mod
2713 (pkglib_MODULES): add boot.mod
2714 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2715 (grub_emu_SOURCES): likewise
2716 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2717 (grub_emu_SOURCES): likewise
2718 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2719 (grub_emu_SOURCES): likewise
2720 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2721 (grub_emu_SOURCES): likewise
2722 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2723 (grub_emu_SOURCES): likewise
2724 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2725 (grub_emu_SOURCES): likewise
2726 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2727 (grub_emu_SOURCES): likewise
2729 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2731 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2733 * kern/misc.c (grub_itoa): Removed function
2734 (grub_ltoa): likewise
2735 (grub_vsprintf): use grub_lltoa
2737 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2741 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2742 * conf/i386-coreboot.rmk: likewise
2743 * conf/i386-ieee1275.rmk: likewise
2744 * conf/powerpc-ieee1275.rmk: likewise
2746 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2748 * INSTALL: Add that `./autogen.sh' needs to be run before
2751 2009-04-14 Bean <bean123ch@gmail.com>
2753 * Makefile.in (pkglib_DATA): Add handler.lst.
2754 (handler.lst): New rule.
2756 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2757 * conf/i386-coreboot.rmk: Likewise.
2758 * conf/i386-ieee1275.rmk: Likewise.
2759 * conf/i386-efi.rmk: Likewise.
2760 * conf/x86_64-efi.rmk: Likewise.
2761 * conf/powerpc-ieee1275.rmk: Likewise.
2762 * conf/sparc64-ieee1275.rmk: Likewise.
2764 * genhandlerlist.sh: New file.
2766 * genmk.rb: Add rules to generate handler.lst.
2768 * include/grub/normal.h (grub_file_getline): New function definition.
2769 (read_handler_list): Likewise.
2770 (free_handler_list): Likewise.
2772 * include/grub/term.h (grub_term_register_input): Add name parameter
2773 for auto generation of handler.lst.
2774 (grub_term_register_output): Likewise.
2776 * normal/handler.c: New file.
2778 * normal/main.c (get_line): Renamed to grub_file_getline.
2779 (read_config_file): Use the newly renamed grub_file_getline.
2780 (read_command_list): Likewise.
2781 (read_fs_list): Likewise.
2782 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2783 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2785 * term/efi/console.c (grub_console_init): Add name parameter for auto
2786 generation of handler.lst.
2787 * term/gfxterm.c: Likewise.
2788 * term/i386/pc/at_keyboard.c: Likewise.
2789 * term/i386/pc/console.c: Likewise.
2790 * term/i386/pc/serial.c: Likewise.
2791 * term/i386/pc/vesafb.c: Likewise.
2792 * term/i386/pc/vga.c: Likewise.
2793 * term/i386/pc/vga_text.c: Likewise.
2794 * term/ieee1275/ofconsole.c: Likewise.
2795 * term/usb_keyboard.c: Likewise.
2797 2009-04-14 Bean <bean123ch@gmail.com>
2799 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2800 properly with null character.
2802 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2804 * configure: Remove.
2805 * config.h.in: Likewise.
2806 * stamp-h.in: Likewise.
2807 * DISTLIST: Likewise.
2808 * conf/common.mk: Likewise.
2809 * conf/i386-coreboot.mk: Likewise.
2810 * conf/i386-efi.mk: Likewise.
2811 * conf/i386-ieee1275.mk: Likewise.
2812 * conf/i386.mk: Likewise.
2813 * conf/i386-pc.mk: Likewise.
2814 * conf/powerpc-ieee1275.mk: Likewise.
2815 * conf/sparc64-ieee1275.mk: Likewise.
2816 * conf/x86_64-efi.mk: Likewise.
2818 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2821 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2822 David S. Miller <davem@davemloft.net>
2824 * util/hostdisk.c (make_device_name): Fix buffer length
2827 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2829 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2830 <sys/param.h> and <sys/sysctl.h>.
2831 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2832 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2833 opening the device and reset them afterwards.
2835 2009-04-13 Pavel Roskin <proski@gnu.org>
2837 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2838 Reported by John Stanley <jpsinthemix@verizon.net>
2840 2009-04-13 Robert Millan <rmh@aybabtu.com>
2842 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2843 that name for menuentries when appropriate.
2845 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2847 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2849 2009-04-13 Robert Millan <rmh@aybabtu.com>
2851 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2852 to Linux, simply abort telling the user it's no longer supported.
2854 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2856 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2857 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2858 `freebsd_loadenv' only when devices.hints exist.
2860 2009-04-13 Pavel Roskin <proski@gnu.org>
2862 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2864 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2866 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2868 (grub_drive): Likewise.
2870 2009-04-13 David S. Miller <davem@davemloft.net>
2872 * kern/sparc64/ieee1275/ieee1275.c: New file.
2873 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2874 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2875 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2876 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2877 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2878 grub_ieee1275_alloc_physmem): Declare new exported functions.
2880 * include/grub/sparc64/ieee1275/loader.h: New file.
2881 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2882 * include/grub/sparc64/kernel.h: Likewise.
2883 * loader/sparc64/ieee1275/linux.c: Likewise.
2885 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2886 (grub_fstest_SOURCES): Likewise.
2888 * util/hostdisk.c (make_device_name): Do not make any assumptions
2889 about the length of drive names.
2891 * kern/dl.c (grub_dl_load_file): Close file immediately when
2892 we are done using it.
2894 2009-04-12 David S. Miller <davem@davemloft.net>
2896 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2897 values. Noticed by Pavel Roskin.
2899 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2902 * genmk.rb: Add more flexible image type specification, also
2903 pass --strip-unneeded to objcopy.
2904 * conf/i386-pc.rmk: Use *_FORMAT.
2905 * conf/i386-pc.mk: Rebuilt.
2907 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2908 (OFDISK_HASH_SZ): Define.
2909 (ofdisk_hash): New hash table.
2910 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2911 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2912 instead of device phandle which is not unique.
2914 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2915 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2916 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2917 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2918 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2919 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2920 GRUB_KERNEL_MACHINE_DATA_END): Define.
2921 (grub_kernel_image_size, grub_total_module_size): Declare.
2923 2009-04-12 Pavel Roskin <proski@gnu.org>
2925 * configure.ac: Change the logic when we check for target tools.
2926 Do it when the target is specified and it's different from the
2927 specified value of the host.
2929 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2931 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2932 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2933 GNU/kFreeBSD. Check if a device is a character device. Use
2934 DIOCGMEDIASIZE to get the size.
2935 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2936 support for GNU/kFreeBSD.
2937 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2938 is a character device instead of a block device. Add support for
2939 FreeBSD device names.
2941 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2942 is a character device instead of a block device.
2944 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2945 is a character device instead of a block device.
2947 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2949 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2950 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2951 FreeBSD. Check if a device is a character device. Use
2952 DIOCGMEDIASIZE to get the size.
2953 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2954 support for FreeBSD.
2955 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2956 is a character device instead of a block device. Add support for
2957 FreeBSD device names.
2959 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2960 a character device instead of a block device.
2961 (grub_util_check_char_device): New function.
2963 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2964 a character device instead of a block device.
2966 * include/grub/util/getroot.h (grub_util_check_char_device): New
2969 2009-04-11 David S. Miller <davem@davemloft.net>
2971 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2973 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2974 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2975 function, if present.
2976 (__bswapdi2): Likewise.
2978 * include/grub/sparc64/ieee1275/boot.h: New file.
2979 * boot/sparc64/ieee1275/boot.S: Likewise.
2980 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2982 * kern/misc.c (grub_ltoa): New function.
2983 (grub_vsprintf): Use it to format 'long' integers.
2985 2009-04-10 David S. Miller <davem@davemloft.net>
2987 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2988 slots are of type grub_ieee1275_cell_t.
2989 (grub_nand_read): Likewise.
2990 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2991 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2992 macros are used to compare values in arg/ret block of the call.
2993 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2994 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2995 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2996 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2997 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2998 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2999 grub_ieee1275_close, grub_ieee1275_set_property,
3000 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3001 grub_ieee1275_cell_t.
3002 * kern/ieee1275/openfw.c (grub_map): Likewise.
3003 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3004 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3006 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3007 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3008 (grub_devalias_iterate): Likewise.
3010 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3014 * fs/ufs.c (INODE_NBLOCKS): new definition
3015 (struct grub_ufs_dirent): added fields for non-BSD dirents
3016 (grub_ufs_get_file_block): fixed double indirect handling
3017 (grub_ufs_lookup_symlink): use more robust way to determine whether
3019 (grub_ufs_find_file): support for non-BSD dirents
3020 (grub_ufs_dir): support for non-BSD dirents
3022 2009-04-10 Bean <bean123ch@gnail.com>
3024 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3025 attribute, otherwise the size would be wrong for i386 platform.
3027 * include/grub/pci.h (grub_pci_read_word): New inline function.
3028 (grub_pci_read_byte): Likewise.
3029 (grub_pci_write): Likewise.
3030 (grub_pci_write_word): Likewise.
3031 (grub_pci_write_byte): Likewise.
3033 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3035 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3036 (find_framebuf): Scan pci to locate the frame buffer address.
3038 * commands/efi/fixvideo.c: New file.
3040 * commands/efi/loadbios.c: Likewise.
3042 * commands/memrw.c: Likewise.
3044 * util/grub-dumpbios.in: Likewise.
3046 * conf/common.rmk (grub-dumpbios): New utility.
3047 (pkglib_MODULES): New module memrw.mod.
3048 (memrw_mod_SOURCE): New macro.
3049 (memrw_mod_CFLAGS): Likewise.
3050 (memrw_mod_LDFLAGS): Likewise.
3052 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3054 (loadbios_mod_SOURCE): New macro.
3055 (loadbios_mod_CFLAGS): Likewise.
3056 (loadbios_mod_LDFLAGS): Likewise.
3057 (fixvideo_mod_SOURCE): Likewise.
3058 (fixvideo_mod_CFLAGS): Likewise.
3059 (fixvideo_mod_LDFLAGS): Likewise.
3061 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3063 (loadbios_mod_SOURCE): New macro.
3064 (loadbios_mod_CFLAGS): Likewise.
3065 (loadbios_mod_LDFLAGS): Likewise.
3066 (fixvideo_mod_SOURCE): Likewise.
3067 (fixvideo_mod_CFLAGS): Likewise.
3068 (fixvideo_mod_LDFLAGS): Likewise.
3070 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3072 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3074 2009-04-07 David S. Miller <davem@davemloft.net>
3076 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3077 support for R_SPARC_OLO10 relocations. Fix compile warning for
3078 R_SPARC_WDISP30 case.
3079 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3081 2009-04-06 Pavel Roskin <proski@gnu.org>
3083 * include/grub/misc.h (ARRAY_SIZE): New macro.
3084 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3086 * loader/i386/linux.c (allocate_pages): Use free_pages().
3087 (grub_linux_unload): Don't use free_pages().
3088 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3089 wrong index. Treat all other modes as text modes.
3090 (grub_cmd_linux): Initialize vid_mode unconditionally to
3091 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3093 * commands/help.c (print_command_help): Use cmd->prio, not
3094 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3096 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3100 * parttool/pcpart.c: new file
3101 * commands/parttool.c: likewise
3102 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3103 (parttool_mod_SOURCES): new variable
3104 (parttool_mod_CFLAGS): likewise
3105 (parttool_mod_LDFLAGS): likewise
3106 (pcpart_mod_SOURCES): likewise
3107 (pcpart_mod_CFLAGS): likewise
3108 (pcpart_mod_LDFLAGS): likewise
3109 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3110 and parttool/pcpart.c
3111 * conf/i386-efi.rmk: likewise
3112 * conf/i386-ieee1275.rmk: likewise
3113 * conf/i386-pc.rmk: likewise
3114 * conf/powerpc-ieee1275.rmk: likewise
3115 * conf/sparc64-ieee1275.rmk: likewise
3116 * conf/x86_64-ieee1275.rmk: likewise
3118 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3120 Support for mtime and further expandability of dir command
3122 * include/grub/lib/datetime.h: moved to ...
3123 * include/grub/datetime.h: ... moved here and added
3124 declaration of grub_unixtime2datetime. All users updated
3125 * include/grub/fs.h: new syntax for dir and mtime functions in
3127 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3128 and GRUB_FSHELP_FLAGS_MASK
3129 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3130 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3131 (grub_ext2_mtime): new function
3132 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3133 (grub_hfsplus_mtime): new function
3134 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3135 (GRUB_UFS_ATTR_FILE): likewise
3136 (GRUB_UFS_ATTR_LNK): likewise
3137 (struct grub_ufs_sblock): new fields mtime
3138 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3140 (grub_ufs_dir): mtime support
3141 (grub_ufs_mtime): new function
3142 * fs/affs.c (grub_affs_dir): use new dir syntax
3143 * fs/afs.c (grub_afs_dir): likewise
3144 * fs/cpio.c (grub_cpio_dir): likewise
3145 * fs/fat.c (grub_fat_find_dir): likewise
3146 * fs/hfs.c (grub_hfs_dir): likewise
3147 * fs/iso9660.c (grub_iso9660_dir): likewise
3148 * fs/jfs.c (grub_jfs_dir): likewise
3149 * fs/minix.c (grub_minix_dir): likewise
3150 * fs/ntfs.c (grub_ntfs_dir): likewise
3151 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3152 * fs/sfs.c (grub_sfs_dir): likewise
3153 * fs/xfs.c (grub_xfs_dir): likewise
3154 * util/hostfs.c (grub_hostfs_dir): likewise
3155 * lib/datetime.c: moved to ...
3156 * normal/datetime.c: ... moved here
3157 (grub_unixtime2datetime): new function
3158 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3159 * normal/completion.c (iterate_dir): use new dir syntax
3160 * normal/misc.c (grub_normal_print_device_info): tell the
3161 last modification time of a volume
3162 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3163 * conf/common.rmk: added lib/datetime.c to ls.mod
3164 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3165 (normal_mod_SOURCES): likewise
3166 (datetime_mod_SOURCES): Removed lib/datetime.c
3167 * conf/i386-efi.rmk: likewise
3168 * conf/i386-ieee1275.rmk: likewise
3169 * conf/i386-pc.rmk: likewise
3170 * conf/powerpc-ieee1275.rmk: likewise
3171 * conf/sparc64-ieee1275.rmk: likewise
3172 * conf/x86_64-efi.rmk: likewise
3174 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3176 Trim trailing spaces in FAT label and support mtools-like labels
3178 * fs/fat.c (grub_fat_iterate_dir): New function based
3179 on grub_fat_find_dir
3180 (grub_fat_find_dir): use grub_fat_iterate_dir
3181 (grub_fat_label): likewise
3183 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3185 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3187 remove extraneous kernel_elf_HEADERS
3189 2009-04-04 Bean <bean123ch@gnail.com>
3191 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3193 * util/misc.c: Likewise.
3195 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3197 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3198 instead of grub_printf.
3200 2009-04-03 Robert Millan <rmh@aybabtu.com>
3202 * loader/i386/linux.c (grub_linux_setup_video): Fill
3203 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3204 values from `mode info' structure instead of hardcoded
3207 2009-04-01 Pavel Roskin <proski@gnu.org>
3209 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3211 * genmk.rb: Likewise.
3212 * configure.ac: Likewise.
3214 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3216 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3217 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3219 2009-04-01 David S. Miller <davem@davemloft.net>
3221 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3222 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3223 (grub_setjmp): Mark with 'returns_twice' attribute.
3224 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3225 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3226 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3228 2009-04-01 Robert Millan <rmh@aybabtu.com>
3230 Reapply fix from 2008-07-28 which was accidentally reverted; also
3231 perform the same fix to a similar check in same function.
3233 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3234 with the same number are found, just use issue a warning with
3235 grub_dprintf(), as this error has been reported to be non-fatal.
3237 2009-03-31 Pavel Roskin <proski@gnu.org>
3239 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3240 for cross-compilation.
3242 2009-03-30 Robert Millan <rmh@aybabtu.com>
3244 Fix i386-ieee1275 build.
3246 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3249 2009-03-30 Pavel Roskin <proski@gnu.org>
3251 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3252 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3253 zero-terminated, rely only on the strlen value. Fix comparison
3254 of strings differing in length.
3256 2009-03-30 Robert Millan <rmh@aybabtu.com>
3258 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3259 checking for abi version. Improve error messages on BIOS to notify
3260 user about `linux16' command.
3262 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3266 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3267 in case of collision
3268 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3270 2009-03-29 Robert Millan <rmh@aybabtu.com>
3272 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3273 set `vid_mode' accordingly.
3274 (grub_linux_boot): Process `vid_mode' and set video mode.
3276 2009-03-29 Robert Millan <rmh@aybabtu.com>
3278 * util/grub.d/10_linux.in (linux_entry): New function.
3279 Factorize generation of Linux boot entries.
3281 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3283 Make the format of Environment Block plain text. The boot loader
3284 part is not tested well yet.
3286 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3289 (usage): Remove "info" and "clear". Add "unset". Update the
3290 description of "set", as this does not delete variables any
3292 (create_envblk_file): Complete rewrite.
3293 (open_envblk_file): Likewise.
3294 (cmd_info): Removed.
3295 (cmd_list): Likewise.
3296 (cmd_set): Likewise.
3297 (cmd_clear): Likewise.
3298 (list_variables): New function.
3299 (write_envblk): Likewise.
3300 (set_variables): Likewise.
3301 (unset_variables): Likewise.
3302 (main): Complete rewrite.
3304 * commands/loadenv.c (buffer): Removed.
3306 (open_envblk_file): New function.
3307 (read_envblk_file): Complete rewrite.
3308 (grub_cmd_load_env): Likewise.
3309 (grub_cmd_list_env): Likewise.
3310 (struct blocklist): New struct.
3311 (free_blocklists): New function.
3312 (check_blocklists): Likewise.
3313 (write_blocklists): Likewise.
3314 (grub_cmd_save_env): Complete rewrite.
3316 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3317 a plain text signature.
3318 (GRUB_ENVBLK_MAXLEN): Removed.
3319 (struct grub_envblk): Complete rewrite.
3320 (grub_envblk_find): Removed.
3321 (grub_envblk_insert): Likewise.
3322 (grub_envblk_open): New prototype.
3323 (grub_envblk_set): Likewise.
3324 (grub_envblk_delete): Put const to VALUE.
3325 (grub_envblk_iterate): Put const to NAME and VALUE.
3326 (grub_envblk_close): New prototype.
3327 (grub_envblk_buffer): New inline function.
3328 (grub_envblk_size): Likewise.
3330 * lib/envblk.c: Include grub/mm.h.
3331 (grub_env_find): Removed.
3332 (grub_envblk_open): New function.
3333 (grub_envblk_close): Likewise.
3334 (escaped_value_len): Likewise.
3335 (find_next_line): Likewise.
3336 (grub_envblk_insert): Removed.
3337 (grub_envblk_set): New function.
3338 (grub_envblk_delete): Complete rewrite.
3339 (grub_envblk_iterate): Likewise.
3341 2009-03-28 Robert Millan <rmh@aybabtu.com>
3343 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3344 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3345 variables. Use 16-bit loader.
3346 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3348 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3349 (grub_linux16_boot): ... this. Update all users.
3350 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3351 (grub_linux_boot): ... this. Update all users.
3353 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3354 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3355 commands to `linux16' and `initrd16'.
3356 (GRUB_MOD_FINI(linux)): Rename to ...
3357 (GRUB_MOD_FINI(linux16)): ... this.
3359 2009-03-24 Pavel Roskin <proski@gnu.org>
3361 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3362 not just for compilation.
3364 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3366 Move multiboot helper out of kernel
3368 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3369 `loader/i386/multiboot_helper.S'.
3370 * conf/i386-coreboot.rmk: Likewise
3371 * conf/i386-ieee1275.rmk: Likewise
3373 * kern/i386/loader.S: Move multiboot helpers from here...
3374 * loader/i386/multiboot_helper.S: ...moved here
3375 * include/grub/i386/loader.h: Move declarations of multiboot
3376 helpers from here...
3377 * include/grub/i386/multiboot.h: ...moved here
3378 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3380 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3382 * kern/env.c (grub_env_context_open): Added an argument to specify
3383 whether a new context inherits exported variables from current
3384 one. This is useful when making a sandbox to interpret a config
3386 All callers updated.
3388 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3390 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3392 * kern/env.c (grub_env_context_close): Fix memory leaks.
3394 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3396 * normal/main.c (grub_normal_execute): Added an argument
3397 BATCH to specify if an interactive interface should be provided
3398 after reading a config file.
3399 All callers updated.
3400 (read_command_list): Prevent being executed twice.
3401 (read_fs_list): Likewise.
3403 * include/grub/normal.h (grub_normal_execute): Updated the
3406 2009-03-22 Pavel Roskin <proski@gno.org>
3408 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3410 * kern/i386/pc/startup.S: Likewise.
3411 * kern/i386/efi/startup.S: Likewise.
3412 * kern/i386/ieee1275/startup.S: Likewise.
3413 * kern/i386/coreboot/startup.S: Likewise.
3414 * kern/x86_64/efi/startup.S: Likewise.
3416 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3417 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3418 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3420 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3422 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3424 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3426 Use vaddr of correct segment for entry_point.
3428 2009-03-21 Bean <bean123ch@gmail.com>
3430 * commands/blocklist.c: Add include file <grub/command.h>, remove
3431 <grub/normal.h> and <grub/arg.h>.
3432 (grub_cmd_blocklist): Use the new command interface.
3433 (GRUB_MOD_INIT): Likewise.
3434 (GRUB_MOD_FINI): Likewise.
3435 * commands/boot.c: Likewise.
3436 * commands/cat.c: Likewise.
3437 * commands/cmp.c: Likewise.
3438 * commands/configfile.c: Likewise.
3439 * commands/crc.c: Likewise.
3440 * commands/echo.c: Likewise.
3441 * commands/halt.c: Likewise.
3442 * commands/handler.c: Likewise.
3443 * commands/hdparm.c: Likewise.
3444 * commands/help.c: Likewise.
3445 * commands/hexdump.c: Likewise.
3446 * commands/loadenv.c: Likewise.
3447 * commands/ls.c: Likewise.
3448 * commands/lsmmap.c: Likewise.
3449 * commands/lspci.c: Likewise.
3450 * commands/loadenv.c: Likewise.
3451 * commands/read.c: Likewise.
3452 * commands/reboot.c: Likewise.
3453 * commands/search.c: Likewise.
3454 * commands/sleep.c: Likewise.
3455 * commands/test.c: Likewise.
3456 * commands/usbtest.c: Likewise.
3457 * commands/videotest.c: Likewise.
3458 * commands/i386/cpuid.c: Likewise.
3459 * commands/i386/pc/halt.c: Likewise.
3460 * commands/i386/pc/play.c: Likewise.
3461 * commands/i386/pc/pxecmd.c: Likewise.
3462 * commands/i386/pc/vbeinfo.c: Likewise.
3463 * commands/i386/pc/vbetest.c: Likewise.
3464 * commands/ieee1275/suspend.c: Likewise.
3465 * disk/loopback.c: Likewise.
3466 * font/font_cmd.c: Likewise.
3467 * hello/hello.c: Likewise.
3468 * loader/efi/appleloader.c: Likewise.
3469 * loader/efi/chainloader.c: Likewise.
3470 * loader/i386/bsd.c: Likewise.
3471 * loader/i386/efi/linux.c: Likewise.
3472 * loader/i386/ieee1275/linux.c: Likewise.
3473 * loader/i386/linux.c: Likewise.
3474 * loader/i386/pc/chainloader.c: Likewise.
3475 * loader/i386/pc/linux.c: Likewise.
3476 * loader/powerpc/ieee1275/linux.c: Likewise.
3477 * loader/multiboot_loader.c: Likewise.
3478 * term/gfxterm.c: Likewise.
3479 * term/i386/pc/serial.c: Likewise.
3480 * term/terminfo.c: Likewise.
3482 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3483 * term/i386/pc/vga.c: Likewise.
3484 * video/readers/jpeg.c: Likewise.
3485 * video/readers/png.c: Likewise.
3486 * video/readers/tga.c: Likewise.
3488 * util/grub-fstest (cmd_loopback): Removed.
3489 (cmd_blocklist): Likewise.
3491 (grub_register_command): Likewise.
3492 (grub_unregister_command): Likewise.
3493 (execute_command): Use grub_command_find to locate command and execute
3496 * include/grub/efi/chainloader.h: Removed.
3497 * loader/efi/chainloader_normal.c: Likewise.
3498 * loader/i386/bsd_normal.c: Likewise.
3499 * loader/i386/pc/chainloader_normal.c: Likewise.
3500 * loader/i386/pc/multiboot_normal.c: Likewise.
3501 * loader/linux_normal.c: Likewise.
3502 * loader/multiboot_loader_normal.c: Likewise.
3503 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3505 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3506 and grub_register_command_p1.
3508 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3509 kern/command.c, lib/arg.c and commands/extcmd.c.
3510 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3511 (minicmd_mod_SOURCES): New variable.
3512 (minicmd_mod_CFLAGS): Likewise.
3513 (minicmd_mod_LDFLAGS): Likewise.
3514 (extcmd_mod_SOURCES): Likewise.
3515 (extcmd_mod_CFLAGS): Likewise.
3516 (extcmd_mod_LDFLAGS): Likewise.
3517 (boot_mod_SOURCES): Removed.
3518 (boot_mod_CFLAGS): Likewise.
3519 (boot_mod_LDFLAGS): Likewise.
3521 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3523 (kernel_img_HEADERS): Add command.h.
3524 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3525 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3527 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3528 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3529 remove the corresponding normal mode command.
3530 (normal_mod_SOURCES): Remove normal/arg.c.
3531 * conf/i386-coreboot.rmk: Likewise.
3532 * conf/i386-efi.rmk: Likewise.
3533 * conf/i386-ieee1275.rmk: Likewise.
3534 * conf/powerpc-ieee1275.rmk: Likewise.
3535 * conf/x86_64-efi.rmk: Likewise.
3537 * include/grub/arg.h: Move from here ...
3538 * include/grub/lib/arg.h: ... to here.
3540 * normal/arg.c: Move from here ...
3541 * lib/arg.c: ... to here.
3543 * commands/extcmd.c: New file.
3544 * commands/minicmd.c: Likewise.
3545 * include/grub/command.h: Likewise.
3546 * include/grub/extcmd.h: Likewise.
3547 * kern/command.c: Likewise.
3548 * kern/corecmd.c: Likewise.
3550 * kern/list.c (grub_list_iterate): Return int instead of void.
3551 (grub_list_insert): New function.
3552 (grub_prio_list_insert): Likewise.
3554 * kern/rescue.c (grub_rescue_command): Removed.
3555 (grub_rescue_command_list): Likewise.
3556 (grub_rescue_register_command): Likewise.
3557 (grub_rescue_unregister_command): Likewise.
3558 (grub_rescue_cmd_boot): Move to minicmd.c
3559 (grub_rescue_cmd_help): Likewise.
3560 (grub_rescue_cmd_info): Likewise.
3561 (grub_rescue_cmd_boot): Likewise.
3562 (grub_rescue_cmd_testload): Likewise.
3563 (grub_rescue_cmd_dump): Likewise.
3564 (grub_rescue_cmd_rmmod): Likewise.
3565 (grub_rescue_cmd_lsmod): Likewise.
3566 (grub_rescue_cmd_exit): Likewise.
3567 (grub_rescue_print_devices): Moved to corecmd.c.
3568 (grub_rescue_print_files): Likewise.
3569 (grub_rescue_cmd_ls): Likewise.
3570 (grub_rescue_cmd_insmod): Likewise.
3571 (grub_rescue_cmd_set): Likewise.
3572 (grub_rescue_cmd_unset): Likewise.
3573 (attempt_normal_mode): Use grub_command_find to get normal module.
3574 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3575 commands, remove grub_rescue_register_command calls.
3577 * normal/command.c (grub_register_command): Removed.
3578 (grub_unregister_command): Likewise.
3579 (grub_command_find): Likewise.
3580 (grub_iterate_commands): Likewise.
3581 (rescue_command): Likewise.
3582 (export_command): Moved to corecmd.c.
3583 (set_command): Removed.
3584 (unset_command): Likewise.
3585 (insmod_command): Likewise.
3586 (rmmod_command): Likewise.
3587 (lsmod_command): Likewise.
3588 (grub_command_init): Likewise.
3590 * normal/completion.c (iterate_command): Use cmd->prio to check for
3592 (complete_arguments): Use grub_extcmd_t structure to find options.
3593 (grub_normal_do_completion): Change function grub_iterate_commands to
3594 grub_command_iterate.
3596 * normal/execute.c (grub_script_execute_cmd): No need to parse
3599 * normal/main.c (grub_dyncmd_dispatcher): New function.
3600 (read_command_list): Register unload commands as dyncmd.
3601 (grub_cmd_normal): Use new command interface, register rescue,
3602 unregister normal at entry, register normal, unregister rescue at exit.
3604 * include/grub/list.h (grub_list_test_t): New type.
3605 (grub_list_iterate): Return int instead of void.
3606 (grub_list_insert): New function.
3607 (GRUB_AS_NAMED_LIST_P): New macro.
3608 (GRUB_AS_PRIO_LIST): Likewise.
3609 (GRUB_AS_PRIO_LIST_P): Likewise.
3610 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3611 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3612 (grub_prio_list): New structure.
3613 (grub_prio_list_insert): New function.
3614 (grub_prio_list_remove): New inline function.
3616 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3617 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3618 (GRUB_COMMAND_FLAG_MENU): Likewise.
3619 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3620 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3621 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3622 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3623 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3624 (grub_command): Likewise.
3625 (grub_register_command): Likewise.
3626 (grub_command_find): Likewise.
3627 (grub_iterate_commands): Likewise.
3628 (grub_command_init): Likewise.
3629 (grub_arg_parse): Likewise.
3630 (grub_arg_show_help): Likewise.
3632 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3633 (grub_rescue_unregister_command): Likewise.
3635 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3636 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3637 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3639 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3640 grub_rescue_cmd_initrd.
3641 * include/grub/i386/loader.h: Likewise.
3642 * include/grub/x86_64/loader.h: Likewise.
3644 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3646 2009-03-21 Bean <bean123ch@gmail.com>
3648 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3649 instead of stat in mingw environment.
3651 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3653 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3655 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3658 2009-03-21 Bean <bean123ch@gmail.com>
3660 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3663 2009-03-18 Michel Dänzer <michel@daenzer.net>
3665 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3666 checking inode flags for EXT4_EXTENTS_FLAG.
3668 2009-03-18 Robert Millan <rmh@aybabtu.com>
3670 * loader/i386/linux.c: Include `<grub/video.h>' and
3671 `<grub/i386/pc/vbe.h>'..
3672 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3673 (grub_linux32_boot): Attempt to configure video settings with
3674 grub_linux_setup_video().
3675 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3676 to avoid grub_console_fini() which would step out of graphical mode
3679 2009-03-14 Robert Millan <rmh@aybabtu.com>
3681 Fix build on powerpc.
3682 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3684 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3686 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3687 background image command.
3689 2009-03-12 Colin D Bennett <colin@gibibit.com>
3691 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3692 (grub_gfxterm_putchar): Extract pairs of identical calls to
3693 draw_cursor out of conditional blocks.
3695 2009-03-11 Pavel Roskin <proski@gnu.org>
3697 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3698 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3700 2009-03-11 Robert Millan <rmh@aybabtu.com>
3702 * loader/i386/multiboot_elfxx.c
3703 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3705 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3707 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3710 2009-03-11 Robert Millan <rmh@aybabtu.com>
3712 * loader/i386/multiboot.c (code_size): New variable.
3713 (grub_multiboot): Define offsets by adding to `code_size' rather
3714 than subtracting from `grub_multiboot_payload_size'. Provide
3715 4-byte alignment to MBI and others by increasing
3716 `boot_loader_name_length' appropriately.
3718 * loader/i386/multiboot_elfxx.c
3719 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3721 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3723 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3726 2009-03-08 Robert Millan <rmh@aybabtu.com>
3728 Make loader/i386/linux.c usable on i386-pc again.
3730 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3732 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3735 2009-03-07 Bean <bean123ch@gmail.com>
3737 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3740 2009-03-06 Robert Millan <rmh@aybabtu.com>
3742 Fix display issue on terminals with screen size other than 80x25
3743 (e.g. gfxterm with resolution higher than 640x480).
3745 * normal/main.c (grub_normal_init_page): Display title text in a
3746 position relative to the center of the terminal instead of relying
3747 on a hardcoded offset.
3749 2009-03-04 Robert Millan <rmh@aybabtu.com>
3751 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3754 * Makefile.in (host_kernel): New variable.
3755 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3756 scripts instead of just the windows one.
3757 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3759 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3761 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3763 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3764 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3765 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3766 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3767 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3768 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3770 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3772 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3773 or if there's no space for the disk label and print the partition number on a
3776 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3778 * util/misc.c: Include <time.h>.
3779 (grub_millisleep): New function.
3781 2009-03-04 Bean <bean123ch@gmail.com>
3783 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3784 another option -mno-red-zone.
3786 * commands/handler.c: Change module description.
3788 * kern/handler.c: Add missing space at the end of description line.
3790 * kern/list.c: Likewise.
3792 2009-03-03 Robert Millan <rmh@aybabtu.com>
3794 Move more components to the relocation area, and fix mbi pointer
3795 handling to use the destination rather than the origin (thanks to
3796 Vladimir Serbinenko for spotting).
3798 * loader/i386/multiboot.c (mbi_dest): New variable.
3799 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3800 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3803 2009-03-01 Bean <bean123ch@gmail.com>
3805 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3806 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3807 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3808 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3810 * loader/i386/efi/linux.c (acpi_guid): New variable.
3811 (acpi_guid): Likewise.
3812 (EBDA_SEG_ADDR): New constant.
3813 (LOW_MEM_ADDR): Likewise.
3814 (FAKE_EBDA_SEG): Likewise.
3815 (fake_bios_data): New function.
3816 (grub_linux_boot): Call fake_bios_data.
3818 2009-03-01 Bean <bean123ch@gmail.com>
3820 * commands/terminal.c: Removed.
3822 * commands/handler.c: New file.
3824 * include/grub/list.h: Likewise.
3826 * include/grub/handler.h: Likewise.
3828 * kern/list.c: Likewise.
3830 * kern/handler.c: Likewise.
3832 * kern/term.h: Include header file <grub/handler.h>.
3833 (grub_term_input): Move next field to the beginning.
3834 (grub_term_output): Likewise.
3835 (grub_term_input_class): New variable.
3836 (grub_term_output_class): Likewise.
3837 (grub_term_register_input): Changed to inline function.
3838 (grub_term_register_output): Likewise.
3839 (grub_term_unregister_input): Likewise.
3840 (grub_term_unregister_output): Likewise.
3841 (grub_term_set_current_input): Likewise.
3842 (grub_term_set_current_output): Likewise.
3843 (grub_term_get_current_input): Likewise.
3844 (grub_term_get_current_output): Likewise.
3845 (grub_term_iterate_input): Removed.
3846 (grub_term_iterate_output): Likewise.
3848 * kern/term.c (grub_term_list_input): Removed.
3849 (grub_term_list_output): Likewise.
3850 (grub_term_input_class): New variable.
3851 (grub_term_output_class): Likewise.
3852 (grub_cur_term_input): Change variable as macro.
3853 (grub_cur_term_output): Likewise.
3854 (grub_term_register_input): Removed.
3855 (grub_term_register_output): Likewise.
3856 (grub_term_unregister_input): Likewise.
3857 (grub_term_unregister_output): Likewise.
3858 (grub_term_set_current_input): Likewise.
3859 (grub_term_set_current_output): Likewise.
3860 (grub_term_iterate_input): Likewise.
3861 (grub_term_iterate_output): Likewise.
3862 (grub_term_get_current_input): Likewise.
3863 (grub_term_get_current_output): Likewise.
3865 * util/grub-editenv.c: Include header file <grub/handler.h>.
3866 (grub_term_get_current_input): Removed.
3867 (grub_term_get_current_output): Likewise.
3868 (grub_term_input_class): New variable.
3869 (grub_term_output_class): Likewise.
3871 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3872 (grub_term_get_current_output): Likewise.
3873 (grub_term_input_class): New variable.
3874 (grub_term_output_class): Likewise.
3876 * util/grub-probe.c (grub_term_get_current_input): Removed.
3877 (grub_term_get_current_output): Likewise.
3878 (grub_term_input_class): New variable.
3879 (grub_term_output_class): Likewise.
3881 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3882 (grub_term_get_current_output): Likewise.
3883 (grub_term_input_class): New variable.
3884 (grub_term_output_class): Likewise.
3886 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3887 (terminal_mod_SOURCES): Likewise.
3888 (terminal_mod_CFLAGS): Likewise.
3889 (terminal_mod_LDFLAGS): Likewise.
3891 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3893 (kernel_img_SOURCES): Add list.c and handler.c.
3894 (kernel_img_HEADERS): Add list.h and handler.h.
3896 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3898 (kernel_mod_SOURCES): Add list.c and handler.c.
3899 (kernel_mod_HEADERS): Add list.h and handler.h.
3901 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3903 (kernel_elf_SOURCES): Add list.c and handler.c.
3904 (kernel_elf_HEADERS): Add list.h and handler.h.
3906 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3908 (kernel_elf_SOURCES): Add list.c and handler.c.
3909 (kernel_elf_HEADERS): Add list.h and handler.h.
3911 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3913 (kernel_mod_SOURCES): Add list.c and handler.c.
3914 (kernel_mod_HEADERS): Add list.h and handler.h.
3916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3918 (kernel_elf_SOURCES): Add list.c and handler.c.
3919 (kernel_elf_HEADERS): Add list.h and handler.h.
3921 2009-02-27 Robert Millan <rmh@aybabtu.com>
3923 Factorize elf32 / elf64 code in Multiboot loader. This will
3924 prevent it from getting out of sync again.
3926 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3927 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3928 grub_multiboot_load_elf64): Move from here ...
3929 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3930 grub_multiboot_load_elf): ... to here (new file).
3932 2009-02-27 Robert Millan <rmh@aybabtu.com>
3934 * util/grub.d/10_linux.in: Rename "single-user mode" to
3937 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3939 Don't leak in SCSI code.
3940 * disk/scsi.c (grub_scsi_close): free `scsi'.
3942 2009-02-27 Robert Millan <rmh@aybabtu.com>
3944 * loader/i386/pc/multiboot.c: Move from here ...
3945 * loader/i386/multiboot.c: ... to here. Update all users.
3947 2009-02-27 Robert Millan <rmh@aybabtu.com>
3949 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3950 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3952 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3954 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3957 2009-02-27 Robert Millan <rmh@aybabtu.com>
3959 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3960 `0x' qualifier as 0 when base is specified as parameter).
3962 2009-02-24 Bean <bean123ch@gmail.com>
3964 * configure.ac: Check for -mcmodel=large in x86_64 target.
3966 * include/grub/efi/api.h (efi_call_10): New macro.
3967 (efi_wrap_10): New function.
3969 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3970 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3971 (GRUB_PE32_REL_BASED_LOW): Likewise.
3972 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3973 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3974 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3975 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3976 (GRUB_PE32_REL_BASED_REL): Likewise.
3977 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3978 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3979 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3981 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3984 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3985 (efi_wrap_10): New function.
3987 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3989 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3990 MB/MBP model (NV chipset).
3991 (devdata_devs): Add devpath_5 to the list.
3993 * load/i386/efi/linux.c (video_base): Remove variable.
3994 (RGB_MASK): New macro.
3995 (RGB_MAGIC): Likewise.
3996 (LINE_MIN): Likewise.
3997 (LINE_MAX): Likewise.
3998 (FBTEST_STEP): Likewise.
3999 (FBTEST_COUNT): Likewise.
4000 (fb_list): New variable.
4001 (grub_find_video_card): Remove function.
4002 (find_framebuf): New function.
4003 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4006 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4009 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4011 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4013 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4016 2009-02-22 Robert Millan <rmh@aybabtu.com>
4018 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4019 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4020 in our relocation, instead of using it directly from heap. Also
4021 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4023 2009-02-21 Robert Millan <rmh@aybabtu.com>
4025 Implement USB keyboard support (based on patch by Marco Gerards)
4027 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4028 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4029 (usb_keyboard_mod_LDFLAGS): New variables.
4031 * term/usb_keyboard.c: New file.
4033 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4035 Corrected wrong declaration
4037 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4039 2009-02-14 Christian Franke <franke@computer.org>
4041 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4042 (grub_lspci_iter): Print class code and programming interface byte.
4044 2009-02-14 Christian Franke <franke@computer.org>
4046 * gendistlist.sh: Ignore `.svn' directories.
4048 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4050 * fs/fat.c: Add 2009 to Copyright line.
4052 2009-02-14 Christian Franke <franke@computer.org>
4054 * commands/hdparm.c: New file. Provides `hdparm' command
4055 which sends ATA commands via grub_disk_ata_pass_through ().
4057 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4059 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4060 and <grub/cpu/io.h> to include/grub/ata.h.
4061 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4062 (GRUB_CDROM_SECTOR_SIZE): Remove.
4063 (GRUB_ATA_*): Move to include/grub/ata.h.
4064 (GRUB_ATAPI_*): Likewise.
4065 (enum grub_ata_commands): Likewise.
4066 (enum grub_ata_timeout_milliseconds): Likewise.
4067 (struct grub_ata_device): Likewise.
4068 (grub_ata_regset): Likewise.
4069 (grub_ata_regget): Likewise.
4070 (grub_ata_regset2): Likewise.
4071 (grub_ata_regget2): Likewise.
4072 (grub_ata_check_ready): Likewise.
4073 (grub_ata_wait_not_busy): Remove static, exported in
4075 (grub_ata_wait_drq): Likewise.
4076 (grub_ata_pio_read): Likewise.
4078 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4079 function for hdparm.mod.
4081 * include/grub/ata.h: New file, contains declarations from
4083 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4085 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4086 (grub_disk_ata_pass_through): New exported variable.
4088 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4090 2009-02-13 Colin D Bennett <colin@gibibit.com>
4092 Support multiple fallback entries, and provide an API to support
4093 executing default+fallback menu entries. Renamed the `terminal' menu
4096 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4097 variable declaration.
4098 (grub_menu_execute_callback): New structure declaration.
4099 (grub_menu_execute_callback_t): New typedef.
4100 (grub_menu_execute_with_fallback): New function declaration.
4101 (grub_menu_get_entry): Likewise.
4102 (grub_menu_get_timeout): Likewise.
4103 (grub_menu_set_timeout): Likewise.
4105 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4107 * normal/menu.c (grub_wait_after_message): Moved to
4108 `normal/menu_text.c'.
4109 (draw_border): Likewise.
4110 (print_message): Likewise.
4111 (print_entry): Likewise.
4112 (print_entries): Likewise.
4113 (grub_menu_init_page): Likewise.
4114 (get_entry_number): Likewise.
4115 (print_timeout): Likewise.
4116 (run_menu): Likewise.
4117 (grub_menu_execute_entry): Likewise.
4118 (show_text_menu): Likewise.
4119 (get_and_remove_first_entry_number): New function.
4120 (grub_menu_execute_with_fallback): Likewise.
4121 (get_entry): Renamed to ...
4122 (grub_menu_get_entry): .. this and made it global.
4123 (get_timeout): Renamed to ...
4124 (grub_menu_get_timeout): ... this and made it global.
4125 (set_timeout): Renamed to ...
4126 (grub_menu_set_timeout): ... this and made it global.
4127 (grub_normal_terminal_menu_viewer): Renamed to ...
4128 (grub_normal_text_menu_viewer): ... this.
4130 * normal/menu_text.c: New file. Extracted text-menu-specific code
4133 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4134 (normal_mod_SOURCES): Likewise.
4136 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4137 (normal_mod_SOURCES): Likewise.
4139 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4140 (normal_mod_SOURCES): Likewise.
4142 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4143 (normal_mod_SOURCES): Likewise.
4145 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4146 (normal_mod_SOURCES): Likewise.
4148 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4149 (normal_mod_SOURCES): Likewise.
4151 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4152 (normal_mod_SOURCES): Likewise.
4154 2009-02-11 Robert Millan <rmh@aybabtu.com>
4156 * util/grub.d/00_header.in: Update old reference to `font' command.
4158 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4160 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4162 Based on patch from Javier MartÃn.
4164 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4166 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4167 to avoid false positives with FAT.
4168 (grub_fstest_SOURCES): Likewise.
4169 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4170 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4171 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4172 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4173 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4174 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4176 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4178 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4179 bpb.version_specific.fat12_or_fat16.fstype and
4180 bpb.version_specific.fat32.fstype.
4182 2009-02-08 Robert Millan <rmh@aybabtu.com>
4184 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4186 2009-02-08 Robert Millan <rmh@aybabtu.com>
4188 * Makefile.in (host_os, host_cpu): New variables.
4189 (target_os): Remove. Update all users.
4191 2009-02-08 Marco Gerards <marco@gnu.org>
4193 * Makefile.in (enable_grub_emu_usb): New variable.
4194 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4195 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4196 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4197 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4198 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4199 `usbtest.mod' and `usbms.mod'.
4200 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4201 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4202 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4203 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4204 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4207 * disk/usbms.c: New file.
4209 * include/grub/usb.h: Likewise.
4211 * include/grub/usbtrans.h: Likewise.
4213 * include/grub/usbdesc.h: Likewise.
4215 * bus/usb/usbtrans.c: Likewise.
4217 * bus/usb/ohci.c: Likewise.
4219 * bus/usb/uhci.c: Likewise.
4221 * bus/usb/usbhub.c: Likewise.
4223 * bus/usb/usb.c: Likewise.
4225 * commands/usbtest.c: Likewise.
4227 * util/usb.c: Likewise.
4229 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4231 * configure.ac: Test for libusb presence.
4233 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4235 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4237 * kern/mm.c: Add more comments.
4239 2009-02-08 Robert Millan <rmh@aybabtu.com>
4241 Patch from Javier MartÃn.
4242 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4243 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4245 2009-02-08 Robert Millan <rmh@aybabtu.com>
4247 * fs/cpio.c: Split tar functionality to ...
4248 * fs/tar.c: ... here (new file). Update all users.
4250 2009-02-07 Robert Millan <rmh@aybabtu.com>
4252 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4253 backward-incompatible features.
4255 Based on patch from Javier MartÃn, with some adjustments.
4257 2009-02-07 Michael Scherer <misc@mandriva.org>
4259 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4261 2009-02-07 Robert Millan <rmh@aybabtu.com>
4263 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4264 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4265 after the RAID stuff.
4267 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4269 Fixes problem when running vbetest command as reported by
4270 Vladimir Serbinenko <phcoder@gmail.com>.
4272 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4274 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4276 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4277 /dev/md/NpN style mdraid devices.
4279 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4281 * util/unifont2pff.rb: Remove.
4283 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4285 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4288 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4290 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4291 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4292 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4293 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4294 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4295 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4296 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4298 2009-02-02 Christian Franke <franke@computer.org>
4300 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4302 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4304 * INSTALL: Note that we now require at least autoconf 2.59 and
4305 that LZO is optional.
4307 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4309 Base on patch on bug #24154 created by Tomas Tintera
4312 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4314 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4316 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4317 <bero@arklinux.org>.
4319 * normal/parser.y (script_init): Add missing semicolon.
4321 2009-01-31 Colin D Bennett <colin@gibibit.com>
4323 * normal/main.c: Add include to grub/menu_viewer.h.
4324 (free_menu_entry_classes): Added.
4325 (grub_normal_menu_addentry): Added class property handling.
4326 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4327 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4329 * normal/menu_viewer.c: New file.
4331 * normal/menu.c (run_menu_entry): Renamed to ...
4332 (grub_menu_execute_entry): ... this and made it as global.
4333 (grub_menu_run): Renamed to ...
4334 (show_text_menu): ... this and made it local.
4335 (show_text_menu): Adapt to new function names.
4336 (grub_normal_terminal_menu_viewer): New global variable.
4338 * include/grub/menu.h: New file.
4340 * include/grub/menu_viewer.h: New file.
4342 * include/grub/normal.h: Added include to grub/menu.h.
4343 (grub_menu_entry): Moved to include/grub/menu.h.
4344 (grub_menu_entry_t): Likewise.
4345 (grub_menu): Likewise.
4346 (grub_menu_t): Likewise.
4347 (grub_normal_terminal_menu_viewer): Added.
4348 (grub_menu_execute_entry): Likewise.
4349 (grub_menu_run): Removed.
4351 * DISTLIST: Added include/grub/menu.h.
4352 Added include/grub/menu_viewer.h.
4353 Added normal/menu_viewer.c.
4355 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4357 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4358 arglist for menutitle arguments.
4360 * normal/main.c (grub_normal_menu_addentry): Likewise.
4362 * normal/parser.y (menuentry): Likewise.
4364 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4366 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4367 (grub_script_create_cmdmenu): Likewise.
4369 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4371 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4374 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4376 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4378 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4380 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4382 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4384 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4386 2009-01-30 Christian Franke <franke@computer.org>
4388 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4389 in option help text.
4391 2009-01-27 Pavel Roskin <proski@gnu.org>
4393 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4395 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4397 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4399 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4401 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4402 unregister function.
4404 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4406 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4408 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4410 * util/grub-mkfont.c (usage): Fix typo.
4412 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4414 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4416 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4418 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4420 * kern/misc.c (grub_strcasecmp): New function.
4421 (grub_strcasecmp): Use grub_size_t instead of int for length.
4423 * include/grub/misc.h: Update function prototypes.
4425 2009-01-26 Robert Millan <rmh@aybabtu.com>
4427 * configure.ac: Fix cross-compilation check.
4429 2009-01-22 Christian Franke <franke@computer.org>
4431 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4432 (precision) digit string. Allow `.format2' without `format1' (width).
4433 Limit input chars for `%s' output to `format2' if specified. This is
4434 compatible with standard printf ().
4436 2009-01-22 Christian Franke <franke@computer.org>
4438 * disk/ata.c (grub_ata_wait_status): Replace by ...
4439 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4440 other status bits may be invalid while BSY is asserted.
4441 (grub_ata_check_ready): New function.
4442 (grub_ata_cmd): Removed.
4443 (grub_ata_wait_drq): New function.
4444 (grub_ata_strncpy): Remove inline.
4445 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4446 and error check now done by grub_ata_wait_drq ().
4447 (grub_ata_pio_write): Likewise.
4448 (grub_atapi_identify): Set DEV before check for !BSY. Use
4449 grub_ata_wait_drq () to wait for data.
4450 (grub_ata_device_initialize): Add status register check to
4451 detect missing SATA slave devices. Add debug messages.
4452 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4453 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4454 transfer loop by grub_ata_pio_write ().
4455 (grub_ata_identify): Set DEV before check for !BSY. Use
4456 grub_ata_wait_drq () to wait for data.
4457 (grub_ata_setaddress): Set DEV before check for !BSY.
4458 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4459 read/write in one loop. Fix invalid command on write. Fix incomplete
4460 command on (size % batch) == 0. Add missing error check after write of
4461 last block. Add debug messages.
4462 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4464 2009-01-19 Christian Franke <franke@computer.org>
4466 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4467 (GRUB_ATAPI_IREASON_*): Likewise.
4468 (grub_ata_pio_write): Fix timeout error return.
4469 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4470 (grub_atapi_wait_drq): New function.
4471 (grub_atapi_packet): New parameter `size'.
4472 Use grub_atapi_wait_drq () and direct write instead of
4473 grub_ata_pio_write ().
4474 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4475 reads the number of bytes requested by the device for each DRQ
4477 (grub_atapi_write): Remove old implementation, return not
4478 implemented instead.
4480 2009-01-19 Christian Franke <franke@computer.org>
4482 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4483 of 512 to calculate data size.
4484 (grub_scsi_read12): Likewise.
4485 (grub_scsi_write10): Likewise.
4486 (grub_scsi_write12): Likewise.
4487 (grub_scsi_read): Adjust size according to blocksize.
4488 Add checks for invalid blocksize and unaligned transfer.
4490 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4492 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4494 * term/gfxterm.c (write_char): Fix background rendering for wide
4497 2009-01-19 Robert Millan <rmh@aybabtu.com>
4499 * config.guess: Update to latest version from config git.
4500 * config.sub: Likewise.
4502 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4504 * Makefile.in: Change font compilation to use new grub-mkfont instead
4507 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4508 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4509 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4510 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4511 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4512 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4513 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4514 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4515 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4517 2009-01-16 Christian Franke <franke@computer.org>
4519 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4520 (enum grub_ata_timeout_milliseconds): New enum.
4521 (grub_ata_wait_status): Add parameter milliseconds.
4522 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4523 recovery from timed-out commands.
4524 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4525 return grub_errno instead of REG_ERROR.
4526 (grub_ata_pio_write): Add parameter milliseconds.
4527 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4528 Pass milliseconds to grub_ata_wait_status () and
4529 grub_ata_pio_read ().
4530 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4531 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4532 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4533 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4534 It is not suitable for device detection, because DEV bit is ignored,
4535 the command may run too long, and not all devices set the signature
4537 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4538 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4539 Fix device selection, DEV bit must be set first to address the registers
4540 of the correct device.
4541 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4542 grub_ata_pio_read/write ().
4543 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4544 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4546 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4548 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4550 2009-01-13 Bean <bean123ch@gmail.com>
4552 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4554 2009-01-13 Bean <bean123ch@gmail.com>
4556 * Makefile.in: (enable_grub_mkfont): New variable.
4557 (freetype_cflags): Likewise.
4558 (freetype_libs): Likewise.
4560 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4561 (grub_mkfont_SOURCES): New variable.
4562 (grub_mkfont_CFLAGS): Likewise.
4563 (grub_mkfont_LDFLAGS): Likewise.
4565 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4566 library if `--enable-grub-mkfont' is requested.
4567 (enable_grub_mkfont): New variable.
4568 (freetype_cflags): Likewise.
4569 (freetype_libs): Likewise.
4571 * util/grub-mkfont.c: New file.
4573 2009-01-12 Christian Franke <franke@computer.org>
4575 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4576 mode check. Fix setting of compat_use[].
4578 2009-01-10 Robert Millan <rmh@aybabtu.com>
4580 Update a few copyright years which we forgot to do in 2008 (only for
4581 files whose changes made in 2008 were copyright-significant)
4583 * Makefile.in: Add 2008 to Copyright line.
4584 * disk/ieee1275/ofdisk.c: Likewise.
4585 * disk/efi/efidisk.c: Likewise.
4586 * kern/dl.c: Likewise.
4587 * kern/sparc64/ieee1275/init.c: Likewise.
4588 * kern/mm.c: Likewise.
4589 * kern/efi/mm.c: Likewise.
4590 * boot/i386/pc/boot.S: Likewise.
4591 * genfslist.sh: Likewise.
4592 * fs/iso9660.c: Likewise.
4593 * fs/hfs.c: Likewise.
4594 * fs/jfs.c: Likewise.
4595 * fs/minix.c: Likewise.
4596 * fs/ufs.c: Likewise.
4597 * gensymlist.sh.in: Likewise.
4598 * genkernsyms.sh.in: Likewise.
4599 * include/grub/misc.h: Likewise.
4600 * include/grub/types.h: Likewise.
4601 * include/grub/symbol.h: Likewise.
4602 * include/grub/elf.h: Likewise.
4603 * include/grub/kernel.h: Likewise.
4604 * include/grub/disk.h: Likewise.
4605 * include/grub/dl.h: Likewise.
4606 * include/grub/i386/linux.h: Likewise.
4607 * include/grub/i386/pc/biosdisk.h: Likewise.
4608 * include/grub/efi/api.h: Likewise.
4609 * include/grub/efi/pe32.h: Likewise.
4610 * include/grub/util/misc.h: Likewise.
4611 * normal/execute.c: Likewise.
4612 * normal/arg.c: Likewise.
4613 * normal/completion.c: Likewise.
4614 * normal/lexer.c: Likewise.
4615 * normal/parser.y: Likewise.
4616 * normal/misc.c: Likewise.
4617 * commands/i386/pc/vbeinfo.c: Likewise.
4618 * commands/hexdump.c: Likewise.
4619 * commands/terminal.c: Likewise.
4620 * commands/ls.c: Likewise.
4621 * commands/help.c: Likewise.
4622 * partmap/pc.c: Likewise.
4623 * loader/efi/chainloader.c: Likewise.
4624 * loader/multiboot_loader.c: Likewise.
4625 * loader/i386/pc/multiboot2.c: Likewise.
4626 * term/efi/console.c: Likewise.
4627 * term/i386/pc/serial.c: Likewise.
4628 * util/lvm.c: Likewise.
4629 * util/console.c: Likewise.
4630 * util/i386/efi/grub-mkimage.c: Likewise.
4631 * util/raid.c: Likewise.
4633 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4635 * commands/videotest.c: Removed include to grub/machine/memory.h.
4637 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4638 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4639 (video_mod_SOURCES): Removed.
4640 (video_mod_CFLAGS): Likewise.
4641 (video_mod_LDFLAGS): Likewise.
4642 (gfxterm_mod_SOURCES): Likewise.
4643 (gfxterm_mod_CFLAGS): Likewise.
4644 (gfxterm_mod_LDFLAGS): Likewise.
4645 (videotest_mod_SOURCES): Likewise.
4646 (videotest_mod_CFLAGS): Likewise.
4647 (videotest_mod_LDFLAGS): Likewise.
4648 (bitmap_mod_SOURCES): Likewise.
4649 (bitmap_mod_CFLAGS): Likewise.
4650 (bitmap_mod_LDFLAGS): Likewise.
4651 (tga_mod_SOURCES): Likewise.
4652 (tga_mod_CFLAGS): Likewise.
4653 (tga_mod_LDFLAGS): Likewise.
4654 (jpeg_mod_SOURCES): Likewise.
4655 (jpeg_mod_CFLAGS): Likewise.
4656 (jpeg_mod_LDFLAGS): Likewise.
4657 (png_mod_SOURCES): Likewise.
4658 (png_mod_CFLAGS): Likewise.
4659 (png_mod_LDFLAGS): Likewise.
4661 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4662 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4663 (video_mod_SOURCES): Added.
4664 (video_mod_CFLAGS): Likewise.
4665 (video_mod_LDFLAGS): Likewise.
4666 (videotest_mod_SOURCES): Likewise.
4667 (videotest_mod_CFLAGS): Likewise.
4668 (videotest_mod_LDFLAGS): Likewise.
4669 (bitmap_mod_SOURCES): Likewise.
4670 (bitmap_mod_CFLAGS): Likewise.
4671 (bitmap_mod_LDFLAGS): Likewise.
4672 (tga_mod_SOURCES): Likewise.
4673 (tga_mod_CFLAGS): Likewise.
4674 (tga_mod_LDFLAGS): Likewise.
4675 (jpeg_mod_SOURCES): Likewise.
4676 (jpeg_mod_CFLAGS): Likewise.
4677 (jpeg_mod_LDFLAGS): Likewise.
4678 (png_mod_SOURCES): Likewise.
4679 (png_mod_CFLAGS): Likewise.
4680 (png_mod_LDFLAGS): Likewise.
4681 (gfxterm_mod_SOURCES): Likewise.
4682 (gfxterm_mod_CFLAGS): Likewise.
4683 (gfxterm_mod_LDFLAGS): Likewise.
4685 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4686 grub/machine/console.h.
4688 2009-01-04 Jerone Young <jerone@gmail.com>
4690 Make on screen instructions clearer
4692 Based on patch created by Jidanni <jidanni@jidanni.org>
4694 * normal/menu.c: print clearer instructions on the screen
4696 2009-01-02 Colin D Bennett <colin@gibibit.com>
4700 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4701 build system and fixed gfxterm.c to work with different sized fonts.
4703 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4705 * configure: Re-generated.
4707 * DISTLIST: Removed font/manager.c.
4709 Added font/font_cmd.c.
4711 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4714 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4716 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4718 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4720 * normal/menu.c: Likewise.
4722 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4723 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4725 * include/grub/font.h: Replaced with new file.
4727 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4728 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4729 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4730 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4731 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4732 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4733 fg_red, fg_green, fg_blue, fg_alpha.
4734 (grub_video_adapter): Removed blit_glyph.
4735 (grub_video_blit_glyph): Removed.
4737 * font/manager.c: Removed file.
4739 * font/font.c: New file.
4741 * font/font_cmd.c: Likewise.
4743 * video/video.c (grub_video_blit_glyph): Removed.
4745 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4746 (grub_video_vbe_map_rgba): Likewise.
4747 (grub_video_vbe_unmap_color_int): Likewise.
4748 (grub_video_vbe_blit_glyph): Removed.
4749 (grub_video_vbe_adapter): Removed blit_glyph.
4751 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4752 (get_pixel): Likewise.
4753 (set_pixel): Likewise.
4755 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4757 * term/gfxterm.c: Adapted to new font engine.
4759 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4761 * term/i386/pc/vga.c: Likewise.
4763 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4765 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4767 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4769 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4771 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4773 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4775 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4777 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4779 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4781 * util/grub.d/00_header.in: Changed to use new loadfont command.
4783 * util/grub-mkconfig_lib.in: Changed font extension.
4785 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4787 * util/getroot.c (grub_util_get_grub_dev): Add support for
4788 /dev/md/dNNpNN style partitionable mdraid devices.
4790 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4792 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4793 at a time limit of the PXE TFTP API correctly.
4794 (grub_pxefs_close): Likewise.
4796 2008-11-29 Robert Millan <rmh@aybabtu.com>
4798 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4799 grub_ata_device_initialize() calls.
4801 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4803 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4805 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4807 2008-11-28 Robert Millan <rmh@aybabtu.com>
4809 Fix build on powerpc-ieee1275. Based on patch created by
4810 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4811 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4812 `kern/ieee1275/mmap.c'.
4813 * include/grub/powerpc/ieee1275/memory.h: New file.
4815 Provide grub-install on coreboot.
4816 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4817 (grub_install_SOURCES): New variable.
4818 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4821 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4823 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4824 to `grub_term_input_t'.
4825 (grub_term_get_current_output): Change return type to
4826 `grub_term_output_t'.
4828 2008-11-22 Robert Millan <rmh@aybabtu.com>
4830 Fix breakage on coreboot due to declaration mismatch.
4831 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4832 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4833 grub_vga_text_cls().
4835 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4836 comments. Avoid copying one more byte than necessary (just in case).
4838 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4839 to 0x200000 (avoids trouble with some OFW implementations, and matches
4840 with the one in Yaboot).
4841 Reported by Manoel Abranches
4843 2008-11-20 Robert Millan <rmh@aybabtu.com>
4845 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4846 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4848 * util/grub-mkconfig_lib.in (grub_warn): New function.
4849 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4850 warnings, to obtain consistent formatting.
4851 * util/grub.d/00_header.in: Likewise.
4852 * util/update-grub_lib.in: Likewise.
4854 * loader/i386/linux.c (allocate_pages): Fix a warning.
4855 Move comment text to `#error' stanza.
4857 Harmonize ieee1275's grub_available_iterate() with the generic
4858 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4859 build problem on i386-ieee1275):
4860 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4861 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4862 parameter `type'. Update all users of this function.
4863 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4864 `kern/ieee1275/mmap.c'.
4865 * kern/ieee1275/init.c
4866 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4868 (grub_machine_mmap_iterate): ... this.
4869 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4870 return type to `grub_err_t'. Update all implementations of this
4872 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4875 Add `lsmmap' command (lists firmware-provided memory map):
4876 * commands/lsmmap.c: New file.
4877 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4878 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4880 * conf/powerpc-ieee1275.rmk: Likewise.
4881 * conf/i386-coreboot.rmk: Likewise.
4882 * conf/i386-ieee1275.rmk: Likewise.
4884 2008-11-19 Robert Millan <rmh@aybabtu.com>
4886 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4887 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4888 constraints to initrd allocation (based on code from
4889 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4890 for Linux to find it.
4892 2008-11-14 Robert Millan <rmh@aybabtu.com>
4894 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4895 order to cope with duplicate slashes.
4897 2008-11-14 Robert Millan <rmh@aybabtu.com>
4899 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4900 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4901 don't want to mess with lower memory, because it is used in the Linux
4904 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4905 an appropriate place in lower memory, between 0x10000 and 0x90000,
4906 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4907 is in our heap (probably as a result of it being corrupted during
4908 decompression). Add #error instance with comment to explain why this
4909 loader isn't currently usable on PC/BIOS.
4911 2008-11-14 Robert Millan <rmh@aybabtu.com>
4913 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4914 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4916 2008-11-12 Robert Millan <rmh@aybabtu.com>
4918 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4920 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4921 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4923 * include/grub/i386/pc/memory.h: ... to here.
4925 2008-11-12 Robert Millan <rmh@aybabtu.com>
4927 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4930 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4931 (grub_console_cur_color, grub_console_real_putchar)
4932 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4933 (grub_console_setcolorstate, grub_console_setcolor)
4934 (grub_console_getcolor): Move from here ...
4935 * include/grub/i386/vga_common.h: ... to here (new file).
4937 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4938 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4940 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4941 `<grub/i386/vga_common.h>'.
4943 2008-11-12 Robert Millan <rmh@aybabtu.com>
4945 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4946 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4947 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4949 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4950 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4952 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4953 grub_console_init() with call to grub_vga_text_init().
4954 (grub_machine_fini): Replace call to
4955 grub_console_fini() with call to grub_vga_text_fini() and
4956 grub_at_keyboard_fini().
4958 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4959 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4960 (grub_console_setcolorstate, grub_console_setcolor)
4961 (grub_console_getcolor): New function prototypes.
4963 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4964 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4965 (grub_vga_text_setcursor): Static-ize.
4966 (grub_vga_text_term): New structure.
4967 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4969 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4970 (grub_console_cur_color, grub_console_standard_color)
4971 (grub_console_normal_color, grub_console_highlight_color)
4972 (map_char, grub_console_putchar, grub_console_getcharwidth)
4973 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4974 (grub_console_getcolor): Move from here ...
4975 * term/i386/vga_common.c: ... to here (same function names).
4977 2008-11-12 Robert Millan <rmh@aybabtu.com>
4979 Use newly-added Multiboot support in coreboot.
4981 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4982 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4984 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4985 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4986 (codestart): Store the MBI in `startup_multiboot_info' when we're
4987 being loaded using Multiboot.
4989 * kern/i386/coreboot/init.c (grub_machine_init): Move
4990 grub_at_keyboard_init() call to beginning of function (useful for
4991 debugging). Call grub_machine_mmap_init() before attempting to use
4992 grub_machine_mmap_iterate().
4993 (grub_lower_mem, grub_upper_mem): Move from here ...
4994 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4997 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5000 2008-11-12 Robert Millan <rmh@aybabtu.com>
5002 Fix a regression introduced by the at_keyboard.mod split. Because
5003 some terminals are default on some platforms and non-default on
5004 others, the first terminal being registered determines which is
5005 going to be default.
5007 * kern/term.c (grub_term_register_input): If this is the first
5008 terminal being registered, set it as the current one.
5009 (grub_term_register_output): Likewise.
5011 * term/efi/console.c (grub_console_init): Do not call
5012 grub_term_set_current_output() or grub_term_set_current_input().
5013 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5014 * term/i386/pc/console.c (grub_console_init): Likewise.
5015 (grub_console_fini): Do not call grub_term_set_current_input()
5016 (but leave grub_term_set_current_output() to restore text mode).
5018 2008-11-10 Robert Millan <rmh@aybabtu.com>
5020 * util/grub.d/00_header.in: Add backward compatibility check for
5021 versions of terminal.mod that don't understand `terminal_input' or
5024 2008-11-09 Robert Millan <rmh@aybabtu.com>
5026 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5027 `terminal_input' / `terminal_output', not `terminal'.
5029 2008-11-08 Robert Millan <rmh@aybabtu.com>
5031 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5032 (DISTCLEANFILES): Add `build_env.mk'.
5034 2008-11-08 Robert Millan <rmh@aybabtu.com>
5036 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5037 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5038 members. Update all users.
5039 * util/console.c (grub_ncurses_term): Split in ...
5040 (grub_ncurses_term_input): ... this, and ...
5041 (grub_ncurses_term_output): ... this. Update all users.
5042 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5044 2008-11-08 Robert Millan <rmh@aybabtu.com>
5046 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5047 (PKGDATA): Add $(pkgdata_SRCDIR).
5048 (pkglib_BUILDDIR): New variable.
5049 (pkgdata_SRCDIR): New variable.
5050 (build_env.mk): New target.
5051 (include_DATA): New variable.
5052 (install-local): Install $(include_DATA) files in $(includedir).
5054 2008-11-07 Pavel Roskin <proski@gnu.org>
5056 * gendistlist.sh: Use C locale for sorting to ensure consistent
5057 output on all systems.
5059 * util/grub.d/00_header.in: Remove incorrect space before
5062 2008-11-07 Robert Millan <rmh@aybabtu.com>
5064 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5066 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5067 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5068 (based on find_multi_boot1_header).
5069 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5070 using find_multi_boot2_header(), and abort if neither Multiboot or
5071 Multiboot headers were found.
5073 2008-11-07 Robert Millan <rmh@aybabtu.com>
5075 Modularize at_keyboard.mod:
5077 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5078 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5079 (at_keyboard_mod_LDFLAGS): New variables.
5081 Actual terminal split:
5083 * include/grub/term.h (struct grub_term): Split in ...
5084 (struct grub_term_input): ... this, and ...
5085 (struct grub_term_output): ... this. Update all users.
5086 (grub_term_set_current): Split in ...
5087 (grub_term_set_current_input): ... this, and ...
5088 (grub_term_set_current_output): ... this.
5089 (grub_term_get_current): Split in ...
5090 (grub_term_get_current_input): ... this, and ...
5091 (grub_term_get_current_output): ... this.
5092 (grub_term_register): Split in ...
5093 (grub_term_register_input): ... this, and ...
5094 (grub_term_register_output): ... this.
5095 (grub_term_unregister): Split in ...
5096 (grub_term_unregister_input): ... this, and ...
5097 (grub_term_unregister_output): ... this.
5098 (grub_term_iterate): Split in ...
5099 (grub_term_iterate_input): ... this, and ...
5100 (grub_term_iterate_output): ... this.
5102 * kern/term.c (grub_term_list): Split in ...
5103 (grub_term_list_input): ... this, and ...
5104 (grub_term_list_output): ... this. Update all users.
5105 (grub_cur_term): Split in ...
5106 (grub_cur_term_input): ... this, and ...
5107 (grub_cur_term_output): ... this. Update all users.
5108 (grub_term_set_current): Split in ...
5109 (grub_term_set_current_input): ... this, and ...
5110 (grub_term_set_current_output): ... this.
5111 (grub_term_get_current): Split in ...
5112 (grub_term_get_current_input): ... this, and ...
5113 (grub_term_get_current_output): ... this.
5114 (grub_term_register): Split in ...
5115 (grub_term_register_input): ... this, and ...
5116 (grub_term_register_output): ... this.
5117 (grub_term_unregister): Split in ...
5118 (grub_term_unregister_input): ... this, and ...
5119 (grub_term_unregister_output): ... this.
5120 (grub_term_iterate): Split in ...
5121 (grub_term_iterate_input): ... this, and ...
5122 (grub_term_iterate_output): ... this.
5124 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5125 a check for input and one for output (and only attempt to get keys
5126 from user when input works).
5128 * util/grub-probe.c (grub_term_get_current): Split in ...
5129 (grub_term_get_current_input): ... this, and ...
5130 (grub_term_get_current_output): ... this.
5131 * util/grub-fstest.c: Likewise.
5132 * util/i386/pc/grub-setup.c: Likewise.
5133 * util/grub-editenv.c: Likewise.
5135 Portability adjustments:
5137 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5138 `term/i386/pc/at_keyboard.c'.
5139 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5140 grub_keyboard_controller_init() (now handled by terminal .init).
5141 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5142 grub_at_keyboard_init().
5143 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5144 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5145 at_keyboard.mod via input terminal interface).
5146 * include/grub/i386/coreboot/console.h: Convert into a stub for
5147 `<grub/i386/pc/console.h>'.
5149 Migrate full terminals to new API:
5151 * term/efi/console.c (grub_console_term): Split into ...
5152 (grub_console_term_input): ... this, and ...
5153 (grub_console_term_output): ... this. Update all users.
5154 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5155 (grub_ofconsole_init): Split into ...
5156 (grub_ofconsole_init_input): ... this, and ...
5157 (grub_ofconsole_init_output): ... this.
5158 (grub_ofconsole_term): Split into ...
5159 (grub_ofconsole_term_input): ... this, and ...
5160 (grub_ofconsole_term_output): ... this. Update all users.
5161 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5162 (grub_serial_term_input): ... this, and ...
5163 (grub_serial_term_output): ... this. Update all users.
5164 * term/i386/pc/console.c (grub_console_term): Split into ...
5165 (grub_console_term_input): ... this, and ...
5166 (grub_console_term_output): ... this. Update all users.
5167 (grub_console_term_input): Only enable it on PC/BIOS platform.
5168 (grub_console_init): Remove grub_keyboard_controller_init() call.
5170 Migrate input terminals to new API:
5172 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5173 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5174 i386-specific anyway).
5175 (grub_console_checkkey): Rename to ...
5176 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5178 (grub_keyboard_controller_orig): New variable.
5179 (grub_console_getkey): Rename to ...
5180 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5182 (grub_keyboard_controller_init): Static-ize. Save original
5183 controller value so that it can be restored ...
5184 (grub_keyboard_controller_fini): ... here (new function).
5185 (grub_at_keyboard_term): New structure.
5186 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5189 Migrate output terminals to new API:
5191 * term/i386/pc/vga.c (grub_vga_term): Change type to
5192 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5193 members. Update all users.
5194 * term/gfxterm.c (grub_video_term): Change type to
5195 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5196 members. Update all users.
5197 * include/grub/i386/pc/console.h (grub_console_checkkey)
5198 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5201 Migrate `terminal' command and userland tools to new API:
5203 * commands/terminal.c (grub_cmd_terminal): Split into ...
5204 (grub_cmd_terminal_input): ... this, and ...
5205 (grub_cmd_terminal_output): ... this.
5206 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5207 `terminal_input' and `terminal_output'.
5208 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5209 `terminal_input' / `terminal_output' API.
5210 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5211 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5212 provided ${GRUB_TERMINAL}, convert it).
5214 2008-11-04 Robert Millan <rmh@aybabtu.com>
5216 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5218 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5220 2008-11-03 Bean <bean123ch@gmail.com>
5222 * kern/elf.c (grub_elf32_load): Revert to previous code.
5223 (grub_elf64_load): Likewise.
5225 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5227 2008-11-01 Robert Millan <rmh@aybabtu.com>
5229 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5230 (TARGET_CPPFLAGS): Likewise.
5231 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5233 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5235 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5237 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5239 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5240 addition of objects until the code is not going to be able to fail.
5242 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5244 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5245 (add a missing NULL check, and correct them by moving the pointer
5246 operations after the actual check).
5248 2008-10-29 Robert Millan <rmh@aybabtu.com>
5250 * util/i386/pc/grub-install.in: Handle empty string as output from
5251 make_system_path_relative_to_its_root().
5253 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5255 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5256 circular metadata worst case scenario. If the metadata is circular
5257 then copy the wrap in place.
5258 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5259 project lib/format_text/layout.h
5260 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5262 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5264 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5266 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5268 * util/update-grub_lib.in: Mention filename in warning message.
5270 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5272 * NEWS: Update for rename of update-grub to grub-mkconfig.
5274 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5276 * util/update-grub_lib.in: Copy to ...
5277 * util/grub-mkconfig_lib.in: ... this. Update all users.
5278 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5279 * util/update-grub.in: Rename to ...
5280 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5281 option. Add `--output' option to allow users to specify the generated
5282 configuration file. Default to stdout.
5283 (update_grub_dir): Rename to ...
5284 (grub_mkconfig_dir): ... this.
5285 (grub_cfg): Default to an empty string.
5286 * conf/common.rmk (update-grub): Rename to ...
5287 (grub-mkconfig): ... this.
5288 (update-grub_lib): Copy to ...
5289 (grub-mkconfig_lib): ... this.
5290 (update-grub_SCRIPTS): Copy to ...
5291 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5292 (update-grub_DATA): Rename to ...
5293 (grub-mkconfig_DATA): ... this.
5295 2008-09-28 Robert Millan <rmh@aybabtu.com>
5297 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5298 to `modified'. Add the real `created' field.
5299 (grub_iso9660_uuid): Use `modified' rather than `created' for
5300 constructing the UUID.
5302 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5304 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5305 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5307 2008-09-28 Bean <bean123ch@gmail.com>
5309 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5310 Thanks to Christian Franke for finding this bug.
5312 2008-09-25 Robert Millan <rmh@aybabtu.com>
5314 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5315 instances of grub_util_get_disk_name() (see previous commit).
5317 2008-09-25 Robert Millan <rmh@aybabtu.com>
5319 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5320 `util/i386/get_disk_name.c'.
5321 * conf/i386-efi.rmk: Likewise.
5322 * conf/x86_64-efi.rmk: Likewise.
5323 * conf/i386-coreboot.rmk: Likewise.
5324 * conf/i386-ieee1275.rmk: Likewise.
5325 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5326 `util/ieee1275/get_disk_name.c'.
5327 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5328 * util/ieee1275/get_disk_name.c: Remove file.
5329 * util/i386/get_disk_name.c: Remove file.
5330 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5331 "hd%d" for device.map entries, rather than using
5332 grub_util_get_disk_name().
5334 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5336 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5338 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5340 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5342 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5344 (GRUB_TERM_PPAGE): Changed to 0x4900.
5346 2008-09-24 Robert Millan <rmh@aybabtu.com>
5348 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5349 macros (they were i386-pc specific).
5350 * include/grub/sparc64/ieee1275/console.h: Likewise.
5351 * include/grub/efi/console.h: Likewise.
5353 2008-09-22 Bean <bean123ch@gmail.com>
5355 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5356 resident and in attribute list.
5358 * include/grub/ntfs.h (BMP_LEN): Removed.
5360 2008-09-22 Bean <bean123ch@gmail.com>
5362 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5363 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5365 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5366 error occurs, as grub_disk_open will call grub_disk_close, which will
5367 call p->close (scsi).
5369 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5371 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5372 (AC_PREREQ): Bumped to 2.59.
5373 (AC_TRY_COMPILE): Replace obsolete macro with ...
5374 (AC_COMPILE_IFELSE): ... this.
5375 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5376 (AC_LINK_IFELSE): ... this.
5378 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5380 * autogen.sh: Add a call to `gendistlist.sh'.
5382 2008-09-19 Christian Franke <franke@computer.org>
5384 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5385 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5386 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5387 Export __enable_execute_stack() to modules.
5388 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5391 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5393 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5396 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5398 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5399 #include <grub/util/hostdisk.h>.
5401 2008-09-08 Robert Millan <rmh@aybabtu.com>
5403 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5404 segments when their filesz is zero (grub_file_read() interprets
5405 zero-size as "read until EOF", which results in memory corruption).
5406 Use `lowest_segment' rather than 0 for calculating the current
5407 segment load address.
5409 2008-09-08 Robert Millan <rmh@aybabtu.com>
5411 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5412 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5413 clobbered useful information.
5415 2008-09-08 Robert Millan <rmh@aybabtu.com>
5417 * include/grub/util/biosdisk.h: Move to ...
5418 * include/grub/util/hostdisk.h: ... here. Update all users.
5419 * util/biosdisk.c: Move to ...
5420 * util/hostdisk.c: ... here. Update all users.
5422 2008-09-07 Robert Millan <rmh@aybabtu.com>
5424 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5426 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5427 and length can be stored directly in the `mbi->mmap_addr' and
5428 `mbi->mmap_length' struct fields.
5430 2008-09-07 Robert Millan <rmh@aybabtu.com>
5432 * conf/i386.rmk: New file. Provides declaration for building
5434 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5435 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5437 Include `conf/i386.mk'.
5438 * conf/i386-efi.rmk: Likewise.
5439 * conf/x86_64-efi.rmk: Likewise.
5440 * conf/i386-coreboot.rmk: Likewise.
5441 * conf/i386-ieee1275.rmk: Likewise.
5443 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5445 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5446 Adds optimization support for BGR based modes.
5448 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5449 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5450 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5451 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5452 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5453 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5454 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5455 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5456 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5457 (grub_video_i386_vbeblit_index_index): Likewise.
5458 (grub_video_i386_vbeblit_replace_directN): Added.
5459 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5460 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5461 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5462 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5463 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5464 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5465 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5466 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5467 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5468 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5469 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5470 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5471 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5473 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5474 (grub_video_i386_vbefill_R8G8B8): Likewise.
5475 (grub_video_i386_vbefill_index): Likewise.
5476 (grub_video_i386_vbefill_direct32): Added.
5477 (grub_video_i386_vbefill_direct24): Likewise.
5478 (grub_video_i386_vbefill_direct16): Likewise.
5479 (grub_video_i386_vbefill_direct8): Likewise.
5481 * include/grub/video.h (grub_video_blit_format): Removed
5482 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5483 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5484 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5485 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5486 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5488 * video/video.c (grub_video_get_blit_format): Updated to use new
5489 blit formats. Added handling for 16 bit color modes.
5491 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5493 (common_blitter): Updated to use new blitters.
5495 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5497 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5498 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5499 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5500 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5501 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5502 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5503 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5504 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5505 (grub_video_i386_vbeblit_index_index): Likewise.
5506 (grub_video_i386_vbeblit_replace_directN): Added.
5507 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5508 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5509 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5510 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5511 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5512 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5513 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5514 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5515 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5516 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5517 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5518 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5519 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5521 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5522 (grub_video_i386_vbefill_R8G8B8): Likewise.
5523 (grub_video_i386_vbefill_index): Likewise.
5524 (grub_video_i386_vbefill_direct32): Added.
5525 (grub_video_i386_vbefill_direct24): Likewise.
5526 (grub_video_i386_vbefill_direct16): Likewise.
5527 (grub_video_i386_vbefill_direct8): Likewise.
5529 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5532 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5535 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5538 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5541 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5543 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5546 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5548 * fs/iso9660.c (grub_iso9660_date): New structure.
5549 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5550 (grub_iso9660_uuid): New function.
5552 2008-09-05 Bean <bean123ch@gmail.com>
5554 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5556 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5557 insensitive bit for names in Win32 and Win32 & DOS namespace.
5559 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5561 * include/grub/types.h (LONG_MAX): Likewise.
5563 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5565 * util/getroot.c: Include <config.h>.
5566 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5567 add support for /dev/md/N devices and handle LVM double dash escaping.
5569 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5571 * config.guess: Update to latest version from config git.
5572 * config.sub: Likewise.
5574 2008-09-03 Robert Millan <rmh@aybabtu.com>
5576 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5577 `disk->total_sectors'.
5579 2008-09-01 Colin D Bennett <colin@gibibit.com>
5581 * include/grub/normal.h: Fixed incorrect comment for
5582 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5584 2008-09-01 Colin D Bennett <colin@gibibit.com>
5586 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5587 values with defines.
5589 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5590 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5591 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5592 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5593 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5594 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5595 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5596 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5597 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5598 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5599 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5600 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5601 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5602 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5603 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5604 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5605 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5606 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5607 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5609 2008-08-31 Robert Millan <rmh@aybabtu.com>
5611 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5613 (grub_multiboot): Fix a few warnings.
5615 2008-08-31 Robert Millan <rmh@aybabtu.com>
5617 * loader/i386/pc/multiboot.c: Update comment not to say that
5618 boot_device support is unimplemented.
5620 2008-08-31 Robert Millan <rmh@aybabtu.com>
5622 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5623 or memory map support are unimplemented.
5625 2008-08-31 Colin D Bennett <colin@gibibit.com>
5627 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5629 2008-08-31 Colin D Bennett <colin@gibibit.com>
5631 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5632 total video memory in 'vbeinfo' output; show color format details for
5635 2008-08-30 Pavel Roskin <proski@gnu.org>
5637 * util/genmoddep.c: Remove for real this time.
5638 * DISTLIST: Remove util/genmoddep.c.
5640 2008-08-30 Robert Millan <rmh@aybabtu.com>
5642 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5643 as required by Multiboot spec (it was already 4-byte aligned, but
5646 2008-08-29 Pavel Roskin <proski@gnu.org>
5648 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5649 * kern/powerpc/ieee1275/startup.S: ... this.
5650 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5651 * DISTLIST: Likewise.
5653 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5654 grub/cpu/kernel.h. Add start label for consistency with other
5655 platforms. Add grub_prefix immediately after start. Add jump
5656 to the code after grub_prefix.
5657 * include/grub/powerpc/kernel.h: Provide valid values for
5658 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5660 2008-08-29 Bean <bean123ch@gmail.com>
5662 * configure.ac: Change host_os to cygwin for mingw.
5663 (asprintf): New check for function.
5665 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5666 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5668 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5669 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5670 sync, sleep and grub_util_get_disk_size for mingw.
5672 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5673 to get size in mingw.
5674 (open_device): Use flag O_BINARY if it's defined.
5675 (find_root_device): Add dummy code for mingw.
5677 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5678 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5679 (get_scsi_disk_name): Return 0 for mingw.
5681 * util/hostfs.c: #include <grub/util/misc.h>.
5682 (grub_hostfs_open): Use "rb" flag to open file, use
5683 grub_util_get_disk_size to get disk size for mingw.
5685 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5686 (asprintf): New function if HAVE_ASPRINTF is not set.
5687 (sync): New function for mingw.
5689 (grub_util_get_disk_size): Likewise.
5691 2008-08-28 Pavel Roskin <proski@gnu.org>
5693 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5696 2008-08-28 Robert Millan <rmh@aybabtu.com>
5698 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5700 2008-08-28 Robert Millan <rmh@aybabtu.com>
5702 Change find_grub_drive() syntax so it doesn't prevent it from
5703 detecting NULL names as errors.
5705 * util/biosdisk.c (find_grub_drive): Move free slot search code
5707 (find_free_slot): ... to here.
5708 (read_device_map): Use find_free_slot() to search for free slots.
5710 2008-08-27 Marco Gerards <marco@gnu.org>
5712 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5713 (scsi_mod_SOURCES): New variable.
5714 (scsi_mod_CFLAGS): Likewise
5715 (scsi_mod_LDFLAGS): Likewise.
5717 * disk/scsi.c: New file.
5719 * include/grub/scsi.h: Likewise.
5721 * include/grub/scsicmd.h: Likewise.
5723 * disk/ata.c: Include <grub/scsi.h>.
5724 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5726 (grub_ata_iterate): Skip ATAPI devices.
5727 (grub_ata_open): Only handle ATAPI devices.
5728 (struct grub_atapi_read): Removed.
5729 (grub_atapi_readsector): Likewise.
5730 (grub_ata_read): No longer handle ATAPI devices.
5731 (grub_ata_write): Likewise.
5732 (grub_atapi_iterate): New function.
5733 (grub_atapi_read): Likewise.
5734 (grub_atapi_write): Likewise.
5735 (grub_atapi_open): Likewise.
5736 (grub_atapi_close): Likewise.
5737 (grub_atapi_dev): New variable.
5738 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5739 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5741 * include/grub/disk.h (enum grub_disk_dev_id): Add
5742 `GRUB_DISK_DEVICE_SCSI_ID'.
5744 2008-08-26 Robert Millan <rmh@aybabtu.com>
5746 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5747 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5750 2008-08-23 Bean <bean123ch@gmail.com>
5752 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5753 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5754 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5755 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5757 (raid5rec_mod_SOURCES): New macro.
5758 (raid5rec_mod_CFLAGS): Likewise.
5759 (raid5rec_mod_LDFLAGS): Likewise.
5760 (raid6rec_mod_SOURCES): Likewise.
5761 (raid6rec_mod_CFLAGS): Likewise.
5762 (raid6rec_mod_LDFLAGS): Likewise.
5763 (mdraid_mod_SOURCES): Likewise.
5764 (mdraid_mod_CFLAGS): Likewise.
5765 (mdraid_mod_LDFLAGS): Likewise.
5766 (dm_nv_mod_SOURCES): Likewise.
5767 (dm_nv_mod_CFLAGS): Likewise.
5768 (dm_nv_mod_LDFLAGS): Likewise.
5770 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5771 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5772 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5774 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5775 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5777 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5779 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5781 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5783 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5785 * disk/raid5_recover.c: New file.
5787 * disk/raid6_recover.c: Likewise.
5789 * disk/mdraid_linux.c: Likewise.
5791 * disk/dmraid_nvidia.c: Likewise.
5793 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5796 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5797 calculate the size of raid device.
5798 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5799 different layout of raid5.
5800 (grub_raid_scan_device): Remove code specific to mdraid.
5801 (grub_raid_list): New variable.
5802 (free_array): New function.
5803 (grub_raid_register): Likewise.
5804 (grub_raid_unregister): Likewise.
5805 (grub_raid_rescan): Likewise.
5806 (GRUB_MOD_INIT): Don't iterate device here.
5807 (GRUB_MOD_FINI): Use free_array to release resource.
5809 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5810 (grub_raid5_recover_func_t): New function variable type.
5811 (grub_raid6_recover_func_t): Likewise.
5812 (grub_raid5_recover_func): New variable.
5813 (grub_raid6_recover_func): Likewise.
5814 (grub_raid_register): New function.
5815 (grub_raid_unregister): Likewise.
5816 (grub_raid_rescan): Likewise.
5817 (grub_raid_block_xor): Likewise.
5819 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5820 (CMD_CRC): New macro.
5822 (read_file): Handle device as well as file.
5823 (cmd_crc): New function.
5824 (fstest): Handle multiple disks.
5825 (options): Remove part, raw and long, add root and diskcount.
5826 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5827 (main): Find the first non option entry and ignore subsequent options,
5828 add handling for the new options, support multiple disks.
5830 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5832 2008-08-23 Bean <bean123ch@gmail.com>
5834 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5836 * genfslist.sh: Ignore kernel.mod.
5838 * genpartmaplist.sh: Likewise.
5840 2008-08-23 Robert Millan <rmh@aybabtu.com>
5842 * util/getroot.c (find_root_device): Skip anything that starts with
5843 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5845 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5847 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5848 * util/grub.d/00_header.in: Allow the administrator to change default
5849 gfxmode via ${GRUB_GFXMODE}.
5851 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5853 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5855 2008-08-21 Robert Millan <rmh@aybabtu.com>
5857 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5859 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5860 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5862 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5864 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5865 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5867 2008-08-19 Robert Millan <rmh@aybabtu.com>
5869 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5870 (struct grub_virtual_screen): Remove `cursor_color'.
5871 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5873 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5875 2008-08-18 Robert Millan <rmh@aybabtu.com>
5877 Unify (identical) linux_normal.c files.
5878 * loader/i386/efi/linux_normal.c: Move from here ...
5879 * loader/linux_normal.c: ... to here. Update all users.
5880 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5881 * loader/i386/ieee1275/linux_normal.c: Likewise.
5883 2008-08-18 Robert Millan <rmh@aybabtu.com>
5885 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5886 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5887 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5888 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5889 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5891 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5892 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5893 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5894 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5895 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5896 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5897 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5898 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5899 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5900 portably using grub_getxy().
5901 Replace `-EFI' with `-bzImage' in boot message.
5903 2008-08-17 Robert Millan <rmh@aybabtu.com>
5905 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5907 2008-08-17 Robert Millan <rmh@aybabtu.com>
5909 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5911 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5912 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5913 (grub_machine_mmap_iterate): New function declaration.
5914 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5916 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5919 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5920 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5921 Move e820 parsing from here ...
5922 * kern/i386/pc/mmap.c: New file.
5923 (grub_machine_mmap_iterate): ... to here.
5925 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5926 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5927 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5928 (grub_available_iterate): Redeclare to return `void', and redeclare
5929 its hook to use grub_uint64_t as addr and size parameters, and rename
5931 (grub_machine_mmap_iterate): ... this. Update all users.
5933 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5934 to make it more readable. Rename to ...
5935 (grub_machine_mmap_iterate): ... this.
5937 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5938 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5939 (grub_multiboot): Allocate an extra region after the payload, and fill
5940 it with a Multiboot memory map. Adjust a.out loader to calculate size
5941 with the extra space.
5942 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5943 with the extra space.
5945 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5947 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5949 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5951 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5952 mdate-sh to the list `find' searches for.
5953 * DISTLIST: Regenerated.
5955 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5957 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5958 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5959 genmoddep.awk, gensymlist.sh.in.
5960 (DISTDIRS): Add bus, docs, hook, lib.
5961 * DISTLIST: Regenerated.
5962 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5964 2008-08-16 Robert Millan <rmh@aybabtu.com>
5966 * disk/raid.c (grub_raid_init): Handle/report errors set by
5967 grub_device_iterate().
5968 * disk/lvm.c (grub_lvm_init): Likewise.
5970 2008-08-15 Bean <bean123ch@gmail.com>
5972 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5974 (datetime_mod_SOURCES): New macro.
5975 (datetime_mod_CFLAGS): Likewise.
5976 (datetime_mod_LDFLAGS): Likewise.
5977 (date_mod_SOURCES): Likewise.
5978 (date_mod_CFLAGS): Likewise.
5979 (date_mod_LDFLAGS): Likewise.
5980 (datehook_mod_SOURCES): Likewise.
5981 (datehook_mod_CFLAGS): Likewise.
5982 (datehook_mod_LDFLAGS): Likewise.
5984 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5986 (datetime_mod_SOURCES): New macro.
5987 (datetime_mod_CFLAGS): Likewise.
5988 (datetime_mod_LDFLAGS): Likewise.
5989 (date_mod_SOURCES): Likewise.
5990 (date_mod_CFLAGS): Likewise.
5991 (date_mod_LDFLAGS): Likewise.
5992 (datehook_mod_SOURCES): Likewise.
5993 (datehook_mod_CFLAGS): Likewise.
5994 (datehook_mod_LDFLAGS): Likewise.
5996 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5998 (datetime_mod_SOURCES): New macro.
5999 (datetime_mod_CFLAGS): Likewise.
6000 (datetime_mod_LDFLAGS): Likewise.
6001 (date_mod_SOURCES): Likewise.
6002 (date_mod_CFLAGS): Likewise.
6003 (date_mod_LDFLAGS): Likewise.
6004 (datehook_mod_SOURCES): Likewise.
6005 (datehook_mod_CFLAGS): Likewise.
6006 (datehook_mod_LDFLAGS): Likewise.
6008 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6010 (datetime_mod_SOURCES): New macro.
6011 (datetime_mod_CFLAGS): Likewise.
6012 (datetime_mod_LDFLAGS): Likewise.
6013 (date_mod_SOURCES): Likewise.
6014 (date_mod_CFLAGS): Likewise.
6015 (date_mod_LDFLAGS): Likewise.
6016 (datehook_mod_SOURCES): Likewise.
6017 (datehook_mod_CFLAGS): Likewise.
6018 (datehook_mod_LDFLAGS): Likewise.
6020 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6022 (datetime_mod_SOURCES): New macro.
6023 (datetime_mod_CFLAGS): Likewise.
6024 (datetime_mod_LDFLAGS): Likewise.
6025 (date_mod_SOURCES): Likewise.
6026 (date_mod_CFLAGS): Likewise.
6027 (date_mod_LDFLAGS): Likewise.
6028 (datehook_mod_SOURCES): Likewise.
6029 (datehook_mod_CFLAGS): Likewise.
6030 (datehook_mod_LDFLAGS): Likewise.
6032 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6034 * commands/date.c: New file.
6036 * hook/datehook.c: Likewise.
6038 * include/grub/lib/datetime.h: Likewise.
6040 * include/grub/i386/cmos.h: Likewise.
6042 * lib/datetime.c: Likewise.
6044 * lib/i386/datetime.c: Likewise.
6046 * lib/efi/datetime.c: Likewise.
6048 2008-08-14 Robert Millan <rmh@aybabtu.com>
6050 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6051 (grub_mkelfimage_SOURCES): New variable.
6052 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6054 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6055 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6056 * conf/powerpc-ieee1275.rmk: Likewise.
6057 * conf/i386-ieee1275.rmk: Likewise.
6059 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6060 * kern/i386/coreboot/init.c: Likewise.
6062 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6063 with `<grub/cpu/kernel.h>'.
6064 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6066 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6067 * kern/i386/coreboot/startup.S: Likewise.
6069 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6070 (GRUB_MOD_GAP): Remove.
6071 * include/grub/powerpc/kernel.h: New file.
6072 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6073 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6074 * include/grub/i386/kernel.h: New file.
6075 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6076 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6077 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6079 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6081 Use --directory when invoking grub_mkimage.
6083 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6084 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6085 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6086 and GRUB_KERNEL_CPU_PREFIX.
6088 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6090 * include/grub/err.h (grub_err_printf): New function prototype.
6091 * util/misc.c (grub_err_printf): New function.
6092 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6094 * kern/err.c (grub_print_error): Use grub_err_printf.
6096 2008-08-13 Robert Millan <rmh@aybabtu.com>
6098 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6100 2008-08-13 Robert Millan <rmh@aybabtu.com>
6102 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6105 2008-08-12 Robert Millan <rmh@aybabtu.com>
6107 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6108 of the relocation code from here ...
6109 (grub_multiboot): ... to here.
6110 (forward_relocator, backward_relocator): Move from here ...
6111 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6112 (grub_multiboot_backward_relocator): ... to here.
6113 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6114 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6115 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6116 (grub_multiboot_forward_relocator_end)
6117 (grub_multiboot_backward_relocator)
6118 (grub_multiboot_backward_relocator_end): New variables.
6120 2008-08-12 Bean <bean123ch@gmail.com>
6122 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6124 2008-08-11 Robert Millan <rmh@aybabtu.com>
6126 * kern/i386/linuxbios/startup.S: Move from here ...
6127 * kern/i386/coreboot/startup.S: ... to here.
6129 * kern/i386/linuxbios/init.c: Move from here ...
6130 * kern/i386/coreboot/init.c: ... to here.
6132 * kern/i386/linuxbios/table.c: Move from here ...
6133 * kern/i386/coreboot/mmap.c: ... to here.
6135 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6137 2008-08-11 Robert Millan <rmh@aybabtu.com>
6139 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6140 errors. Leave it to the upper layer to handle them.
6142 2008-08-09 Christian Franke <franke@computer.org>
6144 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6145 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6146 Install `grub.d/10_windows' only on Cygwin.
6147 * configure.ac: Add subst of `target_os'.
6148 Check `target_os' also before setting TARGET_OBJ2ELF.
6149 Add `--enable-grub-pe2elf'.
6151 2008-08-08 Robert Millan <rmh@aybabtu.com>
6153 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6154 (grub_last_time): Change type to grub_uint64_t.
6155 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6156 (grub_disk_close): Likewise.
6158 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6159 (run_menu): Migrate code from to using grub_get_time_ms().
6161 * util/misc.c (grub_get_time_ms): New function.
6163 2008-08-08 Marco Gerards <marco@gnu.org>
6165 * disk/ata.c (grub_ata_regget): Change return type to
6167 (grub_ata_regget2): Likewise.
6168 (grub_ata_wait_status): New function.
6169 (grub_ata_wait_busy): Removed function, updated all users to use
6170 `grub_ata_wait_status'.
6171 (grub_ata_wait_drq): Likewise.
6172 (grub_ata_cmd): New function.
6173 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6175 (grub_ata_pio_write): Add error handling.
6176 (grub_atapi_identify): Likewise.
6177 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6179 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6180 handling. Actually use the detected registers. Reorder the
6181 detection logic such that it is easier to read.
6182 (grub_ata_pciinit): Do not assign the same ID to each controller.
6183 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6185 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6187 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6189 2008-08-08 Marco Gerards <marco@gnu.org>
6193 2008-08-07 Bean <bean123ch@gmail.com>
6195 * include/grub/x86_64/pci.h: New file.
6197 2008-08-07 Christian Franke <franke@computer.org>
6199 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6200 (TIMER2_GATE): Likewise.
6201 (grub_pit_wait): Add enable/disable of the timer2 gate
6202 bit of port 0x61. This fixes a possible infinite loop.
6204 2008-08-07 Bean <bean123ch@gmail.com>
6206 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6207 kern/i386/tsc.c and kern/i386/pit.c.
6209 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6212 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6215 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6217 2008-08-07 Bean <bean123ch@gmail.com>
6219 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6221 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6223 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6224 multiple inclusion. Add #include <grub/types.h>.
6226 2008-08-06 Christian Franke <franke@computer.org>
6228 * conf/common.rmk: Build and install `10_windows'.
6229 * util/grub.d/10_windows.in: New script.
6231 2008-08-06 Pavel Roskin <proski@gnu.org>
6233 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6235 2008-08-06 Robert Millan <rmh@aybabtu.com>
6237 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6238 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6240 2008-08-06 Bean <bean123ch@gmail.com>
6242 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6243 (grub_pxefs_fs_int): Remove dummy definition.
6244 (grub_pxefs_open): Use data->block_size to store the current block
6246 (grub_pxefs_read): Use block size stored in data->block_size. As the
6247 value of grub_pxe_blksize can be changed after the file is opened.
6249 2008-08-06 Bean <bean123ch@gmail.com>
6251 * fs/i386/pc/pxe.c (curr_file): new variable.
6252 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6253 require the dummy internal file system anymore.
6254 (grub_pxefs_read): Removed.
6255 (grub_pxefs_close): Likewise.
6256 (grub_pxefs_fs_int): Likewise.
6257 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6258 connection when we switch file.
6259 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6261 2008-08-06 Robert Millan <rmh@aybabtu.com>
6263 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6265 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6266 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6268 * kern/i386/halt.c: New file.
6269 * kern/i386/reboot.c: Likewise.
6270 * include/grub/i386/reboot.h: Likewise.
6271 * include/grub/i386/halt.h: Likewise.
6273 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6274 Include `<grub/cpu/halt.h>'.
6275 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6276 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6278 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6279 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6280 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6281 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6282 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6283 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6285 * include/grub/i386/at_keyboard.h: ... to here.
6287 2008-08-05 Robert Millan <rmh@aybabtu.com>
6289 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6290 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6291 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6292 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6293 `kern/generic/millisleep.c'.
6295 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6296 instead of grub_get_rtc().
6297 (grub_tsc_init): Initialize `tsc_boot_time'.
6299 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6300 (grub_machine_init): Use grub_tsc_init() rather than
6301 installing an RTC-based handler via grub_install_get_time_ms().
6303 * kern/i386/pit.c: New file.
6304 * include/grub/i386/pit.h: Likewise.
6306 2008-08-05 Bean <bean123ch@gmail.com>
6308 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6310 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6311 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6312 (pxe_mod_SOURCES): New macro.
6313 (pxe_mod_CFLAGS): Likewise.
6314 (pxe_mod_LDFLAGS): Likewise.
6315 (pxecmd_mod_SOURCES): Likewise.
6316 (pxecmd_mod_CFLAGS): Likewise.
6317 (pxecmd_mod_LDFLAGS): Likewise.
6319 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6320 (grub_pxe_call): Likewise.
6322 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6324 * commands/i386/pc/pxecmd.c: New file.
6326 * fs/i386/pc/pxe.c: Likewise.
6328 * include/grub/i386/pc/pxe.h: Likewise.
6330 2008-08-05 Bean <bean123ch@gmail.com>
6332 * util/console.c (grub_console_cur_color): New variable.
6333 (grub_console_standard_color): Likewise.
6334 (grub_console_normal_color): Likewise.
6335 (grub_console_highlight_color): Likewise.
6336 (color_map): Likewise.
6337 (use_color): Likewise.
6338 (NUM_COLORS): New macro.
6339 (grub_ncurses_setcolorstate): Handle color properly.
6340 (grub_ncurses_setcolor): Don't change color here, just remember the
6341 settings, color will be set in grub_ncurses_setcolorstate.
6342 (grub_ncurses_getcolor): New function.
6343 (grub_ncurses_init): Initialize color pairs.
6344 (grub_ncurses_term): New member grub_ncurses_getcolor.
6346 2008-08-05 Colin D Bennett <colin@gibibit.com>
6348 High resolution timer support. Implemented for x86 CPUs using TSC.
6349 Extracted generic grub_millisleep() so it's linked in only as needed.
6350 This requires a Pentium compatible CPU; if the RDTSC instruction is
6351 not supported, then it falls back on the generic grub_get_time_ms()
6352 implementation that uses the machine's RTC.
6354 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6355 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6356 `kern/generic/millisleep.c'.
6358 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6359 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6361 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6362 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6364 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6366 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6367 `kern/generic/millisleep.c'.
6369 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6371 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6373 * kern/generic/rtc_get_time_ms.c: New file.
6375 * kern/generic/millisleep.c: New file.
6377 * kern/misc.c: Don't include
6378 <kern/time.h> anymore.
6379 (grub_millisleep_generic): Removed.
6381 * commands/sleep.c (grub_interruptible_millisleep): Uses
6382 grub_get_time_ms() instead of grub_get_rtc().
6384 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6386 (grub_cpu_is_cpuid_supported): New inline function.
6387 (grub_cpu_is_tsc_supported): New inline function.
6388 (grub_tsc_init): New function prototype.
6389 (grub_tsc_get_time_ms): New function prototype.
6391 * kern/i386/tsc.c (grub_get_time_ms): New file.
6393 * include/grub/time.h: Include <grub/types.h.
6394 (grub_millisleep_generic): Removed.
6395 (grub_get_time_ms): New prototype.
6396 (grub_install_get_time_ms): New prototype.
6397 (grub_rtc_get_time_ms): New prototype.
6399 * kern/time.c (grub_get_time_ms): New function.
6400 (grub_install_get_time_ms): New function.
6402 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6403 <grub/time.h> anymore.
6404 (grub_millisleep): Removed.
6405 (grub_machine_init): Call grub_tsc_init.
6407 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6408 get_time_ms() implementation.
6410 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6411 (ieee1275_get_time_ms): New function.
6412 (grub_machine_init): Install get_time_ms() implementation.
6414 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6415 (grub_machine_init): Call grub_tsc_init().
6416 (grub_millisleep): Removed.
6418 * kern/ieee1275/init.c (grub_millisleep): Removed.
6419 (grub_machine_init): Install ieee1275_get_time_ms()
6421 (ieee1275_get_time_ms): New function.
6422 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6425 2008-08-05 Marco Gerards <marco@gnu.org>
6427 * disk/ata.c: Include <grub/pci.h>.
6428 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6429 (grub_ata_initialize): Rewritten.
6430 (grub_ata_device_initialize): New function.
6432 2008-08-04 Pavel Roskin <proski@gnu.org>
6434 * kern/main.c: Include grub/mm.h.
6436 2008-08-04 Robert Millan <rmh@aybabtu.com>
6438 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6439 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6440 corruption problem).
6442 2008-08-04 Robert Millan <rmh@aybabtu.com>
6444 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6445 warnings introduced in my last commit.
6447 2008-08-03 Robert Millan <rmh@aybabtu.com>
6449 Make PCI available on all i386 architectures.
6451 * include/grub/i386/pc/pci.h: Move from here ...
6452 * include/grub/i386/pci.h: ... to here.
6454 * include/grub/i386/pc/pci.h: Remove.
6455 * include/grub/i386/efi/pci.h: Remove.
6456 * include/grub/x86_64/efi/pci.h: Remove.
6458 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6461 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6462 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6463 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6465 * conf/i386-ieee1275.rmk: Likewise.
6467 2008-08-03 Robert Millan <rmh@aybabtu.com>
6469 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6470 (grub_console_setcursor): Make it possible to set cursor off.
6472 2008-08-03 Robert Millan <rmh@aybabtu.com>
6474 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6475 of modules instead of assuming which platform provides what.
6476 * util/update-grub.in: Likewise.
6478 2008-08-03 Robert Millan <rmh@aybabtu.com>
6480 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6481 instead of `grub_install_dos_part' to determine whether a drive needs
6482 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6483 because it can be overridden when loading GRUB via Multiboot).
6485 2008-08-02 Robert Millan <rmh@aybabtu.com>
6487 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6489 2008-08-02 Robert Millan <rmh@aybabtu.com>
6491 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6492 of informational grub_dprintf() calls.
6494 2008-08-02 Robert Millan <rmh@aybabtu.com>
6496 * disk/memdisk.c (memdisk_size): Don't initialize.
6497 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6499 * include/grub/i386/pc/kernel.h
6500 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6501 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6502 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6503 (grub_arch_memdisk_size): Remove.
6505 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6506 field (was only used to transfer a constant). Add `type' field to
6507 support multiple module types.
6508 (grub_module_iterate): New function.
6510 * kern/device.c (grub_device_open): Do not hide error messages
6511 when grub_disk_open() fails. Use grub_print_error() instead.
6513 * kern/i386/pc/init.c (grub_arch_modules_addr)
6514 (grub_arch_memdisk_size): Remove functions.
6515 (grub_arch_modules_addr): Return the module address in high memory
6516 (now that it isn't copied anymore).
6518 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6519 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6520 decompression routine (grub_total_module_size already includes that
6521 now). Don't copy modules back to low memory.
6523 * kern/main.c: Include `<grub/mm.h>'.
6524 (grub_load_modules): Split out (and use) ...
6525 (grub_module_iterate): ... this function, which iterates through
6526 module objects and runs a hook.
6527 Comment out grub_mm_init_region() call, as it would cause non-ELF
6528 modules to be overwritten.
6530 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6531 the memdisk image in its own region, make it part of the module list.
6532 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6533 (main): Parse --memdisk|-m option, and pass user-provided path as
6534 parameter to generate_image().
6535 (add_segments): Pass `memdisk_path' down to load_modules().
6536 (load_modules): Embed memdisk image in module section when requested.
6537 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6538 `header.type' instead of `header.offset'.
6540 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6541 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6542 (memdisk_mod_LDFLAGS): New variables.
6543 * conf/i386-coreboot.rmk: Likewise.
6544 * conf/i386-ieee1275.rmk: Likewise.
6546 2008-08-02 Robert Millan <rmh@aybabtu.com>
6548 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6549 (backward_relocator): New variables. Used to allocate and relocate
6550 the payload, respectively.
6551 (grub_multiboot_load_elf32): Load into heap instead of requested
6552 address, install the appropriate relocator code in each bound of
6553 the payload, and set the entry point such that
6554 grub_multiboot_real_boot() will jump to one of them.
6556 * kern/i386/loader.S (grub_multiboot_payload_size)
6557 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6558 (grub_multiboot_payload_entry_offset): New variables.
6559 (grub_multiboot_real_boot): Set cpu context to what the relocator
6560 expects, and jump to the relocator instead of the payload.
6562 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6563 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6564 (grub_multiboot_payload_entry_offset): Export.
6566 2008-08-01 Bean <bean123ch@gmail.com>
6568 * normal/menu_entry.c (editor_getline): Don't return the original
6569 string as result, as it will be released by lexer once it has done
6572 2008-08-01 Robert Millan <rmh@aybabtu.com>
6574 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6575 within menuentries, not before them.
6576 util/grub.d/10_hurd.in: Likewise.
6578 2008-08-01 Bean <bean123ch@gmail.com>
6580 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6581 (bufio_mod_SOURCES): New macro.
6582 (bufio_mod_CFLAGS): Likewise.
6583 (bufio_mod_LDFLAGS): Likewise.
6585 * include/grub/bufio.h: New file.
6587 * io/bufio.c: Likewise.
6589 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6590 (grub_video_reader_png): Use grub_buffile_open to open file.
6592 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6593 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6595 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6596 (grub_video_reader_tga): Use grub_buffile_open to open file.
6598 * font/manager.c: Include <grub/bufio.h>.
6599 (add_font): Use grub_buffile_open to open file.
6601 2008-07-31 Robert Millan <rmh@aybabtu.com>
6603 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6604 ELF segments, use a macro for arbitrarily accessing any of them instead
6605 of preparing a pointer that allows access to one at a time.
6606 (grub_multiboot_load_elf64): Likewise.
6608 2008-07-31 Bean <bean123ch@gmail.com>
6610 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6611 GRUB_KERNEL_MACHINE_DATA_END.
6613 2008-07-30 Robert Millan <rmh@aybabtu.com>
6615 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6616 Increase from 0x50 to 0x60.
6617 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6618 use UUIDs to identify the root drive for them. If that's not
6620 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6621 check, for cross-disk installs.
6623 2008-07-30 Robert Millan <rmh@aybabtu.com>
6625 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6626 is non-empty, use it to set the `prefix' environment variable instead
6627 of the usual approach.
6628 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6629 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6630 environment variable instead of dummy make_install_device().
6632 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6633 (start): Insert a data section, with `grub_prefix' variable.
6634 * kern/i386/linuxbios/startup.S: Likewise.
6636 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6637 New variable reference.
6638 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6639 New macro. Defines offset of `grub_prefix' within startup.S (relative
6641 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6642 section within startup.S (relative to `start').
6643 * include/grub/i386/coreboot/kernel.h: Likewise.
6645 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6646 Overwrite grub_prefix with its contents, at the beginning of the
6648 (main): Understand -p|--prefix.
6650 2008-07-30 Robert Millan <rmh@aybabtu.com>
6652 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6654 2008-07-30 Robert Millan <rmh@aybabtu.com>
6656 * term/i386/pc/vga_text.c (grub_console_cls): Use
6657 grub_console_gotoxy() to go back to beginning of the screen.
6658 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6660 2008-07-29 Christian Franke <franke@computer.org>
6662 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6663 Add conversion of emulated mount points on Cygwin.
6665 2008-07-29 Christian Franke <franke@computer.org>
6667 * util/update-grub.in: Add a check for admin
6669 Remove old `grub.cfg.new' before creation.
6670 Add `-f' to `mv' to handle the different filesystem
6671 semantics of Windows.
6673 2008-07-29 Bean <bean123ch@gmail.com>
6675 * normal/main.c (get_line): Fix buffer overflow bug.
6677 2008-07-28 Robert Millan <rmh@aybabtu.com>
6679 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6680 (struct grub_apple_header): New struct. Describes the layout of
6682 (apple_partition_map_iterate): Check the header magic as well as the
6683 partition magic (which was already being checked).
6685 2008-07-28 Pavel Roskin <proski@gnu.org>
6687 * genmk.rb: Add a warning to the beginning of the output that
6688 it's a generated file and should not be edited.
6690 2008-07-28 Robert Millan <rmh@aybabtu.com>
6692 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6693 with the same number are found, just use issue a warning with
6694 grub_dprintf(), as this error has been reported to be non-fatal.
6696 2008-07-27 Robert Millan <rmh@aybabtu.com>
6698 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6701 2008-07-27 Bean <bean123ch@gmail.com>
6703 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6704 (grub_fat_find_dir): Ignore case when comparing filename.
6706 2008-07-27 Bean <bean123ch@gmail.com>
6708 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6709 smallino, as it's more descriptive, and i8count can be confused with
6710 the other field count.
6711 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6714 2008-07-27 Bean <bean123ch@gmail.com>
6716 * commands/crc.c: New file.
6718 * lib/crc.c: Likewise.
6720 * include/grub/lib/crc.h: Likewise.
6722 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6724 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6725 (hexdump): Move this function to ...
6727 * lib/hexdump.c: ... here.
6729 * include/grub/hexdump.h: Renamed to ...
6731 * include/grub/lib/hexdump.h: ... this.
6733 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6735 * util/grub-editenv.c: Likewise.
6737 * include/envblk.h: Renamed to ...
6739 * include/lib/envblk.h: ... this.
6741 * util/envblk.c: Renamed to ...
6743 * lib/envblk.c: ... this.
6745 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6747 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6748 (pkglib_MODULES): Add crc.mod.
6749 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6750 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6751 (crc_mod_SOURCES): New macro.
6752 (crc_mod_CFLAGS): Likewise.
6753 (crc_mod_LDFLAGS): Likewise.
6755 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6757 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6759 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6761 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6763 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6765 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6767 * commands/help.c: Include <grub/term.h>.
6768 (TERM_WIDTH): Removed. Updated all users.
6770 2008-07-27 Pavel Roskin <proski@gnu.org>
6772 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6773 spurious warnings about a comment within a comment.
6775 2008-07-25 Robert Millan <rmh@aybabtu.com>
6777 * util/getroot.c (find_root_device): Skip devices that match
6778 /dev/dm-[0-9]. This lets the real device be found for any type of
6779 abstraction (LVM, EVMS, RAID..).
6780 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6781 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6782 device is found first, find_root_device() will now skip it.
6784 2008-07-24 Pavel Roskin <proski@gnu.org>
6786 * include/grub/types.h: Use __builtin_bswap32() and
6787 __builtin_bswap64() with gcc 4.3 and newer.
6789 2008-07-24 Christian Franke <franke@computer.org>
6791 * util/i386/pc/grub-install.in: If `--debug' is specified,
6792 pass `--verbose' to grub-setup.
6793 Abort script if make_system_path_relative_to_its_root() fails.
6795 2008-07-24 Bean <bean123ch@gmail.com>
6797 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6798 variable `target_platform' should be `platform'.
6800 2008-07-24 Bean <bean123ch@gmail.com>
6802 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6803 (grub_png_init_fixed_block): New function.
6804 (grub_png_decode_image_data): Handle fixed huffman code compression.
6806 2008-07-24 Bean <bean123ch@gmail.com>
6808 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6809 (grub_pe2elf_SOURCES): New macro.
6810 (CLEANFILES): Add grub-pe2elf.
6812 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6813 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6814 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6815 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6816 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6817 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6818 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6819 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6820 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6821 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6822 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6823 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6824 (GRUB_PE32_DT_FUNCTION): Likewise.
6825 (GRUB_PE32_REL_I386_DIR32): Likewise.
6826 (GRUB_PE32_REL_I386_REL32): Likewise.
6827 (grub_pe32_symbol): New structure.
6828 (grub_pe32_reloc): Likewise.
6830 * util/grub-pe2elf.c: New file.
6832 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6833 start symbol in non pc platform.
6835 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6837 The following patches are from Christian Franke.
6839 * include/grub/dl.h: Remove .previous, gas supports this only
6842 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6843 Remove .type, gas supports this only for ELF format.
6845 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6846 nullbytes in symbol table. This fixes an infinite loop if table is
6849 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6850 TARGET_IMG_LDFLAGS and EXEEXT.
6852 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6853 TARGET_IMG_LDFLAGS_AC.
6854 (grub_CHECK_STACK_ARG_PROBE): New function.
6856 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6858 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6860 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6861 to set TARGET_IMG_LD* accordingly.
6862 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6863 Add call to grub_CHECK_STACK_ARG_PROBE.
6864 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6866 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6868 * genmk.rb: Add EXEEXT to CLEANFILES.
6870 2008-07-23 Robert Millan <rmh@aybabtu.com>
6872 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6873 define the codes for arrows and lines used for the menu).
6874 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6877 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6878 fonts, because the latter are too slow.
6880 2008-07-21 Bean <bean123ch@gmail.com>
6882 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6883 a20. Run keyboard test last, as it will cause macbook to halt.
6885 2008-07-18 Pavel Roskin <proski@gnu.org>
6887 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6888 load foreign architecture modules correctly anyway. Keep
6889 support for loading host architecture modules, whether we
6890 compile them or not.
6892 2008-07-17 Pavel Roskin <proski@gnu.org>
6894 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6895 change target_cpu. The compiler default can mismatch target_cpu
6898 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6899 * kern/efi/efi.c: Likewise.
6901 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6902 target compiler is functional.
6903 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6906 * configure.ac: Default to efi platform for x86_64-apple. Allow
6907 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6908 adjustments from the rest, only do them if target is not
6909 explicitly given. Merge other adjustments with the final sanity
6910 check. Remove an extraneous check for supported CPU. Be
6911 specific which CPU and which platform is not supported.
6913 * configure.ac: Default to pc platform for x86_64.
6915 2008-07-17 Robert Millan <rmh@aybabtu.com>
6917 Partial LinuxBIOS -> Coreboot rename.
6919 * conf/i386-linuxbios.rmk: Renamed to ...
6920 * conf/i386-coreboot.rmk: ... this.
6921 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6922 * configure.ac: Accept "coreboot" as input platform (but maintain
6923 compatibility with "linuxbios").
6924 * include/grub/i386/linuxbios: Renamed to ...
6925 * include/grub/i386/coreboot: ... this.
6927 2008-07-17 Bean <bean123ch@gmail.com>
6929 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6930 (appleldr_mod_SOURCE): New variable.
6931 (appleldr_mod_CFLAGS): Likewise.
6932 (appleldr_mod_LDFLAGS): Likewise.
6933 (pci_mod_SOURCES): Likewise.
6934 (pci_mod_CFLAGS): Likewise.
6935 (pci_mod_LDFLAGS): Likewise.
6936 (lspci_mod_SOURCES): Likewise.
6937 (lspci_mod_CFLAGS): Likewise.
6938 (lspci_mod_LDFLAGS): Likewise.
6940 * conf/x86_64-efi.rmk: New file.
6942 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6944 (grub_efidisk_write): Likewise.
6946 * include/efi/api.h (efi_call_0): New macro.
6947 (efi_call_1): Likewise.
6948 (efi_call_2): Likewise.
6949 (efi_call_3): Likewise.
6950 (efi_call_4): Likewise.
6951 (efi_call_5): Likewise.
6952 (efi_call_6): Likewise.
6954 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6955 grub_rescue_cmd_chainloader.
6957 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6958 (grub_pe32_optional_header): Change some fields based on i386 or
6960 (GRUB_PE32_PE32_MAGIC): Likewise.
6962 * include/grub/efi/uga_draw.h: New file.
6964 * include/grub/elf.h (STN_ABS): New constant.
6965 (R_X86_64_NONE): Relocation constant for x86_64.
6966 (R_X86_64_64): Likewise.
6967 (R_X86_64_PC32): Likewise.
6968 (R_X86_64_GOT32): Likewise.
6969 (R_X86_64_PLT32): Likewise.
6970 (R_X86_64_COPY): Likewise.
6971 (R_X86_64_GLOB_DAT): Likewise.
6972 (R_X86_64_JUMP_SLOT): Likewise.
6973 (R_X86_64_RELATIVE): Likewise.
6974 (R_X86_64_GOTPCREL): Likewise.
6975 (R_X86_64_32): Likewise.
6976 (R_X86_64_32S): Likewise.
6977 (R_X86_64_16): Likewise.
6978 (R_X86_64_PC16): Likewise.
6979 (R_X86_64_8): Likewise.
6980 (R_X86_64_PC8): Likewise.
6982 * include/grub/i386/efi/pci.h: New file.
6984 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6985 Change it value based on platform.
6986 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6987 (GRUB_E820_RAM): Likewise.
6988 (GRUB_E820_RESERVED): Likewise.
6989 (GRUB_E820_ACPI): Likewise.
6990 (GRUB_E820_NVS): Likewise.
6991 (GRUB_E820_EXEC_CODE): Likewise.
6992 (GRUB_E820_MAX_ENTRY): Likewise.
6993 (grub_e820_mmap): New structure.
6994 (linux_kernel_header): Change the efi field according to different
6995 kernel version, also field from linux_kernel_header.
6997 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6999 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7000 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7001 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7002 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7003 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7004 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7005 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7006 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7007 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7008 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7010 * include/grub/x86_64/efi/kernel.h: New file.
7012 * include/grub/x86_64/efi/loader.h: Likewise.
7014 * include/grub/x86_64/efi/machine.h: Likewise.
7016 * include/grub/x86_64/efi/pci.h: Likewise.
7018 * include/grub/x86_64/efi/time.h: Likewise.
7020 * include/grub/x86_64/linux.h: Likewise.
7022 * include/grub/x86_64/setjmp.h: Likewise.
7024 * include/grub/x86_64/time.h: Likewise.
7026 * include/grub/x86_64/types.h: Likewise.
7028 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7029 GRUB_TARGET_SIZEOF_VOID_P.
7031 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7032 (grub_efi_locate_handle): Likewise.
7033 (grub_efi_open_protocol): Likewise.
7034 (grub_efi_set_text_mode): Likewise.
7035 (grub_efi_stall): Likewise.
7036 (grub_exit): Likewise.
7037 (grub_reboot): Likewise.
7038 (grub_halt): Likewise.
7039 (grub_efi_exit_boot_services): Likewise.
7040 (grub_get_rtc): Likewise.
7042 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7043 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7044 (grub_efi_allocate_pages): Wrap efi calls.
7045 (grub_efi_free_pages): Wrap efi calls.
7046 (grub_efi_get_memory_map): Wrap efi calls.
7048 * kern/x86_64/dl.c: New file.
7050 * kern/x86_64/efi/callwrap.S: Likewise.
7052 * kern/x86_64/efi/startup.S: Likewise.
7054 * loader/efi/appleloader.c: Likewise.
7056 * loader/efi/chainloader.c (cmdline): New variable.
7057 (grub_chainloader_unload): Wrap efi calls.
7058 (grub_chainloader_boot): Likewise.
7059 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7062 * loader/efi/chainloader_normal.c (chainloader_command):
7063 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7066 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7068 (grub_e820_add_region): New function.
7069 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7071 (grub_find_video_card): New function.
7072 (grub_linux_setup_video): New function.
7073 (grub_rescue_cmd_linux): Probe for video information.
7075 * normal/x86_64/setjmp.S: New file.
7077 * term/efi/console.c (map_char): New function.
7078 (grub_console_putchar): Map unicode char.
7079 (grub_console_checkkey): Wrap efi calls.
7080 (grub_console_getkey): Likewise.
7081 (grub_console_getwh): Likewise.
7082 (grub_console_gotoxy): Likewise.
7083 (grub_console_cls): Likewise.
7084 (grub_console_setcolorstate): Likewise.
7085 (grub_console_setcursor): Likewise.
7087 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7089 2008-07-16 Pavel Roskin <proski@gnu.org>
7091 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7094 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7095 pointer, not an integer. This fixes a warning and prevents
7096 precision loss on 64-bit systems.
7097 (relocate_addresses): Remove unneeded cast.
7099 2008-07-15 Pavel Roskin <proski@gnu.org>
7101 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7103 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7105 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7106 Fix comparison between signed and unsigned.
7108 * include/grub/i386/ieee1275/console.h: Declare
7109 grub_console_init() and grub_console_fini().
7111 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7112 It's empty and unused.
7114 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7115 beginning to avoid warnings with some compilers.
7117 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7118 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7120 2008-07-14 Pavel Roskin <proski@gnu.org>
7122 * kern/env.c (grub_register_variable_hook): Don't copy empty
7123 string, it leaks memory. Pass "" to grub_env_set(), it should
7124 handle constant strings.
7126 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7127 * commands/cmp.c (grub_cmd_cmp): Likewise.
7128 * kern/dl.c (grub_dl_flush_cache): Likewise.
7129 (grub_dl_load_core): Likewise.
7130 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7131 (grub_elf64_load_phdrs): Likewise.
7133 2008-07-13 Pavel Roskin <proski@gnu.org>
7135 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7136 between signed and unsigned.
7137 (LzmaEnc_Finish): Fix warning about an unused parameter.
7139 2008-07-13 Bean <bean123ch@gmail.com>
7141 * Makefile.in (enable_lzo): New rule.
7143 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7145 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7147 * boot/i386/pc/lnxboot.S: #include <config.h>.
7149 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7150 its value according to the compression algorithm used, lzo or lzma.
7152 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7153 compression algorithm according to configure macro.
7155 * kern/i386/pc/startup.S (codestart): Likewise.
7157 * kern/i386/pc/lzma_decode.S: New file.
7159 * include/grub/lib/LzFind.h: Likewise.
7161 * include/grub/lib/LzHash.h: Likewise.
7163 * include/grub/lib/LzmaDec.h: Likewise.
7165 * include/grub/lib/LzmaEnc.h: Likewise.
7167 * include/grub/lib/LzmaTypes.h: Likewise.
7169 * lib/LzFind.c: Likewise.
7171 * lib/LzmaDec.c: Likewise.
7173 * lib/LzmaEnc.c: Likewise.
7175 2008-07-13 Bean <bean123ch@gmail.com>
7177 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7178 (grub_ext4_extent_header): New structure.
7179 (grub_ext4_extent): Likewise.
7180 (grub_ext4_extent_idx): Likewise.
7181 (grub_ext4_find_leaf): New function.
7182 (grub_ext2_read_block): Handle extents.
7184 2008-07-12 Robert Millan <rmh@aybabtu.com>
7186 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7188 2008-07-11 Robert Millan <rmh@aybabtu.com>
7190 * util/grub.d/40_custom.in: New file. Example on how to add custom
7191 entries to /etc/grub.d.
7192 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7193 40_custom (implicitly, by merging all the grub.d rules).
7195 2008-07-11 Pavel Roskin <proski@gnu.org>
7197 * commands/read.c (grub_getline): Fix invalid memory access.
7198 Don't add newline to the variable value.
7200 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7201 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7202 (serial_hw_get_port): Check validity of the port number.
7203 (grub_cmd_serial): Check return value of serial_hw_get_port().
7205 2008-07-07 Pavel Roskin <proski@gnu.org>
7207 * boot/i386/pc/diskboot.S (notification_string): Replace
7208 "Loading kernel" with just "loading". This is shorter, less
7209 confusing and saves a few bytes for possible future changes.
7211 2008-07-05 Pavel Roskin <proski@gnu.org>
7213 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7214 size for ATAPI devices, they are undefined. Output sector
7215 number in decimal form.
7217 * disk/ata.c: Use named constants for status bits.
7219 2008-07-04 Pavel Roskin <proski@gnu.org>
7221 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7222 grub_addr_t before casting it to the void pointer to fix a
7223 warning. Non-addressable regions are discarded earlier.
7224 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7225 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7226 (check_signature): Don't shadow table_header.
7227 (grub_linuxbios_table_iterate): Cast numeric constants to
7228 grub_linuxbios_table_header_t.
7229 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7232 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7235 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7236 pointer, which can cause warnings. Support 64-bit addresses.
7238 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7239 of sizeof(long). This fixes PowerPC image generation on x86_64.
7241 2008-07-04 Robert Millan <rmh@aybabtu.com>
7243 This fixes a performance issue when pc & gpt partmap iterators
7244 didn't abort iteration even after our hook found what it was
7245 looking for (often causing expensive probes of non-existent drives).
7247 Some callers relied on previous buggy behaviour, since they would
7248 raise an error when their own hooks caused early abortion of its
7251 * kern/device.c (grub_device_open): Improve error message.
7252 * disk/lvm.c (grub_lvm_open): Likewise.
7253 * disk/raid.c (grub_raid_open): Likewise.
7255 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7256 when hook requests it, independently of grub_errno.
7257 (pc_partition_map_probe): Do not fail when find_func() caused
7258 early abortion of pc_partition_map_iterate().
7260 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7261 when hook requests it, independently of grub_errno.
7262 (gpt_partition_map_probe): Do not fail when find_func() caused
7263 early abortion of gpt_partition_map_iterate().
7265 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7266 when hook requests it, independently of grub_errno. Do not fail when
7267 part_map_iterate_hook() caused early abortion of p->iterate().
7269 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7270 when grub_partition_iterate() returned with non-zero.
7272 2008-07-03 Pavel Roskin <proski@gnu.org>
7274 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7275 like we do in grub_ata_pio_read().
7276 (grub_ata_readwrite): Always write individual sectors. Fix the
7277 sector count for the remainder.
7278 (grub_ata_write): Enable writing to ATA devices. Correctly
7279 report error for ATAPI devices.
7281 2008-07-02 Pavel Roskin <proski@gnu.org>
7283 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7286 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7287 for every read sector, we already increment it for the whole
7288 batch. This fixes reading more than 256 sectors at once.
7290 * util/grub-editenv.c (cmd_info): Cast argument to long
7291 explicitly. ptrdiff_t reduces to int on i386.
7293 * util/grub-editenv.c (main): Be specific which parameter is
7296 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7297 (memdisk): Make memdisk_orig_addr a pointer.
7299 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7300 for file offsets, use grub_off_t instead. Fix printf format
7303 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7304 there. Real unexpected warnings should not drown in the noise
7305 about known problems.
7307 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7308 grub_disk_addr_t for memory addresses.
7310 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7311 explicitly to fix a warning.
7313 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7315 * Makefile.in (MODULE_LDFLAGS): New variable.
7316 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7317 the linker accepts --build-id=none.
7318 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7320 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7322 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7323 those in Linux XFS code. Provide a way to access 64-bit parent
7325 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7326 the end of struct grub_xfs_dir_header.
7328 2008-07-02 Bean <bean123ch@gmail.com>
7330 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7331 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7332 and GRUB_IEEE1275_FLAG_NO_ANSI.
7334 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7335 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7336 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7338 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7339 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7341 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7342 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7344 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7345 esc sequence on non ANSI terminal.
7346 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7348 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7351 2008-07-02 Bean <bean123ch@gmail.com>
7353 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7354 (grub_editenv_SOURCES): New variable.
7355 (pkglib_MODULES): Add loadenv.mod.
7356 (loadenv_mod_SOURCES): New variable.
7357 (loadenv_mod_CFLAGS): Likewise.
7358 (loadenv_mod_LDFLAGS): Likewise.
7360 * include/grub/envblk.h: New file.
7362 * util/envblk.c: New file.
7364 * util/grub-editenv.c: New file.
7366 * commands/loadenv.c: New file.
7368 2008-07-01 Pavel Roskin <proski@gnu.org>
7370 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7371 not unsigned char. This fixes warnings and is consistent with
7374 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7376 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7378 * term/tparm.c (analyze): Always set *popcount.
7380 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7381 cast to fix a warning.
7383 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7384 cast to suppress a warning.
7386 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7387 grub_fshelp_read_file() expects.
7389 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7390 write uuid as a 32-bit value in CPU byte order, so declare and
7393 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7394 long if the format specifier expects it.
7395 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7396 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7397 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7398 long to fix a warning.
7399 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7400 grub_dprintf() arguments to fix warnings.
7402 2008-06-30 Pavel Roskin <proski@gnu.org>
7404 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7405 install_bsd_part immediately before core.img is embedded or
7406 modified on disk. This fixes core.img verification if core.img
7409 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7410 core_path to calculate the blocklist.
7411 Patch from Javier MartÃn <lordhabbit@gmail.com>
7413 2008-06-29 Robert Millan <rmh@aybabtu.com>
7415 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7416 block to disk block.
7417 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7418 Patch from Niels Böhm <bitbucket@arcor.de>
7420 2008-06-29 Robert Millan <rmh@aybabtu.com>
7422 * util/update-grub_lib.in (font_path): Search for fonts in
7423 /boot/grub first, which is more likely to be readable (we aren't
7424 deciding where fonts live, just looking for them).
7426 2008-06-26 Pavel Roskin <proski@gnu.org>
7428 * util/biosdisk.c (read_device_map): Don't leave dead map
7429 entries for devices failing stat() check.
7431 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7432 core_path_dev for the core.img path on the target device.
7434 2008-06-26 Robert Millan <rmh@aybabtu.com>
7436 * disk/fs_uuid.c: New file.
7437 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7438 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7439 (fs_uuid_mod_LDFLAGS): New variables.
7440 * include/grub/disk.h (grub_disk_dev_id): Add
7441 `GRUB_DISK_DEVICE_UUID_ID'.
7442 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7443 implement iterate().
7445 2008-06-26 Robert Millan <rmh@aybabtu.com>
7447 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7448 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7449 Linux image includes no initrd.
7451 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7453 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7454 call to resolve the core image location that effectively appended the
7457 2008-06-21 Robert Millan <rmh@aybabtu.com>
7459 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7462 * util/grub.d/10_hurd.in: ... to here ...
7463 * util/grub.d/10_linux.in: ... and here.
7465 2008-06-19 Robert Millan <rmh@aybabtu.com>
7467 * kern/main.c (grub_main): Export `prefix' variable immediately
7468 after it has been set by grub_machine_set_prefix().
7470 2008-06-19 Robert Millan <rmh@aybabtu.com>
7472 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7473 search result when not saving to variable, not the other way around.
7474 When saving to variable, abort iteration as soon as a match is found.
7476 2008-06-19 Robert Millan <rmh@aybabtu.com>
7478 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7479 check for partition that provides /boot/grub. Its logic is flawed,
7480 as it prevents prepare_grub_to_access_device() from being called
7483 2008-06-19 Robert Millan <rmh@aybabtu.com>
7485 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7486 "insmod" command directly when abstraction modules are needed,
7487 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7488 since it had already been processed).
7490 2008-06-19 Pavel Roskin <proski@gnu.org>
7492 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7493 changed. This is needed in case GRUB_LIBDIR changes.
7494 * conf/i386-ieee1275.rmk: Likewise.
7495 * conf/i386-linuxbios.rmk: Likewise.
7496 * conf/i386-pc.rmk: Likewise.
7497 * conf/powerpc-ieee1275.rmk: Likewise.
7499 2008-06-18 Pavel Roskin <proski@gnu.org>
7501 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7502 kernel_elf_symlist.c to symlist.c for consistency with other
7503 architectures. Update all users.
7504 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7506 2008-06-18 Robert Millan <rmh@aybabtu.com>
7508 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7511 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7512 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7513 a RAID device, run setup() for all members independently on whether
7514 LVM abstraction is being used.
7515 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7516 If grub-mkimage has set `*install_dos_part == -2', don't override this
7518 Perform *install_dos_part adjustments independently on whether
7519 we're embedding or not.
7520 Clarify error message when image is too big for embedding.
7521 Remove duplicate *install_dos_part stanza.
7523 2008-06-17 Robert Millan <rmh@aybabtu.com>
7525 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7526 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7528 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7529 values in grub_ofconsole_normal_color and
7530 grub_ofconsole_highlight_color (they're not directly related to
7531 background and foreground).
7532 (grub_ofconsole_setcolorstate): Extract background and foreground
7533 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7535 2008-06-17 Robert Millan <rmh@aybabtu.com>
7537 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7538 /boot/grub for the check in last commit, not /boot (they could be
7539 different partitions).
7541 2008-06-16 Robert Millan <rmh@aybabtu.com>
7543 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7544 asked to setup access for the same partition that provides /boot,
7545 don't bother using UUIDs since our root already has the value we
7548 2008-06-16 Robert Millan <rmh@aybabtu.com>
7550 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7552 Patch from Sven Mueller <sven@debian.org>.
7554 2008-06-16 Robert Millan <rmh@aybabtu.com>
7556 * util/update-grub.in: Check for $EUID instead of $UID.
7557 Reported by Vincent Zweije.
7559 2008-06-16 Bean <bean123ch@gmail.com>
7561 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7562 (grub_ext2_read_block): Likewise.
7563 (grub_ext2_read_inode): Likewise.
7564 (grub_ext2_mount): Likewise.
7565 (grub_ext2_close): Likewise.
7566 (grub_ext3_get_journal): Removed.
7568 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7569 (grub_reiserfs_read_symlink): Likewise.
7570 (grub_reiserfs_mount): Likewise.
7571 (grub_reiserfs_open): Likewise.
7572 (grub_reiserfs_read): Likewise.
7573 (grub_reiserfs_close): Likewise.
7574 (grub_reiserfs_get_journal): Removed.
7576 * fs/fshelp.c (grub_fshelp_read): Removed.
7577 (grub_fshelp_map_block): Likewise.
7579 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7580 (grub_fshelp_journal): Likewise.
7581 (grub_fshelp_read): Likewise.
7582 (grub_fshelp_map_block): Likewise.
7584 2008-06-16 Pavel Roskin <proski@gnu.org>
7586 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7587 floating point anymore.
7588 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7590 2008-06-15 Pavel Roskin <proski@gnu.org>
7592 * commands/ls.c (grub_ls_list_files): Use integer calculations
7593 for human readable format, avoid floating point use.
7594 * kern/misc.c (grub_ftoa): Remove.
7595 (grub_vsprintf): Remove floating point support.
7597 2008-06-15 Robert Millan <rmh@aybabtu.com>
7599 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7601 Reported by Max Vozeler.
7603 2008-06-15 Robert Millan <rmh@aybabtu.com>
7605 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7606 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7608 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7609 the beginning of the prefix.
7611 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7612 It is assumed that if we have a memdisk, grub-mkimage has set
7613 grub_prefix to include the "(memdisk)" drive in it.
7615 2008-06-15 Robert Millan <rmh@aybabtu.com>
7617 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7618 Initialize keyboard controller after registering the terminal, so that
7619 grub_printf() can be called from grub_keyboard_controller_init().
7621 2008-06-15 Robert Millan <rmh@aybabtu.com>
7623 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7624 extent-btree which is written as big endian on disk.
7625 Reported by Alain Greppin <al@chilibi.org>.
7627 2008-06-14 Robert Millan <rmh@aybabtu.com>
7629 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7630 * util/i386/pc/grub-install.in (modules): Likewise.
7632 2008-06-13 Pavel Roskin <proski@gnu.org>
7634 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7636 2008-06-13 Bean <bean123ch@gmail.com>
7638 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7640 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7642 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7643 to indicate sparse block.
7645 2008-06-12 Pavel Roskin <proski@gnu.org>
7647 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7648 number, grub_fshelp_read() does it for us.
7650 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7651 linear disk read with journal translation.
7652 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7653 * include/grub/fshelp.h: Declare grub_fshelp_read().
7655 2008-06-09 Pavel Roskin <proski@gnu.org>
7657 * fs/minix.c (grub_minix_mount): Handle error reading
7660 2008-06-08 Robert Millan <rmh@aybabtu.com>
7662 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7663 don't append the RAID prefix afterwards.
7664 Reported by Clint Adams.
7666 2008-06-08 Robert Millan <rmh@aybabtu.com>
7668 Based on description from Pavel:
7669 * kern/disk.c (grub_disk_check_range): Rename to ...
7670 (grub_disk_adjust_range): ... this. Add a comment explaining the
7671 tasks performed by this function.
7673 2008-06-08 Robert Millan <rmh@aybabtu.com>
7675 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7676 `num_serial' (for consistency with other variables).
7677 (struct grub_ntfs_data): Add `uuid' member.
7678 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7679 (grub_ntfs_uuid): New function.
7680 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7682 2008-06-07 Pavel Roskin <proski@gnu.org>
7684 * util/biosdisk.c (open_device): Revert last change to the
7685 function, it broke installation. The sector needs to be
7686 different dependent on which device is opened.
7688 2008-06-06 Robert Millan <rmh@aybabtu.com>
7690 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7691 rest of GRUB, and breakage doesn't happen if its value were modified.
7693 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7694 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7695 a constant (same value).
7696 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7697 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7699 2008-06-06 Robert Millan <rmh@aybabtu.com>
7701 * util/biosdisk.c (open_device): Do not modify sector offset when
7702 accessing a partition. kern/disk.c already handles this for us.
7704 2008-06-06 Robert Millan <rmh@aybabtu.com>
7706 * util/grub-emu.c (grub_machine_init): Move code in this function from
7708 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7709 segfault in case grub_printf() is called).
7711 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7712 grub_probe. Update all users not to explicitly add it again.
7713 (grub_device): New variable; contains corresponding device for grubdir.
7714 (fs_module, partmap_module, devabstraction_module): Pass
7715 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7718 2008-06-05 Robert Millan <rmh@aybabtu.com>
7720 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7721 is found, print it (same layout as with labels).
7723 2008-06-04 Robert Millan <rmh@aybabtu.com>
7725 * util/biosdisk.c (get_drive): Rename to ...
7726 (find_grub_drive): ... this. Update all users.
7728 (get_os_disk): Rename to ...
7729 (convert_system_partition_to_system_disk): ... this. Update all users.
7731 (find_drive): Rename to ...
7732 (find_system_device): ... this. Update all users.
7734 2008-06-04 Robert Millan <rmh@aybabtu.com>
7736 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7737 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7738 (make_device_map): Likewise.
7740 2008-06-01 Robert Millan <rmh@aybabtu.com>
7742 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7743 before dereferencing it.
7745 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7746 union with fat12/fat16-specific ones. Add some new fields, including
7747 `num_serial' for both versions.
7748 (struct grub_fat_data): Add `uuid' member.
7749 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7750 names. Initialize `data->uuid' using `num_serial'.
7751 (grub_fat_uuid): New function.
7752 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7754 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7755 (grub_reiserfs_uuid): New function.
7756 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7759 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7760 (grub_xfs_uuid): New function.
7761 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7763 2008-06-01 Robert Millan <rmh@aybabtu.com>
7765 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7766 code that is backward compatible with pre-uuid search command.
7768 2008-05-31 Robert Millan <rmh@aybabtu.com>
7770 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7771 floppies after everything else, to ensure floppy drive isn't accessed
7772 unnecessarily (patch from Bean).
7774 2008-05-31 Robert Millan <rmh@aybabtu.com>
7776 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7777 not print device names when we were asked to set a variable.
7779 2008-05-31 Robert Millan <rmh@aybabtu.com>
7781 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7782 using "cursor-on" and "cursor-off" commands (understood at least by
7783 the Open Firmware flavour on OLPC).
7785 2008-05-31 Michael Gorven <michael@gorven.za.net>
7787 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7788 on and off sequences.
7790 2008-05-31 Robert Millan <rmh@aybabtu.com>
7792 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7793 * util/update-grub.in: Likewise.
7795 2008-05-30 Pavel Roskin <proski@gnu.org>
7797 * util/biosdisk.c (linux_find_partition): Simplify logic and
7798 make the code more universal. Keep special processing for
7799 devfs, but use a simple rule for all other devices. If the
7800 device ends with a number, append 'p' and the partition number.
7801 Otherwise, append only the partition number.
7803 2008-05-30 Robert Millan <rmh@aybabtu.com>
7805 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7806 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7807 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7808 the `root' parameter to Linux.
7810 2008-05-30 Robert Millan <rmh@aybabtu.com>
7812 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7813 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7814 --fs_uuid with --fs-uuid.
7815 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7816 all filesystems support them).
7818 2008-05-30 Robert Millan <rmh@aybabtu.com>
7820 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7821 grub_printf() flags, since we're printing in units of 2 bytes.
7823 2008-05-30 Robert Millan <rmh@aybabtu.com>
7825 * util/grub.d/00_header.in: Remove obsolete comment referencing
7826 convert_system_path_to_grub_path().
7827 * util/update-grub.in: Likewise.
7828 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7829 (convert_system_path_to_grub_path): Add a warning message explaining
7830 that this function is deprecated. Rely on is_path_readable_by_grub()
7831 for the readability checks.
7832 (font_path): Use is_path_readable_by_grub() for the readability
7833 check rather than convert_system_path_to_grub_path().
7835 2008-05-30 Robert Millan <rmh@aybabtu.com>
7837 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7838 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7839 converting it first.
7840 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7841 grub.cfg for access to font file, and afterwards call it again to set
7844 2008-05-30 Robert Millan <rmh@aybabtu.com>
7846 * commands/search.c (options): Add --fs_uuid option.
7847 (search_fs_uuid): New function.
7848 (grub_cmd_search): Fix --set argument passing.
7849 Use search_fs_uuid() when requested via --fs_uuid.
7850 (grub_search_init): Update help message.
7851 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7852 and redeclare it as an array of 16-bit words.
7853 (grub_ext2_uuid): New function.
7854 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7855 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7856 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7857 (GRUB_DEVICE_BOOT_UUID): New variables.
7858 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7859 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7861 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7862 just assume `root' variable has the right value.
7863 * util/grub.d/10_linux.in: Likewise.
7864 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7866 (main): Recognise `-t fs_uuid' argument.
7868 2008-05-30 Robert Millan <rmh@aybabtu.com>
7870 * util/biosdisk.c (map): Redefine structure to hold information
7871 about GRUB drive name.
7872 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7874 (call_hook): Remove.
7875 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7876 member. Assume drive has partitions.
7877 (grub_util_biosdisk_open): Access device names via `.device' struct
7879 (open_device): Likewise.
7880 (find_drive): Likewise.
7881 (read_device_map): Adjust map[] usage to match the new struct
7882 definition. Don't check for duplicates (still possible, but not cheap
7884 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7885 (make_device_name): Remove assumption of BIOS-like drive names.
7887 2008-05-30 Pavel Roskin <proski@gnu.org>
7889 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7890 compiling execute.c doesn't need grub_script.tab.h anymore.
7891 (normal/command.c_DEPENDENCIES): Likewise.
7892 (normal/function.c_DEPENDENCIES): Likewise.
7893 * conf/i386-ieee1275.rmk: Likewise.
7894 * conf/i386-linuxbios.rmk: Likewise.
7895 * conf/i386-pc.rmk: Likewise.
7896 * conf/powerpc-ieee1275.rmk: Likewise.
7897 * conf/sparc64-ieee1275.rmk: Likewise.
7899 2008-05-29 Pavel Roskin <proski@gnu.org>
7901 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7902 when scanning metadata for volume group name.
7904 * include/grub/script.h: Don't include grub_script.tab.h. It's
7905 a generated file, which may only be included from the files with
7906 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7907 use union YYSTYPE, as the later allows forward declaration.
7908 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7910 2008-05-29 Robert Millan <rmh@aybabtu.com>
7912 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7913 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7914 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7915 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7918 2008-05-29 Robert Millan <rmh@aybabtu.com>
7920 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7921 control key combinations.
7923 2008-05-29 Robert Millan <rmh@aybabtu.com>
7925 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7926 * util/ieee1275/grub-install.in: ... to here.
7927 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7928 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7929 (grub_install_SOURCES): Likewise.
7931 2008-05-29 Robert Millan <rmh@aybabtu.com>
7933 * fs/affs.c: Update copyright year.
7934 * fs/ext2.c: Likewise.
7935 * fs/fshelp.c: Likewise.
7936 * fs/hfsplus.c: Likewise.
7937 * fs/ntfs.c: Likewise.
7938 * fs/xfs.c: Likewise.
7939 * include/grub/fshelp.h: Likewise.
7940 * util/grub-mkdevicemap.c: Likewise.
7942 2008-05-28 Robert Millan <rmh@aybabtu.com>
7944 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7945 might need to be fatfs to support some firmware implementations
7948 2008-05-28 Robert Millan <rmh@aybabtu.com>
7950 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7952 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7953 (make_device_map): Likewise.
7955 2008-05-20 Bean <bean123ch@gmail.com>
7957 * fs/fshelp.c (grub_fshelp_map_block): New function.
7958 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7959 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7961 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7962 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7963 (grub_fshelp_journal): New structure.
7964 (grub_fshelp_map_block): New function prototype.
7965 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7966 (grub_fshelp_map_block): Likewise.
7968 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7969 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7970 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7971 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7972 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7973 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7974 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7975 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7976 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7977 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7978 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7979 (grub_ext2_sblock): New members for journal support.
7980 (grub_ext3_journal_header): New structure.
7981 (grub_ext3_journal_revoke_header): Likewise.
7982 (grub_ext3_journal_block_tag): Likewise.
7983 (grub_ext3_journal_sblock): Likewise.
7984 (grub_fshelp_node): New members logfile and journal.
7985 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7986 grub_fshelp_map_block to get real block number.
7987 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7989 (grub_ext2_read_inode): Likewise.
7990 (grub_ext3_get_journal): New function.
7991 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7992 (grub_ext2_close): Release memory used by journal.
7994 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7995 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7996 (grub_reiserfs_transaction_header): Renamed to
7997 grub_reiserfs_description_block, replace field data with real_blocks.
7998 (grub_reiserfs_commit_block): New structure.
7999 (grub_reiserfs_data): New member journal.
8000 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8002 (grub_reiserfs_read_symlink): Likewise.
8003 (grub_reiserfs_iterate_dir): Likewise.
8004 (grub_reiserfs_open): Likewise.
8005 (grub_reiserfs_read): Likewise.
8006 (grub_reiserfs_get_journal): New function.
8007 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8008 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8009 using grub_reiserfs_get_journal.
8010 (grub_reiserfs_close): Release memory used by journal.
8012 * fs/affs.c (grub_affs_read_block): Change block type to
8013 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8015 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8017 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8019 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8021 * fs/udf.c (grub_udf_read_block): Change block type to
8022 grub_disk_addr_t. Use type cast to avoid warning.
8024 * fs/xfs.c (grub_xfs_read_block): Likewise.
8026 2008-05-16 Christian Franke <franke@computer.org>
8028 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8029 to ensure that break with ESC will always work.
8030 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8031 Remove ESC from keyboard queue.
8033 2008-05-16 Christian Franke <franke@computer.org>
8035 * util/biosdisk.c: [__CYGWIN__] Add includes.
8036 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8037 (get_os_disk): Move variable declarations to OS specific
8038 parts to avoid warning.
8039 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8040 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8041 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8043 * util/getroot.c: [__CYGWIN__] Add includes.
8044 (strip_extra_slashes): Fix "/" case.
8045 [__CYGWIN__] (get_win32_path): New function.
8046 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8047 [__CYGWIN__] (find_root_device): Disable.
8048 [__CYGWIN__] (get_bootsec_serial): New function.
8049 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8050 [__linux__] (grub_guess_root_device): Add early returns to simplify
8052 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8053 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8054 check for Linux only.
8056 2008-05-15 Bean <bean123ch@gmail.com>
8058 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8059 keyboard hang problem in apple's intel mac.
8061 2008-05-09 Robert Millan <rmh@aybabtu.com>
8063 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8065 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8066 (make_device_map): Likewise.
8067 Reported by Aurelien Jarno <aurel32@debian.org>
8069 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8071 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8072 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8073 (make_device_map): Output entries for xvd type disks.
8075 2008-05-07 Robert Millan <rmh@aybabtu.com>
8077 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8079 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8080 (make_device_map): Likewise.
8081 Reported by Roland Dreier <rdreier@cisco.com>
8083 2008-05-07 Robert Millan <rmh@aybabtu.com>
8085 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8086 grub_strstr() call. Correct a few mistakes in failure path handling.
8088 2008-05-06 Robert Millan <rmh@aybabtu.com>
8090 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8091 Do not print a trailing slash (therefore, the root directory is an
8093 (convert_system_path_to_grub_path): Do not remove trailing slash
8094 from make_system_path_relative_to_its_root() output.
8096 * util/i386/pc/grub-install.in: Add trailing slash to output from
8097 make_system_path_relative_to_its_root().
8099 2008-05-06 Robert Millan <rmh@aybabtu.com>
8101 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8102 ensures that output lines aren't intermangled with those sent to
8103 stderr (via grub_util_info()).
8104 * util/grub-probe.c (grub_refresh): Likewise.
8105 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8107 2008-05-05 Christian Franke <franke@computer.org>
8109 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8110 Add Cygwin device names.
8111 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8112 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8113 (check_device): Return error instead of success on empty name.
8114 (make_device_map): Move label inside linux specific code to
8115 prevent compiler warning.
8117 2008-04-30 Robert Millan <rmh@aybabtu.com>
8119 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8120 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8122 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8124 2008-04-29 Robert Millan <rmh@aybabtu.com>
8126 * docs/grub.cfg: New file (example GRUB configuration).
8128 2008-04-26 Robert Millan <rmh@aybabtu.com>
8130 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8131 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8132 and `disk/ieee1275/nand.c'.
8134 2008-04-25 Bean <bean123ch@gmail.com>
8136 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8139 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8140 change the buffer size to 4096 for cdrom device.
8142 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8144 (_linux_mod_SOURCES): New variable.
8145 (_linux_mod_CFLAGS): Likewise.
8146 (_linux_mod_LDFLAGS): Likewise.
8147 (linux_mod_SOURCES): Likewise.
8148 (linux_mod_CFLAGS): Likewise.
8149 (linux_mod_LDFLAGS): Likewise.
8150 (nand_mod_SOURCES): Likewise.
8151 (nand_mod_CFLAGS): Likewise.
8152 (nand_mod_LDFLAGS): Likewise.
8154 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8155 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8156 type property. (nand device in olpc don't have this property)
8158 * include/grub/disk.h (grub_disk_dev_id): New macro
8159 GRUB_DISK_DEVICE_NAND_ID.
8161 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8163 (grub_rescue_cmd_initrd): Likewise.
8165 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8166 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8167 ofw_cif_handler and ofw_idt, adjust padding number.
8169 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8170 GRUB_MACHINE_IEEE1275 is defined.
8172 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8173 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8175 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8176 on nested function heap_init.
8177 (grub_upper_mem): New variable for i386-ieee1275.
8178 (grub_get_extended_memory): New function for i386-ieee1275.
8179 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8181 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8182 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8185 * loader/i386/ieee1275/linux.c: New file.
8187 * loader/i386/ieee1275/linux_normal.c: New file.
8189 * disk/ieee1275/nand.c: New file.
8191 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8193 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8195 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8197 2008-04-18 Robert Millan <rmh@aybabtu.com>
8199 Restructures early code path on ieee1275 to unify grub_main() as
8200 the first C function that is executed in every platform.
8202 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8203 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8205 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8206 * kern/ieee1275/cmain.c (cmain): Rename to ...
8207 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8208 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8211 2008-04-18 Robert Millan <rmh@aybabtu.com>
8213 * util/update-grub.in: Fix syntax error when setting
8214 `GRUB_PRELOAD_MODULES'.
8215 Reported by Stephane Chazelas <stephane@artesyncp.com>
8217 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8219 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8220 section into account, newer toolchains generate unique build ids
8221 * configure.ac: remove the test for --build-id=none acceptance,
8222 we want build ids to be preserved
8223 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8224 far from other sections don't cause the raw binary images grow
8227 2008-04-15 Robert Millan <rmh@aybabtu.com>
8229 * disk/lvm.c: Update copyright year.
8230 * kern/misc.c: Likewise.
8232 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8234 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8235 there is no memory left for physical volume name.
8237 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8239 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8240 volume name mapping to support bigger than 9 character names properly.
8242 2008-04-13 Robert Millan <rmh@aybabtu.com>
8244 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8245 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8247 2008-04-13 Christian Franke <franke@computer.org>
8249 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8250 to create a floppy emulation boot CD when non emulation mode
8252 Enable Joliet CD filesystem extension.
8254 2008-04-13 Robert Millan <rmh@aybabtu.com>
8256 * kern/misc.c (grub_strncat): Fix off-by-one error.
8257 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8259 * kern/env.c (grub_env_context_close): Clear current context, not
8261 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8263 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8265 2008-04-13 Robert Millan <rmh@aybabtu.com>
8267 Improve robustness when handling LVM.
8269 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8270 (and leave `*p' unmodified).
8271 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8273 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8274 iterating through it.
8275 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8277 (grub_lvm_scan_device): Check the return value (and fail gracefully
8278 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8279 Don't assume `vg->pvs != NULL' when iterating through it.
8281 2008-04-13 Robert Millan <rmh@aybabtu.com>
8283 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8284 * genmk.rb (partmap): New variable.
8285 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8286 (#{partmap}): New target rule.
8287 * genpartmaplist.sh: New file.
8288 * Makefile.in (pkglib_DATA): Add partmap.lst.
8289 (partmap.lst): New target rule.
8290 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8291 modules (including all partition maps), instead of preloading them.
8293 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8295 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8296 `linux-boot-prober' (if installed) to detect other operating
8297 systems which are installed on the computer and add them to
8299 * conf/common.rmk: Build and install 30_os-prober.
8301 2008-04-12 Robert Millan <rmh@aybabtu.com>
8303 * kern/powerpc/ieee1275/init.c: Move from here ...
8304 * kern/ieee1275/init.c: ... to here. Update all users.
8306 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8307 * kern/ieee1275/cmain.c: ... to here. Update all users.
8309 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8310 * kern/ieee1275/openfw.c: ... to here. Update all users.
8312 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8313 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8315 2008-04-10 Pavel Roskin <proski@gnu.org>
8317 * configure.ac: Always use "_cv_" in cache variables for
8318 compatibility with Autoconf 2.62.
8320 2008-04-07 Robert Millan <rmh@aybabtu.com>
8322 Revert grub/machine/init.h addition by Pavel (since it breaks on
8323 i386-ieee1275 and others):
8324 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8325 * util/powerpc/ieee1275/misc.c: Likewise.
8327 2008-04-07 Robert Millan <rmh@aybabtu.com>
8329 * util/grub-probe.c (probe): Improve error message.
8331 2008-04-07 Robert Millan <rmh@aybabtu.com>
8333 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8334 (this prevents the presence of a bogus entry from ruining the whole
8337 2008-04-06 Pavel Roskin <proski@gnu.org>
8339 * util/biosdisk.c: Include grub/util/biosdisk.h.
8340 * util/grub-fstest.c (execute_command): Make static.
8341 * util/grub-mkdevicemap.c (check_device): Likewise.
8342 * util/i386/pc/misc.c: Include grub/machine/init.h.
8343 * util/powerpc/ieee1275/misc.c: Likewise.
8344 * util/lvm.c: Include grub/util/lvm.h.
8345 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8347 * util/raid.c: Include grub/util/raid.h.
8348 (grub_util_getdiskname): Make static.
8350 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8351 grub_hostfs_fini(), as they are called from grub_init_all() and
8352 grub_fini_all() respectively. This fixes an infinite loop in
8353 grub-fstest due to double registration of hostfs.
8354 Reported by Christian Franke <Christian.Franke@t-online.de>
8356 2008-04-05 Pavel Roskin <proski@gnu.org>
8358 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8359 all 8 functions. Otherwise, probe function 0 only.
8361 2008-04-04 Pavel Roskin <proski@gnu.org>
8363 * commands/lspci.c (grub_lspci_iter): Print the bus number
8366 * commands/lspci.c (grub_pci_classes): Fix typos.
8367 (grub_lspci_iter): Don't print func twice. Print vendor ID
8368 before device ID, as it's normally done.
8370 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8371 Fix signedness warnings.
8372 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8374 * util/ieee1275/get_disk_name.c: Include config.h so that
8375 _GNU_SOURCE is defined and getline() is declared. Mark an
8376 unused argument as such. Fix a signedness warning.
8378 2008-04-02 Pavel Roskin <proski@gnu.org>
8380 * genkernsyms.sh.in: Use more robust assignments for CC and
8381 srcdir. Quote srcdir.
8382 * gensymlist.sh.in: Likewise. Assert at the compile time that
8383 the symbol table is not empty.
8385 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8386 * fs/cpio.c (grub_cpio_read): Likewise.
8388 2008-04-01 Pavel Roskin <proski@gnu.org>
8390 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8391 * disk/host.c (grub_host_open): Likewise.
8392 * disk/loopback.c (grub_loopback_open): Likewise.
8393 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8394 disk->id as in disk/host.c, not a multi-character constant.
8396 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8397 later is obsolete, potentially dangerous and sets a bad example.
8398 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8399 * util/misc.c (grub_util_get_image_size): Likewise.
8401 * disk/loopback.c (options): Improve help for "--partitions".
8403 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8404 options to align them with the short options, e.g. "echo -e".
8406 2008-03-31 Bean <bean123ch@gmail.com>
8408 * video/reader/png.c (grub_png_data): New member is_16bit and
8410 (grub_png_decode_image_header): Detect 16 bit png image.
8411 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8412 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8413 (grub_video_reader_png): Release memory occupied by image_data.
8415 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8417 (grub_nfs_mount): Skip the test for sector per cluster.
8419 * include/grub/ntfs.h (MAX_SPC): Removed.
8421 2008-03-31 Bean <bean123ch@gmail.com>
8423 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8424 (grub_probe_SOURCES): Add fs/afs.c.
8425 (grub_fstest_SOURCES): Likewise.
8426 (afs_mod_SOURCES): New variable.
8427 (afs_mod_CFLAGS): Likewise.
8428 (afs_mod_LDFLAGS): Likewise.
8430 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8431 (grub_emu_SOURCES): Likewise.
8433 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8435 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8437 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8439 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8441 * fs/afs.c: New file.
8443 2008-03-30 Pavel Roskin <proski@gnu.org>
8445 * disk/host.c: Include grub/misc.h to fix a warning.
8446 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8447 warnings about implicit declarations.
8449 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8451 * include/grub/i386/loader.h: Change declaration of
8452 grub_linux_boot() to match what grub_loader_set() expects.
8453 * util/getroot.c (grub_guess_root_device): Return const char* to
8455 * util/grub-probe.c (probe): Fix a warning about uninitialized
8456 abstraction_name variable.
8457 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8458 second argument as unused to fix a warning.
8460 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8461 missing grub_error() call.
8463 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8464 2.60 and newer uses it to define datadir.
8466 * commands/sleep.c: Fix warning about implicit declaration.
8467 * disk/memdisk.c: Likewise.
8468 * loader/aout.c: Likewise.
8469 * loader/i386/bsd_normal.c: Likewise.
8470 * util/grub-probe.c: Likewise.
8472 * commands/i386/cpuid.c (has_longmode): Make static.
8473 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8474 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8476 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8477 GDT. This is more robust, as %ds can change.
8478 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8479 calling real_to_prot().
8480 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8482 2008-03-28 Pavel Roskin <proski@gnu.org>
8484 * kern/i386/pc/startup.S: Assert that uncompressed functions
8485 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8486 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8487 code, as they push parts of the code (error handlers) beyond
8488 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8489 code as correctness and size.
8491 2008-03-28 Pavel Roskin <proski@gnu.org>
8493 * kern/i386/pc/startup.S
8494 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8495 data block address to the real mode, keep offset minimal. This
8496 works around a bug in AWARD BIOS on old Athlon systems, which
8497 makes CD detection hang.
8499 2008-03-26 Pavel Roskin <proski@gnu.org>
8501 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8503 * include/grub/normal.h: Add grub_parse_color_name_pair()
8506 2008-03-24 Bean <bean123ch@gmail.com>
8508 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8509 (cd_count): Removed.
8510 (cd_drive): New variable.
8511 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8512 (grub_biosdisk_call_hook): Likewise.
8513 (grub_biosdisk_iterate): Change cdrom detection method.
8514 (grub_biosdisk_open): Replace cd_start with cd_drive.
8515 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8516 detect cdrom device.
8518 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8520 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8521 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8522 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8523 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8524 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8525 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8526 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8527 (grub_biosdisk_cdrp): New structure.
8528 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8530 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8532 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8535 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8538 2008-03-20 Robert Millan <rmh@aybabtu.com>
8540 Remove 2 TiB limit in ata.mod.
8541 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8542 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8543 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8544 grub_uint64_t instead of grub_uint32_t.
8546 2008-03-05 Bean <bean123ch@gmail.com>
8548 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8549 (grub_multiboot): Set boot device.
8551 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8553 2008-03-02 Bean <bean123ch@gmail.com>
8555 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8558 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8560 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8563 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8566 * docs/fdl.texi: New file.
8568 * docs/mdate-sh: New file. Copied from gnulib.
8569 * docs/texinfo.tex: Likewise.
8571 * config.guess: Updated from gnulib.
8572 * install-sh: Likewise.
8574 2008-02-28 Robert Millan <rmh@aybabtu.com>
8576 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8577 (aout_mod_SOURCES): New variable.
8578 (aout_mod_CFLAGS): Likewise.
8579 (aout_mod_LDFLAGS): Likewise.
8581 * conf/i386-ieee1275.rmk: Likewise.
8583 2008-02-28 Robert Millan <rmh@aybabtu.com>
8585 * util/update-grub.in: Reorganise terminal validity check. Accept
8586 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8587 Based on suggestion by Franklin PIAT.
8589 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8591 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8593 * util/getroot.c (grub_util_check_block_device): New function that
8594 returns the given argument if it is a block device and returns NULL else.
8595 * util/grub-probe.c (argument_is_device): New variable.
8596 (probe): Promote device_name from a variable to an argument. Receive
8597 device_name from grub_util_check_block_device() if path is NULL and from
8598 grub_guess_root_device() else. Do not free() device_name anymore.
8599 (options): Introduce new parameter '-d, --device'.
8600 (main): Add description of the new parameter to the help screen.
8601 Rename path variable to argument. Set argument_is_device if the '-d'
8602 option is given. Pass argument to probe() depending on
8605 2008-02-24 Bean <bean123ch@gmail.com>
8607 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8608 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8609 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8610 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8611 (GRUB_ISO9660_VOLDESC_END): Likewise.
8612 (grub_iso9660_primary_voldesc): New member escape.
8613 (grub_iso9660_data): New member joliet.
8614 (grub_iso9660_convert_string): New function.
8615 (grub_iso9660_mount): Detect joliet extension.
8616 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8617 (grub_iso9660_iso9660_label): Likewise.
8619 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8620 (grub_setup_SOURCES): Add fs/udf.c.
8621 (grub_fstest_SOURCES): Likewise.
8622 (udf_mod_SOURCES): New variable.
8623 (udf_mod_CFLAGS): Likewise.
8624 (udf_mod_LDFLAGS): Likewise.
8626 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8627 (grub_emu_SOURCES): Likewise.
8629 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8631 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8633 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8635 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8637 * fs/udf.c: New file.
8639 2008-02-24 Robert Millan <rmh@aybabtu.com>
8641 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8642 (normal/lexer.c_DEPENDENCIES): New variables.
8643 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8644 (normal/lexer.c_DEPENDENCIES): Likewise.
8645 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8646 (normal/lexer.c_DEPENDENCIES): Likewise.
8647 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8648 (normal/lexer.c_DEPENDENCIES): Likewise.
8649 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8650 (normal/lexer.c_DEPENDENCIES): Likewise.
8651 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8652 (normal/lexer.c_DEPENDENCIES): Likewise.
8654 2008-02-23 Robert Millan <rmh@aybabtu.com>
8656 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8657 since they were intended to be in hex. This didn't break previously
8658 because of a bug in gpt_partition_map_iterate() (see below).
8660 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8661 when checking the validity of GPT header.
8662 Remove `partno', since it always provides the same information as `i'.
8664 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8666 * include/grub/efi/time.h: Fix a wrong comment.
8668 2008-02-19 Pavel Roskin <proski@gnu.org>
8670 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8673 2008-02-19 Bean <bean123ch@gmail.com>
8675 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8676 (aout_mod_SOURCES): New variable.
8677 (aout_mod_CFLAGS): Likewise.
8678 (aout_mod_LDFLAGS): Likewise.
8679 (_bsd_mod_SOURCES): New variable.
8680 (_bsd_mod_CFLAGS): Likewise.
8681 (_bsd_mod_LDFLAGS): Likewise.
8682 (bsd_mod_SOURCES): New variable.
8683 (bsd_mod_CFLAGS): Likewise.
8684 (bsd_mod_LDFLAGS): Likewise.
8686 * include/grub/aout.h: New file.
8688 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8690 * include/grub/i386/bsd.h: New file.
8692 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8695 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8696 function is called, so that it's possible to change it inside the hook.
8697 (grub_elf64_load): Likewise.
8698 (grub_elf_file): Don't close the file if elf header is not found.
8699 (grub_elf_close): Close the file if grub_elf_file fails (The new
8700 grub_elf_file won't close it).
8701 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8702 (grub_elf64_size): Likewise.
8704 * kern/i386/loader.S (grub_unix_real_boot): New function.
8706 * loader/aout.c: New file.
8708 * loader/i386/bsd.c: New file.
8710 * loader/i386/bsd_normal.c: New file.
8712 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8714 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8715 can test other formats.
8717 2008-02-19 Robert Millan <rmh@aybabtu.com>
8719 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8720 (grub_gpt_partition_type_empty): Redefine with macro from
8721 `<grub/gpt_partition.h>'.
8722 (gpt_partition_map_iterate): Adjust partition type comparison.
8724 Export `entry' as partmap-specific `part.data' struct.
8725 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8727 * include/grub/gpt_partition.h (grub_gpt_header)
8728 (grub_gpt_partentry): ... to here (new file).
8730 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8732 (grub_gpt_partition_type_bios_boot): New const variable, defined
8733 with macro from `<grub/gpt_partition.h>'.
8735 (setup): Replace `first_start' with `embed_region', which keeps
8736 track of the embed region (and is partmap-agnostic).
8738 Replace find_first_partition_start() with find_usable_region(),
8739 which finds a usable region for embedding using partmap-specific
8740 knowledge (supports PC/MSDOS and GPT).
8742 Fix all assumptions that the embed region start at sector 1, using
8743 `embed_region.start' from now on. Similarly, use `embed_region.end'
8744 rather than `first_start' to calculate available size.
8746 In grub_util_info() message, replace "into after the MBR" with an
8747 indication of the specific sector our embed region starts at.
8749 2008-02-19 Robert Millan <rmh@aybabtu.com>
8751 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8752 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8753 `commands/reboot.c'.
8754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8755 (halt_mod_SOURCES): Likewise.
8756 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8757 (halt_mod_SOURCES): Likewise.
8759 2008-02-17 Christian Franke <franke@computer.org>
8761 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8763 2008-02-17 Robert Millan <rmh@aybabtu.com>
8765 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8766 set `first_start' to 0 for non-PC/MSDOS partition maps.
8768 2008-02-16 Robert Millan <rmh@aybabtu.com>
8770 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8771 do not assume partition map is PC/MSDOS before performing checks that
8772 are specific to that layout.
8774 2008-02-13 Robert Millan <rmh@aybabtu.com>
8776 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8777 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8778 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8780 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8782 * configure.ac: Only a cosmetic change on the handling of
8783 -fno-stack-protector.
8785 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8787 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8788 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8790 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8791 (halt_mod_SOURCES): New variable.
8792 (halt_mod_CFLAGS): Likewise.
8793 (halt_mod_LDFLAGS): Likewise.
8794 (reboot_mod_SOURCES): Likewise.
8795 (reboot_mod_CFLAGS): Likewise.
8796 (reboot_mod_LDFLAGS): Likewise.
8798 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8799 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8801 (halt_mod_SOURCES): Likewise.
8802 (reboot_mod_SOURCES): Likewise.
8804 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8805 commands/i386/pc/reboot.c by commands/reboot.c.
8806 (reboot_mod_SOURCES): Likewise.
8808 * commands/i386/pc/reboot.c: merge this file ...
8810 * commands/ieee1275/reboot.c: ... and this file ...
8812 * commands/reboot.c: ... to this file.
8813 Add some precompiler directive to include the correct header for
8816 * commands/ieee1275/halt.c: move this file ...
8818 * commands/halt.c: ... to here.
8819 Add some precompiler directive to include the correct header for
8822 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8823 (grub_halt): Likewise.
8825 * kern/efi/efi.c (grub_reboot): New function.
8826 (grub_halt): Likewise.
8828 2008-02-12 Robert Millan <rmh@aybabtu.com>
8830 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8831 /dev (like it is done for /dev/mapper). This doesn't provide support
8832 for EVMS, but at least it is now easy to identify the problem when it
8835 2008-02-11 Robert Millan <rmh@aybabtu.com>
8837 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8838 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8839 comparing it with -1, not 0.
8841 2008-02-10 Robert Millan <rmh@aybabtu.com>
8843 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8845 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8846 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8848 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8849 `disk/lvm.c' to the end of the list.
8850 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8851 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8853 2008-02-10 Robert Millan <rmh@aybabtu.com>
8855 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8856 grub_print_error() instead. This will let user know why we're entering
8858 Based on suggestions from Sam Morris.
8860 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8862 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8863 on remaining N args, instead of "--" arg N times.
8865 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8867 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8868 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8869 pattern for unknown glyphs.
8871 2008-02-09 Robert Millan <rmh@aybabtu.com>
8873 * configure.ac: Probe for `help2man'.
8874 * Makefile.in (builddir): New variable.
8875 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8876 or otherwise add a few flags/options to it.
8877 (install-local): For every executable utility or script that is
8878 installed, invoke $(HELP2MAN) to install a manpage based on --help
8881 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8882 that it doesn't prevent --help from working in build tree.
8884 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8885 with `bug-grub@gnu.org'.
8886 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8887 * util/update-grub.in (usage): New function.
8888 Implement proper argument check, with support for --help and --version
8889 (as well as existing -y).
8891 2008-02-09 Christian Franke <franke@computer.org>
8893 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8894 avoid overwriting previous output.
8895 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8897 2008-02-09 Robert Millan <rmh@aybabtu.com>
8899 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8902 2008-02-09 Robert Millan <rmh@aybabtu.com>
8904 * commands/sleep.c: New file.
8905 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8906 (sleep_mod_SOURCES): New variable.
8907 (sleep_mod_CFLAGS): Likewise.
8908 (sleep_mod_LDFLAGS): Likewise.
8910 2008-02-09 Robert Millan <rmh@aybabtu.com>
8912 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8913 situations in which we can deduce the RAID size and the superblock
8916 2008-02-09 Robert Millan <rmh@aybabtu.com>
8918 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8919 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8920 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8922 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8923 and return a grub_diskmemberlist_t composed of physical array members.
8924 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8926 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8928 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8929 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8930 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8932 * util/grub-probe.c (probe): Move partmap probing code from here ...
8933 (probe_partmap): ... to here.
8934 (probe): Use probe_partmap() once for the disk we're probing, and
8935 additionally, when such disk contains a memberlist() struct member,
8936 once for each disk that is contained in the structure returned by
8939 2008-02-09 Robert Millan <rmh@aybabtu.com>
8941 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8942 environment variable to 'all' in order to obtain debug output from
8944 * util/i386/pc/grub-setup.c (main): Likewise.
8946 2008-02-08 Robert Millan <rmh@aybabtu.com>
8948 * disk/raid.c (grub_raid_scan_device): Check for
8949 `array->device[sb.this_disk.number]' rather than for
8950 `array->device[sb.this_disk.number]->name', since the latter is not
8951 guaranteed to be accessible.
8953 2008-02-08 Robert Millan <rmh@aybabtu.com>
8955 * disk/raid.c: Update copyright.
8956 * fs/cpio.c: Likewise.
8957 * include/grub/raid.h: Likewise.
8958 * loader/i386/pc/multiboot.c: Likewise.
8959 * util/hostfs.c: Likewise.
8961 2008-02-08 Robert Millan <rmh@aybabtu.com>
8963 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8964 to a grub_disk_t array.
8965 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8967 (grub_raid_scan_device): Replace `device[x].name' accesses with
8968 `device[x]->name'. Simplify initialization of `array->device[x]'.
8970 2008-02-08 Robert Millan <rmh@aybabtu.com>
8972 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8973 grub_dprintf() calls.
8974 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8977 2008-02-07 Christian Franke <franke@computer.org>
8979 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8980 instead of fseek and ftell to support large files.
8981 (grub_hostfs_read): Likewise.
8983 2008-02-07 Robert Millan <rmh@aybabtu.com>
8985 Patch from Jeroen Dekkers.
8986 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8987 failure, since successfully reading all array members might not be
8990 2008-02-06 Robert Millan <rmh@aybabtu.com>
8992 * util/grub-probe.c (probe): Simplify partmap probing (with the
8993 assumption that the first word up to the underscore equals to
8996 2008-02-06 Christian Franke <franke@computer.org>
8998 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8999 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9000 last block of a cpio or tar stream.
9001 Check for "TRAILER!!!" instead of any empty data
9002 block to detect last block of a cpio stream.
9003 (grub_cpio_dir): Fix constness of variable np.
9004 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9005 cpio or tar trailer is detected. This fixes a crash
9006 on open of a non existing file.
9008 2008-02-05 Bean <bean123ch@gmail.com>
9010 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9012 (grub_multiboot_load_elf64): Likewise.
9013 (grub_multiboot): Initialize mbi structure.
9015 * util/grub-fstest.c: Don't include unused header file script.h.
9017 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9019 (grub_fstest_SOURCES): Likewise.
9021 2008-02-05 Robert Millan <rmh@aybabtu.com>
9023 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9024 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9025 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9026 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9028 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9029 (translation_table): Replace hardcoded values with macros
9030 provided by `<grub/term.h>'.
9032 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9033 (keyboard_map): Correct/add a few values, with macros provided
9035 (keyboard_map_shift): Zero values that don't differ from their
9036 `keyboard_map' equivalents.
9037 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9038 Discard the second scan code that is always sent by Caps lock.
9039 Only use `keyboard_map_shift' when it provides a non-zero value,
9040 otherwise fallback to `keyboard_map'.
9042 2008-02-04 Bean <bean123ch@gmail.com>
9044 * Makefile.in (enable_grub_fstest): New variable.
9046 * conf/common.rmk (grub_fstest_init.lst): New rule.
9047 (grub_fstest_init.h): Likewise.
9048 (grub_fstest_init.c): Likewise.
9049 (util/grub-fstest.c_DEPENDENCIES): New variable.
9050 (grub_fstest_SOURCES): Likewise.
9052 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9054 * util/grub-fstest.c: New file.
9056 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9058 Make grub-setup handle a separate root device.
9060 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9061 so that the root device can be compared with the destination
9063 When embedding the core image, if the root and destination devices
9064 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9066 When not embedding, set ROOT_DRIVE to 0xFF.
9068 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9070 Add support for having a grub directory in a different drive. This
9071 is still only the data handling part.
9073 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9074 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9075 (grub_root_drive): New variable.
9077 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9078 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9079 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9082 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9084 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9086 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9088 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9089 is bogus, because PXE booting does not specify any drive
9092 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9093 am not sure if this is really correct.
9095 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9096 is always identical to the boot drive when booting from a CD.
9098 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9100 (root_drive): New variable.
9101 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9102 (setup_sectors): Push %dx right after popping it, because %dh will
9104 (copy_buffer): Restore %dx.
9106 2008-02-03 Robert Millan <rmh@aybabtu.com>
9108 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9109 use `cdboot.img' for cdrom images.
9111 2008-02-03 Robert Millan <rmh@aybabtu.com>
9113 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9114 only setup gfxterm when `font' command has succeeded.
9116 2008-02-03 Robert Millan <rmh@aybabtu.com>
9118 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9119 (grub_rescue_cmd_multiboot_loader)
9120 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9122 2008-02-03 Pavel Roskin <proski@gnu.org>
9124 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9125 %edx and %esi from stack only after grub_gate_a20() is called.
9126 grub_gate_a20() clobbers %edx.
9128 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9130 * configure.ac (AC_INIT): Bumped to 1.96.
9132 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9133 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9134 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9135 video/readers/png.c.
9137 2008-02-03 Bean <bean123ch@gmail.com>
9139 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9140 (cdboot_img_SOURCES): New variable.
9141 (cdboot_img_ASFLAGS): New variable.
9142 (cdboot_img_LDFLAGS): New variable.
9144 * boot/i386/pc/cdboot.S: New file.
9146 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9147 (cd_count): Likewise.
9148 (grub_biosdisk_get_drive): Add support for cd device.
9149 (grub_biosdisk_call_hook): Likewise.
9150 (grub_biosdisk_iterate): Likewise.
9151 (grub_biosdisk_open): Likewise.
9152 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9153 (grub_biosdisk_rw): Support reading from cd device.
9154 (GRUB_MOD_INIT): Iterate cd devices.
9156 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9157 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9158 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9160 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9162 2008-02-02 Robert Millan <rmh@aybabtu.com>
9164 * commands/read.c: New file.
9165 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9166 (read_mod_SOURCES): New variable.
9167 (read_mod_CFLAGS): Likewise.
9168 (read_mod_LDFLAGS): Likewise.
9170 2008-02-02 Robert Millan <rmh@aybabtu.com>
9172 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9173 determining whether menu has to be displayed.
9175 2008-02-02 Marco Gerards <marco@gnu.org>
9177 * bus/pci.c: New file.
9179 * include/grub/pci.h: Likewise.
9181 * include/grub/i386/pc/pci.h: Likewise.
9183 * commands/lspci.c: Likewise.
9185 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9187 (pci_mod_SOURCES): New variable.
9188 (pci_mod_CFLAGS): Likewise.
9189 (pci_mod_LDFLAGS): Likewise.
9190 (lspci_mod_SOURCES): Likewise.
9191 (lspci_mod_CFLAGS): Likewise.
9192 (lspci_mod_LDFLAGS): Likewise.
9194 2008-02-02 Bean <bean123ch@gmail.com>
9196 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9197 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9199 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9200 (grub_xfs_btree_node): New structure.
9201 (grub_xfs_btree_root): New structure.
9202 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9203 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9204 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9205 (GRUB_XFS_EXTENT_SIZE): Likewise.
9206 (grub_xfs_read_block): Support btree format type.
9207 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9208 Use directory block as basic unit.
9210 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9212 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9213 __attribute__ ((__regparm__ (1))).
9215 2008-02-01 Robert Millan <rmh@aybabtu.com>
9217 Correct a mistake in previous commit.
9219 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9221 (normal/command.c_DEPENDENCIES): New variable.
9223 2008-02-01 Robert Millan <rmh@aybabtu.com>
9225 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9227 (normal/command.c_DEPENDENCIES): New variable.
9228 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9229 * conf/i386-ieee1275.rmk: Likewise.
9230 * conf/i386-linuxbios.rmk: Likewise.
9231 * conf/i386-pc.rmk: Likewise.
9232 * conf/sparc64-ieee1275.rmk: Likewise.
9233 * conf/powerpc-ieee1275.rmk: Likewise.
9234 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9236 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9238 2008-02-01 Robert Millan <rmh@aybabtu.com>
9240 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9241 call at beginning of function.
9243 2008-01-31 Pavel Roskin <proski@gnu.org>
9245 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9246 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9247 (grub_mkrescue_SOURCES): Likewise.
9248 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9250 2008-01-30 Robert Millan <rmh@aybabtu.com>
9252 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9253 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9254 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9255 (grub_probe_SOURCES): ... to here.
9257 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9258 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9259 * conf/i386-ieee1275.rmk: Likewise.
9260 * conf/i386-linuxbios.rmk: Likewise.
9261 * conf/powerpc-ieee1275.rmk: Likewise.
9263 2008-01-30 Tristan Gingold <gingold@free.fr>
9265 * kern/rescue.c: Silently accept empty lines.
9267 2008-01-29 Bean <bean123ch@gmail.com>
9269 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9270 (real_code_2): Code cleanup and change comment style.
9271 (move_memory): Avoid using 32-bit address mode.
9273 2008-01-29 Bean <bean123ch@gmail.com>
9275 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9276 (png_mod_SOURCES): New variable.
9277 (png_mod_CFLAGS): Likewise.
9278 (png_mod_LDFLAGS): Likewise.
9280 * video/readers/png.c: New file.
9282 2008-01-28 Robert Millan <rmh@aybabtu.com>
9284 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9285 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9286 `ifndef GRUB_MOD_GAP' hack.
9287 * util/elf/grub-mkimage.c (add_segments): Likewise.
9289 2008-01-27 Robert Millan <rmh@aybabtu.com>
9291 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9292 `GRUB_MOD_GAP' for platforms in which it's not defined.
9293 * util/elf/grub-mkimage.c (add_segments): Likewise.
9295 2008-01-27 Robert Millan <rmh@aybabtu.com>
9297 Get grub-emu to build again (including parallel builds).
9299 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9301 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9302 (normal/execute.c_DEPENDENCIES): ... this, ...
9303 (grub-emu_DEPENDENCIES): ... and this.
9305 * conf/i386-efi.rmk: Likewise.
9306 * conf/i386-linuxbios.rmk: Likewise.
9307 * conf/i386-ieee1275.rmk: Likewise.
9308 * conf/powerpc-ieee1275.rmk: Likewise.
9309 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9311 2008-01-27 Robert Millan <rmh@aybabtu.com>
9313 * NEWS: Add a few items.
9315 2008-01-27 Robert Millan <rmh@aybabtu.com>
9317 Fix parallel builds with grub-emu. Based on earlier commit for
9318 grub-probe and grub-setup.
9320 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9321 (util/grub-emu.c_DEPENDENCIES): ... this.
9322 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9323 (util/grub-emu.c_DEPENDENCIES): ... this.
9324 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9325 (util/grub-emu.c_DEPENDENCIES): ... this.
9326 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9327 (util/grub-emu.c_DEPENDENCIES): ... this.
9328 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9329 (util/grub-emu.c_DEPENDENCIES): ... this.
9331 2008-01-27 Pavel Roskin <proski@gnu.org>
9333 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9334 to create a gap between _end and the modules added to the image
9335 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9336 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9337 * util/elf/grub-mkimage.c (add_segments): Likewise.
9339 2008-01-26 Pavel Roskin <proski@gnu.org>
9341 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9342 just return an error.
9344 2008-01-26 Bean <bean123ch@gmail.com>
9346 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9347 (grub_reiserfs_get_item): Save offset of the next item.
9348 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9350 2008-01-25 Robert Millan <rmh@aybabtu.com>
9352 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9353 make all filesystem sources appear together (possibly fixing omissions
9355 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9356 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9357 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9358 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9360 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9362 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9363 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9364 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9365 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9367 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9368 (probe): Add a sanity check to make sure of our ability to read
9369 requested files when probing for filesystem type.
9371 * genmk.rb: Update copyright year (2007).
9373 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9374 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9375 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9376 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9377 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9378 : Remove function prototypes.
9380 2008-01-25 Robert Millan <rmh@aybabtu.com>
9382 Revert my previous commits (based on wrong assumption of how grub_errno
9385 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9386 * kern/file.c (grub_file_open): Likewise.
9388 2008-01-24 Pavel Roskin <proski@gnu.org>
9390 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9391 that hang if GRUB tries to setup colors.
9392 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9393 colors for firmwares that don't support it.
9394 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9395 Recognize Open Hack'Ware, set flags to work around its
9398 2008-01-24 Robert Millan <rmh@aybabtu.com>
9400 * kern/file.c (grub_file_open): Do not account previous failures of
9401 unrelated functions when grub_errno is checked for.
9402 Reported by Oleg Strikov.
9404 2008-01-24 Bean <bean123ch@gmail.com>
9406 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9407 (grub_ufs_sblock): New member volume name.
9408 (grub_ufs_find_file): Fix string copy bug.
9409 (grub_ufs_label): Implement this function properly.
9411 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9412 (grub_hfs_iterate_records): Use the correct file number for extents
9413 and catalog file. Fix problem in next index calculation.
9414 (grub_hfs_find_node): Replace recursive function call with loop.
9415 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9417 2008-01-23 Robert Millan <rmh@aybabtu.com>
9419 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9420 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9421 (grub_multiboot2_real_boot): New function prototype.
9423 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9424 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9426 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9427 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9429 2008-01-23 Robert Millan <rmh@aybabtu.com>
9431 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9432 #ifdef'ed out grub_printf().
9434 2008-01-23 Robert Millan <rmh@aybabtu.com>
9436 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9437 grub_dprintf calls, since they make "debug=all" mode unusable.
9438 (grub_console_checkkey): Likewise.
9440 2008-01-23 Robert Millan <rmh@aybabtu.com>
9442 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9443 `term/i386/pc/at_keyboard.c'.
9444 (pkglib_MODULES): Add `serial.mod'.
9445 (serial_mod_SOURCES): New variable.
9446 (serial_mod_CFLAGS): Likewise.
9447 (serial_mod_LDFLAGS): Likewise.
9449 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9450 `<grub/powerpc/ieee1275/console.h>'.
9451 (grub_keyboard_controller_init): New function prototype.
9452 (grub_console_checkkey): Likewise.
9453 (grub_console_getkey): Likewise.
9455 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9458 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9459 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9461 2008-01-23 Robert Millan <rmh@aybabtu.com>
9463 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9464 present, "(memdisk)/boot/grub" becomes the default prefix.
9466 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9467 a memdisk tarball with all the modules. Add --overlay=DIR option that
9468 allows users to overlay additional files into the image.
9470 2008-01-23 Robert Millan <rmh@aybabtu.com>
9472 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9473 and `machine/memory.h'.
9474 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9475 (_multiboot_mod_SOURCES): New variable.
9476 (_multiboot_mod_CFLAGS): Likewise.
9477 (_multiboot_mod_LDFLAGS): Likewise.
9478 (multiboot_mod_SOURCES): Likewise.
9479 (multiboot_mod_CFLAGS): Likewise.
9480 (multiboot_mod_LDFLAGS): Likewise.
9482 * include/grub/i386/ieee1275/loader.h: New file.
9484 * include/grub/i386/ieee1275/machine.h: Likewise.
9486 * include/grub/i386/ieee1275/memory.h: Likewise.
9488 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9489 variable declaration.
9490 (grub_os_area_size): Likewise.
9492 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9493 (grub_lower_mem, grub_upper_mem): New variables.
9494 (grub_stop_floppy): New function (just to make
9495 grub_multiboot2_real_boot() happy).
9497 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9498 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9499 (grub_stop): New function.
9500 Include `"../realmode.S"' and `"../loader.S"'.
9502 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9503 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9505 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9506 rely on grub_multiboot2_real_boot() for final boot.
9508 2008-01-22 Robert Millan <rmh@aybabtu.com>
9510 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9511 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9512 device that doesn't look like an SD card.
9513 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9514 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9515 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9516 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9519 2008-01-22 Robert Millan <rmh@aybabtu.com>
9521 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9522 avoid claiming over our own code.
9524 2008-01-22 Bean <bean123ch@gmail.com>
9526 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9527 (jpeg_mod_SOURCES): New variable.
9528 (jpeg_mod_CFLAGS): Likewise.
9529 (jpeg_mod_LDFLAGS): Likewise.
9531 * video/readers/jpeg.c : New file.
9533 2008-01-22 Bean <bean123ch@gmail.com>
9535 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9536 there are no more items.
9538 2008-01-21 Robert Millan <rmh@aybabtu.com>
9540 * kern/mm.c (grub_mm_init_region): Improve debug message.
9542 2008-01-21 Robert Millan <rmh@aybabtu.com>
9544 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9545 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9547 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9549 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9550 Indicates start of upper memory.
9551 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9552 (generate_image): Abort when image size is big enough to corrupt
9555 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9556 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9557 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9558 instead of hardcoding 0xA0000.
9559 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9560 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9561 instead of hardcoding 0xA0000.
9563 2008-01-21 Robert Millan <rmh@aybabtu.com>
9565 * disk/memdisk.c (memdisk_size): New variable.
9566 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9568 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9569 image to dynamic memory.
9570 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9571 `memdisk_size'. Free memdisk block.
9573 2008-01-21 Robert Millan <rmh@aybabtu.com>
9575 Fix detection of very small filesystems (like tar).
9577 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9578 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9579 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9580 a problem with this disk).
9582 2008-01-21 Robert Millan <rmh@aybabtu.com>
9584 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9585 on grub_biosdisk_rw_standard() error.
9587 2008-01-21 Robert Millan <rmh@aybabtu.com>
9589 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9591 * kern/elf.c: Likewise.
9592 * kern/ieee1275/ieee1275.c: Likewise.
9593 * kern/powerpc/ieee1275/openfw.c: Likewise.
9594 * term/ieee1275/ofconsole.c: Likewise.
9596 2008-01-21 Robert Millan <rmh@aybabtu.com>
9598 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9600 * include/grub/kernel.h (grub_arch_memdisk_addr)
9601 (grub_arch_memdisk_size): Moved from here ...
9603 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9604 (grub_arch_memdisk_size): ... to here.
9606 2008-01-21 Robert Millan <rmh@aybabtu.com>
9608 Mostly based on bugfix from Bean.
9610 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9611 attribute with hook() parameter.
9612 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9614 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9615 attribute with hook() parameter.
9616 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9619 2008-01-21 Robert Millan <rmh@aybabtu.com>
9621 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9622 (pkglib_MODULES): Add `memdisk.mod'.
9623 (memdisk_mod_SOURCES): New variable.
9624 (memdisk_mod_CFLAGS): Likewise.
9625 (memdisk_mod_LDFLAGS): Likewise.
9627 * disk/memdisk.c: New file.
9629 * include/grub/disk.h (grub_disk_dev_id): Add
9630 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9632 * include/grub/i386/pc/kernel.h
9633 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9634 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9635 (grub_kernel_image_size): New variable declaration.
9636 (grub_total_module_size): Likewise.
9637 (grub_memdisk_image_size): Likewise.
9639 * include/grub/i386/pc/memory.h
9640 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9642 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9643 (grub_arch_memdisk_addr): New variable declaration.
9644 (grub_arch_memdisk_size): Likewise.
9646 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9647 (grub_arch_memdisk_size): Likewise.
9649 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9650 (codestart): Replace hardcoded `0x100000' with
9651 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9653 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9654 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9655 not NULL, append the contents of the file it refers to, at the end of
9656 the compressed kernel image. Initialize `grub_memdisk_image_size'
9657 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9658 (options): Add "memdisk"|'m' option.
9659 (main): Parse --memdisk|-m option, and pass user-provided path as
9660 parameter to generate_image().
9662 2008-01-20 Robert Millan <rmh@aybabtu.com>
9664 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9665 grub_dprintf() calls from here ...
9666 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9668 2008-01-20 Robert Millan <rmh@aybabtu.com>
9670 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9672 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9674 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9675 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9676 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9677 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9679 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9680 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9682 2008-01-19 Robert Millan <rmh@aybabtu.com>
9684 Get rid of confusing function (superseded by
9685 `grub_ieee1275_get_integer_property')
9686 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9688 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9690 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9691 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9692 in native endianness from grub_ieee1275_get_integer_property().
9694 2008-01-19 Robert Millan <rmh@aybabtu.com>
9696 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9697 command after "shut-down", since implementations differ on which
9698 the command for halt is.
9700 2008-01-19 Robert Millan <rmh@aybabtu.com>
9702 * include/grub/i386/linuxbios/console.h: Add header protection.
9703 (grub_keyboard_controller_init): New function prototype.
9704 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9705 (KEYBOARD_COMMAND_READ): Likewise.
9706 (KEYBOARD_COMMAND_WRITE): Likewise.
9707 (KEYBOARD_SCANCODE_SET1): Likewise.
9708 (grub_keyboard_controller_write): New function.
9709 (grub_keyboard_controller_read): Likewise.
9710 (grub_keyboard_controller_init): Likewise.
9712 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9713 (grub_console_init): On coreboot/LinuxBIOS, call
9714 grub_keyboard_controller_init().
9716 2008-01-19 Robert Millan <rmh@aybabtu.com>
9718 PowerPC changes provided by Pavel Roskin.
9720 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9721 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9722 don't rely on cmain() doing it.
9723 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9724 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9726 2008-01-16 Robert Millan <rmh@aybabtu.com>
9728 * include/grub/i386/linuxbios/memory.h
9729 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9730 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9731 receive `table_header' as argument. Instead, probe for it in the
9732 known memory ranges where it can be present.
9733 (grub_available_iterate): Do not pass a fixed `table_header' address
9734 to grub_linuxbios_table_iterate().
9736 2008-01-15 Robert Millan <rmh@aybabtu.com>
9738 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9739 * conf/i386-ieee1275.rmk: New file.
9740 * include/grub/i386/ieee1275/console.h: Likewise.
9741 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9742 * include/grub/i386/ieee1275/kernel.h: Likewise.
9743 * include/grub/i386/ieee1275/time.h: Likewise.
9744 * kern/i386/ieee1275/init.c: Likewise.
9745 * kern/i386/ieee1275/startup.S: Likewise.
9747 2008-01-15 Robert Millan <rmh@aybabtu.com>
9749 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9750 when pointers are 32-bit (but still do set it to one when they are
9753 2008-01-15 Robert Millan <rmh@aybabtu.com>
9755 * include/grub/ieee1275/ieee1275.h
9756 (grub_ieee1275_get_integer_property): New function prototype.
9758 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9759 (grub_ieee1275_get_integer_property): New function. Wraps around
9760 grub_ieee1275_get_property() to handle endianness.
9762 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9763 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9765 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9766 (grub_map): Likewise.
9767 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9769 2008-01-15 Bean <bean123ch@gmail.com>
9771 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9772 (grub_script_execute_cmdline): Reset grub_errno.
9774 * normal/main.c (read_config_file): Reset grub_errno.
9776 * normal/parse.y (script_init): New.
9777 (script): Move function and menuentry here.
9779 (command): Add delimiter at the end of command.
9780 (commands): Adjust to match the new command.
9781 (commandblock): Remove grub_script_lexer_record_start.
9782 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9783 (if): Use the new commands.
9785 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9787 2008-01-15 Robert Millan <rmh@aybabtu.com>
9789 * normal/menu.c (run_menu): Move timeout message from here ...
9790 (print_timeout): ... to here.
9791 (run_menu): Use print_timeout() once during initial draw to print
9792 the whole message, and again in every clock tick to update only
9793 the number of seconds.
9795 2008-01-15 Robert Millan <rmh@aybabtu.com>
9797 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9798 actual size of `available' from grub_ieee1275_get_property(), and
9799 restrict parsing to that bound.
9801 2008-01-15 Christian Franke <franke@computer.org>
9803 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9804 (argp_program_version): Remove variable.
9805 (argp_program_bug_address): Likewise.
9806 (options): Convert from struct argp_option to struct option.
9807 (struct arguments): Remove.
9808 (parse_opt): Remove.
9809 (usage): New function.
9810 (main): Replace struct args members by simple variables.
9811 Replace argp_parse() by getopt_long().
9812 Add switch to evaluate options.
9813 Add missing "(...)" around root_dev in prefix string.
9815 2008-01-14 Robert Millan <rmh@aybabtu.com>
9817 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9818 for grub_ieee1275_exit(), in order to improve portability.
9820 2008-01-14 Robert Millan <rmh@aybabtu.com>
9822 * util/grub.d/10_linux.in (prefix): Define.
9823 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9825 2008-01-13 Pavel Roskin <proski@gnu.org>
9827 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9828 grub_errno if no errors have been detected.
9830 2008-01-12 Robert Millan <rmh@aybabtu.com>
9832 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9833 (grub_util_get_dev_abstraction): New function prototype.
9835 * util/getroot.c: Include `<grub/util/getroot.h>'
9836 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9837 (grub_util_get_dev_abstraction): ... here (new function).
9839 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9840 `PRINT_ABSTRACTION'.
9841 (probe): Probe for abstraction type when requested.
9842 (main): Understand `--target=abstraction'.
9844 * util/i386/efi/grub-install.in: Add abstraction module to core
9845 image when it is found to be necessary.
9846 * util/i386/pc/grub-install.in: Likewise.
9847 * util/powerpc/ieee1275/grub-install.in: Likewise.
9849 * util/update-grub_lib.in (font_path): Return system path without
9850 converting to GRUB path.
9851 * util/update-grub.in: Convert system path returned by font_path()
9852 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9853 abstraction module is needed for loading fonts (if any). Export
9854 that as `GRUB_PRELOAD_MODULES'.
9855 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9858 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9860 Remove some unused code from reiserfs.
9862 * fs/reiserfs.c (struct grub_reiserfs_key)
9863 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9864 (struct grub_reiserfs_node_body): Removed.
9865 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9867 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9869 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9871 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9873 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9875 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9877 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9878 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9879 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9881 2008-01-10 Robert Millan <rmh@aybabtu.com>
9883 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9884 Determines if a file is garbage left by packaging systems, etc.
9885 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9886 for processing /etc/grub.d scripts.
9887 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9888 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9889 as a condition for processing Linux images.
9891 2008-01-10 Pavel Roskin <proski@gnu.org>
9893 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9894 to compile reiserfs.c on PowerPC.
9896 2008-01-10 Robert Millan <rmh@aybabtu.com>
9898 * kern/device.c (grub_device_iterate): Do not abort device iteration
9899 when one of the devices cannot be opened.
9900 * kern/disk.c (grub_disk_open): Do not account previous failures of
9901 unrelated functions when grub_errno is checked for.
9903 2008-01-08 Robert Millan <rmh@aybabtu.com>
9905 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9906 `! grub_linux_is_bzimage', change order of address comparison to make
9907 it more intuitive, and improve "too big zImage" error message.
9909 2008-01-08 Robert Millan <rmh@aybabtu.com>
9911 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9912 `$(update-grub_DATA)'.
9913 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9916 2008-01-07 Robert Millan <rmh@aybabtu.com>
9918 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9919 which instruction is modified by grub-setup during installation
9920 (since it wasn't obvious by only looking at this file).
9922 2008-01-07 Robert Millan <rmh@aybabtu.com>
9924 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9925 listing actual TODO items.
9927 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9929 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9931 (grub_reiserfs_get_key_offset): Likewise.
9932 (grub_reiserfs_set_key_offset): Likewise.
9933 (grub_reiserfs_set_key_type): Likewise.
9934 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9936 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9937 better to remove the bitfield version completely.
9939 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9941 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9942 allocated from the heap, due to the fshelp implementation.
9943 (grub_reiserfs_dir): Free NODE, due to the same reason.
9945 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9947 Mostly from Vincent Pelletier:
9949 * fs/reiserfs.c: New file.
9951 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9952 (reiserfs_mod_SOURCES): New variable.
9953 (reiserfs_mod_CFLAGS): Likewise.
9954 (reiserfs_mod_LDFLAGS): Likewise.
9956 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9957 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9958 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9961 2008-01-06 Robert Millan <rmh@aybabtu.com>
9963 * normal/color.c: Remove `<grub/env.h>'.
9965 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9967 * include/grub/normal.h: Include <grub/env.h>.
9969 2008-01-05 Robert Millan <rmh@aybabtu.com>
9971 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9972 usage example with `(hd0,1)'.
9973 Reported by Samuel Thibault.
9975 2008-01-05 Robert Millan <rmh@aybabtu.com>
9977 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9978 (grub_linux_boot_zimage): Rename to ...
9979 (grub_linux_boot): ... this.
9980 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9981 (grub_linux_boot_zimage): Conditionalize zImage copy.
9983 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9984 (grub_linux_boot_bzimage): Remove prototype.
9985 (grub_linux_boot_zimage): Rename to ...
9986 (grub_linux_boot): ... this.
9988 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9989 (grub_linux_boot): Remove function.
9991 2008-01-05 Robert Millan <rmh@aybabtu.com>
9993 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9994 (grub_env_write_color_highlight): Likewise.
9995 (grub_wait_after_message): Likewise.
9997 * normal/color.c: New file.
9999 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10000 (normal_mod_DEPENDENCIES): Likewise.
10002 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10003 (normal_mod_DEPENDENCIES): Likewise.
10005 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10006 (normal_mod_DEPENDENCIES): Likewise.
10008 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10009 (normal_mod_DEPENDENCIES): Likewise.
10011 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10012 for waiting after a message is printed.
10013 * normal/main.c (read_config_file): Likewise.
10014 (grub_normal_init): Register grub_env_write_color_normal() and
10015 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10016 `color_highlight' variables as global.
10018 * normal/menu.c (grub_wait_after_message): New function.
10019 (grub_color_menu_normal): New variable. Replaces ...
10020 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10021 (grub_color_menu_highlight): New variable. Replaces ...
10022 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10023 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10024 `GRUB_TERM_COLOR_STANDARD'.
10025 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10026 `normal_code' and `highlight_code' to `old_color_normal' and
10027 `old_color_highlight', respectively.
10028 (grub_menu_init_page): Update colors when drawing the menu, based on
10029 `menu_color_normal' and `menu_color_highlight' variables.
10030 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10031 a message is printed.
10033 2008-01-05 Robert Millan <rmh@aybabtu.com>
10035 * kern/env.c (grub_env_context_open): Propagate hooks for global
10036 variables to new context.
10038 * kern/main.c (grub_set_root_dev): Export `root' variable.
10040 2008-01-05 Robert Millan <rmh@aybabtu.com>
10042 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10043 discs unconditionally, since udev and others have options to provide
10046 2008-01-05 Robert Millan <rmh@aybabtu.com>
10048 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10050 2008-01-04 Christian Franke <franke@computer.org>
10052 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10055 2008-01-03 Pavel Roskin <proski@gnu.org>
10057 * kern/i386/linuxbios/init.c: Put "void" to all function
10058 declarations with no arguments.
10059 * kern/powerpc/ieee1275/init.c: Likewise.
10060 * term/i386/pc/at_keyboard.c: Likewise.
10061 * term/i386/pc/vga_text.c: Likewise.
10062 * util/grub-mkdevicemap.c: Likewise.
10064 2008-01-02 Robert Millan <rmh@aybabtu.com>
10066 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10067 message when loaded image is out of bounds.
10068 (grub_multiboot_load_elf64): Likewise.
10070 2008-01-02 Pavel Roskin <proski@gnu.org>
10072 * util/grub.d/10_linux.in: Try version without ".old" when
10073 looking for initrd. It's better to use initrd from the newer
10074 kernel of the same version than no initrd at all.
10076 2008-01-01 Robert Millan <rmh@aybabtu.com>
10078 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10080 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10082 * include/grub/video.h: Added grub_video_unmap_color and
10083 grub_video_get_active_render_target.
10084 (grub_video_adapter): Added unmap_color and get_active_render_target.
10086 * video/video.c: Added grub_video_unmap_color and
10087 grub_video_get_active_render_target.
10088 (grub_video_get_info): Changed method to accept NULL pointer as an
10089 argument to allow detection of active video adapter.
10091 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10092 grub_video_vbe_unmap_color_int.
10093 Added grub_video_vbe_unmap_color and
10094 grub_video_vbe_get_active_render_target.
10095 (grub_video_vbe_adapter): Added unmap_color and
10096 get_active_render_target.
10098 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10099 with grub_video_vbe_unmap_color_int.
10101 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10102 (DEFAULT_NORMAL_COLOR): Likewise.
10103 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10104 (DEFAULT_FG_COLOR): Removed.
10105 (DEFAULT_BG_COLOR): Likewise.
10106 (DEFAULT_CURSOR_COLOR): Changed value.
10107 (grub_virtual_screen): Added standard_color_setting,
10108 normal_color_setting, highlight_color_setting and term_color.
10109 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10110 (bitmap_width): Added.
10111 (bitmap_height): Likewise.
10112 (bitmap): Likewise.
10113 (set_term_color): Likewise.
10114 (grub_virtual_screen_setup): Changed to use new terminal coloring
10116 (grub_gfxterm_init): Added init for bitmap.
10117 (grub_gfxterm_fini): Added destroy for bitmap.
10118 (redraw_screen_rect): Updated to use background bitmap and new
10120 (scroll_up): Added optimization for case when there is no bitmap.
10121 (grub_gfxterm_cls): Fixed to use correct background color.
10122 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10124 (grub_virtual_screen_setcolor): Likewise.
10125 (grub_virtual_screen_getcolor): Added.
10126 (grub_gfxterm_background_image_cmd): Likewise.
10127 (grub_video_term): Added setcolor and getcolor.
10128 (MOD_INIT): Added registration of background_image command.
10129 (MOD_TERM): Added unregistration for background_image command.
10131 2007-12-30 Pavel Roskin <proski@gnu.org>
10133 * loader/multiboot_loader.c: Fix multiboot command
10134 unregistration. Fix all typos in the word "multiboot".
10136 2007-12-29 Pavel Roskin <proski@gnu.org>
10138 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10139 support for initrd names used in Fedora.
10141 2007-12-26 Bean <bean123ch@gmail.com>
10143 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10144 (cpio_mod_SOURCES): New variable.
10145 (cpio_mod_CFLAGS): Likewise.
10146 (cpio_mod_LDFLAGS): Likewise.
10148 * fs/cpio.c: New file.
10150 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10152 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10154 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10156 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10158 2007-12-25 Robert Millan <rmh@aybabtu.com>
10160 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10161 (grub_getcolor): New function.
10163 * kern/term.c (grub_getcolor): New function.
10164 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10165 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10166 (print_entry): Set normal and highlight colors to
10167 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10168 respectively, before printing and restore them to old
10170 (grub_menu_init_page): Likewise. Fill an additional colored space
10171 that would otherwise be left blank.
10173 * term/efi/console.c (grub_console_getcolor): New function.
10174 (struct grub_console_term.getcolor): New variable.
10175 * term/i386/pc/console.c (grub_console_getcolor): New function.
10176 (struct grub_console_term.getcolor): New variable.
10177 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10178 (struct grub_console_term.getcolor): New variable.
10180 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10181 (struct grub_console_term.setcolor): Remove variable.
10182 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10183 (struct grub_console_term.setcolor): Remove variable.
10184 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10185 (struct grub_console_term.setcolor): Remove variable.
10186 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10187 (struct grub_console_term.setcolor): Remove variable.
10189 2007-12-25 Robert Millan <rmh@aybabtu.com>
10191 * configure.ac: Search for possible unifont.hex locations, and
10192 define UNIFONT_HEX if found.
10194 * Makefile.in (UNIFONT_HEX): Define variable.
10195 (DATA): Rename to ...
10196 (PKGLIB): ... this. Update all users.
10197 (PKGDATA): New variable.
10198 (pkgdata_IMAGES): Rename to ...
10199 (pkglib_IMAGES): ... this. Update all users.
10200 (pkgdata_MODULES): Rename to ...
10201 (pkglib_MODULES): ... this. Update all users.
10202 (pkgdata_PROGRAMS): Rename to ...
10203 (pkglib_PROGRAMS): ... this. Update all users.
10204 (pkgdata_DATA): Rename to ...
10205 (pkglib_DATA): ... this. Update all users.
10206 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10207 (unicode.pff, ascii.pff): New rules.
10208 (all-local): Add `$(PKGDATA)' dependency.
10209 (install-local): Process `$(PKGDATA)'.
10211 * util/update-grub_lib.in (font_path): Search for *.pff files in
10212 a few more locations, including `${pkgdata}'.
10214 2007-12-23 Robert Millan <rmh@aybabtu.com>
10216 Patch from Bean <bean123ch@gmail.com>:
10217 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10220 2007-12-21 Bean <bean123ch@gmail.com>
10222 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10223 (ntfscomp_mod_SOURCES): New variable.
10224 (ntfscomp_mod_CFLAGS): Likewise.
10225 (ntfscomp_mod_LDFLAGS): Likewise.
10227 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10228 (grub_probe_SOURCES): Likewise.
10229 (grub_emu_SOURCES): Likewise.
10231 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10232 (grub_emu_SOURCES): Likewise.
10234 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10235 (grub_emu_SOURCES): Likewise.
10237 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10238 (grub_emu_SOURCES): Likewise.
10240 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10241 (read_run_list): Renamed to grub_ntfs_read_run_list.
10242 (decomp_nextvcn): Moved to ntfscomp.c.
10243 (decomp_getch): Likewise.
10244 (decomp_get16): Likewise.
10245 (decomp_block): Likewise.
10246 (read_block): Likewise.
10247 (read_data): Partially moved to ntfscomp.c.
10248 (fixup): Change unsigned to grub_uint16_t.
10249 (read_mft): Change unsigned long to grub_uint32_t.
10250 (read_attr): Likewise.
10251 (read_data): Likewise.
10252 (read_run_data): Likewise.
10253 (read_run_list): Likewise.
10254 (read_mft): Likewise.
10256 * fs/ntfscomp.c: New file.
10258 * include/grub/ntfs.h: New file.
10260 2007-12-16 Robert Millan <rmh@aybabtu.com>
10262 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10263 IDE disk check, since Linux is known to support 20 IDE disks.
10264 Reported by Colin Watson.
10266 2007-12-15 Bean <bean123ch@gmail.com>
10268 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10269 (lnxboot_img_SOURCES): New variable.
10270 (lnxboot_img_ASFLAGS): Likewise.
10271 (lnxboot_img_LDFLAGS): Likewise.
10273 * boot/i386/pc/lnxboot.S: New file.
10275 2007-11-24 Pavel Roskin <proski@gnu.org>
10277 * configure.ac: Test if '--build-id=none' is supported by the
10278 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10279 objcopy to generate incorrect binary files (binutils
10280 2.17.50.0.18-1 as shipped by Fedora 8).
10281 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10282 linking, so that build ID doesn't break the test.
10284 2007-11-24 Pavel Roskin <proski@gnu.org>
10286 * include/grub/i386/time.h: use "void" in the argument list
10287 of grub_cpu_idle().
10288 * include/grub/powerpc/time.h: Likewise.
10289 * include/grub/sparc64/time.h: Likewise.
10291 2007-11-18 Christian Franke <franke@computer.org>
10293 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10294 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10295 This fixes the problem that function keys did not work in grub-emu.
10297 2007-11-18 Christian Franke <franke@computer.org>
10299 * disk/host.c (grub_host_open): Remove attribute unused from
10300 name parameter. Add check for "host". This fixes the problem
10301 that grub-emu does not find partitions.
10303 2007-11-18 Christian Franke <franke@computer.org>
10305 * util/hostfs.c (is_dir): New function.
10306 (grub_hostfs_dir): Handle missing dirent.d_type case.
10307 (grub_hostfs_read): Add missing fseek().
10308 (grub_hostfs_label): Clear label pointer. This fixes a crash
10309 of grub-emu on "ls (host)".
10311 2007-11-18 Christian Franke <franke@computer.org>
10313 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10314 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10315 to 64 bit boundary by default.
10317 2007-11-18 Bean <bean123ch@gmail.com>
10319 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10320 (hexdump_mod_SOURCES): New variable.
10321 (hexdump_mod_CFLAGS): Likewise.
10322 (hexdump_mod_LDFLAGS): Likewise.
10324 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10326 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10328 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10330 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10332 * include/grub/hexdump.h: New file.
10334 * commands/hexdump.c: New file.
10336 2007-11-10 Robert Millan <rmh@aybabtu.com>
10338 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10339 in grub_outb() calls.
10340 (beep_on): Likewise.
10342 2007-11-10 Christian Franke <franke@computer.org>
10344 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10345 (grub_menu_run): Likewise.
10347 2007-11-10 Robert Millan <rmh@aybabtu.com>
10349 * include/grub/i386/efi/machine.h: New file.
10350 * include/grub/i386/linuxbios/machine.h: Likewise.
10351 * include/grub/i386/pc/machine.h: Likewise.
10352 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10353 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10355 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10356 (serial_hw_io_addr): New variable.
10357 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10358 instead of `(unsigned short *) 0x400'.
10360 2007-11-10 Bean <bean123ch@gmail.com>
10362 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10364 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10366 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10367 (vga_mod_SOURCES): Added.
10368 (vga_mod_CFLAGS): Likewise.
10369 (vga_mod_LDFLAGS): Likewise.
10371 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10373 (set_map_mask): Likewise.
10374 (set_read_map): Likewise.
10375 (set_read_address): Likewise.
10376 (vga_font): Removed variable.
10377 (get_vga_glyph): Removed function.
10378 (invalidate_char): Likewise.
10379 (write_char): Changed to use grub_font_get_glyph() for font
10381 (grub_vga_putchar): Likewise.
10382 (grub_vga_getcharwidth): Likewise.
10384 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10386 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10388 (pxeboot_img_LDFLAGS): Likewise.
10389 (diskboot_img_LDFLAGS): Likewise.
10390 (kernel_img_LDFLAGS): Likewise.
10392 2007-11-06 Robert Millan <rmh@aybabtu.com>
10394 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10395 in grub_outb() calls.
10396 (serial_hw_init): Likewise.
10398 2007-11-05 Robert Millan <rmh@aybabtu.com>
10400 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10401 spaces. Skip non-regular files.
10403 2007-11-05 Robert Millan <rmh@aybabtu.com>
10405 * kern/disk.c (grub_disk_firmware_fini)
10406 (grub_disk_firmware_is_tainted): New variables.
10408 * include/grub/disk.h (grub_disk_firmware_fini)
10409 (grub_disk_firmware_is_tainted): Likewise.
10411 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10412 (grub_disk_biosdisk_fini): ... to here.
10413 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10414 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10415 is set. Register grub_disk_biosdisk_fini() in
10416 `grub_disk_firmware_fini'.
10418 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10419 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10420 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10421 to finish existing firmware disk interface.
10423 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10424 (ata_mod_SOURCES): New variable.
10425 (ata_mod_CFLAGS): Likewise.
10426 (ata_mod_LDFLAGS): Likewise.
10428 2007-11-05 Robert Millan <rmh@aybabtu.com>
10430 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10431 (grub_ata_wait): Reimplement using grub_millisleep().
10433 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10434 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10436 2007-11-03 Marco Gerards <marco@gnu.org>
10438 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10439 (CRTC_ADDR_PORT): New macro.
10440 (CRTC_DATA_PORT): Likewise.
10441 (CRTC_CURSOR): Likewise.
10442 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10443 (CRTC_CURSOR_ADDR_LOW): Likewise.
10444 (update_cursor): New function.
10445 (grub_console_real_putchar): Call `update_cursor'.
10446 (grub_console_gotoxy): Likewise.
10447 (grub_console_cls): Set the default color when clearing the
10449 (grub_console_setcursor): Implemented.
10451 2007-11-03 Marco Gerards <marco@gnu.org>
10453 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10455 (grub_ata_pio_write): Likewise.
10457 (grub_atapi_identify): Wait after issuing an ATA command.
10458 (grub_atapi_packet): Likewise.
10459 (grub_ata_identify): Likewise.
10460 (grub_ata_readwrite): Likewise.
10462 2007-11-03 Marco Gerards <marco@gnu.org>
10464 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10465 (grub_ata_pio_write): Likewise.
10466 (grub_ata_readwrite): Use `grub_error', instead of
10467 returning `grub_errno'.
10469 2007-11-03 Marco Gerards <marco@gnu.org>
10471 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10472 grub_ata_pio_write once for every single sector, instead of for
10475 2007-10-31 Robert Millan <rmh@aybabtu.com>
10477 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10479 * conf/i386-linuxbios.rmk: New file.
10481 * kern/i386/pc/hardware.c: Likewise.
10482 * term/i386/pc/at_keyboard.c: Likewise.
10483 * term/i386/pc/vga_text.c: Likewise.
10485 * include/grub/i386/linuxbios/boot.h: Likewise.
10486 * include/grub/i386/linuxbios/console.h: Likewise.
10487 * include/grub/i386/linuxbios/init.h: Likewise.
10488 * include/grub/i386/linuxbios/kernel.h: Likewise.
10489 * include/grub/i386/linuxbios/loader.h: Likewise.
10490 * include/grub/i386/linuxbios/memory.h: Likewise.
10491 * include/grub/i386/linuxbios/serial.h: Likewise.
10492 * include/grub/i386/linuxbios/time.h: Likewise.
10494 * kern/i386/linuxbios/init.c: Likewise.
10495 * kern/i386/linuxbios/startup.S: Likewise.
10496 * kern/i386/linuxbios/table.c: Likewise.
10498 2007-10-31 Marco Gerards <marco@gnu.org>
10500 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10501 (ata_mod_SOURCES): New variable.
10502 (ata_mod_CFLAGS): Likewise.
10503 (ata_mod_LDFLAGS): Likewise.
10505 * disk/ata.c: New file.
10507 * include/grub/disk.h (grub_disk_dev_id): Add
10508 `GRUB_DISK_DEV_ATA_ID'.
10510 2007-10-31 Robert Millan <rmh@aybabtu.com>
10512 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10513 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10515 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10516 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10518 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10521 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10523 2007-10-27 Robert Millan <rmh@aybabtu.com>
10525 * include/grub/types.h (ULONG_MAX): Define macro.
10527 2007-10-22 Robert Millan <rmh@aybabtu.com>
10529 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10531 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10533 2007-10-22 Robert Millan <rmh@aybabtu.com>
10535 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10536 (pkgdata_MODULES): Add `biosdisk.mod'.
10537 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10540 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10541 (grub_biosdisk_init): Replace with ...
10542 (GRUB_MOD_INIT(biosdisk)): ... this.
10543 (grub_biosdisk_fini): Replace with ...
10544 (GRUB_MOD_FINI(biosdisk)): ... this.
10546 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10547 (grub_machine_init): Remove call to grub_biosdisk_init().
10548 (grub_machine_fini): Remove call to grub_machine_fini().
10550 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10552 2007-10-22 Robert Millan <rmh@aybabtu.com>
10554 * include/grub/time.h: New file.
10555 * include/grub/i386/time.h: Likewise.
10556 * include/grub/powerpc/time.h: Likewise.
10557 * include/grub/sparc64/time.h: Likewise.
10559 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10561 (KERNEL_MACHINE_TIME_HEADER): ... this.
10562 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10564 (KERNEL_MACHINE_TIME_HEADER): ... this.
10565 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10567 (KERNEL_MACHINE_TIME_HEADER): ... this.
10569 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10570 (grub_millisleep): New function.
10571 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10572 (grub_millisleep): New function.
10573 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10574 Remove `grub/machine/time.h' include.
10575 (grub_millisleep): New function.
10576 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10577 Remove `grub/machine/time.h' include.
10578 (grub_millisleep): New function.
10580 * include/grub/misc.h (grub_div_roundup): New function.
10582 * kern/misc.c: Include `<grub/time.h>'.
10583 (grub_millisleep_generic): New function.
10585 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10587 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10589 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10590 `machine/time.h'. Add `time.h'.
10591 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10593 2007-10-21 Robert Millan <rmh@aybabtu.com>
10595 * include/grub/misc.h (grub_max): New function.
10597 2007-10-21 Robert Millan <rmh@aybabtu.com>
10599 * util/misc.c (grub_util_info): Call fflush() before returning.
10601 2007-10-20 Robert Millan <rmh@aybabtu.com>
10603 * genmk.rb (Image): Copy `extra_flags' from here ...
10604 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10606 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10607 to `argc' and `args' arguments.
10609 2007-10-17 Robert Millan <rmh@aybabtu.com>
10611 * kern/i386/loader.S: New file.
10613 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10614 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10615 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10616 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10617 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10618 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10619 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10620 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10621 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10622 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10623 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10624 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10625 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10626 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10628 * kern/i386/realmode.S: New file.
10630 * kern/i386/pc/startup.S (protstack): Moved from here ...
10631 * kern/i386/realmode.S (protstack)... to here.
10632 * kern/i386/pc/startup.S (gdt): Moved from here ...
10633 * kern/i386/realmode.S (gdt)... to here.
10634 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10635 * kern/i386/realmode.S (prot_to_real)... to here.
10637 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10638 `kern/i386/realmode.S'.
10640 2007-10-17 Robert Millan <rmh@aybabtu.com>
10642 * include/grub/i386/loader.h: New file.
10644 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10645 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10646 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10647 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10648 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10649 * include/grub/i386/loader.h (grub_linux_prot_size)
10650 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10651 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10652 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10653 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10655 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10657 2007-10-15 Robert Millan <rmh@aybabtu.com>
10659 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10660 filesystem when dev->disk is unset.
10661 Do probe for filesystem even when dev->disk->has_partitions is set.
10662 In case a filesystem is found, always report it.
10663 In case it isn't, if dev->disk->has_partitions is set, report that
10664 a partition table was found instead of reporting that no filesystem
10665 could be identified.
10667 2007-10-12 Robert Millan <rmh@aybabtu.com>
10669 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10670 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10672 * include/grub/types.h (grub_host_to_target16): New macro.
10673 (grub_host_to_target32): Likewise.
10674 (grub_host_to_target64): Likewise.
10675 (grub_target_to_host16): Likewise.
10676 (grub_target_to_host32): Likewise.
10677 (grub_target_to_host64): Likewise.
10679 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10680 Renamed from to ...
10681 (GRUB_MOD_ALIGN): ...this. Update all users.
10683 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10684 grub_host_to_target32.
10685 Replace grub_be_to_cpu32 with grub_target_to_host32.
10686 (load_modules): Likewise.
10687 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10688 Replace grub_be_to_cpu32 with grub_target_to_host32.
10689 Replace grub_cpu_to_be16 with grub_host_to_target16.
10690 Replace grub_cpu_to_be32 grub_host_to_target32.
10692 2007-10-12 Robert Millan <rmh@aybabtu.com>
10694 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10695 * util/elf/grub-mkimage.c: ... here.
10697 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10698 `util/powerpc/ieee1275/grub-mkimage.c'.
10700 2007-10-07 Robert Millan <rmh@aybabtu.com>
10702 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10703 and make it easier to figure out.
10704 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10705 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10706 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10707 leave us with less than HEAP_MIN_SIZE total heap.
10708 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10710 2007-10-03 Robert Millan <rmh@aybabtu.com>
10712 * include/grub/i386/io.h: New file.
10713 * commands/i386/pc/play.c (inb): Removed.
10715 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10717 * term/i386/pc/serial.c (inb): Removed.
10719 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10721 * term/i386/pc/vga.c (inb): Removed.
10723 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10726 2007-10-02 Robert Millan <rmh@aybabtu.com>
10728 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10729 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10730 Reported by Marcin Kurek.
10732 2007-09-07 Robert Millan <rmh@aybabtu.com>
10734 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10735 SmartFirmware version updates (as released by Sven Luther), and avoid
10736 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10737 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10740 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10742 From Hitoshi Ozeki:
10743 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10744 when merging two regions.
10746 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10748 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10749 * normal/completion.c (grub_normal_do_completion): Likewise.
10750 Reported by Hitoshi Ozeki.
10752 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10754 Do not use devices at boot in chainloading.
10756 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10757 (boot_part_addr): Likewise.
10758 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10759 with BOOT_DRIVE and BOOT_PART_ADDR.
10760 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10761 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10763 2007-08-29 Robert Millan <rmh@aybabtu.com>
10765 Patch from Simon Peter <dn.tlp@gmx.net>:
10766 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10767 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10768 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10769 util/i386/pc/grub-setup.c_DEPENDENCIES.
10770 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10771 util/grub-probe.c_DEPENDENCIES.
10772 * conf/powerpc-ieee1275.rmk: Likewise.
10774 2007-08-28 Robert Millan <rmh@aybabtu.com>
10776 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10777 to tell grub-mkdevicemap how to name devices.
10778 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10781 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10782 util/i386/get_disk_name.c.
10783 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10784 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10785 util/ieee1275/get_disk_name.c.
10787 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10789 * DISTLIST: Add util/i386/get_disk_name.c and
10790 util/ieee1275/get_disk_name.c.
10792 * util/grub-mkdevicemap.c: Replace device naming logic with
10793 grub_util_get_disk_name() calls.
10795 2007-08-20 Robert Millan <rmh@aybabtu.com>
10797 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10798 (so that it works for both plural and singular quantities).
10800 2007-08-05 Robert Millan <rmh@aybabtu.com>
10802 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10803 so that [xz] isn't taken into account when determining order.
10805 2007-08-02 Marco Gerards <marco@gnu.org>
10807 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10808 `include/multiboot2.h', `include/grub/elfload.h',
10809 `include/multiboot.h', `include/grub/multiboot.h',
10810 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10811 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10812 `kern/elf.c', `loader/multiboot_loader.c',
10813 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10814 `loader/i386/pc/multiboot2.c',
10815 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10816 `util/i386/pc/grub-mkrescue.in'. Remove
10817 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10818 `include/grub/i386/pc/util/biosdisk.h' and
10819 `include/grub/powerpc/ieee1275/multiboot.h'.
10821 2007-08-02 Bean <bean123ch@gmail.com>
10823 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10824 (ntfs_mod_SOURCES): New variable.
10825 (ntfs_mod_CFLAGS): Likewise.
10826 (ntfs_mod_LDFLAGS): Likewise.
10828 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10829 (grub_probe_SOURCES): Likewise.
10830 (grub_emu_SOURCES): Likewise.
10832 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10833 (grub_emu_SOURCES): Likewise.
10835 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10836 (grub_emu_SOURCES): Likewise.
10838 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10840 * fs/ntfs.c: New file.
10842 2007-08-02 Bean <bean123ch@gmail.com>
10844 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10846 * file.h (grub_file): Likewise.
10848 * fshelp.h (grub_fshelp_read_file): Likewise.
10850 * util/i386/pc/grub-setup.c (setup): Likewise.
10851 (save_first_sector): Likewise.
10852 (save_blocklists): Likewise.
10854 * fs/affs.c (grub_affs_read_file): Likewise.
10856 * fs/ext2.c (grub_ext2_read_file): Likewise.
10858 * fs/fat.c (grub_fat_read_data): Likewise.
10860 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10862 * fs/hfs.c (grub_hfs_read_file): Likewise.
10864 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10866 * fs/jfs.c (grub_jfs_read_file): Likewise.
10868 * fs/minix.c (grub_minix_read_file): Likewise.
10870 * fs/sfs.c (grub_sfs_read_file): Likewise.
10872 * fs/ufs.c (grub_ufs_read_file): Likewise.
10874 * fs/xfs.c (grub_xfs_read_file): Likewise.
10876 * command/blocklist.c (read_blocklist): Likewise.
10877 (print_blocklist): Likewise.
10879 2007-08-02 Marco Gerards <marco@gnu.org>
10881 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10884 * disk/host.c: New file.
10886 * util/hostfs.c: Likewise.
10888 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10889 return `GRUB_ERR_BAD_FS'.
10890 * fs/sfs.c (grub_sfs_mount): Likewise.
10891 * fs/xfs.c (grub_xfs_mount): Likewise.
10893 * include/grub/disk.h (enum grub_disk_dev_id): Add
10894 `GRUB_DISK_DEVICE_HOST_ID'.
10896 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10898 2007-07-24 Jerone Young <jerone@gmail.com>
10900 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10901 modules for compilation.
10902 * conf/powerpc-ieee1275.rmk: Likewise.
10904 * include/multiboot.h: Move multiboot definitions to one file. Rename
10905 many definitions to not get grub specific.
10906 * include/multiboot2.h: Create header with multiboot 2 definitions.
10907 * include/grub/multiboot.h: Header for grub specific function
10908 prototypes and definitions.
10909 * include/grub/multiboot2.h: Likewise.
10910 * include/grub/multiboot_loader.h: Likewise.
10911 * include/grub/i386/pc/multiboot.h: Removed.
10912 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10914 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10915 and 2 to allow for one multiboot and module commands.
10916 * loader/multiboot2.c: Add multiboot2 functionality.
10917 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10918 and definition names.
10919 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10921 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10922 ieee1275 specific multiboot2 code.
10924 * kern/i386/pc/startup.S: Change headers and definition names for
10925 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10927 2007-07-22 Robert Millan <rmh@aybabtu.com>
10929 * geninitheader.sh: Process file specified in first parameter rather
10930 than hardcoding grub_modules_init.lst.
10931 * geninit.sh: Likewise. Also, construct header name dynamically rather
10932 than hardcoding grub_modules_init.h.
10934 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10935 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10936 grub_probe_init.[ch] and grub_setup_init.[ch].
10938 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10939 grub_modules_init.h with grub_emu_init.h.
10940 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10941 grub_probe_init.[ch] files.
10942 * conf/i386-efi.rmk: Likewise.
10943 * conf/i386-pc.rmk: Likewise.
10944 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10945 grub_setup_init.[ch] files.
10947 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10948 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10949 to initialize modules rather than a list of hardcoded functions.
10950 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10951 grub_init_all() to initialize modules rather than a list of hardcoded
10954 2007-07-22 Robert Millan <rmh@aybabtu.com>
10956 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10957 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10959 2007-07-22 Robert Millan <rmh@aybabtu.com>
10961 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10962 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10963 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10964 flag when running on SmartFirmware.
10965 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10966 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10969 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10970 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10971 rather than decreasing it.
10973 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10974 there's not enough space to do it, fail in the same way as when it
10975 can't be done because there are no partitions.
10977 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10978 when nvsetenv failed.
10980 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10982 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10983 because this rule is automatically generated.
10984 (grub-mkrescue): Removed for the same reason as above.
10986 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10988 Migrate to GNU General Public License Version 3.
10990 * COPYING: Replaced with the plain text version of GPLv3.
10992 * config.guess: Updated from gnulib.
10993 * config.sub: Likewise.
10995 * geninit.sh: Output a GPLv3 copyright notice.
10996 * geninitheader.sh: Likewise.
10997 * genmodsrc.sh: Likewise.
10998 * gensymlist.sh.in: Likewise.
11000 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11001 * boot/i386/pc/diskboot.S: Likewise.
11002 * boot/i386/pc/pxeboot.S: Likewise.
11003 * commands/blocklist.c: Likewise.
11004 * commands/boot.c: Likewise.
11005 * commands/cat.c: Likewise.
11006 * commands/cmp.c: Likewise.
11007 * commands/configfile.c: Likewise.
11008 * commands/echo.c: Likewise.
11009 * commands/help.c: Likewise.
11010 * commands/ls.c: Likewise.
11011 * commands/search.c: Likewise.
11012 * commands/terminal.c: Likewise.
11013 * commands/test.c: Likewise.
11014 * commands/videotest.c: Likewise.
11015 * commands/i386/cpuid.c: Likewise.
11016 * commands/i386/pc/halt.c: Likewise.
11017 * commands/i386/pc/play.c: Likewise.
11018 * commands/i386/pc/reboot.c: Likewise.
11019 * commands/i386/pc/vbeinfo.c: Likewise.
11020 * commands/i386/pc/vbetest.c: Likewise.
11021 * commands/ieee1275/halt.c: Likewise.
11022 * commands/ieee1275/reboot.c: Likewise.
11023 * commands/ieee1275/suspend.c: Likewise.
11024 * disk/loopback.c: Likewise.
11025 * disk/lvm.c: Likewise.
11026 * disk/raid.c: Likewise.
11027 * disk/efi/efidisk.c: Likewise.
11028 * disk/i386/pc/biosdisk.c: Likewise.
11029 * disk/ieee1275/ofdisk.c: Likewise.
11030 * font/manager.c: Likewise.
11031 * fs/affs.c: Likewise.
11032 * fs/ext2.c: Likewise.
11033 * fs/fat.c: Likewise.
11034 * fs/fshelp.c: Likewise.
11035 * fs/hfs.c: Likewise.
11036 * fs/hfsplus.c: Likewise.
11037 * fs/iso9660.c: Likewise.
11038 * fs/jfs.c: Likewise.
11039 * fs/minix.c: Likewise.
11040 * fs/sfs.c: Likewise.
11041 * fs/ufs.c: Likewise.
11042 * fs/xfs.c: Likewise.
11043 * hello/hello.c: Likewise.
11044 * include/grub/acorn_filecore.h: Likewise.
11045 * include/grub/arg.h: Likewise.
11046 * include/grub/bitmap.h: Likewise.
11047 * include/grub/boot.h: Likewise.
11048 * include/grub/cache.h: Likewise.
11049 * include/grub/device.h: Likewise.
11050 * include/grub/disk.h: Likewise.
11051 * include/grub/dl.h: Likewise.
11052 * include/grub/elfload.h: Likewise.
11053 * include/grub/env.h: Likewise.
11054 * include/grub/err.h: Likewise.
11055 * include/grub/file.h: Likewise.
11056 * include/grub/font.h: Likewise.
11057 * include/grub/fs.h: Likewise.
11058 * include/grub/fshelp.h: Likewise.
11059 * include/grub/gzio.h: Likewise.
11060 * include/grub/hfs.h: Likewise.
11061 * include/grub/kernel.h: Likewise.
11062 * include/grub/loader.h: Likewise.
11063 * include/grub/lvm.h: Likewise.
11064 * include/grub/misc.h: Likewise.
11065 * include/grub/mm.h: Likewise.
11066 * include/grub/net.h: Likewise.
11067 * include/grub/normal.h: Likewise.
11068 * include/grub/parser.h: Likewise.
11069 * include/grub/partition.h: Likewise.
11070 * include/grub/pc_partition.h: Likewise.
11071 * include/grub/raid.h: Likewise.
11072 * include/grub/rescue.h: Likewise.
11073 * include/grub/script.h: Likewise.
11074 * include/grub/setjmp.h: Likewise.
11075 * include/grub/symbol.h: Likewise.
11076 * include/grub/term.h: Likewise.
11077 * include/grub/terminfo.h: Likewise.
11078 * include/grub/tparm.h: Likewise.
11079 * include/grub/types.h: Likewise.
11080 * include/grub/video.h: Likewise.
11081 * include/grub/efi/api.h: Likewise.
11082 * include/grub/efi/chainloader.h: Likewise.
11083 * include/grub/efi/console.h: Likewise.
11084 * include/grub/efi/console_control.h: Likewise.
11085 * include/grub/efi/disk.h: Likewise.
11086 * include/grub/efi/efi.h: Likewise.
11087 * include/grub/efi/pe32.h: Likewise.
11088 * include/grub/efi/time.h: Likewise.
11089 * include/grub/i386/linux.h: Likewise.
11090 * include/grub/i386/setjmp.h: Likewise.
11091 * include/grub/i386/types.h: Likewise.
11092 * include/grub/i386/efi/kernel.h: Likewise.
11093 * include/grub/i386/efi/loader.h: Likewise.
11094 * include/grub/i386/efi/time.h: Likewise.
11095 * include/grub/i386/pc/biosdisk.h: Likewise.
11096 * include/grub/i386/pc/boot.h: Likewise.
11097 * include/grub/i386/pc/chainloader.h: Likewise.
11098 * include/grub/i386/pc/console.h: Likewise.
11099 * include/grub/i386/pc/init.h: Likewise.
11100 * include/grub/i386/pc/kernel.h: Likewise.
11101 * include/grub/i386/pc/loader.h: Likewise.
11102 * include/grub/i386/pc/memory.h: Likewise.
11103 * include/grub/i386/pc/multiboot.h: Likewise.
11104 * include/grub/i386/pc/serial.h: Likewise.
11105 * include/grub/i386/pc/time.h: Likewise.
11106 * include/grub/i386/pc/vbe.h: Likewise.
11107 * include/grub/i386/pc/vbeblit.h: Likewise.
11108 * include/grub/i386/pc/vbefill.h: Likewise.
11109 * include/grub/i386/pc/vbeutil.h: Likewise.
11110 * include/grub/i386/pc/vga.h: Likewise.
11111 * include/grub/ieee1275/ieee1275.h: Likewise.
11112 * include/grub/ieee1275/ofdisk.h: Likewise.
11113 * include/grub/powerpc/libgcc.h: Likewise.
11114 * include/grub/powerpc/setjmp.h: Likewise.
11115 * include/grub/powerpc/types.h: Likewise.
11116 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11117 * include/grub/powerpc/ieee1275/console.h: Likewise.
11118 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11119 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11120 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11121 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11122 * include/grub/powerpc/ieee1275/time.h: Likewise.
11123 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11124 * include/grub/sparc64/libgcc.h: Likewise.
11125 * include/grub/sparc64/setjmp.h: Likewise.
11126 * include/grub/sparc64/types.h: Likewise.
11127 * include/grub/sparc64/ieee1275/console.h: Likewise.
11128 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11129 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11130 * include/grub/sparc64/ieee1275/time.h: Likewise.
11131 * include/grub/util/biosdisk.h: Likewise.
11132 * include/grub/util/getroot.h: Likewise.
11133 * include/grub/util/lvm.h: Likewise.
11134 * include/grub/util/misc.h: Likewise.
11135 * include/grub/util/raid.h: Likewise.
11136 * include/grub/util/resolve.h: Likewise.
11137 * io/gzio.c: Likewise.
11138 * kern/device.c: Likewise.
11139 * kern/disk.c: Likewise.
11140 * kern/dl.c: Likewise.
11141 * kern/elf.c: Likewise.
11142 * kern/env.c: Likewise.
11143 * kern/err.c: Likewise.
11144 * kern/file.c: Likewise.
11145 * kern/fs.c: Likewise.
11146 * kern/loader.c: Likewise.
11147 * kern/main.c: Likewise.
11148 * kern/misc.c: Likewise.
11149 * kern/mm.c: Likewise.
11150 * kern/parser.c: Likewise.
11151 * kern/partition.c: Likewise.
11152 * kern/rescue.c: Likewise.
11153 * kern/term.c: Likewise.
11154 * kern/efi/efi.c: Likewise.
11155 * kern/efi/init.c: Likewise.
11156 * kern/efi/mm.c: Likewise.
11157 * kern/i386/dl.c: Likewise.
11158 * kern/i386/efi/init.c: Likewise.
11159 * kern/i386/efi/startup.S: Likewise.
11160 * kern/i386/pc/init.c: Likewise.
11161 * kern/i386/pc/lzo1x.S: Likewise.
11162 * kern/i386/pc/startup.S: Likewise.
11163 * kern/ieee1275/ieee1275.c: Likewise.
11164 * kern/powerpc/cache.S: Likewise.
11165 * kern/powerpc/dl.c: Likewise.
11166 * kern/powerpc/ieee1275/cmain.c: Likewise.
11167 * kern/powerpc/ieee1275/crt0.S: Likewise.
11168 * kern/powerpc/ieee1275/init.c: Likewise.
11169 * kern/powerpc/ieee1275/openfw.c: Likewise.
11170 * kern/sparc64/cache.S: Likewise.
11171 * kern/sparc64/dl.c: Likewise.
11172 * kern/sparc64/ieee1275/init.c: Likewise.
11173 * kern/sparc64/ieee1275/openfw.c: Likewise.
11174 * loader/efi/chainloader.c: Likewise.
11175 * loader/efi/chainloader_normal.c: Likewise.
11176 * loader/i386/efi/linux.c: Likewise.
11177 * loader/i386/efi/linux_normal.c: Likewise.
11178 * loader/i386/pc/chainloader.c: Likewise.
11179 * loader/i386/pc/chainloader_normal.c: Likewise.
11180 * loader/i386/pc/linux.c: Likewise.
11181 * loader/i386/pc/linux_normal.c: Likewise.
11182 * loader/i386/pc/multiboot.c: Likewise.
11183 * loader/i386/pc/multiboot_normal.c: Likewise.
11184 * loader/powerpc/ieee1275/linux.c: Likewise.
11185 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11186 * normal/arg.c: Likewise.
11187 * normal/cmdline.c: Likewise.
11188 * normal/command.c: Likewise.
11189 * normal/completion.c: Likewise.
11190 * normal/execute.c: Likewise.
11191 * normal/function.c: Likewise.
11192 * normal/lexer.c: Likewise.
11193 * normal/main.c: Likewise.
11194 * normal/menu.c: Likewise.
11195 * normal/menu_entry.c: Likewise.
11196 * normal/misc.c: Likewise.
11197 * normal/parser.y: Likewise.
11198 * normal/script.c: Likewise.
11199 * normal/i386/setjmp.S: Likewise.
11200 * normal/powerpc/setjmp.S: Likewise.
11201 * normal/sparc64/setjmp.S: Likewise.
11202 * partmap/acorn.c: Likewise.
11203 * partmap/amiga.c: Likewise.
11204 * partmap/apple.c: Likewise.
11205 * partmap/gpt.c: Likewise.
11206 * partmap/pc.c: Likewise.
11207 * partmap/sun.c: Likewise.
11208 * term/gfxterm.c: Likewise.
11209 * term/terminfo.c: Likewise.
11210 * term/efi/console.c: Likewise.
11211 * term/i386/pc/console.c: Likewise.
11212 * term/i386/pc/serial.c: Likewise.
11213 * term/i386/pc/vesafb.c: Likewise.
11214 * term/i386/pc/vga.c: Likewise.
11215 * term/ieee1275/ofconsole.c: Likewise.
11216 * util/biosdisk.c: Likewise.
11217 * util/console.c: Likewise.
11218 * util/genmoddep.c: Likewise.
11219 * util/getroot.c: Likewise.
11220 * util/grub-emu.c: Likewise.
11221 * util/grub-mkdevicemap.c: Likewise.
11222 * util/grub-probe.c: Likewise.
11223 * util/lvm.c: Likewise.
11224 * util/misc.c: Likewise.
11225 * util/raid.c: Likewise.
11226 * util/resolve.c: Likewise.
11227 * util/update-grub.in: Likewise.
11228 * util/update-grub_lib.in: Likewise.
11229 * util/grub.d/00_header.in: Likewise.
11230 * util/grub.d/10_hurd.in: Likewise.
11231 * util/grub.d/10_linux.in: Likewise.
11232 * util/i386/efi/grub-install.in: Likewise.
11233 * util/i386/efi/grub-mkimage.c: Likewise.
11234 * util/i386/pc/grub-install.in: Likewise.
11235 * util/i386/pc/grub-mkimage.c: Likewise.
11236 * util/i386/pc/grub-mkrescue.in: Likewise.
11237 * util/i386/pc/grub-setup.c: Likewise.
11238 * util/i386/pc/misc.c: Likewise.
11239 * util/powerpc/ieee1275/grub-install.in: Likewise.
11240 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11241 * util/powerpc/ieee1275/misc.c: Likewise.
11242 * video/bitmap.c: Likewise.
11243 * video/video.c: Likewise.
11244 * video/i386/pc/vbe.c: Likewise.
11245 * video/i386/pc/vbeblit.c: Likewise.
11246 * video/i386/pc/vbefill.c: Likewise.
11247 * video/i386/pc/vbeutil.c: Likewise.
11248 * video/readers/tga.c: Likewise.
11250 2007-07-02 Robert Millan <rmh@aybabtu.com>
11252 * conf/i386-efi.rmk: Replace obsolete reference to
11253 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11254 with util/getroot.c.
11255 * conf/powerpc-ieee1275.rmk: Likewise.
11256 * conf/sparc64-ieee1275.rmk: Likewise.
11258 * util/grub-emu.c (main): Fix unchecked pointer handling.
11260 2007-07-02 Robert Millan <rmh@aybabtu.com>
11262 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11263 invocation to fail, in order to support partition-less media.
11265 * util/i386/pc/grub-install.in: Likewise.
11267 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11268 which fs or partmap modules are needed (akin to its sister scripts).
11270 Also use grub-probe to get rid of unportable /proc/mounts check.
11272 Print the same informational message that the other scripts do, before
11275 2007-06-23 Robert Millan <rmh@aybabtu.com>
11277 * util/update-grub_lib.in (font_path): New function. Determine whether
11278 a font file can be found and, if so, echo the GRUB path to it.
11280 * util/update-grub.in: Handle multiple terminals depending on user
11281 input, platform availability and font file presence. Propagate
11282 variables of our findings to /etc/grub.d/ children.
11284 * util/grub.d/00_header.in: Handle multiple terminals, based on
11285 environment setup by update-grub.
11287 2007-06-23 Robert Millan <rmh@aybabtu.com>
11289 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11291 2007-06-21 Robert Millan <rmh@aybabtu.com>
11293 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11294 indicate end of data section in kernel image.
11295 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11296 GRUB_KERNEL_MACHINE_DATA_END.
11298 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11300 * kern/i386/efi/startup.S: Likewise.
11302 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11303 during image generation. Implement --prefix option to override this
11305 * util/i386/efi/grub-mkimage.c: Likewise.
11307 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11308 code to make path relative to its root into a separate function.
11310 * util/i386/pc/grub-install.in: Use newly provided
11311 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11312 pass the result to grub-install --prefix.
11314 2007-06-13 Robert Millan <rmh@aybabtu.com>
11316 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11317 DEFAULT_DEVICE_MAP.
11318 * util/grub-emu.c: Use above definitions from misc.h instead of
11320 * util/grub-mkdevicemap.c: Likewise.
11321 * util/i386/pc/grub-setup.c: Likewise.
11322 * util/grub-probe.c: Likewise.
11323 (probe): Abort with grub_util_error() when either
11324 grub_guess_root_device or grub_util_get_grub_dev fails.
11326 2007-06-12 Robert Millan <rmh@aybabtu.com>
11328 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11329 "pager" assignment.
11330 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11332 * util/grub-probe.c (probe): Likewise for "drive_name".
11334 2007-06-11 Robert Millan <rmh@aybabtu.com>
11336 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11337 not just the cdrom one.
11339 2007-06-11 Robert Millan <rmh@aybabtu.com>
11341 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11342 Add --pkglibdir=DIR option to override pkglibdir.
11343 Mention --image-type=TYPE in help output.
11344 Fix --grub-mkimage (it was a no-op).
11345 Abort gracefully when no parameter is given.
11347 2007-06-11 Robert Millan <rmh@aybabtu.com>
11349 * util/i386/pc/grub-mkrescue.in: New file.
11350 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11351 * Makefile.in: Handle bin_SCRIPTS.
11353 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11355 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11356 list of video modes.
11358 2007-06-06 Robert Millan <rmh@aybabtu.com>
11360 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11361 file doesn't exist, or if it is in a filesystem grub can't read.
11363 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11364 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11365 header comment to fit in 80 columns when the variables are resolved.
11367 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11368 could be identified by update-grub. Remove redundant check for
11369 unifont.pff existence (since convert_system_path_to_grub_path now
11372 2007-06-04 Robert Millan <rmh@aybabtu.com>
11374 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11376 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11378 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11380 2007-06-04 Robert Millan <rmh@aybabtu.com>
11382 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11384 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11385 grub_apple_partition_map_fini.
11388 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11389 to access >2 TiB disks).
11391 Print disk->total_sectors with %llu instead of %lu, since this
11392 variable is always 64-bit (prevents wrong disk size from being displayed
11393 on either >2 TiB disk or big-endian CPU).
11395 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11396 into a generic case that supports all (sane) partition maps.
11398 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11401 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11402 and grub_apple_partition_map_fini() after that.
11404 2007-06-01 Robert Millan <rmh@aybabtu.com>
11406 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11408 * util/grub.d/00_header.in: Only enable gfxterm when
11409 convert_system_path_to_grub_path() succeeds.
11411 2007-05-20 Robert Millan <rmh@aybabtu.com>
11413 * util/update-grub_lib.in: New file.
11414 * DISTLIST: Add update-grub_lib.in.
11415 * conf/common.rmk: Generate update-grub_lib and install it in
11417 * Makefile.in: Add install routine for $(lib_DATA).
11419 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11420 function provided by update-grub_lib to support arbitrary paths of
11422 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11423 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11425 2007-05-19 Robert Millan <rmh@aybabtu.com>
11427 * commands/i386/cpuid.c: New module.
11428 * DISTLIST: Add it.
11429 * conf/i386-efi.rmk: Enable cpuid.mod.
11430 * conf/i386-pc.rmk: Likewise.
11432 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11434 * kern/disk.c (grub_disk_read): Check return value of
11437 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11439 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11441 * disk/raid.c (grub_raid_open): Likewise.
11443 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11445 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11446 stack instead of on the heap.
11448 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11449 before doing a read on it.
11451 * configure.ac: Only use -fno-stack-protector for the target
11454 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11456 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11457 __attribute_ ((unused)) to mode_type argument.
11459 * util/getroot.c (grub_guess_root_device): Fix #endif.
11461 * kern/misc.c (memcmp): Fix prototype.
11463 * include/grub/partition.h [GRUB_UTIL]
11464 (grub_gpt_partition_map_init): Add prototype.
11465 (grub_gpt_partition_map_fini): Likewise.
11467 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11468 at the right place.
11470 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11471 (grub_fat_read_data): Likewise.
11472 (grub_fat_find_dir): Likewise.
11474 * font/manager.c (find_glyph): Make table a const.
11475 (grub_font_get_glyph): Remove bitmap from if statement.
11477 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11479 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11480 code, first search for device in /dev/mapper, then in /dev.
11481 (grub_util_get_grub_dev): New function.
11482 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11484 * util/grub-probe.c (probe): Remove check for RAID, call
11485 grub_util_get_grub_dev() instead of
11486 grub_util_biosdisk_get_grub_dev().
11487 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11488 grub_util_biosdisk_get_grub_dev().
11489 * util/i386/pc/grub-setup.c (main): Likewise.
11491 2007-05-16 Robert Millan <rmh@aybabtu.com>
11493 * DISTLIST: Update for the latest changes.
11494 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11495 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11496 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11497 grub/util/biosdisk.h.
11498 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11499 grub/util/biosdisk.h.
11501 2007-05-16 Robert Millan <rmh@aybabtu.com>
11503 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11505 2007-05-16 Robert Millan <rmh@aybabtu.com>
11507 * util/i386/efi/grub-install.in: New.
11508 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11509 newly added grub-install.
11510 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11512 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11513 grub/util/biosdisk.h.
11514 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11515 grub/util/biosdisk.h.
11517 2007-05-16 Robert Millan <rmh@aybabtu.com>
11519 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11520 * include/grub/util/biosdisk.h: ... here.
11521 * util/i386/pc/biosdisk.c: Moved to ...
11522 * util/biosdisk.c: ... here.
11523 * util/i386/pc/getroot.c: Moved to ...
11524 * util/getroot.c: ... here.
11525 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11526 * util/grub-mkdevicemap.c: ... here.
11527 * util/i386/pc/grub-probe.c: Moved to ...
11528 * util/grub-probe.c: ... here.
11530 2007-05-15 Robert Millan <rmh@aybabtu.com>
11532 * util/update-grub.in: Remove duplicated line in grub.cfg header
11535 2007-05-13 Robert Millan <rmh@aybabtu.com>
11537 * util/update-grub.in: Fix a few assumptions about the devices holding
11538 /, /boot and /boot/grub being the same.
11539 * util/grub.d/00_header.in: Likewise.
11540 * util/grub.d/10_hurd.in: Likewise.
11541 * util/grub.d/10_linux.in: Likewise.
11543 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11544 patterns. Use that to define the `.old' suffix as older than `'.
11546 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11548 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11549 the grub.cfg header message.
11551 2007-05-11 Robert Millan <rmh@aybabtu.com>
11553 * util/update-grub.in: Create device.map if it doesn't already exist,
11554 before attempting to run grub-probe.
11555 Check for grub-probe and grub-mkdevicemap with the same code
11556 grub-install is using.
11559 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11561 * Makefile.in: Add the datarootdir autoconf variable.
11563 2007-05-09 Robert Millan <rmh@aybabtu.com>
11565 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11566 fail gracefully if dev->disk->partition == NULL.
11568 2007-05-07 Robert Millan <rmh@aybabtu.com>
11570 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11571 determine partition map module.
11572 * util/i386/pc/grub-install.in: Use this feature to decide which
11573 partition module to load, instead of hardcoding pc and gpt.
11575 2007-05-07 Robert Millan <rmh@aybabtu.com>
11577 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11578 source directory differs from build directory.
11580 2007-05-05 Robert Millan <rmh@aybabtu.com>
11582 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11585 2007-05-05 Robert Millan <rmh@aybabtu.com>
11587 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11589 2007-05-05 Robert Millan <rmh@aybabtu.com>
11591 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11592 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11594 2007-05-05 Robert Millan <rmh@aybabtu.com>
11596 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11597 (grub_probe_SOURCES): Likewise.
11598 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11599 GPT and initialize dos_part and bsd_part accordingly.
11600 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11602 (main): Activate gpt module for use during partition identification,
11603 and deactivate it afterwards.
11604 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11605 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11606 partition identification, and deactivate it afterwards.
11608 2007-05-05 Robert Millan <rmh@aybabtu.com>
11610 * term/i386/pc/console.c (grub_console_fini): Call
11611 grub_term_set_current() before grub_term_unregister().
11613 2007-05-04 Robert Millan <rmh@aybabtu.com>
11615 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11616 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11617 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11618 and update-grub_DATA.
11619 * conf/common.rmk: Build and install update-grub components.
11620 * conf/common.mk: Regenerate.
11621 * util/update-grub.in: New. Core of update-grub.
11622 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11623 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11624 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11625 * util/grub.d/README: New. Document grub.d directory layout.
11627 2007-05-01 Robert Millan <rmh@aybabtu.com>
11629 * util/grub-emu.c: Move initialization functions
11630 grub_util_biosdisk_init() and grub_init_all() before
11631 grub_util_biosdisk_get_grub_dev(), which relies on them.
11633 2007-04-19 Robert Millan <rmh@aybabtu.com>
11635 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11638 2007-04-18 Jerone Young <jerone@gmail.com>
11640 * kernel/elf.c: Add missing parenthesis for conditional statement
11643 2007-04-10 Jerone Young <jerone@gmail.com>
11645 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11646 continue on and look for device node with real device name.
11648 2007-04-10 Jerone Young <jerone@gmail.com>
11650 * configure.ac: Add argument for autoconf to use transformation
11652 * Makefile.in: Add autoconf package transformation code.
11653 * util/i386/pc/grub-install.in: Likewise.
11654 * util/powerpc/ieee1275/grub-install.in: Likewise.
11656 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11658 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11659 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11660 (EXT2_REVISION): Likewise.
11661 (EXT2_INODE_SIZE): Likewise.
11662 (struct grub_ext2_block_group): Added a missing member
11664 (grub_ext2_read_inode): Divide by the inode size in a superblock
11665 instead of 128 to obtain INODES_PER_BLOCK.
11666 Use the macro EXT2_INODE_SIZE instead of directly using
11667 SBLOCK->INODE_SIZE.
11669 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11671 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11672 superblock instead of the structure size to compute an
11673 offset. This fixes the problem that GRUB could not read a
11674 filesystem when inode size is different from 128-byte.
11676 2007-03-05 Marco Gerards <marco@gnu.org>
11678 * normal/main.c (read_config_file): When "menu" is not set, create
11679 an initial context.
11681 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11683 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11684 (HEAP_LIMIT): New macro.
11685 (grub_claim_heap): Claim memory up to `heaplimit'.
11687 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11689 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11690 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11691 (_start): Likewise.
11692 (grub_arch_modules_addr): Return address after `_end'.
11693 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11694 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11695 (add_segments): Calculate `_end' from phdr size and location.
11696 (ALIGN_UP): Moved to ...
11697 * include/grub/misc.h: here.
11698 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11700 (GRUB_IEEE1275_MODULE_BASE): Removed.
11702 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11704 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11707 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11709 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11711 (grub_elf64_load_hook_t): Likewise.
11712 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11715 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11717 * kern/mm.c: Update copyright.
11718 (grub_mm_debug): Correct syntax error.
11719 (grub_mm_dump_free): New function.
11720 (grub_debug_free): Call `grub_free'.
11721 * include/grub/mm.h: Update copyright.
11722 (grub_mm_dump_free): Add declaration.
11724 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11726 * include/grub/ieee1275/ieee1275.h: Update copyright.
11727 * kern/powerpc/ieee1275/init.c: Likewise.
11728 * kern/powerpc/ieee1275/openfw.c: Likewise.
11730 * loader/powerpc/ieee1275/linux.c: Likewise.
11731 * include/grub/elfload.h: Likewise.
11732 * kern/elf.c: Likewise.
11733 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11735 (grub_elf64_load): Likewise.
11736 (grub_elf32_load_segment): Move to a nested function.
11737 (grub_elf64_load_segment): Likewise.
11739 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11741 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11743 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11744 (grub_heap_len): Likewise.
11745 (HEAP_SIZE): New macro.
11746 (grub_claim_heap): New function.
11747 (grub_machine_init): Don't claim heap directly. Call
11749 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11750 (grub_available_iterate): New function.
11752 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11754 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11755 * configure.ac: Use it for testing the HOST and TARGET compilers.
11757 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11759 * Makefile.in (enable_grub_emu): New variable.
11760 * configure.ac (--enable-grub-emu): New option.
11761 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11762 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11763 * conf/i386-pc.rmk: Likewise.
11764 * conf/powerpc-ieee1275.rmk: Likewise.
11765 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11767 2006-12-12 Marco Gerards <marco@gnu.org>
11769 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11771 * kern/env.c (grub_env_unset): Don't free the member `value' when
11772 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11775 * normal/main.c (current_menu): Removed.
11776 (free_menu): Unset the `menu' environment variable.
11777 (grub_normal_menu_addentry): Make use of the environment variable
11778 `menu', instead of using the global `current_menu'. Allocate
11779 memory for the sourcecode of this entry.
11780 (read_config_file): New argument `nested', changed all callers.
11781 Only in the case of a new context, initialize a new menu. Set the
11782 `menu' environment variable.
11783 (grub_normal_execute): Don't set and unset the environment
11784 variable `menu' here anymore. Only free the menu when leaving the
11787 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11790 2006-12-11 Marco Gerards <marco@gnu.org>
11792 * normal/menu_entry.c (run): Fix off by one bug so the last line
11793 is executed. Move the loader check to outside the loop.
11795 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11797 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11799 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11801 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11802 the number of sectors. Reported by Andrey Shuvikov
11803 <mr_hyro@yahoo.com>.
11805 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11807 * kern/disk.c (grub_disk_read): When there is a read error, always
11808 try to read only the necessary data.
11810 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11812 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11814 [GRUB_UTIL] (grub_raid_fini): Likewise.
11815 [GRUB_UTIL] (grub_lvm_init): Likewise.
11816 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11817 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11818 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11819 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11820 and grub_raid_fini().
11822 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11824 * include/grub/types.h (__unused): Rename to UNUSED.
11825 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11826 (grub_elf64_size): Likewise.
11828 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11830 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11831 grub_error_push and grub_error_pop in the error-handling path.
11832 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11835 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11837 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11838 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11839 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11840 (kernel_elf_SOURCES): Likewise.
11841 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11842 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11843 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11844 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11845 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11846 (elf_mod_SOURCES): New variable.
11847 (elf_mod_CFLAGS): Likewise.
11848 (elf_mod_LDFLAGS): Likewise.
11849 * include/grub/types.h (__unused): New macro.
11850 * include/grub/elfload.h: New file.
11851 * kern/elf.c: Likewise.
11852 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11853 (ELF32_LOADMASK): New macro.
11854 (ELF64_LOADMASK): Likewise.
11855 (vmlinux): Removed.
11856 (grub_linux_load32): New function.
11857 (grub_linux_load64): Likewise.
11858 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11859 Use grub_elf_t instead of grub_file_t.
11861 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11863 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11864 `catch_result' to struct set_color_args.
11866 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11868 * normal/menu.c: Include grub/script.h.
11869 * normal/menu_entry.c: Likewise.
11870 * include/grub/normal.h: Do not include grub/script.h.
11872 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11874 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11876 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11878 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11880 (grub_disk_close): Print debug messages when closing a disk.
11881 (grub_disk_read): Print debug messages when disk read fails.
11882 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11884 * kern/partition.c: Include misc.h.
11885 (grub_partition_iterate): Print debug messages when detecting
11888 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11890 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11892 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11894 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11896 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11897 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11899 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11901 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11902 instead of sizeof(lv). Patch by Michael Guntsche.
11904 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11906 * disk/lvm.c: Rename VGS to VG_LIST.
11907 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11908 (grub_lvm_open): Likewise.
11909 Thanks to Michael Guntsche for finding this bug.
11911 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11913 * configure.ac (AC_INIT): Bumped to 1.95.
11915 2006-10-14 Robert Millan <rmh@aybabtu.com>
11917 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11918 with "/dev/.static/dev/md".
11920 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11922 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11923 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11924 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11925 DRIVE_NAME are always freed.
11927 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11928 DOS_PART, as a DOS partition is counted from one instead of zero
11929 now. Reported by Robert Millan.
11931 2006-10-14 Robert Millan <rmh@aybabtu.com>
11933 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11934 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11935 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11936 string returned by grub_guess_root_device.
11937 * util/i386/pc/grub-setup.c: Likewise.
11938 * util/i386/pc/grub-probefs.c: Likewise.
11940 * util/i386/pc/grub-probefs.c: Rename to ...
11941 * util/i386/pc/grub-probe.c: ... this.
11942 * DISTLIST: Remove grub-probefs, add grub-probe.
11943 * conf/i386-efi.rmk: Likewise.
11944 * conf/i386-pc.rmk: Likewise.
11945 * util/i386/pc/grub-install.in: Likewise.
11947 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11948 choose which information we want to print.
11950 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11952 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11953 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11954 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11955 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11956 video/readers/tga.c and video/i386/pc/vbeutil.c.
11958 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11960 Added support for RAID and LVM.
11962 * disk/lvm.c: New file.
11963 * disk/raid.c: Likewise.
11964 * include/grub/lvm.h: Likewise.
11965 * include/grub/raid.h: Likewise.
11966 * include/grub/util/lvm.h: Likewise.
11967 * include/grub/util/raid.h: Likewise.
11968 * util/lvm.c: Likewise.
11969 * util/raid.c: Likewise.
11971 * include/grub/disk.h (grub_disk_dev_id): Add
11972 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11973 (grub_disk_get_size): New prototype.
11974 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11975 returns a partition.
11976 (grub_disk_get_size): New function.
11978 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11979 verbatim if grub_install_dos_part is -2.
11981 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11984 * util/i386/pc/grub-setup.c (setup): New argument
11985 MUST_EMBED. Force embedding of GRUB when the argument is
11986 true. Close FILE before returning.
11987 (main): Add support for RAID and LVM.
11989 * conf/common.rmk: Add RAID and LVM modules.
11990 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11992 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11994 * kern/misc.c (grub_strstr): New function.
11995 * include/grub/misc.h (grub_strstr): New prototype.
11997 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11999 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12001 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12003 * kern/misc.c (grub_strtoull): Guess the base only if not
12006 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12008 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12011 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12013 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12015 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12016 Remove `flags' argument. All callers changed.
12017 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12018 (IEEE1275_IHANDLE_INVALID): New variable.
12019 (IEEE1275_CELL_INVALID): New variable.
12020 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12021 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12022 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12023 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12024 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12025 codes from Open Firmware. All callers updated.
12026 (grub_ieee1275_next_property): Directly return Open Firmware return
12028 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12029 Standardize error checking from `grub_ieee1275_get_property'.
12030 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12031 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12033 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12035 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12036 `instance_to_package_args' to `instance_to_path_args'.
12038 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12039 `grub_ieee1275_chosen'.
12041 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12042 `grub_ieee1275_interpret'.
12044 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12046 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12048 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12050 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12051 (__cmpdi): Likewise.
12053 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12054 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12057 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12059 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12060 to type `grub_ssize_t'.
12061 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12063 2006-09-22 Marco Gerards <marco@gnu.org>
12065 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12068 2006-09-22 Marco Gerards <marco@gnu.org>
12070 * commands/echo.c: New file.
12072 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12074 * conf/common.rmk (echo_mod_SOURCES): New variable.
12075 (echo_mod_CFLAGS): Likewise.
12076 (echo_mod_LDFLAGS): Likewise.
12078 2006-09-22 Marco Gerards <marco@gnu.org>
12080 * normal/main.c (get_line): Malloc memory instead of using
12081 preallocated memory. Removed the arguments `cmdline' and
12082 `max_len'. Updated all callers.
12084 2006-09-22 Marco Gerards <marco@gnu.org>
12086 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12087 (normal_mod_DEPENDENCIES): Likewise.
12089 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12090 (normal_mod_DEPENDENCIES): Likewise.
12092 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12094 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12096 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12098 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12099 (normal_mod_DEPENDENCIES): Likewise.
12100 * conf/i386-pc.mk: Regenerate.
12101 * conf/i386-efi.mk: Likewise
12102 * conf/common.mk: Likewise.
12103 * conf/powerpc-ieee1275.mk: Likewise.
12104 * conf/sparc64-ieee1275.mk: Likewise.
12106 2006-09-22 Robert Millan <rmh@aybabtu.com>
12108 Sync with i386 version.
12109 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12110 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12112 2006-09-21 Robert Millan <rmh@aybabtu.com>
12114 Import from GRUB Legacy (lib/device.c):
12115 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12116 (init_device_map) [__linux__]: Add support for I2O devices.
12118 2006-09-14 Marco Gerards <marco@gnu.org>
12120 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12123 2006-09-14 Robert Millan <rmh@aybabtu.com>
12125 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12128 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12130 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12131 before adding it to device.map.
12133 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12135 * genmk.rb: Let GCC generate dependencies the first time it
12136 compiles a file; using the -MD option.
12137 * conf/common.mk: Regenerate.
12138 * conf/i386-pc.mk: Likewise.
12139 * conf/i386-efi.mk: Likewise.
12140 * conf/powerpc-ieee1275.mk: Likewise.
12141 * conf/sparc64-ieee1275.mk: Likewise.
12143 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12145 Move the prototypes of grub_setjmp and grub_longjmp to
12146 cpu/setjmp.h, so that each architecture may specify different
12149 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12150 (grub_longjmp): Likewise.
12151 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12152 (grub_longjmp): Likewise.
12153 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12154 (grub_longjmp): Likewise.
12156 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12157 [!GRUB_UTIL] (grub_longjmp): Removed.
12159 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12161 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12162 "color!" method does not return any value.
12164 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12166 * include/grub/bitmap.h: New file.
12168 * include/grub/i386/pc/vbeutil.h: Likewise.
12170 * video/bitmap.c: Likewise.
12172 * video/readers/tga.c: Likewise.
12174 * video/i386/pc/vbeutil.c: Likewise.
12176 * commands/videotest.c: Code cleanup and updated to reflect to new
12179 * term/gfxterm.c: Likewise.
12181 * video/video.c: Likewise.
12183 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12184 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12185 (bitmap_mod_SOURCES): New entry.
12186 (bitmap_mod_CFLAGS): Likewise.
12187 (bitmap_mod_LDFLAGS): Likewise.
12188 (tga_mod_SOURCES): Likewise.
12189 (tga_mod_CFLAGS): Likewise.
12190 (tga_mod_LDFLAGS): Likewise.
12192 * include/grub/video.h (grub_video_blit_operators): New enum type.
12193 (grub_video_render_target): Changed as forward declaration and moved
12194 actual definition to be video driver specific.
12195 (grub_video_adapter.blit_bitmap): Added blitting operator.
12196 (grub_video_adapter.blit_render_target): Likewise.
12197 (grub_video_blit_bitmap): Likewise.
12198 (grub_video_blit_render_target): Likewise.
12200 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12201 driver specific render target definition.
12202 (grub_video_vbe_map_rgba): Added driver internal helper.
12203 (grub_video_vbe_unmap_color): Updated to use
12204 grub_video_i386_vbeblit_info.
12205 (grub_video_vbe_get_video_ptr): Likewise.
12207 * include/grub/i386/pc/vbeblit.h
12208 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12209 grub_video_i386_vbeblit_info.
12210 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12211 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12212 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12213 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12214 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12215 (grub_video_i386_vbeblit_index_index): Likewise.
12216 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12217 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12218 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12219 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12221 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12224 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12225 include/grub/i386/pc/vbeblit.h.
12227 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12228 Updated to use grub_video_i386_vbeblit_info.
12229 (grub_video_i386_vbefill_R8G8B8): Likewise.
12230 (grub_video_i386_vbefill_index): Likewise.
12231 (grub_video_i386_vbefill): Added generic filler.
12233 * video/i386/pc/vbefill.c: Updated to reflect changes on
12234 include/grub/i386/pc/vbefill.h.
12236 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12237 grub_video_i386_vbeblit_info.
12238 (grub_video_vbe_unmap_color): Likewise.
12239 (grub_video_vbe_blit_glyph): Likewise.
12240 (grub_video_vbe_scroll): Likewise.
12241 (grub_video_vbe_draw_pixel): Removed function.
12242 (grub_video_vbe_get_pixel): Likewise.
12243 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12244 updated code to use it.
12245 (common_blitter): Added common blitter for render target and bitmap.
12246 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12247 (grub_video_vbe_blit_render_target): Likewise.
12249 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12251 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12252 is in text mode if there is no console control protocol instance
12255 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12257 * include/grub/video.h: Code cleanup.
12259 * include/grub/i386/pc/vbe.h: Likewise.
12261 * video/i386/pc/vbe.c: Likewise.
12263 * video/i386/pc/vbeblit.c: Likewise.
12265 * video/i386/pc/vbefill.c: Likewise.
12267 * video/video.c: Likewise. Also added more comments.
12269 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12271 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12272 (struct grub_biosdisk_dap): Likewise.
12274 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12275 linkage settings for all functions.
12277 2006-07-12 Marco Gerards <marco@gnu.org>
12279 * configure.ac (--enable-mm-debug): Fix typo.
12281 * genkernsyms.sh.in: Use proper quoting for `CC'.
12283 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12285 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12286 (normal_mod_ASFLAGS): Remove "-m32".
12288 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12290 * util/misc.c: Include config.h.
12291 [!HAVE_MEMALIGN]: Do not include malloc.h.
12292 (grub_memalign): Use posix_memalign, if present. Then, use
12293 memalign, if present. Otherwise, emit an error.
12295 * util/grub-emu.c: Do not include malloc.h.
12297 * include/grub/util/misc.h: Include unistd.h. This is required for
12298 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12299 D. Eades III <hde@foobar-qux.org>.
12301 * configure.ac (AC_GNU_SOURCE): Added.
12302 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12305 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12307 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12308 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12310 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12312 * include/grub/types.h (grub_host_addr_t): Rename to
12313 grub_target_addr_t.
12314 (grub_host_off_t): Rename to grub_target_off_t.
12315 (grub_host_size_t): Rename to grub_target_size_t.
12316 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12317 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12319 * include/grub/kernel.h (struct grub_module_header): Change type
12320 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12321 (grub_module_info): Likewise.
12323 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12325 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12326 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12327 Velazquez <jesus.velazquez@gmail.com>.
12329 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12331 Count partitions from 1 instead of 0 in the string representation
12332 of partitions. Still use 0-based internally.
12334 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12335 (sun_partition_map_iterate): Use grub_partition_t instead of
12336 struct grub_partition *. Cast DESC->START_CYLINDER to
12337 grub_uint64_t after converting the endian.
12338 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12339 (sun_partition_map_get_name): Add 1 to P->INDEX.
12341 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12343 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12345 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12346 zero instead of one.
12347 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12348 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12350 * partmap/apple.c (apple_partition_map_iterate): Change the type
12351 of POS to unsigned.
12352 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12353 (apple_partition_map_get_name): Add 1 into P->INDEX.
12355 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12356 of POS to unsigned.
12357 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12358 calculate the offset of a partition.
12359 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12360 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12362 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12363 SECTOR to grub_disk_addr_t.
12364 (acorn_partition_map_iterate): Likewise.
12365 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12366 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12368 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12370 * kern/i386/pc/init.c (make_install_device): Add 1 into
12371 GRUB_INSTALL_DOS_PART.
12373 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12376 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12378 Clean up the code to support 64-bit addressing in disks and
12379 files. This change is not enough for filesystems yet.
12381 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12382 type of "start" to grub_uint64_t.
12383 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12384 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12385 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12388 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12389 to grub_disk_addr_t.
12391 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12394 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12396 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12399 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12401 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12403 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12405 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12406 to grub_off_t, to detect an error from grub_file_seek.
12407 (grub_multiboot_load_elf32): Likewise.
12409 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12410 maximum unsigned long value when an overflow is detected.
12411 (grub_strtoull): New function.
12412 (grub_divmod64): Likewise.
12413 (grub_lltoa): use grub_divmod64.
12415 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12417 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12418 the pointer to next character. Use grub_strtoull instead of
12420 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12421 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12424 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12425 return value is signed.
12426 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12427 test if OFFSET is less than zero, as OFFSET is unsigned now.
12429 * kern/disk.c (struct grub_disk_cache): Change the type of
12430 "sector" to grub_disk_addr_t.
12431 (grub_disk_cache_get_index): Change the type of SECTOR to
12432 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12433 unsigned after shifting.
12434 (grub_disk_cache_invalidate): Change the type of SECTOR to
12436 (grub_disk_cache_unlock): Likewise.
12437 (grub_disk_cache_store): Likewise.
12438 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12439 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12440 grub_disk_addr_t and grub_uint64_t, respectively.
12441 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12442 body, as the value of OFFSET is tweaked by
12443 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12444 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12446 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12447 body, as the value of OFFSET is tweaked by
12448 grub_disk_check_range. Change the types of LEN and N to
12451 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12452 and "saved_offset" to grub_off_t.
12453 (test_header): Cast BUF to char *.
12454 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12456 (grub_gzio_read): Change the types of OFFSET and SIZE to
12457 grub_off_t and grub_size_t, respectively.
12459 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12461 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12462 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12463 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12464 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12465 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12467 * include/grub/types.h (grub_off_t): Unconditionally set to
12469 (grub_disk_addr_t): Changed to grub_uint64_t.
12471 * include/grub/partition.h (struct grub_partition): Change the
12472 types of "start", "len" and "offset" to grub_disk_addr_t,
12473 grub_uint64_t and grub_disk_addr_t, respectively.
12474 (grub_partition_get_start): Return grub_disk_addr_t.
12475 (grub_partition_get_len): Return grub_uint64_t.
12477 * include/grub/misc.h (grub_strtoull): New prototype.
12478 (grub_divmod64): Likewise.
12480 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12481 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12482 grub_off_t, respectively.
12483 All callers and references changed.
12485 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12486 grub_size_t in "read".
12487 All callers and references changed.
12489 * include/grub/file.h (struct grub_file): Change the types of
12490 "offset" and "size" to grub_off_t and grub_off_t,
12491 respectively. Change the type of SECTOR to grub_disk_addr_t in
12493 (grub_file_read): Change the type of LEN to grub_size_t.
12494 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12496 (grub_file_size): Return grub_off_t.
12497 (grub_file_tell): Likewise.
12498 All callers and references changed.
12500 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12501 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12503 (struct grub_disk): Change the type of "total_sectors" to
12504 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12506 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12507 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12508 (grub_disk_write): Likewise.
12509 All callers and references changed.
12511 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12512 char * for grub_strncmp to silence gcc.
12513 (grub_iso9660_mount): Likewise.
12514 (grub_iso9660_mount): Likewise.
12515 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12517 (grub_iso9660_iterate_dir): Likewise.
12518 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12520 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12521 LEN to grub_disk_addr_t and grub_size_t, respectively.
12523 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12525 * fs/jfs.c (grub_jfs_read_file): Likewise.
12527 * fs/minix.c (grub_jfs_read_file): Likewise.
12529 * fs/sfs.c (grub_jfs_read_file): Likewise.
12531 * fs/ufs.c (grub_jfs_read_file): Likewise.
12533 * fs/xfs.c (grub_jfs_read_file): Likewise.
12535 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12536 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12539 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12540 BLKNR to -1 instead of returning GRUB_ERRNO.
12541 (grub_ext2_read_file): Change the types of SECTOR and
12542 LEN to grub_disk_addr_t and grub_size_t, respectively.
12544 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12545 LEN to grub_disk_addr_t and grub_size_t, respectively.
12547 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12550 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12551 string. Do not cast SECTOR explicitly.
12553 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12554 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12555 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12556 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12557 over 2TB and LBA mode is not supported, raise an error.
12558 (get_safe_sectors): New function.
12559 (grub_biosdisk_read): Use get_safe_sectors.
12560 (grub_biosdisk_write): Likewise.
12562 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12563 (grub_efidisk_write): Likewise.
12565 * disk/loopback.c (delete_loopback): Cosmetic changes.
12566 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12568 (grub_loopback_open): Likewise.
12569 (grub_loopback_read): Likewise. Also, change the type of POS to
12570 grub_off_t, and fix the usage of grub_memset.
12572 * commands/i386/pc/play.c: Include grub/machine/time.h.
12574 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12577 * commands/configfile.c: Include grub/env.h.
12579 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12580 GRUB_ERRNO directly instead. Change the type of POS to
12581 grub_off_t. Follow the coding standard.
12583 * commands/blocklist.c: Include grub/partition.h.
12584 (grub_cmd_blocklist): Return an error if the underlying device is
12585 not a disk. Take the starting sector of a partition into account,
12586 if a partition is used.
12588 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12590 (lba_mode): Support 64-bit addresses.
12591 (chs_mode): Likewise.
12592 (copy_buffer): Adapted to the new offsets of a length field and a
12594 (blocklist_default_start): Allocate 64-bit space.
12596 * boot/i386/pc/boot.S (force_lba): Removed.
12597 (boot_drive): Moved to under KERNEL_SECTOR.
12598 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12600 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12602 (lba_mode): Refactored to support a 64-bit address. More size
12604 (setup_sectors): Likewise.
12606 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12608 * DISTLIST: Added include/grub/i386/linux.h. Removed
12609 include/grub/i386/pc/linux.h
12611 * configure.ac (AC_INIT): Bumped to 1.94.
12613 * config.guess: Updated from gnulib.
12614 * config.sub: Likewise.
12615 * install-sh: Likewise.
12616 * mkinstalldirs: Likewise.
12618 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12620 * conf/common.rmk (grub_modules_init.lst): Depended on
12621 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12624 * genmk.rb (PModule::rule): Reverted the previous change.
12626 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12628 * conf/common.rmk (grub_modules_init.lst): Depends on
12629 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12630 that the target does not exist before producing.
12631 (grub_modules_init.h): Remove the target before generating.
12632 (grub_emu_init.c): Likewise.
12634 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12636 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12638 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12639 for the target-specific tests. Make sure that we also have the
12640 up-to-date target variables for those tests.
12642 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12644 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12645 (PModule::rule): Likewise.
12647 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12649 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12650 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12651 target-specific flags should be prefixed.
12652 (PModule::rule): Likewise.
12654 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12656 * configure.ac (CMP): Check if cmp is available explicitly.
12658 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12660 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12661 (target_cpu): New variable.
12662 (pkglibdir): Use target_cpu instead of host_cpu.
12664 * util/i386/pc/grub-install.in (host_cpu): Removed.
12665 (target_cpu): New variable.
12666 (pkglibdir): Use target_cpu instead of host_cpu.
12668 * util/genmoddep.c: Removed.
12670 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12671 instead of GRUB_HOST_SIZEOF_VOID_P.
12672 * kern/dl.c: Likewise.
12674 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12676 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12677 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12678 (GRUB_TARGET_SIZEOF_LONG): ... this.
12679 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12680 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12681 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12683 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12684 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12685 (GRUB_TARGET_SIZEOF_LONG): ... this.
12686 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12687 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12688 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12690 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12691 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12692 (GRUB_TARGET_SIZEOF_LONG): ... this.
12693 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12694 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12696 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12697 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12698 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12699 instead of GRUB_HOST_SIZEOF_LONG.
12700 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12701 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12702 GRUB_CPU_WORDS_BIGENDIAN.
12703 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12704 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12707 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12708 (genmoddep_SOURCES): Likewise.
12709 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12710 (genmoddep_SOURCES): Likewise.
12711 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12712 (genmoddep_SOURCES): Likewise.
12713 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12715 (genmoddep_SOURCES): Likewise.
12717 * genmoddep.awk: New file.
12719 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12720 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12721 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12722 (PModule::rule): Likewise.
12723 (Program::rule): Likewise.
12724 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12725 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12728 * configure.ac: Rewritten intensively to use host and target
12729 instead of build and host, respectively.
12731 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12732 (host_cpu): Removed.
12733 (target_cpu): New variable.
12734 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12735 (BUILD_CC): Removed.
12736 (BUILD_CFLAGS): Likewise.
12737 (BUILD_CPPFLAGS): Likewise.
12738 (TARGET_CC): New variable.
12739 (TARGET_CFLAGS): Likewise.
12740 (TARGET_CPPFLAGS): Likewise.
12741 (TARGET_LDFLAGS): Likewise.
12743 (include): Use target_cpu instead of host_cpu.
12744 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12746 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12748 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12750 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12751 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12752 field 'false' to 'exec_on_false'.
12753 (grub_script_create_cmdif): Renamed argument names to reflect above
12756 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12758 * normal/script.c (grub_script_create_cmdif): Likewise.
12760 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12762 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12764 (grub_hfsplus_btree_recptr): Likewise.
12765 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12766 FILEBLOCK both to pass a block number and store next block
12768 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12769 overflow file correctly. Specify errors appropriately, because
12770 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12771 grub_hfsplus_btree_recptr to get the pointer to a found key.
12772 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12775 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12777 (_linux_mod_SOURCES): New variable.
12778 (_linux_mod_CFLAGS): Likewise.
12779 (_linux_mod_LDFLAGS): Likewise.
12780 (linux_mod_SOURCES): Likewise.
12781 (linux_mod_CFLAGS): Likewise.
12782 (linux_mod_LDFLAGS): Likewise.
12784 * DISTLIST: Added loader/i386/efi/linux.c,
12785 loader/i386/efi/linux_normal.c and
12786 include/grub/i386/efi/loader.h.
12788 * loader/i386/efi/linux.c: New file.
12789 * loader/i386/efi/linux_normal.c: Likewise.
12790 * include/grub/i386/efi/loader.h: Likewise.
12792 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12794 * commands/blocklist.c: New file.
12796 * DISTLIST: Added commands/blocklist.c.
12798 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12799 color for the background, and a darker color for the foreground.
12800 (grub_console_checkkey): Return READ_KEY.
12801 (grub_console_cls): Set the background to
12802 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12804 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12806 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12807 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12809 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12812 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12813 BG. The spec is wrong again.
12815 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12817 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12819 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12820 commands/blocklist.c.
12821 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12823 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12824 (blocklist_mod_SOURCES): New variable.
12825 (blocklist_mod_CFLAGS): Likewise.
12826 (blocklist_mod_LDFLAGS): Likewise.
12828 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12830 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12832 (lba_mode): Use %eax more intensively to reduce the code size.
12834 2006-05-20 Marco Gerards <marco@gnu.org>
12836 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12838 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12840 (script): Accept leading newlines.
12841 (newlines): New rule to describe 0 or more newlines.
12842 (commands): Accept `command' with trailing newline. Fixed the
12843 order in which arguments were passed to `grub_script_add_cmd'.
12844 Accept commands separated by newlines.
12845 (function): Changed to accept newlines.
12846 (menuentry) Rewritten.
12848 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12849 front of the list, instead of to the end.
12851 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12853 * util/i386/pc/grub-install.in (bindir): New variable.
12854 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12855 Shaver <lbgwjl@gmail.com>.
12857 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12859 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12860 grub/machine/linux.h
12861 * loader/i386/pc/linux.c: Likewise.
12863 * include/grub/i386/pc/linux.h: Moved to ...
12864 * include/grub/i386/linux.h: ... here.
12866 * include/grub/i386/linux.h (struct linux_kernel_params): New
12869 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12871 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12873 (grub_video_vbe_blit_glyph): Likewise.
12874 (grub_video_vbe_blit_bitmap): Likewise.
12875 (grub_video_vbe_blit_render_target): Likewise.
12877 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12879 * configure.ac (--with-platform): Properly quote the square
12882 2006-05-08 Marco Gerards <marco@gnu.org>
12884 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12886 (kernel_elf_HEADERS): ...to this. Updated all users.
12887 (grubof_symlist.c): Renamed from this...
12888 (kernel_elf_symlist.c): ...to this. Updated all users.
12889 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12890 (grubof_SOURCES): Renamed from this...
12891 (kernel_elf_SOURCES): ...to this.
12892 (grubof_HEADERS): Renamed from this...
12893 (kernel_elf_HEADERS): ...to this.
12894 (grubof_CFLAGS): Renamed from this...
12895 (kernel_elf_CFLAGS): ...to this.
12896 (grubof_ASFLAGS): Renamed from this...
12897 (kernel_elf_ASFLAGS): ...to this.
12898 (grubof_LDFLAGS): Renamed from this...
12899 (kernel_elf_LDFLAGS): ...to this.
12901 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12903 (kernel_elf_HEADERS): ...to this. Updated all users.
12904 (grubof_symlist.c): Renamed from this...
12905 (kernel_elf_symlist.c): ...to this. Updated all users.
12906 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12907 (grubof_SOURCES): Renamed from this...
12908 (kernel_elf_SOURCES): ...to this.
12909 (grubof_HEADERS): Renamed from this...
12910 (kernel_elf_HEADERS): ...to this.
12911 (grubof_CFLAGS): Renamed from this...
12912 (kernel_elf_CFLAGS): ...to this.
12913 (grubof_ASFLAGS): Renamed from this...
12914 (kernel_elf_ASFLAGS): ...to this.
12915 (grubof_LDFLAGS): Renamed from this...
12916 (kernel_elf_LDFLAGS): ...to this.
12918 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12919 `kernel.elf' instead of `grubof'.
12921 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12923 Add --with-platform to configure. Use pkglibdir instead of
12924 pkgdatadir. This is reported by Roger Leigh.
12926 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12927 (host_vendor): Likewise.
12928 (host_os): Likewise.
12929 (pkgdatadir): Likewise.
12930 (platform): New variable.
12931 (pkglibdir): Likewise.
12932 Use PKGLIBDIR instead of PKGDATADIR.
12934 * util/i386/pc/grub-install.in (datadir): Removed.
12935 (host_vendor): Likewise.
12936 (host_os): Likewise.
12937 (pkgdatadir): Likewise.
12938 (platform): New variable.
12939 (pkglibdir): Likewise.
12940 Use PKGLIBDIR instead of PKGDATADIR.
12942 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12943 instead of GRUB_DATADIR.
12945 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12947 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12950 * configure.ac (--with-platform): New option.
12951 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12953 * Makefile.in: Include a makefile based on PLATFORM instead of
12955 (pkgdatadir): Not appended by the machine type.
12956 (pkglibdir): Appended by the machine type.
12957 (host_vendor): Removed.
12958 (platform): New variable.
12959 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12960 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12961 (uninstall): Likewise.
12963 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12965 Use the environment context in the menu. Remove the commands
12966 "default" and "timeout", and use variables instead.
12968 * normal/menu.c: Include grub/env.h.
12969 (print_entry): Cast TITLE to silence gcc.
12970 (get_timeout): New function.
12971 (set_timeout): Likewise.
12972 (get_entry_number): Likewise.
12973 (run_menu): Use a default entry, a fallback entry and a timeout
12974 in the environment variables "default", "fallback" and
12975 "timeout". Also, tweak the default entry if it is not within the
12976 current menu entries.
12977 (grub_menu_run): Use a fallback entry in the environment variable
12980 * normal/main.c (read_config_file): Do not initialize
12981 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12983 (grub_normal_execute): Use a data slot to store the menu.
12985 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12986 fallback_entry and timeout.
12987 (struct grub_menu_list): Removed.
12988 (grub_menu_list_t): Likewise.
12989 (struct grub_context): Likewise.
12990 (grub_context_t): Likewise.
12991 (grub_context_get): Likewise.
12992 (grub_context_get_current_menu): Likewise.
12993 (grub_context_push_menu): Likewise.
12994 (grub_context_pop_menu): Likewise.
12995 (grub_default_init): Likewise.
12996 (grub_default_fini): Likewise.
12997 (grub_timeout_init): Likewise.
12998 (grub_timeout_fini): Likewise.
13000 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13002 (normal_mod_SOURCES): Removed normal/context.c.
13004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13005 commands/default.c, commands/timeout.c and normal/context.c.
13006 (normal_mod_SOURCES): Removed normal/context.c.
13008 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13009 commands/timeout.c and normal/context.c.
13010 (normal_mod_SOURCES): Removed normal/context.c.
13012 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13013 commands/default.c, commands/timeout.c and normal/context.c.
13014 (normal_mod_SOURCES): Removed normal/context.c.
13016 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13018 (default_mod_SOURCES): Removed.
13019 (default_mod_CFLAGS): Likewise.
13020 (default_mod_LDFLAGS): Likewise.
13021 (timeout_mod_SOURCES): Removed.
13022 (timeout_mod_CFLAGS): Likewise.
13023 (timeout_mod_LDFLAGS): Likewise.
13025 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13028 * commands/default.c: Removed.
13029 * commands/timeout.c: Likewise.
13030 * normal/context.c: Likewise.
13032 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13034 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13036 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13038 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13039 "next" to "prev" for readability.
13040 (struct grub_env_sorted_var): New struct.
13041 (grub_env_context): Renamed to ...
13042 (initial_context): ... this.
13043 (grub_env_var_context): Renamed to ...
13044 (current_context): ... this.
13045 (grub_env_find): Look only at CURRENT_CONTEXT.
13046 (grub_env_context_open): Rewritten to copy exported variables from
13048 (grub_env_context_close): Rewritten according to the new
13049 scheme. Also, add an assertion to prevent the initial context from
13051 (grub_env_insert): Removed the code for the sorted list.
13052 (grub_env_remove): Likewise.
13053 (grub_env_export): Simply mark the variable with
13054 GRUB_ENV_VAR_GLOBAL.
13055 (grub_env_set): A cosmetic change for naming consistency.
13056 (grub_env_get): Likewise.
13057 (grub_env_unset): Likewise.
13058 (grub_env_iterate): Rewritten to sort variables within this
13060 (grub_register_variable_hook): Fixed for naming consistency. Call
13061 grub_env_find again, only if NAME is not found at the first time.
13062 (mangle_data_slot_name): New function.
13063 (grub_env_set_data_slot): Likewise.
13064 (grub_env_get_data_slot): Likewise.
13065 (grub_env_unset_data_slot): Likewise.
13067 * include/grub/env.h (grub_env_var_type): New enum.
13068 (GRUB_ENV_VAR_LOCAL): New constant.
13069 (GRUB_ENV_VAR_GLOBAL): Likewise.
13070 (GRUB_ENV_VAR_DATA): Likewise.
13071 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13073 (grub_env_set): Replace VAR with NAME for consistency.
13074 (grub_register_variable_hook): Likewise.
13075 (grub_env_export): Specify the name of the argument.
13076 (grub_env_set_data_slot): New prototype.
13077 (grub_env_get_data_slot): Likewise.
13078 (grub_env_unset_data_slot): Likewise.
13080 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13082 Extend the loader so that GRUB can accept a loader which comes
13083 back to GRUB when a loaded image exits. Also, this change adds
13084 support for a chainloader on EFI.
13086 * term/efi/console.c: Include grub/misc.h.
13087 (grub_console_checkkey): Display a scan code on the top for
13088 debugging. This will be removed once the EFI port gets stable.
13089 Correct the scan code mapping.
13091 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13092 allocate memory from larger regions, in order to reduce the number
13093 of allocated regions. Otherwise, the MacOSX loader panics.
13094 (filter_memory_map): Avoid less than 1MB for compatibility with
13096 (add_memory_regions): Allocate from the tail of a region, if
13097 possible, to avoid allocating a region near to 1MB, for the MacOSX
13100 * kern/efi/init.c (grub_efi_set_prefix): Specify
13101 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13103 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13104 argument IMAGE_HANDLE and specify it to get a loaded image.
13105 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13106 grub_efi_get_loaded_image.
13107 (grub_efi_get_filename): Divide the length by the size of
13109 (grub_efi_get_device_path): New function.
13110 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13111 the length by the size of grub_efi_char16_t for a file path device
13114 * kern/loader.c (grub_loader_noreturn): New variable.
13115 (grub_loader_set): Accept a new argument NORETURN. Set
13116 GRUB_LOADER_NORETURN to NORETURN.
13117 All callers changed.
13118 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13121 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13123 (grub_efi_get_loaded_image): Take an argument to specify an image
13126 * include/grub/loader.h (grub_loader_set): Added one more argument
13129 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13130 instead of grub_efi_open_protocol.
13131 (grub_efidisk_get_device_name): Likewise.
13132 (grub_efidisk_close): Print a newline.
13133 (grub_efidisk_get_device_handle): Fixed to use
13134 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13135 GRUB_EFI_DEVICE_PATH_TYPE.
13137 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13138 * kern/efi/efi.c (device_path_guid): ... here.
13140 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13142 (kernel_mod_HEADERS): Added efi/disk.h.
13143 (_chain_mod_SOURCES): New variable.
13144 (_chain_mod_CFLAGS): Likewise.
13145 (_chain_mod_LDFLAGS): Likewise.
13146 (chain_mod_SOURCES): Likewise.
13147 (chain_mod_CFLAGS): Likewise.
13148 (chain_mod_LDFLAGS): Likewise.
13150 * DISTLIST: Added include/grub/efi/chainloader.h,
13151 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13153 * include/grub/efi/chainloader.h: New file.
13154 * loader/efi/chainloader.c: Likewise.
13155 * loader/efi/chainloader_normal.c: Likewise.
13157 2006-04-30 Marco Gerards <marco@gnu.org>
13159 * commands/configfile.c (grub_cmd_source): New function.
13160 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13161 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13163 2006-04-30 Marco Gerards <marco@gnu.org>
13165 * normal/execute.c (grub_script_execute_cmd): Change the return
13166 type to `grub_err_t'. Correctly return the error.
13167 (grub_script_execute_cmdline): In case a command line is not a
13168 command or a function, try to interpret it as an assignment.
13170 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13172 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13173 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13174 skip a node whose name is obviously invalid as UTF-16,
13175 i.e. contains a NUL character. Stop the iteration when the last
13176 directory entry is found. Instead of using the return value of
13177 grub_hfsplus_btree_iterate_node, store the value in RET and use
13178 it, because the iterator can be stopped by the last directory
13181 2006-04-30 Marco Gerards <marco@gnu.org>
13183 * include/grub/env.h (grub_env_export): New prototype. Reported
13184 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13186 2006-04-30 Marco Gerards <marco@gnu.org>
13188 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13189 size of the extents in a catalog file record.
13191 2006-04-29 Marco Gerards <marco@gnu.org>
13193 * commands/configfile.c (grub_cmd_configfile): Execute the
13194 configfile within its own context.
13196 * include/grub/env.h (grub_env_context_open): New prototype.
13197 (grub_env_context_close): Likewise.
13199 * kern/env.c (grub_env): Removed.
13200 (grub_env_sorted): Likewise.
13201 (grub_env_context): New variable.
13202 (grub_env_var_context): Likewise.
13203 (grub_env_find): Search both the active context and the global
13205 (grub_env_context_open): New function.
13206 (grub_env_context_close): Likewise.
13207 (grub_env_insert): Likewise.
13208 (grub_env_remove): Likewise.
13209 (grub_env_export): Likewise.
13210 (grub_env_set): Changed to use helper functions to avoid code
13212 (grub_env_iterate): Rewritten so both the current context and the
13213 global context are being used.
13215 * normal/command.c (export_command): New function.
13216 (grub_command_init): Register the `export' function.
13218 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13220 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13221 explicitly to suppress gcc's warnings.
13222 * fs/fat.c (grub_fat_find_dir): Likewise.
13223 (grub_fat_label): Likewise.
13224 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13225 (grub_xfs_mount): Likewise.
13226 (grub_xfs_label): Likewise.
13227 * fs/affs.c (grub_affs_mount): Likewise.
13228 (grub_affs_label): Likewise.
13229 (grub_affs_iterate_dir): Likewise.
13230 * fs/sfs.c (grub_sfs_mount): Likewise.
13231 (grub_sfs_iterate_dir): Likewise.
13232 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13233 * fs/hfs.c (grub_hfs_mount): Likewise.
13234 (grub_hfs_cmp_catkeys): Likewise.
13235 (grub_hfs_find_dir): Likewise.
13236 (grub_hfs_dir): Likewise.
13237 (grub_hfs_label): Likewise.
13238 * fs/jfs.c (grub_jfs_mount): Likewise.
13239 (grub_jfs_opendir): Likewise.
13240 (grub_jfs_getent): Likewise.
13241 (grub_jfs_lookup_symlink): Likewise.
13242 (grub_jfs_label): Likewise.
13243 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13244 (grub_hfsplus_iterate_dir): Likewise.
13245 (grub_hfsplus_btree_iterate_node): Made static.
13247 * util/grub-emu.c (prefix): New variable.
13248 (grub_machine_set_prefix): New function.
13249 (main): Do not set the environment variable "prefix" here. Only
13250 set PREFIX, which is used later by grub_machine_set_prefix.
13252 * include/grub/video.h: Do not include grub/symbol.h.
13253 (grub_video_register): Not exported. This symbol is not defined in
13255 (grub_video_unregister): Likewise.
13256 (grub_video_iterate): Likewise.
13257 (grub_video_setup): Likewise.
13258 (grub_video_restore): Likewise.
13259 (grub_video_get_info): Likewise.
13260 (grub_video_get_blit_format): Likewise.
13261 (grub_video_set_palette): Likewise.
13262 (grub_video_get_palette): Likewise.
13263 (grub_video_set_viewport): Likewise.
13264 (grub_video_get_viewport): Likewise.
13265 (grub_video_map_color): Likewise.
13266 (grub_video_map_rgb): Likewise.
13267 (grub_video_map_rgba): Likewise.
13268 (grub_video_fill_rect): Likewise.
13269 (grub_video_blit_glyph): Likewise.
13270 (grub_video_blit_bitmap): Likewise.
13271 (grub_video_blit_render_target): Likewise.
13272 (grub_video_scroll): Likewise.
13273 (grub_video_swap_buffers): Likewise.
13274 (grub_video_create_render_target): Likewise.
13275 (grub_video_delete_render_target): Likewise.
13276 (grub_video_set_active_render_target): Likewise.
13278 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13280 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13282 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13283 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13284 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13285 instead of $(srcdir)/genkernsyms.sh.
13287 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13288 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13289 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13290 instead of $(srcdir)/genkernsyms.sh.
13292 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13293 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13294 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13295 instead of $(srcdir)/genkernsyms.sh.
13297 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13298 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13299 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13300 instead of $(srcdir)/genkernsyms.sh.
13302 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13305 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13307 (gensymlist.sh): New target.
13308 (genkernsyms.sh): Likewise.
13310 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13311 genkernsyms.sh.in and gensymlist.sh.in.
13313 * genkernsyms.sh: Removed.
13314 * gensymlist.sh: Likewise.
13316 * genkernsyms.sh.in: New file.
13317 * gensymlist.sh.in: Likewise.
13319 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13321 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13322 clobber "prefix", since we may have already set it manually.
13324 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13326 * kern/misc.c (abort): New alias for grub_abort.
13328 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13330 A new machine-specific function "grub_machine_set_prefix" is
13331 defined. This is called after loading modules, so that a prefix
13332 initialization can use modules. Also, this change adds an
13333 intensive debugging feature for the memory manager via the
13334 configure option "--enable-mm-debug".
13336 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13339 * kern/sparc64/ieee1275/init.c (abort): Removed.
13340 (grub_stop): Likewise.
13341 (grub_exit): New function.
13342 (grub_set_prefix): Renamed to ...
13343 (grub_machine_set_prefix): ... this.
13344 (grub_machine_init): Do not call grub_set_prefix.
13346 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13347 (grub_machine_set_prefix): ... this.
13348 (grub_machine_init): Do not call grub_set_prefix.
13350 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13351 (grub_machine_init): Do not set the prefix here.
13353 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13355 * kern/efi/init.c: Include grub/mm.h.
13356 (grub_efi_set_prefix): New function.
13358 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13359 (grub_efi_get_filename): New function.
13360 (grub_print_device_path): Renamed to ...
13361 (grub_efi_print_device_path): ... this.
13363 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13364 [MM_DEBUG] (grub_realloc): Likewise.
13365 [MM_DEBUG] (grub_free): Likewise.
13366 [MM_DEBUG] (grub_memalign): Likewise.
13367 [MM_DEBUG] (grub_mm_debug): New variable.
13368 [MM_DEBUG] (grub_debug_malloc): New function.
13369 [MM_DEBUG] (grub_debug_free): New function.
13370 [MM_DEBUG] (grub_debug_realloc): New function.
13371 [MM_DEBUG] (grub_debug_memalign): New function.
13373 * kern/misc.c (grub_abort): Print a newline to distinguish
13376 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13377 grub_set_root_dev after loading modules. This is necessary when
13378 setting a prefix depends on modules.
13380 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13381 (grub_efi_print_device_path): ... this.
13382 (grub_efi_get_filename): New prototype.
13383 (grub_efi_set_prefix): Likewise.
13385 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13387 (grub_efidisk_get_device_handle): New prototype.
13388 (grub_efidisk_get_device_name): Likewise.
13390 * include/grub/mm.h: Include config.h.
13391 (MM_DEBUG): Removed.
13392 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13393 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13394 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13395 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13396 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13397 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13398 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13399 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13400 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13402 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13404 * disk/efi/efidisk.c: Include grub/partition.h.
13405 (iterate_child_devices): New function.
13406 (add_device): First, compare only last device path nodes, so that
13407 devices are sorted by the types.
13408 (grub_efidisk_get_device_handle): New function.
13409 (grub_efidisk_get_device_name): Likewise.
13411 * configure.ac (--enable-mm-debug): New option to enable the
13412 memory manager debugging feature. This makes the binary much
13413 bigger, so is disabled by default.
13415 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13417 Use grub_abort instead of grub_stop, and grub_exit must be
13418 define in each architecture now. Also, this change adds support
13421 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13422 (grub_getkey): New function.
13423 (grub_term_get_current): Likewise.
13425 * util/i386/pc/grub-setup.c: Include grub/term.h.
13426 (grub_getkey): New function.
13427 (grub_term_get_current): Likewise.
13429 * util/misc.c (grub_stop): Renamed to ...
13430 (grub_exit): ... this.
13432 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13433 (grub_exit): ... this.
13434 (grub_machine_init): Use grub_abort instead of abort.
13435 (grub_stop): Removed.
13437 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13440 * kern/i386/pc/startup.S (grub_exit): New function.
13441 (cold_reboot): New label.
13443 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13444 (grub_efi_init): Call grub_efidisk_init.
13445 (grub_efi_fini): Call grub_efidisk_fini.
13447 * kern/efi/efi.c: Include grub/mm.h.
13448 (grub_efi_console_control_guid): Renamed to ...
13449 (console_control_guid): ... this.
13450 (grub_efi_loaded_image_guid): Renamed to ...
13451 (loaded_image_guid): ... this.
13452 (grub_efi_locate_handle): New function.
13453 (grub_efi_open_protocol): Likewise.
13454 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13455 GRUB_EFI_CONSOLE_CONTROL_GUID.
13456 (grub_efi_exit): Removed.
13457 (grub_stop): Likewise.
13458 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13459 (grub_exit): New function.
13460 (grub_print_device_path): Likewise.
13462 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13463 (grub_enter_rescue_mode): Register "exit".
13465 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13466 (grub_abort): New function.
13468 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13470 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13472 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13474 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13475 (grub_print_device_path): New prototype.
13476 (grub_efi_locate_handle): Likewise.
13477 (grub_efi_open_protocol): Likewise.
13479 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13480 * disk/efi/efidisk.c: Likewise.
13482 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13484 * include/grub/efi/console_control.h
13485 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13487 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13488 last 8 bytes as an array.
13489 (GRUB_EFI_DISK_IO_GUID): New macro.
13490 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13491 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13492 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13494 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13495 (struct grub_efi_device_path): Rename the member "sub_type" to
13497 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13498 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13499 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13500 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13501 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13502 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13503 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13504 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13505 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13506 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13507 (struct grub_efi_pci_device_path): New structure.
13508 (grub_efi_pci_device_path_t): New type.
13509 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13510 (struct grub_efi_pccard_device_path): New structure.
13511 (grub_efi_pccard_device_path_t): New type.
13512 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13513 (struct grub_efi_memory_mapped_device_path): New structure.
13514 (grub_efi_memory_mapped_device_path_t): New type.
13515 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13516 (struct grub_efi_vendor_device_path): New structure.
13517 (grub_efi_vendor_device_path_t): New type.
13518 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13519 (struct grub_efi_controller_device_path): New structure.
13520 (grub_efi_controller_device_path_t): New type.
13521 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13522 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13523 (struct grub_efi_acpi_device_path): New structure.
13524 (grub_efi_acpi_device_path_t): New type.
13525 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13526 (struct grub_efi_expanded_acpi_device_path): New structure.
13527 (grub_efi_expanded_acpi_device_path_t): New type.
13528 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13529 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13530 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13531 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13532 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13533 (struct grub_efi_atapi_device_path): New structure.
13534 (grub_efi_atapi_device_path_t): New type.
13535 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13536 (struct grub_efi_fibre_channel_device_path): New structure.
13537 (grub_efi_fibre_channel_device_path_t): New type.
13538 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13539 (struct grub_efi_1394_device_path): New structure.
13540 (grub_efi_1394_device_path_t): New type.
13541 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13542 (struct grub_efi_usb_device_path): New structure.
13543 (grub_efi_usb_device_path_t): New type.
13544 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13545 (struct grub_efi_usb_class_device_path): New structure.
13546 (grub_efi_usb_class_device_path_t): New type.
13547 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13548 (struct grub_efi_i2o_device_path): New structure.
13549 (grub_efi_i2o_device_path_t): New type.
13550 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13551 (struct grub_efi_mac_address_device_path): New structure.
13552 (grub_efi_mac_address_device_path_t): New type.
13553 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13554 (struct grub_efi_ipv4_device_path): New structure.
13555 (grub_efi_ipv4_device_path_t): New type.
13556 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13557 (struct grub_efi_ipv6_device_path): New structure.
13558 (grub_efi_ipv6_device_path_t): New type.
13559 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13560 (struct grub_efi_infiniband_device_path): New structure.
13561 (grub_efi_infiniband_device_path_t): New type.
13562 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13563 (struct grub_efi_uart_device_path): New structure.
13564 (grub_efi_uart_device_path_t): New type.
13565 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13566 (struct grub_efi_vendor_messaging_device_path): New structure.
13567 (grub_efi_vendor_messaging_device_path_t): New type.
13568 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13569 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13570 (struct grub_efi_hard_drive_device_path): New structure.
13571 (grub_efi_hard_drive_device_path_t): New type.
13572 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13573 (struct grub_efi_cdrom_device_path): New structure.
13574 (grub_efi_cdrom_device_path_t): New type.
13575 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13576 (struct grub_efi_vendor_media_device_path): New structure.
13577 (grub_efi_vendor_media_device_path_t): New type.
13578 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13579 (struct grub_efi_file_path_device_path): New structure.
13580 (grub_efi_file_path_device_path_t): New type.
13581 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13582 (struct grub_efi_protocol_device_path): New structure.
13583 (grub_efi_protocol_device_path_t): New type.
13584 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13585 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13586 (struct grub_efi_bios_device_path): New structure.
13587 (grub_efi_bios_device_path_t): New type.
13588 (struct grub_efi_disk_io): New structure.
13589 (grub_efi_disk_io_t): New type.
13590 (struct grub_efi_block_io_media): New structure.
13591 (grub_efi_block_io_media_t): New type.
13592 (struct grub_efi_block_io): New structure.
13593 (grub_efi_block_io_t): New type.
13595 * include/grub/misc.h (grub_stop): Removed.
13596 (grub_exit): New prototype.
13597 (grub_abort): Likewise.
13599 * include/grub/disk.h (enum grub_disk_dev_id): Added
13600 GRUB_DISK_DEVICE_EFIDISK_ID.
13602 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13603 disk/efi/efidisk.c.
13604 (kernel_syms.lst): Remove the target if an error occurs.
13606 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13608 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13609 as it was simply too buggy.
13611 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13613 * kern/misc.c (grub_lltoa): New function.
13614 (grub_vsprintf): Added support for the long long suffix,
13617 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13619 * Makefile.in (LDFLAGS): Add variable.
13620 (LD): Remove variable.
13621 * configure.ac: Add -m32 to LDFLAGS.
13622 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13623 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13624 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13625 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13626 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13628 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13629 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13630 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13632 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13634 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13635 length for unknown glyph.
13637 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13639 Add support for pre-loaded modules into the EFI port.
13641 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13642 completely. Accept one more argument DIR. The caller has changed.
13644 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13646 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13647 (grub_efi_loaded_image_guid): New variable.
13648 (grub_efi_get_loaded_image): New function.
13649 (grub_arch_modules_addr): Likewise.
13651 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13654 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13655 (struct grub_efi_loaded_image): New structure.
13656 (grub_efi_loaded_image_t): New type.
13658 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13660 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13661 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13662 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13664 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13666 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13668 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13670 * DISTLIST: Added include/grub/efi/console.h,
13671 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13672 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13674 * include/grub/efi/console.h: New file.
13675 * include/grub/efi/time.h: Likewise.
13676 * include/grub/i386/efi/kernel.h: Likewise.
13677 * kern/efi/init.c: Likewise.
13678 * kern/efi/mm.c: Likewise.
13679 * term/efi/console.c: Likewise.
13681 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13682 (grub_stop): Removed.
13683 (grub_get_rtc): Likewise.
13684 (grub_machine_init): Simply call grub_efi_init.
13685 (grub_machine_fini): Call grub_efi_fini.
13687 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13688 (grub_efi_output_string): Removed.
13689 (grub_efi_stall): New function.
13690 (grub_stop): Likewise.
13691 (grub_get_rtc): Likewise.
13693 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13694 (grub_efi_stall): New prototype.
13695 (grub_efi_allocate_pages): Likewise.
13696 (grub_efi_free_pages): Likewise.
13697 (grub_efi_get_memory_map): Likewise.
13698 (grub_efi_mm_init): Likewise.
13699 (grub_efi_mm_fini): Likewise.
13700 (grub_efi_init): Likewise.
13701 (grub_efi_fini): Likewise.
13703 * include/grub/i386/efi/time.h: Do not include
13704 grub/symbol.h. Include grub/efi/time.h.
13705 (GRUB_TICKS_PER_SECOND): Removed.
13706 (grub_get_rtc): Likewise.
13708 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13709 Added padding. The EFI spec is buggy.
13710 (GRUB_EFI_BLACK): New macro.
13711 (GRUB_EFI_BLUE): Likewise.
13712 (GRUB_EFI_GREEN): Likewise.
13713 (GRUB_EFI_CYAN): Likewise.
13714 (GRUB_EFI_RED): Likewise.
13715 (GRUB_EFI_MAGENTA): Likewise.
13716 (GRUB_EFI_BROWN): Likewise.
13717 (GRUB_EFI_LIGHTGRAY): Likewise.
13718 (GRUB_EFI_BRIGHT): Likewise.
13719 (GRUB_EFI_DARKGRAY): Likewise.
13720 (GRUB_EFI_LIGHTBLUE): Likewise.
13721 (GRUB_EFI_LIGHTGREEN): Likewise.
13722 (GRUB_EFI_LIGHTCYAN): Likewise.
13723 (GRUB_EFI_LIGHTRED): Likewise.
13724 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13725 (GRUB_EFI_YELLOW): Likewise.
13726 (GRUB_EFI_WHITE): Likewise.
13727 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13728 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13729 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13730 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13731 (GRUB_EFI_BACKGROUND_RED): Likewise.
13732 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13733 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13734 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13735 (GRUB_EFI_TEXT_ATTR): Likewise.
13737 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13738 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13739 (kernel_mod_HEADERS): Added efi/time.h.
13741 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13743 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13744 include/grub/efi/api.h, include/grub/efi/console_control.h,
13745 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13746 include/grub/i386/efi/time.h, kern/efi/efi.c,
13747 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13748 and util/i386/efi/grub-mkimage.c.
13750 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13752 * genmk.rb (PModule#rule): Do not export symbols if
13753 #{prefix}_EXPORTS is set to "no".
13755 * conf/i386-efi.mk: New file.
13756 * conf/i386-efi.rmk: Likewise.
13757 * include/grub/efi/api.h: Likewise.
13758 * include/grub/efi/console_control.h: Likewise.
13759 * include/grub/efi/efi.h: Likewise.
13760 * include/grub/efi/pe32.h: Likewise.
13761 * include/grub/i386/efi/time.h: Likewise.
13762 * kern/efi/efi.c: Likewise.
13763 * kern/i386/efi/init.c: Likewise.
13764 * kern/i386/efi/startup.S: Likewise.
13765 * util/i386/efi/grub-mkimage.c: Likewise.
13767 2006-04-17 Marco Gerards <marco@gnu.org>
13769 * include/grub/script.h: Include <grub/parser.h> and
13770 "grub_script.tab.h".
13771 (struct grub_lexer_param): New struct.
13772 (struct grub_parser_param): Likewise.
13773 (grub_script_create_arglist): Pass the state in an argument.
13774 (grub_script_add_arglist): Likewise.
13775 (grub_script_create_cmdline): Likewise.
13776 (grub_script_create_cmdblock): Likewise.
13777 (grub_script_create_cmdif): Likewise.
13778 (grub_script_create_cmdmenu): Likewise.
13779 (grub_script_add_cmd): Likewise.
13780 (grub_script_arg_add): Likewise.
13781 (grub_script_lexer_ref): Likewise.
13782 (grub_script_lexer_deref): Likewise.
13783 (grub_script_lexer_record_start): Likewise.
13784 (grub_script_lexer_record_stop): Likewise.
13785 (grub_script_mem_record): Likewise.
13786 (grub_script_mem_record_stop): Likewise.
13787 (grub_script_malloc): Likewise.
13788 (grub_script_yylex): Likewise.
13789 (grub_script_yyparse): Likewise.
13790 (grub_script_yyerror): Likewise.
13791 (grub_script_yylex): Likewise.
13792 (grub_script_lexer_init): Return the state.
13794 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13795 (grub_script_lexer_done): Likewise.
13796 (grub_script_lexer_getline): Likewise.
13797 (grub_script_lexer_refs): Likewise.
13798 (script): Likewise.
13799 (newscript): Likewise.
13800 (record): Likewise.
13801 (recording): Likewise.
13802 (recordpos): Likewise.
13803 (recordlen): Likewise.
13804 (grub_script_lexer_init): Return the state instead of setting
13806 (grub_script_lexer_ref): Use the newly added argument for state
13807 instead of globals.
13808 (grub_script_lexer_deref): Likewise.
13809 (grub_script_lexer_record_start): Likewise.
13810 (grub_script_lexer_record_stop): Likewise.
13811 (recordchar): Likewise.
13812 (nextchar): Likewise.
13813 (grub_script_yylex2): Likewise.
13814 (grub_script_yylex): Likewise.
13815 (grub_script_yyerror): Likewise.
13817 * normal/parser.y (func_mem): Removed variable.
13818 (menu_entry): Likewise.
13820 (%lex-param): New parser option.
13821 (%parse-param): Likewise.
13822 (script): Always return the AST.
13823 (argument): Pass the state around.
13824 (arguments): Likewise.
13825 (grubcmd): Likewise.
13826 (commands): Likewise.
13827 (function): Likewise.
13828 (menuentry): Likewise.
13829 (if_statement): Likewise.
13832 * normal/script.c (grub_script_memused): Removed variable.
13833 (grub_script_parsed): Likewise.
13834 (grub_script_malloc): Added a state argument. Use that instead of
13836 (grub_script_mem_record): Likewise.
13837 (grub_script_mem_record_stop): Likewise.
13838 (grub_script_arg_add): Likewise.
13839 (grub_script_add_arglist): Likewise.
13840 (grub_script_create_cmdline): Likewise.
13841 (grub_script_create_cmdif): Likewise.
13842 (grub_script_create_cmdmenu): Likewise.
13843 (grub_script_add_cmd): Likewise.
13844 (grub_script_parse): Setup the state before calling the parser.
13846 2006-04-16 Marco Gerards <marco@gnu.org>
13848 * normal/command.c (grub_command_init): Remove the title command.
13850 * normal/lexer.c (grub_script_yylex): Renamed from this...
13851 (grub_script_yylex2): ... to this.
13852 (grub_script_yylex): New function. Temporary
13853 introduced to filter some tokens.
13854 (grub_script_yyerror): Print a newline.
13856 * normal/main.c (read_config_file): Output information about the
13857 lines that contain errors. Wait for a key after all lines have
13858 been processed. Don't return an empty menu.
13860 * normal/parser.y (func_mem): Don't initialize.
13861 (menu_entry): Likewise.
13862 (err): New variable.
13863 (script): Don't return anything when an error was encountered.
13864 (ws, returns): Removed rules.
13865 (argument): Disabled concatenated variable support.
13866 (arguments): Remove explicit separators.
13867 (grubcmd): Likewise.
13868 (function): Likewise.
13869 (menuentry): Likewise.
13871 (commands): Likewise. Add error handling.
13873 * normal/script.c (grub_script_create_cmdline): If
13874 `grub_script_parsed' is 0, assume the parser encountered an error.
13876 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13878 * configure.ac: Add support for EFI. Fix the typo
13879 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13881 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13883 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13884 foreign multibyte characters should be shown correctly.
13886 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13888 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13890 (read_config_file): Made it to close file before returning.
13892 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13894 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13895 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13896 video/i386/pc/vbefill.c.
13898 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13899 video/i386/pc/vbefill.c.
13901 * include/grub/video.h (grub_video_blit_format): New enum.
13902 (grub_video_mode_info): Added new member blit_format.
13903 (grub_video_get_blit_format): New function prototype.
13905 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13906 function prototype.
13907 (grub_video_vbe_map_rgb): Likewise.
13908 (grub_video_vbe_unmap_color): Likewise.
13910 * include/grub/i386/pc/vbeblit.h: New file.
13912 * include/grub/i386/pc/vbefill.h: New file.
13914 * video/video.c (grub_video_get_blit_format): New function.
13915 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13916 (grub_video_vbe_map_rgb): Likewise.
13917 (grub_video_vbe_unmap_color): Likewise.
13919 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13921 (grub_video_vbe_blit_render_target): Changed to use more optimized
13923 (grub_video_vbe_setup): Added detection for optimized settings.
13924 (grub_video_vbe_create_render_target): Likewise.
13926 * video/i386/pc/vbeblit.c: New file.
13928 * video/i386/pc/vbefill.c: New file.
13930 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13932 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13935 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13936 parsing to support both hex and dec ranges. If filename was missing
13937 show usage information.
13939 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13941 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13942 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13944 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13945 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13946 (video_mod_SOURCES): Added.
13947 (video_mod_CFLAGS): Likewise.
13948 (video_mod_LDFLAGS): Likewise.
13949 (gfxterm_mod_SOURCES): Likewise.
13950 (gfxterm_mod_CFLAGS): Likewise.
13951 (gfxterm_mod_LDFLAGS): Likewise.
13952 (videotest_mod_SOURCES): Likewise.
13953 (videotest_mod_CFLAGS): Likewise.
13954 (videotest_mod_LDFLAGS): Likewise.
13955 (vesafb_mod_SOURCES): Removed.
13956 (vesafb_mod_CFLAGS): Likewise.
13957 (vesafb_mod_LDFLAGS): Likewise.
13958 (vga_mod_SOURCES): Likewise.
13959 (vga_mod_CFLAGS): Likewise.
13960 (vga_mod_LDFLAGS): Likewise.
13962 * commands/videotest.c: New file.
13964 * font/manager.c (fill_with_default_glyph): Modified to use
13966 (grub_font_get_glyph): Likewise.
13967 (fontmanager): Renamed from this...
13968 (font_manager): ... to this.
13970 * include/grub/font.h (grub_font_glyph): Added new structure.
13971 (grub_font_get_glyph): Modified to use grub_font_glyph.
13973 * include/grub/misc.h (grub_abs): Added as inline function.
13975 * include/grub/video.h: New file.
13977 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13978 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13979 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13980 (grub_vbe_get_controller_info): Renamed from this...
13981 (grub_vbe_bios_get_controller_info): ... to this.
13982 (grub_vbe_get_mode_info): Renamed from this...
13983 (grub_vbe_bios_get_mode_info): ... to this.
13984 (grub_vbe_set_mode): Renamed from this...
13985 (grub_vbe_bios_set_mode): ... to this.
13986 (grub_vbe_get_mode): Renamed from this...
13987 (grub_vbe_bios_get_mode): ... to this.
13988 (grub_vbe_set_memory_window): Renamed from this...
13989 (grub_vbe_bios_set_memory_window): ... to this.
13990 (grub_vbe_get_memory_window): Renamed from this...
13991 (grub_vbe_bios_get_memory_window): ... to this.
13992 (grub_vbe_set_scanline_length): Renamed from this...
13993 (grub_vbe_set_scanline_length): ... to this.
13994 (grub_vbe_get_scanline_length): Renamed from this...
13995 (grub_vbe_bios_get_scanline_length): ... to this.
13996 (grub_vbe_set_display_start): Renamed from this...
13997 (grub_vbe_bios_set_display_start): ... to this.
13998 (grub_vbe_get_display_start): Renamed from this...
13999 (grub_vbe_bios_get_display_start): ... to this.
14000 (grub_vbe_set_palette_data): Renamed from this...
14001 (grub_vbe_bios_set_palette_data): ... to this.
14002 (grub_vbe_set_pixel_rgb): Removed.
14003 (grub_vbe_set_pixel_index): Likewise.
14005 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14007 (grub_vbe_bios_get_controller_info): ... to this.
14008 (grub_vbe_get_mode_info): Renamed from this...
14009 (grub_vbe_bios_get_mode_info): ... to this.
14010 (grub_vbe_set_mode): Renamed from this...
14011 (grub_vbe_bios_set_mode): ... to this.
14012 (grub_vbe_get_mode): Renamed from this...
14013 (grub_vbe_bios_get_mode): ... to this.
14014 (grub_vbe_set_memory_window): Renamed from this...
14015 (grub_vbe_bios_set_memory_window): ... to this.
14016 (grub_vbe_get_memory_window): Renamed from this...
14017 (grub_vbe_bios_get_memory_window): ... to this.
14018 (grub_vbe_set_scanline_length): Renamed from this...
14019 (grub_vbe_set_scanline_length): ... to this.
14020 (grub_vbe_get_scanline_length): Renamed from this...
14021 (grub_vbe_bios_get_scanline_length): ... to this.
14022 (grub_vbe_set_display_start): Renamed from this...
14023 (grub_vbe_bios_set_display_start): ... to this.
14024 (grub_vbe_get_display_start): Renamed from this...
14025 (grub_vbe_bios_get_display_start): ... to this.
14026 (grub_vbe_set_palette_data): Renamed from this...
14027 (grub_vbe_bios_set_palette_data): ... to this.
14028 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14029 getting corrupted after calling it. Added more pushes and pops.
14030 (grub_vbe_bios_set_mode): Likewise.
14031 (grub_vbe_bios_get_mode): Likewise.
14032 (grub_vbe_bios_get_memory_window): Likewise.
14033 (grub_vbe_bios_set_scanline_length): Likewise.
14034 (grub_vbe_bios_get_scanline_length): Likewise.
14035 (grub_vbe_bios_get_display_start): Likewise.
14036 (grub_vbe_bios_set_palette_data): Likewise.
14038 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14039 (cl_insert): Likewise.
14040 (cl_delete): Likewise.
14042 * term/gfxterm.c: New file.
14044 * term/i386/pc/vesafb.c: Removed file.
14046 * video/video.c: New file.
14048 * video/i386/pc/vbe.c (real2pm): Added new function.
14049 (grub_video_vbe_draw_pixel): Likewise.
14050 (grub_video_vbe_get_video_ptr): Likewise.
14051 (grub_video_vbe_get_pixel): Likewise
14052 (grub_video_vbe_init): Likewise.
14053 (grub_video_vbe_fini): Likewise.
14054 (grub_video_vbe_setup): Likewise.
14055 (grub_video_vbe_get_info): Likewise.
14056 (grub_video_vbe_set_palette): Likewise.
14057 (grub_video_vbe_get_palette): Likewise.
14058 (grub_video_vbe_set_viewport): Likewise.
14059 (grub_video_vbe_get_viewport): Likewise.
14060 (grub_video_vbe_map_color): Likewise.
14061 (grub_video_vbe_map_rgb): Likewise.
14062 (grub_video_vbe_map_rgba): Likewise.
14063 (grub_video_vbe_unmap_color): Likewise.
14064 (grub_video_vbe_fill_rect): Likewise.
14065 (grub_video_vbe_blit_glyph): Likewise.
14066 (grub_video_vbe_blit_bitmap): Likewise.
14067 (grub_video_vbe_blit_render_target): Likewise.
14068 (grub_video_vbe_scroll): Likewise.
14069 (grub_video_vbe_swap_buffers): Likewise.
14070 (grub_video_vbe_create_render_target): Likewise.
14071 (grub_video_vbe_delete_render_target): Likewise.
14072 (grub_video_vbe_set_active_render_target): Likewise.
14073 (grub_vbe_set_pixel_rgb): Remove function.
14074 (grub_vbe_set_pixel_index): Likewise.
14075 (index_color_mode): Remove static variable.
14076 (active_mode): Likewise.
14077 (framebuffer): Likewise.
14078 (bytes_per_scan_line): Likewise.
14079 (grub_video_vbe_adapter): Added new static variable.
14080 (framebuffer): Likewise.
14081 (render_target): Likewise.
14082 (initial_mode): Likewise.
14083 (mode_in_use): Likewise.
14084 (mode_list): Likewise.
14086 2006-03-10 Marco Gerards <marco@gnu.org>
14088 * configure.ac (AC_INIT): Bumped to 1.93.
14090 * DISTLIST: Added `include/grub/hfs.h'.
14092 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14094 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14095 18H, which might help the BIOS falling back to next boot media.
14097 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14099 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14100 Poe Chen <poe.poechen@gmail.com>.
14102 2006-01-17 Marco Gerards <marco@gnu.org>
14104 * include/grub/normal.h: Include <grub/script.h>.
14105 (grub_command_list): Removed struct.
14106 (grub_command_list_t): Removed type.
14107 (grub_menu_entry): Remove members `num' and `command_list'. Add
14108 members `commands' and `sourcecode'.
14109 * include/grub/script.h: Add inclusion guards.
14110 (grub_script_cmd_menuentry): New struct.
14111 (grub_script_execute_menuentry): New prototype.
14112 (grub_script_lexer_record_start): Likewise.
14113 (grub_script_lexer_record_stop): Likewise.
14114 * normal/execute.c (grub_script_execute_menuentry): New function.
14115 * normal/lexer.c (record, recording, recordpos, recordlen): New
14117 (grub_script_lexer_record_start): New function.
14118 (grub_script_lexer_record_stop): Likewise.
14119 (recordchar): Likewise.
14120 (nextchar): Likewise.
14121 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14122 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14123 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14124 (current_menu): New variable.
14125 (free_menu): Mainly rewritten.
14126 (grub_normal_menu_addentry): New function.
14127 (read_config_file): Rewritten.
14128 * normal/menu.c (run_menu_entry): Mainly rewritten.
14129 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14131 (run): Mainly rewritten.
14132 * normal/parser.y (menu_entry): New variable.
14133 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14134 (menuentry): New rule.
14135 (command): Add `menuentry'.
14136 (if_statement): Allow additional returns before `fi'.
14137 * normal/script.c (grub_script_create_cmdmenu): New function.
14139 2006-01-03 Marco Gerards <marco@gnu.org>
14141 * INSTALL: GNU Bison is required.
14142 * configure.ac: Rewritten the test to detect Bison.
14143 * Makefile.in (YACC): New variable. Reported by Xun Sun
14144 <xun.sun.cn@gmail.com>.
14146 2006-01-03 Marco Gerards <marco@gnu.org>
14148 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14149 the HFS+ filesystem to filesystem blocks.
14150 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14151 GCC warning is silenced.
14153 2006-01-03 Marco Gerards <marco@gnu.org>
14155 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14156 read from disk from big endian to host byte order.
14158 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14160 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14162 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14163 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14164 embedded HFS+ filesystem.
14165 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14166 (grub_hfs_sblock): Move from here...
14167 * include/grub/hfs.h: To here... New file.
14168 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14170 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14172 (grub_hfsplus_volheader): Change type of member `magic' to
14174 (grub_hfsplus_data): Add new member `embedded_offset'.
14175 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14177 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14178 Calculate the offset.
14180 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14182 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14184 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14186 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14188 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14189 ENV->NAME is NULL after allocating ENV->VALUE.
14191 2005-12-25 Marco Gerards <marco@gnu.org>
14193 * kern/env.c (grub_env_set): Rewritten the error handling code.
14195 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14197 * geninit.sh: Made more robust, and more portable.
14199 2005-12-25 Marco Gerards <marco@gnu.org>
14201 Add support for Apple HFS+ filesystems.
14203 * fs/hfsplus.c: New file.
14205 * DISTLIST: Added `fs/hfsplus.c'.
14207 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14208 (hfsplus_mod_SOURCES): New variable.
14209 (hfsplus_mod_CFLAGS): Likewise.
14210 (hfsplus_mod_LDFLAGS): Likewise.
14211 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14212 (grub_setup_SOURCES): Likewise.
14213 (grub_mkdevicemap_SOURCES): Likewise.
14214 (grub_emu_SOURCES): Likewise.
14215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14217 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14219 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14221 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14223 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14224 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14225 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14226 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14227 normal/lexer.c, normal/parser.y, normal/script.c, and
14229 Removed kern/sparc64/cache.c.
14231 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14232 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14235 * configure.ac (AC_INIT): Bumped to 1.92.
14237 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14239 * kern/err.c (grub_error_push): Added new function to support error
14241 (grub_error_pop): Likewise.
14242 (grub_error_stack_items): New local variable to support error stacks.
14243 (grub_error_stack_pos): Likewise.
14244 (grub_error_stack_assert): Likewise.
14245 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14247 (grub_print_error): Added support to print errors from error stack.
14249 * include/grub/err.h (grub_error_push): Added function prototype.
14250 (grub_error_pop): Likewise.
14252 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14254 * configure.ac: Accept `powerpc64' as host_cpu.
14255 (amd64): Rename to `biarch32'.
14257 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14258 non-cacheline-aligned addresses.
14260 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14261 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14262 if `size' is non-zero.
14264 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14266 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14267 and `cd' to make sure the filename is not prefixed with a
14269 (pkgdata_MODULES): Add `gpt.mod'.
14270 (gpt_mod_SOURCES): New variable.
14271 (gpt_mod_CFLAGS): Likewise.
14272 (gpt_mod_LDFLAGS): Likewise.
14274 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14276 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14279 * partmap/gpt.c: New file.
14281 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14282 GPT partition map is detected.
14284 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14286 * commands/i386/pc/play.c: New file.
14287 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14288 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14291 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14293 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14294 ((unused))' to silence gcc warning.
14296 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14298 * configure.ac: Correct `AC_PROG_YACC' test.
14300 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14302 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14303 check before installing files.
14305 2005-11-22 Mike Small <smallm@panix.com>
14307 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14308 number regex so multidigit numbers are recognized correctly.
14310 2005-11-22 Mike Small <smallm@panix.com>
14312 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14313 debugging message before attempting to claim memory.
14314 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14315 multiple addresses in case of failure.
14317 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14319 * term/tparm.c (get_space): Remove empty `if' statement.
14321 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14323 * kern/parser.c (check_varstate): Rename `state' to 's'.
14325 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14327 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14328 variable definitions to the beginning of each function. Sort stack
14330 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14331 `buf' argument to `char *'.
14333 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14335 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14336 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14337 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14338 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14339 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14340 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14341 configfile.mod, search.mod, gzio.mod and test.mod.
14342 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14343 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14344 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14345 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14346 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14347 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14348 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14349 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14350 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14351 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14352 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14353 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14354 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14355 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14356 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14357 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14358 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14359 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14360 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14361 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14362 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14363 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14364 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14366 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14368 (pkgdata_MODULES): Add test.mod.
14370 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14372 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14373 appending to variables with "+=".
14374 (PModule): Use full pathname to generate *.lst filenames.
14376 * Makefile.in: Fixed list rules moved from genmk.rb.
14377 (.DELETE_ON_ERROR): New special target.
14378 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14380 * conf/i386-pc.rmk: Include conf/common.mk.
14381 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14382 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14383 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14384 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14385 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14386 configfile.mod, search.mod, gzio.mod and test.mod.
14387 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14388 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14389 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14390 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14391 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14392 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14393 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14394 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14395 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14396 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14397 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14398 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14399 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14400 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14401 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14402 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14403 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14404 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14405 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14406 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14407 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14408 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14409 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14411 * conf/common.rmk: ... to here. New file.
14413 * conf/common.mk: New file.
14415 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14417 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14418 (grub_script.tab.c): ... here.
14420 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14421 (grub_script.tab.c): ... here.
14423 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14424 (grub_script.tab.c): ... here.
14426 * normal/command.c (grub_command_find): Fixed a memory leak of
14427 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14429 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14431 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14432 "@" which marks the start of a comment on ARM.
14433 (VARIABLE): Likewise.
14435 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14437 Add support for Linux/ADFS partition tables.
14439 * partmap/acorn.c: New file.
14441 * include/grub/acorn_filecore.h: Likewise.
14443 * DISTLIST: Added `partmap/acorn.c' and
14444 `include/grub/acorn_filecore.h'.
14446 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14448 (pkgdata_MODULES): Add `acorn.mod'.
14449 (acorn_mod_SOURCES): New variable.
14450 (acorn_mod_CFLAGS): Likewise.
14452 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14454 (pkgdata_MODULES): Add `acorn.mod'.
14455 (acorn_mod_SOURCES): New variable.
14456 (acorn_mod_CFLAGS): Likewise.
14458 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14459 (pkgdata_MODULES): Add `acorn.mod'.
14460 (acorn_mod_SOURCES): New variable.
14461 (acorn_mod_CFLAGS): Likewise.
14462 (acorn_mod_LDFLAGS): Likewise.
14464 * include/types.h (grub_disk_addr_t): New typedef.
14466 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14468 * geninit.sh: New file.
14470 * geninitheader.sh: Likewise.
14472 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14473 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14474 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14475 * commands/configfile.c (grub_configfile_init)
14476 (grub_configfile_fini): Likewise.
14477 * commands/default.c (grub_default_init, grub_default_fini):
14479 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14480 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14481 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14482 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14484 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14485 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14487 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14488 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14490 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14492 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14494 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14495 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14496 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14497 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14498 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14499 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14500 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14501 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14502 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14503 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14504 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14505 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14506 * partmap/amiga.c (grub_amiga_partition_map_init)
14507 (grub_amiga_partition_map_fini): Likewise.
14508 * partmap/apple.c (grub_apple_partition_map_init)
14509 (grub_apple_partition_map_fini): Likewise.
14510 * partmap/pc.c (grub_pc_partition_map_init)
14511 (grub_pc_partition_map_fini): Likewise.
14512 * partmap/sun.c (grub_sun_partition_map_init,
14513 grub_sun_partition_map_fini): Likewise.
14514 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14517 * util/grub-emu.c: Include <grub_modules_init.h>.
14518 (main): Don't initialize and de-initialize any modules directly,
14519 use `grub_init_all' and `grub_fini_all' instead.
14521 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14522 `grub_vesafb_mod_init'.
14523 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14525 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14526 `grub_vga_mod_init'. Updated all users.
14527 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14529 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14530 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14533 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14534 Generate a function to initialize the module in utilities.
14535 Updated all callers.
14536 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14537 initialize the module in utilities. Updated all callers.
14539 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14541 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14542 escape sequence and a literal ^L to clear the screen.
14544 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14545 when returning from Open Firmware.
14547 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14549 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14550 (grub_ofconsole_height): Likewise.
14551 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14552 manually insert a '\n'.
14553 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14554 `grub_ofconsole_height'. Return early if these are already set.
14556 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14558 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14559 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14560 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14561 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14562 and `normal/script.c'.
14563 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14564 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14565 (test_mod_SOURCES): New variable.
14566 (test_mod_CFLAGS): Likewise.
14567 (test_mod_LDFLAGS): Likewise.
14568 (pkgdata_MODULES): Add `test.mod'.
14569 (grub_script.tab.c): New rule.
14570 (grub_script.tab.h): Likewise.
14572 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14574 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14575 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14576 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14577 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14578 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14579 (test_mod_SOURCES): New variable.
14580 (test_mod_CFLAGS): Likewise.
14581 (pkgdata_MODULES): Add `test.mod'.
14582 (grub_script.tab.c): New rule.
14583 (grub_script.tab.h): Likewise.
14585 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14587 Add initial scripting support.
14589 * commands/test.c: New file.
14590 * include/grub/script.h: Likewise.
14591 * normal/execute.c: Likewise.
14592 * normal/function.c: Likewise.
14593 * normal/lexer.c: Likewise.
14594 * normal/parser.y: Likewise.
14595 * normal/script.c: Likewise.
14597 * configure.ac: Add `AC_PROG_YACC' test.
14599 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14600 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14601 `normal/function.c' and `normal/script.c'.
14602 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14603 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14604 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14606 (pkgdata_MODULES): Add `test.mod'.
14607 (grub_script.tab.c): New rule.
14608 (grub_script.tab.h): Likewise.
14610 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14612 * include/grub/normal.h (grub_test_init): New prototype.
14613 (grub_test_fini): Likewise.
14615 * normal/command.c: Include <grub/script.h>.
14616 (grub_command_execute): Rewritten.
14618 * util/grub-emu.c (main): Call `grub_test_init' and
14621 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14623 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14625 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14626 there are no pending characters.
14628 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14630 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14631 `grub_strndup' to drop device arguments. Replace unnecessary
14632 `grub_strndup' with `grub_strdup'.
14634 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14636 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14637 `debug' environment variable has been set.
14639 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14641 * Makefile.in (install-local): Use $(DATA).
14642 (uninstall): Likewise.
14643 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14644 (sbin_UTILITIES): ... to here.
14645 (sbin_SCRIPTS): New variable.
14646 (grub_install_SOURCES): New variable.
14647 * util/powerpc/ieee1275/grub-install.in: New file.
14648 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14650 (add_segments): Call `grub_util_get_path'.
14652 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14654 From Timothy Baldwin:
14655 * commands/ls.c (grub_ls_list_files): Close FILE with
14657 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14659 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14661 * include/grub/parser.h: New file.
14663 * kern/parser.c: Likewise.
14665 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14666 (grub_setup_SOURCES): Likewise.
14667 (grub_probefs_SOURCES): Likewise.
14668 (grub_emu_SOURCES): Likewise.
14669 (kernel_img_HEADERS): Add `parser.h'.
14671 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14672 (grub_emu_SOURCES): Add `kern/parser.c'.
14673 (grubof_SOURCES): Likewise.
14675 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14676 (grubof_SOURCES): Add `kern/parser.c'.
14678 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14680 * kern/misc.c (grub_split_cmdline): Removed function.
14682 * kern/rescue.c: Include <grub/parser.h>.
14683 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14684 of `grub_split_cmdline'.
14686 * normal/command.c: Include <grub/parser.h>.
14687 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14688 of `grub_split_cmdline'.
14690 * normal/completion.c: Include <grub/parser.h>.
14691 (cmdline_state): New variable.
14692 (iterate_dir): End the filename with a quote depending on the
14693 command line state.
14694 (get_state): new function.
14695 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14696 split the arguments and determine the current argument. When the
14697 argument string is not quoted, escape all spaces.
14699 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14701 * normal/sparc64/setjmp.S: New file.
14703 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14705 * include/grub/sparc64/libgcc.h: New file.
14706 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14707 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14708 normal/sparc64/setjmp.c.
14710 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14712 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14713 * kern/sparc64/cache.S: New file.
14714 * kern/sparc64/cache.c: Removed.
14715 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14716 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14718 (COMMON_LDFLAGS): Add -melf64_sparc.
14719 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14720 (grubof_SOURCES): Use cache.S instead of cache.c.
14721 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14722 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14723 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14725 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14726 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14727 (linux_mod_CFLAGS): Commented out.
14728 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14729 out because module isn't built.
14730 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14731 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14732 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14733 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14734 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14735 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14736 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14737 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14738 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14739 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14740 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14741 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14742 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14743 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14745 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14747 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14748 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14749 longer, because HFS should not be used on PC.
14751 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14753 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14754 consistently within the loop.
14756 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14758 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14759 directory can not be read.
14761 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14763 * configure.ac (AC_INIT): Increase the version number to 1.91.
14765 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14766 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14767 term/i386/pc/serial.c.
14769 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14771 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14772 file size must be permitted.
14774 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14775 between %ah and %al.
14777 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14779 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14781 Call the hook with a NUL-terminated filename.
14782 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14785 * kern/term.c (cursor_state): New variable.
14786 (grub_term_set_current): Reset the cursor state on a new
14788 (grub_setcursor): Rewritten to use CURSOR_STATE.
14789 (grub_getcursor): New function.
14791 * include/grub/term.h (grub_getcursor): New prototype.
14793 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14794 integers on ARM. Reported by Timothy Baldwin
14795 <T.E.Baldwin99@members.leeds.ac.uk>.
14797 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14799 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14801 (grub_sfs_dir): Likewise.
14803 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14805 Add support for the SFS filesystem.
14807 * fs/sfs.c: New file.
14809 * DISTLIST: Added `fs/sfs.c'.
14811 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14812 (grub_probefs_SOURCES): Likewise.
14813 (grub_emu_SOURCES): Likewise.
14814 (pkgdata_MODULES): Add `sfs.mod'.
14815 (sfs_mod_SOURCES): New variable.
14816 (sfs_mod_CFLAGS): Likewise.
14817 (sfs_mod_LDFLAGS): Likewise.
14819 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14820 (pkgdata_MODULES): Add `sfs.mod'.
14821 (sfs_mod_SOURCES): New variable.
14822 (sfs_mod_CFLAGS): Likewise.
14824 * util/grub-emu.c (main): Call `grub_sfs_init' and
14827 * include/grub/fs.h (grub_sfs_init): New prototype.
14828 (grub_sfs_fini): Likewise.
14830 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14832 Add support for the AFFS filesystem.
14834 * fs/affs.c: New file.
14836 * DISTLIST: Added `fs/affs.c'.
14838 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14839 (grub_probefs_SOURCES): Likewise.
14840 (grub_emu_SOURCES): Likewise.
14841 (pkgdata_MODULES): Add `affs.mod'.
14842 (affs_mod_SOURCES): New variable.
14843 (affs_mod_CFLAGS): Likewise.
14844 (affs_mod_LDFLAGS): Likewise.
14846 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14847 (pkgdata_MODULES): Add `affs.mod'.
14848 (affs_mod_SOURCES): New variable.
14849 (affs_mod_CFLAGS): Likewise.
14851 * util/grub-emu.c (main): Call `grub_affs_init' and
14854 * include/grub/fs.h (grub_affs_init): New prototype.
14855 (grub_affs_fini): Likewise.
14857 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14859 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14861 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14863 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14866 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14869 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14870 (COMMON_LDFLAGS): New variable.
14871 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14872 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14873 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14874 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14875 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14876 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14877 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14878 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14879 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14880 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14881 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14882 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14883 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14884 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14885 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14887 (normal_mod_ASFLAGS): Add `-m32'.
14889 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14890 (grub_host_size_t, grub_host_ssize_t): New types.
14891 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14892 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14893 `GRUB_HOST_SIZEOF_VOID_P'.
14895 * include/grub/kernel.h (struct grub_module_header): Type of
14896 member offset changed to `grub_host_off_t'. Type of member size
14897 changed to `grub_host_size_t'.
14898 (struct grub_module_info): Type of member offset changed to
14899 `grub_host_off_t'. Type of member size changed to
14900 `grub_host_size_t'.
14902 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14904 Make GRUB's kernel compliant to Multiboot Specification.
14906 * kern/i386/pc/startup.S (multiboot_header): New label.
14907 (multiboot_entry): Likewise.
14908 (multiboot_trampoline): Likewise.
14910 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14911 Increased to 0x4A0.
14913 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14914 put parentheses after a question mark.
14915 [!GRUB_UTIL] (my_mod): New variable.
14917 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14919 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14921 Adds support for the XFS filesystem. Btrees are not supported
14924 * fs/xfs.c: New file.
14926 * DISTLIST: Added `fs/xfs.c'.
14928 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14929 (grub_probefs_SOURCES): Likewise.
14930 (grub_emu_SOURCES): Likewise.
14931 (pkgdata_MODULES): Add `xfs.mod'.
14932 (xfs_mod_SOURCES): New variable.
14933 (xfs_mod_CFLAGS): Likewise.
14935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14936 (pkgdata_MODULES): Add `xfs.mod'.
14937 (xfs_mod_SOURCES): New variable.
14938 (xfs_mod_CFLAGS): Likewise.
14940 * util/grub-emu.c (main): Call `grub_xfs_init' and
14943 * include/grub/fs.h (grub_xfs_init): New prototype.
14944 (grub_xfs_fini): Likewise.
14947 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14949 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14950 color modes, allow greater than 16 colors to be configured as
14953 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14955 * normal/completion.c (complete_arguments): Add the qualifier
14956 const into OPTIONS.
14958 From Omniflux <omniflux+lists@omniflux.com>:
14959 * include/grub/terminfo.h: New file.
14960 * include/grub/tparm.h: Likewise.
14961 * include/grub/i386/pc/serial.h: Likewise.
14962 * term/terminfo.c: Likewise.
14963 * term/tparm.c: Likewise.
14964 * term/i386/pc/serial.c: Likewise.
14965 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14967 (terminfo_mod_SOURCES): New variable.
14968 (terminfo_mod_CFLAGS): Likewise.
14969 (serial_mod_SOURCES): Likewise.
14970 (serial_mod_CFLAGS): Likewise.
14972 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14974 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14975 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14976 and kern/powerpc/ieee1275/cmain.c, respectively.
14978 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14979 * kern/powerpc/ieee1275/crt0.S: ... here.
14981 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14982 * kern/powerpc/ieee1275/cmain.c: ... here.
14984 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14985 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14986 instead of boot/powerpc/ieee1275/crt0.S and
14987 boot/powerpc/ieee1275/cmain.c, respectively.
14989 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14990 sectors. It was not used anyway.
14992 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14994 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14995 `unused parameter' warning.
14997 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14999 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15001 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15004 2005-08-28 Marco Gerards <metgerards@student.han.nl>
15006 * include/grub/normal.h (enum grub_completion_type): Added
15007 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15009 * normal/cmdline.c (print_completion): Handle
15010 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15011 * normal/menu_entry.c (store_completion): Likewise.
15013 * normal/completion.c (complete_arguments): New function.
15014 (grub_normal_do_completion): Call `complete_arguments' when the
15015 current words start with a dash.
15017 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15019 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15020 `gzio.mod' instead of `io.mod').
15022 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15024 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15025 (DISTDIRS): Added io and video.
15026 Rewrite the search routine to make an output consistently.
15028 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15029 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15030 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15031 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15032 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15033 util/powerpc/ieee1275/misc.c.
15035 * include/grub/gzio.h: New file.
15036 * io/gzio.c: Likewise.
15038 * kern/file.c (grub_file_close): Call grub_device_close only if
15039 FILE->DEVICE is not NULL.
15041 * include/grub/mm.h [!NULL] (NULL): New macro.
15043 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15045 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15046 (pkgdata_MODULES): Added gzio.mod.
15047 (gzio_mod_SOURCES): New variable.
15048 (gzio_mod_CFLAGS): Likewise.
15050 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15051 (pkgdata_MODULES): Added gzio.mod.
15052 (gzio_mod_SOURCES): New variable.
15053 (gzio_mod_CFLAGS): Likewise.
15055 * commands/cat.c: Include grub/gzio.h.
15056 (grub_cmd_cat): Use grub_gzfile_open instead of
15059 * commands/cmp.c: Include grub/gzio.h.
15060 (grub_cmd_cmp): Use grub_gzfile_open instead of
15063 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15064 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15066 (grub_rescue_cmd_module): Likewise.
15068 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15070 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15071 kern/sparc64/ieee1275/init.c because it contains _start.
15072 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15074 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15076 * configure.ac: Add support for sparc64 host with ieee1275
15078 * configure: Generated from configure.ac.
15079 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15081 (grub_ofdisk_read): Likewise.
15082 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15083 pointers as (void *) to remove a warning.
15084 (grub_ofdisk_close): Likewise.
15085 (grub_ofdisk_read): Likewise.
15086 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15087 returns, so make it return void to remove a warning.
15088 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15089 Corresponding prototype change.
15090 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15091 values, and cast the pointers as (void *) to remove a warning.
15092 (grub_mm_dump): Likewise.
15093 * conf/sparc64-ieee1275.mk: New file.
15094 * conf/sparc64-ieee1275.rmk: Likewise.
15095 * include/grub/sparc64/setjmp.h: Likewise.
15096 * include/grub/sparc64/types.h: Likewise.
15097 * include/grub/sparc64/ieee1275/console.h: Likewise.
15098 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15099 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15100 * include/grub/sparc64/ieee1275/time.h: Likewise.
15101 * kern/sparc64/cache.c: Likewise.
15102 * kern/sparc64/dl.c: Likewise.
15103 * kern/sparc64/ieee1275/init.c: Likewise.
15104 * kern/sparc64/ieee1275/openfw.c: Likewise.
15106 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15108 * util/console.c (grub_ncurses_putchar): If C is greater than
15109 0x7f, set C to a question mark.
15110 (grub_ncurses_getcharwidth): New function.
15111 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15114 * normal/menu.c (print_entry): Made aware of Unicode. First,
15115 convert TITLE to UCS-4, and predict the cursor position by
15118 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15120 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15122 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15124 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15125 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15128 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15129 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15130 grub_strcpy and grub_strlen. Take it into account that a space
15131 character is inserted as a delimiter.
15133 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15135 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15136 invalid magic in the error.
15138 * commands/search.c: New file.
15140 * util/grub-emu.c (main): Call grub_search_init and
15143 * kern/rescue.c (grub_rescue_print_disks): Removed.
15144 (grub_rescue_print_devices): New function.
15145 (grub_rescue_cmd_ls): Use grub_device_iterate with
15146 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15147 grub_rescue_print_disks.
15149 * kern/partition.c (grub_partition_iterate): Return the result of
15150 PARTMAP->ITERATE instead of GRUB_ERRNO.
15152 * kern/device.c: Include grub/partition.h.
15153 (grub_device_iterate): New function.
15155 * include/grub/partition.h (grub_partition_iterate): Return int
15156 instead of grub_err_t.
15158 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15160 [GRUB_UTIL] (grub_search_fini): Likewise.
15162 * include/grub/device.h (grub_device_iterate): New prototype.
15164 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15166 (pkgdata_MODULES): Added search.mod.
15167 (search_mod_SOURCES): New variable.
15168 (search_mod_CFLAGS): Likewise.
15170 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15171 (pkgdata_MODULES): Added search.mod.
15172 (search_mod_SOURCES): New variable.
15173 (search_mod_CFLAGS): Likewise.
15175 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15176 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15177 All callers changed.
15179 * DISTLIST: Added commands/search.c.
15181 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15183 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15185 (grub_getcharwidth): New function.
15187 * kern/misc.c (grub_utf8_to_ucs4): New function.
15189 * include/grub/term.h (struct grub_term): Added a new member
15191 (grub_getcharwidth): New prototype.
15193 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15195 * term/i386/pc/console.c (map_char): New function. Segregated from
15196 grub_console_putchar.
15197 (grub_console_putchar): Use map_char.
15198 (grub_console_getcharwidth): New function.
15199 (grub_console_term): Specified grub_console_getcharwidth as
15202 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15203 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15205 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15207 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15208 on grub_strtoul completely.
15209 (write_char): Declare local variables in the beginning of the
15211 (grub_vesafb_getcharwidth): New function.
15212 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15215 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15217 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15218 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15219 commands/i386/pc/vbetest.c.
15221 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15222 call grub_vbe_get_controller_info again, because the returned
15223 information is volatile.
15224 (grub_vbe_set_video_mode): Mostly rewritten.
15225 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15226 grub_vbe_status_t correctly.
15227 (grub_vbe_get_video_mode_info): Likewise.
15228 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15229 several if statements.
15231 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15232 * commands/i386/pc/vbeinfo.c: ... this.
15234 * commands/i386/pc/vbe_test.c: Renamed to ...
15235 * commands/i386/pc/vbetest.c: ... this.
15237 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15239 (grub_cmd_vbeinfo): ... this. Save video modes before
15240 iterating. Skip a video mode, if it is not available, not enough
15241 information is given or it is monochrome. Show the memory
15242 model. Leave the interpretation of MODEVAR to grub_strtoul
15244 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15245 (GRUB_MOD_FINI): Likewise.
15247 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15248 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15249 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15250 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15251 grub_strtoul completely.
15252 (real2pm): Removed.
15253 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15254 (GRUB_MOD_FINI): Likewise.
15256 * normal/misc.c: Include grub/mm.h.
15258 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15259 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15260 (vbe_list_modes_mod_SOURCES): Removed.
15261 (vbe_list_modes_mod_CFLAGS): Likewise.
15262 (vbe_test_mod_SOURCES): Likewise.
15263 (vbe_test_mod_CFLAGS): Likewise.
15264 (vbeinfo_mod_SOURCES): New variable.
15265 (vbeinfo_mod_CFLAGS): Likewise.
15266 (vbetest_mod_SOURCES): Likewise.
15267 (vbetest_mod_CFLAGS): Likewise.
15269 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15271 * normal/misc.c: New file.
15273 * DISTLIST: Added normal/misc.c.
15275 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15276 DISK to HOOK. Call HOOK with DISK.
15277 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15278 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15279 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15281 * normal/menu_entry.c (struct screen): Added a new member
15282 "completion_shown".
15283 (completion_buffer): New global variable.
15284 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15285 (store_completion): New function.
15286 (complete): Likewise.
15287 (clear_completions): Likewise.
15288 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15289 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15290 a tab, call complete.
15292 * normal/completion.c (disk_dev): Removed.
15293 (print_simple_completion): Likewise.
15294 (print_partition_completion): Likewise.
15295 (print_func): New global variable.
15296 (add_completion): Do not take the arguments WHAT or PRINT any
15297 longer. Added a new argument TYPE. Instead of printing directly,
15298 call PRINT_FUNC if not NULL.
15299 All callers changed.
15300 (complete_device): Use a local variable DEV instead of
15301 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15302 (grub_normal_do_completion): Take a new argument HOOK. Do not
15303 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15304 empty string, return NULL instead.
15305 All callers changed.
15307 * normal/cmdline.c (print_completion): New function.
15309 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15311 All callers changed.
15313 * kern/disk.c (grub_print_partinfo): Removed.
15315 * include/grub/partition.h (struct grub_partition_map): Add a new
15316 argument DISK into HOOK of ITERATE.
15317 (grub_partition_iterate): Add a new argument DISK to HOOK.
15319 * include/grub/normal.h (enum grub_completion_type): New enum.
15320 (grub_completion_type_t): New type.
15321 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15322 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15323 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15324 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15325 (grub_normal_do_completion): Added a new argument HOOK.
15326 (grub_normal_print_device_info): New prototype.
15328 * include/grub/disk.h (grub_print_partinfo): Removed.
15330 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15331 (normal_mod_SOURCES): Likewise.
15332 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15333 (normal_mod_SOURCES): Likewise.
15335 * commands/ls.c (grub_ls_list_disks): Use
15336 grub_normal_print_device_info instead of grub_print_partinfo. Free
15338 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15339 duplicating the code.
15341 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15343 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15344 follow GCS more precisely.
15345 * commands/i386/pc/vbe_test.c: Likewise.
15346 * include/grub/i386/pc/vbe.h: Likewise.
15347 * term/i386/pc/vesafb.c: Likewise.
15348 * video/i386/pc/vbe.c: Likewise.
15350 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15352 * DISTLIST: Added term/i386/pc/vesafb.c
15353 DISTLIST: Added video/i386/pc/vbe.c
15354 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15355 DISTLIST: Added commands/i386/pc/vbe_test.c.
15356 * commands/i386/pc/vbe_list_modes.c: New file.
15357 * commands/i386/pc/vbe_test.c: Likewise.
15358 * term/i386/pc/vesafb.c: Likewise.
15359 * video/i386/pc/vbe.c: Likewise.
15360 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15361 (grub_vbe_probe) Added prototype.
15362 (grub_vbe_set_video_mode) Likewise.
15363 (grub_vbe_get_video_mode) Likewise.
15364 (grub_vbe_get_video_mode_info) Likewise.
15365 (grub_vbe_set_pixel_rgb) Likewise.
15366 (grub_vbe_set_pixel_index) Likewise.
15367 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15368 (pkgdata_MODULES): Added vesafb.mod.
15369 (pkgdata_MODULES): Added vbe_list_modes.mod.
15370 (pkgdata_MODULES): Added vbe_test.mod.
15371 (vbe_mod_SOURCES): Added.
15372 (vbe_mod_CFLAGS): Likewise.
15373 (vesafb_mod_SOURCES): Likewise.
15374 (vesafb_mod_CFLAGS): Likewise.
15375 (vbe_list_modes_mod_SOURCES): Likewise.
15376 (vbe_list_modes_mod_CFLAGS): Likewise.
15377 (vbe_test_mod_SOURCES): Likewise.
15378 (vbe_test_mod_CFLAGS): Likewise.
15380 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15382 * normal/command.c (grub_command_execute): If INTERACTIVE is
15383 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15384 CMDLINE. Disable the pager if INTERACTIVE is true.
15385 All callers are changed.
15387 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15388 before reading a config file.
15389 * normal/main.c (read_config_file): Even if a command is not
15390 found, register it if it is within an entry.
15392 * util/grub-emu.c: Include sys/types.h and unistd.h.
15393 (options): Added --hold.
15394 (struct arguments): Added a new member "hold".
15395 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15397 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15398 cleared by a debugger, if it is not zero.
15400 * include/grub/normal.h (grub_command_execute): Add an argument
15403 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15405 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15407 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15409 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15410 program with another one, because the old one didn't detect a bug
15411 in gcc-3.4. Always use regparm 2, because the new test is still
15412 not enough for gcc-4.0. Someone must investigate a simple test
15413 case which detects a bug in gcc-4.0.
15415 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15417 * DISTLIST: Added normal/completion.c.
15419 * normal/completion.c: New file.
15421 * term/i386/pc/console.c (grub_console_getwh): New function.
15422 (grub_console_term): Assign grub_console_getwh to getwh.
15424 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15425 function is defined in normal/completion.c as
15426 grub_normal_do_completion.
15427 (grub_cmdline_get): Use grub_normal_do_completion instead of
15430 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15431 returns non-zero, otherwise return 0.
15432 (grub_partition_iterate): First, probe the partition map. Then,
15433 call ITERATE only for this partition map.
15435 * kern/misc.c (grub_strncmp): Rewritten.
15437 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15438 returns non-zero. Otherwise return 0.
15440 * include/grub/partition.h (grub_partition_map_iterate): Return
15441 int instead of void.
15443 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15445 * include/grub/misc.h (grub_strncmp): Change the type of N to
15448 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15451 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15452 unsigned explicitly before comparing it with I.
15454 * kern/main.c (grub_env_write_root): Add the attribute unused into
15457 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15458 normal/completion.c.
15459 (normal_mod_SOURCES): Likewise.
15460 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15461 (normal_mod_SOURCES): Likewise.
15463 * normal/command.c (grub_iterate_commands): If ITERATE returns
15464 non-zero, return one immediately.
15466 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15468 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15469 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15471 (grub_vbe_get_controller_info): New function.
15472 (grub_vbe_get_mode_info): Likewise.
15473 (grub_vbe_set_mode): Likewise.
15474 (grub_vbe_get_mode): Likewise.
15475 (grub_vbe_set_memory_window): Likewise.
15476 (grub_vbe_get_memory_window): Likewise.
15477 (grub_vbe_set_scanline_length): Likewise.
15478 (grub_vbe_get_scanline_length): Likewise.
15479 (grub_vbe_set_display_start): Likewise.
15480 (grub_vbe_get_display_start): Likewise.
15481 (grub_vbe_set_palette_data): Likewise.
15482 * include/grub/i386/pc/vbe.h: New file.
15484 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15486 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15487 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15488 * DISTLIST: Likewise.
15489 * kern/ieee1275/of.c: Moved to ...
15490 * kern/ieee1275/ieee1275.c: ... here.
15492 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15494 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15495 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15496 Pass 0 as `end' parameter to grub_strtoul().
15498 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15500 * include/grub/powerpc/ieee1275/console.h: Do not include
15501 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15503 (grub_console_cur_color): Remove i386-specific prototype.
15504 (grub_console_real_putchar): Likewise.
15505 (grub_console_checkkey): Likewise.
15506 (grub_console_getkey): Likewise.
15507 (grub_console_getxy): Likewise.
15508 (grub_console_gotoxy): Likewise.
15509 (grub_console_cls): Likewise.
15510 (grub_console_setcursor): Likewise.
15511 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15512 Include <grub/machine/console.h>.
15513 * term/ieee1275/ofconsole.c: Likewise.
15515 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15517 * Makefile.in (LIBLZO): New variable.
15519 * configure.ac: Check for LZO version 2.
15521 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15522 lzo/lzo1x.h instead of lzo1x.h.
15524 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15527 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15528 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15530 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15531 copying the data from PARTITION to P.
15533 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15535 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15536 negative, unload the module.
15538 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15539 map is "pc_partition_map" but not "pc".
15540 (usage): Fix the description. The options are --boot-image and
15541 --core-image but not --boot-file or --core-file.
15542 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15543 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15546 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15547 --core-file. Specify INSTALL_DEVICE as an argument.
15549 * util/console.c: Include config.h.
15550 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15551 [HAVE_NCURSES_H]: Include ncurses.h.
15552 [HAVE_CURSES_H]: Include curses.h.
15553 [!A_NORMAL] (A_NORMAL): Defined as zero.
15554 [!A_STANDOUT] (A_STANDOUT): Likewise.
15556 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15558 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15560 * configure.ac: Check for curses libraries and headers.
15562 * Makefile.in (LIBCURSES): New variable.
15564 * genmk.rb (Script::rule): Set the executable bits.
15566 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15567 name of the PC partition map is "pc_partition_map" but not "pc".
15569 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15571 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15572 (modules): Likewise.
15573 (usage): Added descriptions for --modules and --grub-probefs.
15574 Handle --modules and --grub-probefs. Save the arguments in MODULES
15575 and GRUB_PROBEFS, respectively.
15576 Auto-detect a filesystem module against GRUBDIR. If the result is
15577 empty and modules are not specified explicitly, abort the
15578 installation. Add the result to MODULES.
15580 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15581 disk/powerpc/ieee1275/ofdisk.c,
15582 include/grub/powerpc/ieee1275/init.h and
15583 term/powerpc/ieee1275/ofconsole.c.
15584 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15585 term/ieee1275/ofconsole.c.
15587 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15589 * COPYING: Upgraded to the latest version. Only the address of the
15590 FSF office has changed.
15592 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15594 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15595 kern/ieee1275.c with kern/ieee1275/of.c.
15597 * kern/ieee1275.c: Moved to ...
15598 * kern/ieee1275/of.c: ... here.
15600 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15602 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15605 * config.guess: Updated to the latest version from gnulib.
15606 * config.sub: Likewise.
15607 * install.sh: Likewise.
15608 * mkinstalldirs: Likewise.
15610 * include/grub/console.h: Removed. This file is arch-specific. Do
15611 not put this in include/grub.
15613 * include/grub/i386/pc/console.h: Resurrected.
15615 * util/console.c: Include grub/machine/console.h instead of
15617 * util/grub-emu.c: Likewise.
15619 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15621 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15624 From Vincent Pelletier <subdino2004@yahoo.fr>
15625 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15626 Redefined to use grub_getwh.
15627 (grub_term): New member named getwh.
15628 (grub_getwh): New prototype.
15629 * kern/term.c (grub_getwh): New function.
15630 * term/i386/pc/console.c (grub_console_getwh): New function.
15631 (grub_console_term): New member `getwh'.
15632 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15633 (grub_vga_term): New member `getwh'.
15634 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15636 (grub_ofconsole_getw): New function.
15637 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15638 (grub_ofconsole_term): New field named getwh and new initial
15641 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15643 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15644 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15645 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15646 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15647 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15648 of <grub/machine/ieee1275.h>.
15649 * commands/ieee1275/reboot.c: Likewise.
15650 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15651 * kern/ieee1275.c: ... to here. All users updated. Change all
15652 parameter structs to use new type `grub_ieee1275_cell_t'.
15653 * term/powerpc/ieee1275/ofconsole.c: Move ...
15654 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15655 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15656 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15657 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15659 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15660 Remove unused prototypes. All users updated.
15661 * include/grub/powerpc/ieee1275/console.h: Removed.
15662 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15663 `grub_ieee1275_cell_t'.
15664 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15665 Cast comparisons with -1 to the correct type.
15666 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15667 type to match `grub_ieee1275_entry_fn'.
15669 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15671 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15673 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15674 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15676 (grub_probefs_SOURCES): New variable.
15678 * util/i386/pc/grub-probefs.c: New file.
15680 * util/i386/pc/grub-setup.c (main): Call
15681 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15682 grub_hfs_init and grub_jfs_init to initialize the system. Call
15683 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15684 grub_pc_partition_map_fini to finish the system.
15686 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15688 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15690 (grub_multiboot_load_elf32): Likewise.
15691 (grub_multiboot_is_elf64): Likewise.
15692 (grub_multiboot_load_elf64): Likewise.
15693 (grub_multiboot_load_elf): Likewise.
15694 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15695 an ELF32 or ELF64 file.
15696 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15698 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15699 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15700 NULL before calling FS->LABEL.
15701 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15702 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15703 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15704 before calling FS->LABEL.
15706 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15708 * util/i386/pc/grub-install.in (datadir): New variable.
15710 (pkgdatadir): New variable.
15711 (pkglibdir): Removed.
15713 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15715 * DISTLIST: Added util/i386/pc/grub-install.in.
15717 * util/i386/pc/grub-install.in: New file.
15719 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15720 (grub_install_SOURCES): Likewise.
15722 * genmk.rb: Added support for scripts.
15723 (Script): New class.
15724 (scripts): New variable.
15726 * Makefile.in (install-local): Install sbin_SCRIPTS by
15728 (uninstall): Remove sbin_SCRIPTS.
15730 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15731 device, try to get a GRUB device by
15732 grub_util_biosdisk_get_grub_dev.
15735 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15736 description for --device-map.
15738 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15740 Change the semantics of variable hooks. They now return strings
15741 instead of error values.
15743 * util/i386/pc/grub-setup.c: Include grub/env.h.
15744 (setup): Use grub_device_set_root instead of grub_env_set.
15746 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15747 grub_env_get instead of grub_device_set_root and
15748 grub_device_get_root, respectively.
15750 * kern/main.c (grub_env_write_root): New function.
15751 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15752 grub_env_set instead of grub_device_set_root.
15754 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15756 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15757 rather than calling ENV->WRITE_HOOK afterwards.
15758 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15759 passing a pointer of a pointer.
15760 (grub_register_variable_hook): Change the types of "read_hook" and
15761 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15763 Allocate the default empty string on the heap, because this string
15764 may be freed later.
15766 * kern/device.c: Include grub/env.h.
15767 (grub_device_set_root): Removed.
15768 (grub_device_get_root): Likewise.
15769 (grub_device_open): Use grub_env_get instead of
15770 grub_device_get_root.
15772 * include/grub/env.h (grub_env_read_hook_t): New type.
15773 (grub_env_write_hook_t): Likewise.
15774 (grub_env_var): Change the types of "read_hook" and "write_hook"
15775 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15776 (grub_register_variable_hook): Likewise.
15778 * include/grub/device.h (grub_device_set_root): Removed.
15779 (grub_device_set_root): Likewise.
15781 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15782 make sure that DIRNAME terminates with '/', so that
15783 grub_fat_find_dir will fail if PATH is not a directory.
15785 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15787 Use the qualifier auto for print_files and print_files_long.
15788 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15790 Put a newline only if there is no error.
15791 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15794 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15796 * kern/partition.c (grub_partition_probe): Initialize PART to
15797 NULL. Otherwise, when no partition map is registered, this returns
15800 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15802 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15803 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15806 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15808 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15809 information on each device, if it does not have partitions. Print
15810 "Device" instead of "Disk", because this function is not specific
15813 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15814 static to ensure that it is put on the memory rather than a
15817 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15819 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15820 (grub_cat_init): Likewise.
15821 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15822 (options): Likewise.
15823 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15824 (grub_configfile_init): Likewise.
15825 * font/manager.c (GRUB_MOD_INIT): Likewise.
15826 * commands/help.c (GRUB_MOD_INIT): Likewise.
15827 (grub_help_init): Likewise.
15828 * normal/command.c (grub_command_init): Likewise.
15829 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15830 * disk/loopback.c (grub_loop_init): Likewise.
15831 (GRUB_MOD_INIT): Likewise.
15832 * commands/ls.c (grub_ls_init): Likewise.
15833 (GRUB_MOD_INIT): Likewise.
15834 (options): Likewise.
15835 * commands/boot.c (grub_boot_init): Likewise.
15836 (GRUB_MOD_INIT): Likewise.
15837 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15838 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15839 (GRUB_MOD_INIT): Likewise.
15840 * commands/cmp.c (grub_cmp_init): Likewise.
15841 (GRUB_MOD_INIT): Likewise.
15843 * normal/arg.c: Use <> instead of "" to include header files.
15844 (SHORT_ARG_HELP): New macro.
15845 (SHORT_ARG_USAGE): Likewise.
15846 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15847 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15849 (find_short): Check if C is 'h' or 'u' explicitly.
15850 (grub_arg_show_help): Use space characters instead of tabs. Treat
15851 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15852 are shown with --help and --usage only if they are not used for
15853 the command itself.
15854 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15857 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15858 const into "longarg". Change the type of "shortarg" to int.
15860 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15862 * boot/i386/pc/boot.S (boot_drive_check): New label.
15864 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15867 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15868 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15870 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15872 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15873 When turning off Gate A20, skip the check and return immediately,
15874 because this is not fatal usually.
15876 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15878 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15879 be 0x7C00 instead of 0x8000.
15881 * boot/i386/pc/pxeboot.S: Rewritten.
15883 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15885 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15888 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15890 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15891 robustness. This routine now supports a BIOS call and System
15892 Control Port A to modify the gate A20.
15894 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15895 Increased to 0x440.
15897 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15899 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15900 device path and resulting ihandle.
15901 (grub_ofdisk_close): dprintf the ihandle being closed.
15902 (grub_ofdisk_read): dprintf function parameters.
15903 * kern/mm.c (grub_mm_init_region): Likewise.
15904 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15905 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15906 size, and boot arguments.
15907 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15908 before loading into memory.
15909 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15910 before loading into memory.
15912 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15914 * kern/mm.c: Added much documentation.
15915 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15916 8, set to 5 instead of 8.
15918 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15920 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15922 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15923 (grub_mkdevicemap_SOURCES): New variable.
15925 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15926 lib/device.c of GRUB Legacy.
15928 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15930 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15931 instead of PATH is NULL.
15933 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15935 * commands/cmp.c (BUFFER_SIZE): New macro.
15936 (grub_cmd_cmp): Close the right file at the right time. Compare
15937 only data just read. Don't report files of different size as
15938 identical. Dynamically allocate buffers. Move variable
15939 declarations at the beginning of function.
15941 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15943 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15946 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15948 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15949 when backspace is pressed at beginning of line.
15951 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15953 * DISTLIST: Added genfslist.sh.
15955 * normal/main.c (fs_module_list): New variable.
15956 (autoload_fs_module): New function.
15957 (read_fs_list): Likewise.
15958 (grub_normal_execute): Call read_fs_list.
15960 * kern/fs.c (grub_fs_autoload_hook): New variable.
15961 (grub_fs_probe): Added support for auto-loading.
15963 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15964 (grub_fs_module_list_t): New type.
15966 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15967 (grub_fs_autoload_hook): New prototype.
15969 * genfslist.sh: New file.
15971 * genmk.rb: Added a rule to generate a filesystem list.
15973 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15975 * configure.ac: Fix the test for cross-compiling.
15977 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15978 define GRUB_UTIL anymore.
15980 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15981 so this function works on other systems than just big endian.
15982 (load_modules): Likewise.
15983 (add_segments): Likewise.
15985 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15987 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15988 contains `l' modifier, get a long from va_arg().
15990 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15992 * kern/mm.c (grub_free): If the next free block which is being
15993 merged is the first free block, set the first block to the block
15995 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15997 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15999 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16000 `grub_ieee1275_chosen'.
16002 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16004 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16005 (grub_ieee1275_chosen): New variable.
16006 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16008 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16009 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16010 Rename first argument to `phandle' for consistency.
16011 (grub_ieee1275_get_property_length): Likewise.
16012 (grub_ieee1275_next_property): Likewise. Change type of first argument
16013 to grub_ieee1275_phandle_t.
16014 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16015 Move export next to declaration.
16016 (grub_ieee1275_chosen): New variable.
16017 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16018 Correct cosmetic typo.
16019 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16020 `grub_ieee1275_chosen'.
16021 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16022 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16023 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16024 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16025 `grub_ieee1275_chosen'.
16027 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16029 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16031 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16032 /chosen/bootargs as "variable=value" pairs.
16034 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16036 * include/grub/misc.h (grub_dprintf): New macro.
16037 (grub_real_dprintf): New prototype.
16038 (grub_strword): Likewise.
16039 (grub_iswordseparator): Likewise.
16040 * kern/misc.c (grub_real_dprintf): New function.
16041 (grub_strword): Likewise.
16042 (grub_iswordseparator): Likewise.
16044 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16046 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16047 (roundup): Remove macro.
16048 (grub_ieee1275_flags): Make static.
16049 (grub_ieee1275_realmode): Remove.
16050 (grub_ieee1275_test_flag): New function.
16051 (grub_ieee1275_set_flag): Likewise.
16052 (find_options): Rename to `grub_ieee1275_find_options'; update
16053 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16054 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16055 (cmain): New prototype.
16056 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16057 `grub_ieee1275_flags' directly.
16058 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16059 machine/biosdisk.h.
16060 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16061 Don't include grub/machine/init.h.
16062 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16063 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16065 (grub_ieee1275_realmode): Likewise.
16066 (grub_ieee1275_flag): New enum.
16067 (grub_ieee1275_test_flag): New prototype.
16068 (grub_ieee1275_set_flag): New prototype.
16069 * include/grub/powerpc/ieee1275/init.h: Remove file.
16070 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16071 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16072 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16073 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16075 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16076 `grub_ieee1275_test_flag'.
16077 (grub_ieee1275_encode_devname): Likewise.
16079 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16081 * include/grub/powerpc/ieee1275/ieee1275.h
16082 (grub_ieee1275_encode_devname): New prototype.
16083 (grub_ieee1275_get_filename): Likewise.
16084 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16086 (grub_set_prefix): Likewise.
16087 (grub_machine_init): Call grub_set_prefix.
16088 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16089 (grub_parse_type): New enum.
16090 (grub_ieee1275_get_devargs): New function.
16091 (grub_ieee1275_get_devname): Likewise.
16092 (grub_ieee1275_parse_args): Likewise.
16093 (grub_ieee1275_get_filename): Likewise.
16094 (grub_ieee1275_encode_devname): Likewise.
16096 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16098 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16099 `grub_loader_unset'.
16101 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16103 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16104 instead of grub_ieee1275_interpret.
16105 (grub_halt_init): New function.
16106 (grub_halt_fini): Likewise.
16107 (GRUB_MOD_INIT): Correct message grammar.
16108 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16109 instead of grub_ieee1275_interpret.
16110 (grub_reboot_init): New function.
16111 (grub_reboot_fini): Likewise.
16112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16113 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16114 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16115 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16116 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16118 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16120 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16122 (grub_halt): Likewise.
16123 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16124 (cmain): Remove __attribute__((unused)).
16125 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16126 (grub_heap_len): Likewise.
16127 (grub_machine_fini): New function.
16128 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16129 (grub_halt): Likewise.
16130 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16132 * util/powerpc/ieee1275/misc.c: New file.
16134 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16136 * DISTLIST: New file.
16137 * gendistlist.sh: Likewise.
16139 * Makefile.in (COMMON_DISTFILES): Removed.
16140 (BOOT_DISTFILES): Likewise.
16141 (CONF_DISTFILES): Likewise.
16142 (DISK_DISTFILES): Likewise.
16143 (FS_DISTFILES): Likewise.
16144 (INCLUDE_DISTFILES): Likewise.
16145 (KERN_DISTFILES): Likewise.
16146 (LOADER_DISTFILES): Likewise.
16147 (TERM_DISTFILES): Likewise.
16148 (UTIL_DISTFILES): Likewise.
16149 (DISTFILES): Likewise.
16150 (uninstall): Uninstall files in $(pkgdata_DATA).
16151 (DISTLIST): New target.
16152 (distdir): Use the contents of the file DISTLIST to get a list of
16155 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16157 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16158 descriptor. This is ported from GRUB Legacy.
16160 * gencmdlist.sh: Added an extra semicolon to make it work with
16161 old sed versions. Reported by Robert Bihlmeyer
16162 <robbe@orcus.priv.at>.
16164 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16166 Automatic loading of commands is supported.
16168 * normal/main.c (read_command_list): New function.
16169 (grub_normal_execute): Call read_command_list.
16171 * normal/command.c (grub_register_command): Return zero or CMD.
16172 Allocate CMD->NAME from the heap.
16173 Initialize CMD->MODULE_NAME to zero.
16174 Find the same name as well. If the same command is found and it is
16175 a dummy command, overwrite members. If it is not a dummy command,
16177 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16178 (grub_command_find): If a dummy command is found, load a module
16179 and retry to find a command only once.
16181 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16182 make sure that each command is loaded.
16184 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16186 (struct grub_command): Remove const from the member `name'.
16187 Add a new member `module_name'.
16188 (grub_register_command): Return grub_command_t.
16190 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16191 sure that each command is loaded.
16193 * genmk.rb (PModule::rule): Specify a module name without the
16194 suffix ".mod" to gencmdlist.sh.
16196 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16198 * gencmdlist.sh: New file.
16200 * genmk.rb (PModule::rule): Generate a rule for a command list.
16202 Generate command.lst from $(COMMANDFILES).
16204 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16205 (DATA): Added $(pkgdata_DATA).
16206 (install-local): Install files in $(pkgdata_DATA).
16208 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16210 * term/i386/pc/vga.c (debug_command): Removed.
16211 (GRUB_MOD_INIT): Do not register the command "debug".
16213 From Hollis Blanchard:
16214 * commands/configfile.c: New file.
16215 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16216 commands/configfile.c.
16217 (pkgdata_MODULES): Added configfile.mod.
16218 (configfile_mod_SOURCES): New variable.
16219 (configfile_mod_CFLAGS): Likewise.
16220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16221 commands/configfile.c.
16222 (pkgdata_MODULES): Added configfile.mod.
16223 (configfile_mod_SOURCES): New variable.
16224 (configfile_mod_CFLAGS): Likewise.
16225 * util/grub-emu.c (main): Call grub_configfile_init and
16226 grub_configfile_fini.
16227 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16229 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16231 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16233 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16236 * commands/help.c (grub_cmd_help): Do not print newlines after
16237 the last command in print_command_help.
16239 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16241 * commands/default.h: New file.
16242 * commands/timeout.h: Likewise.
16243 * normal/context.c: Likewise.
16245 * util/misc.c: Do not include sys/times.h.
16246 Include sys/time.h and grub/machine/time.h.
16247 (grub_get_rtc): Rewritten with gettimeofday.
16249 * util/grub-emu.c (main): Call grub_default_init and
16250 grub_timeout_init before grub_normal_init, and call
16251 grub_timeout_fini and grub_default_fini after grub_main.
16253 * util/console.c (grub_ncurses_checkkey): Return the read
16256 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16259 * normal/main.c (read_config_file): Push MENU. If this fails,
16260 print an error and wait for a user input.
16261 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16262 If a menu is empty or an error occurs, pop MENU.
16263 (grub_normal_execute): Pop and free MENU after grub_menu_run
16266 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16268 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16270 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16272 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16274 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16277 * include/grub/normal.h (struct grub_menu_list): New struct.
16278 (grub_menu_list_t): New type.
16279 (struct grub_context): New struct.
16280 (grub_context_t): New type.
16281 (grub_register_command): Got rid of EXPORT_FUNC.
16282 (grub_unregister_command): Likewise.
16283 (grub_context_get): New prototype.
16284 (grub_context_get_current_menu): Likewise.
16285 (grub_context_push_menu): Likewise.
16286 (grub_context_pop_menu): Likewise.
16287 [GRUB_UTIL] (grub_default_init): Likewise.
16288 [GRUB_UTIL] (grub_default_fini): Likewise.
16289 [GRUB_UTIL] (grub_timeout_init): Likewise.
16290 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16292 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16293 commands/timeout.c and normal/context.c.
16294 (pkgdata_MODULES): Added default.mod and timeout.mod.
16295 (normal_mod_SOURCES): Added normal/context.c.
16296 (default_mod_SOURCES): New variable.
16297 (default_mod_CFLAGS): Likewise.
16298 (timeout_mod_SOURCES): Likewise.
16299 (timeout_mod_CFLAGS): Likewise.
16300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16302 (pkgdata_MODULES): Added default.mod and timeout.mod.
16303 (normal_mod_SOURCES): Added normal/context.c.
16304 (default_mod_SOURCES): New variable.
16305 (default_mod_CFLAGS): Likewise.
16306 (timeout_mod_SOURCES): Likewise.
16307 (timeout_mod_CFLAGS): Likewise.
16309 * Makefile.in (all-local): Added $(MKFILES).
16311 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16313 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16314 (grub_emu_SOURCES): Likewise.
16315 (pkgdata_MODULES): Add `sun.mod'.
16316 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16317 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16319 (pkgdata_MODULES): Add `sun.mod'.
16320 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16321 * include/grub/partition.h (grub_sun_partition_map_init): New
16323 (grub_sun_partition_map_fini): Likewise.
16324 * partmap/sun.c: New file.
16325 * util/grub-emu.c (main): Initialize and de-initialize the sun
16326 partitionmap support.
16328 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16330 This implements an Emacs-like menu entry editor.
16332 * normal/menu_entry.c: New file.
16334 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16335 characters to ASCII.
16336 (saved_char): New variable.
16337 (grub_ncurses_checkkey): Rewritten completely.
16338 (grub_ncurses_getkey): Likewise.
16339 (grub_ncurses_init): Call raw instead of cbreak.
16341 * normal/menu.c (print_entry): Do not put a space.
16342 (init_page): Renamed to ...
16343 (grub_menu_init_page): ... this. All callers changed.
16344 (edit_menu_entry): Removed.
16345 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16347 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16349 * kern/misc.c (grub_vprintf): Call grub_refresh.
16351 * normal/menu.c (DISP_LEFT): Renamed to ...
16352 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16353 * normal/menu.c (DISP_UP): Renamed to ...
16354 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16355 * normal/menu.c (DISP_RIGHT): Renamed to ...
16356 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16357 * normal/menu.c (DISP_DOWN): Renamed to ...
16358 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16359 * normal/menu.c (DISP_HLINE): Renamed to ...
16360 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16361 * normal/menu.c (DISP_VLINE): Renamed to ...
16362 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16363 * normal/menu.c (DISP_UL): Renamed to ...
16364 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16365 * normal/menu.c (DISP_UR): Renamed to ...
16366 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16367 * normal/menu.c (DISP_LL): Renamed to ...
16368 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16369 * normal/menu.c (DISP_LR): Renamed to ...
16370 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16371 * normal/menu.c (TERM_WIDTH): Renamed to ...
16372 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16373 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16374 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16375 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16376 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16377 * normal/menu.c (TERM_MARGIN): Renamed to ...
16378 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16379 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16380 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16381 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16382 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16383 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16384 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16385 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16386 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16387 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16388 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16389 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16390 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16391 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16392 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16393 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16394 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16395 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16396 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16397 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16398 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16399 All callers changed.
16401 * include/grub/normal.h: New prototype.
16403 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16404 normal/menu_entry.c.
16405 (normal_mod_SOURCES): Likewise.
16406 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16407 (normal_mod_SOURCES): Likewise.
16409 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16411 * include/grub/normal.h (grub_halt_init): New prototype.
16412 (grub_halt_fini): Likewise.
16413 (grub_reboot_init): Likewise.
16414 (grub_reboot_fini): Likewise.
16416 * util/grub-emu.c: Include signal.h.
16417 (main_env): New global variable.
16418 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16420 (grub_machine_fini): New function.
16421 (main): Call grub_halt_init and grub_reboot_init before
16422 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16423 Call setjmp with MAIN_ENV to go back afterwards.
16424 Call grub_machine_fini right before return.
16426 * include/grub/util/misc.h: Include setjmp.h.
16427 (main_env): New prototype.
16429 * include/grub/kernel.h (grub_machine_fini): New prototype.
16430 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16431 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16433 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16434 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16435 * term/i386/pc/console.c (grub_console_fini): Likewise.
16437 * util/i386/pc/misc.c: New file.
16439 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16440 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16441 commands/i386/pc/reboot.c.
16443 2005-02-14 Guillem Jover <guillem@hadrons.org>
16445 * include/grub/dl.h (grub_dl_check_header): New prototype.
16446 (grub_arch_dl_check_header): Change return type to grub_err_t,
16447 remove size parameter and export function. Update all callers.
16448 * kern/dl.c (grub_dl_check_header): New function.
16449 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16450 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16451 are inside the core.
16452 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16453 independent ELF header checks.
16454 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16455 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16456 `grub_dl_check_header' instead of explicit checks. Check for the
16458 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16459 `grub_dl_check_header' instead of explicit checks. Remove arch
16460 specific ELF header checks.
16462 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16465 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16467 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16468 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16470 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16472 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16473 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16474 (part_map_iterate): Clear `grub_errno' and return 0 if
16475 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16476 * partmap/amiga.c (amiga_partition_map_iterate): Return
16477 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16478 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16480 2005-02-01 Guillem Jover <guillem@hadrons.org>
16482 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16485 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16487 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16489 (grub_rescue_cmd_linux): New prototype.
16490 (grub_rescue_cmd_initrd): Likewise.
16491 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16493 (grub_linux_release_mem): Release the memory for the initrd.
16494 (grub_load_linux): Renamed from this...
16495 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16496 Changed `entry' not to be static. Loop over memory regions to
16497 find another one when the default fails.
16498 (grub_rescue_cmd_initrd): New function.
16499 (grub_linux_init): Remove function.
16500 (grub_linux_fini): Likewise.
16501 (GRUB_MOD_INIT): Register `initrd'.
16502 (GRUB_MOD_FINI): Unregister `initrd'.
16503 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16505 (grub_linux_normal_fini): Likewise.
16506 (GRUB_MOD_INIT): Register `initrd'.
16507 (GRUB_MOD_FINI): Unregister `initrd'.
16509 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16511 * commands/help.c: New file.
16512 * normal/arg.c (show_help): Renamed to...
16513 (grub_arg_show_help): ... this.
16514 * commands/i386/pc/halt.c: New file.
16515 * commands/i386/pc/reboot.c: Likewise.
16516 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16517 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16518 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16519 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16521 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16523 (pkgdata_MODULES): Add `help.mod'.
16524 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16525 * grub/i386/pc/init.h (grub_reboot): New prototype.
16526 (grub_halt): Likewise.
16527 * include/grub/normal.h (grub_arg_show_help): New prototype.
16528 (grub_help_init): Likewise.
16529 (grub_help_fini): Likewise.
16530 * util/grub-emu.c (main): Initialize and deinitialize the help
16533 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16535 * normal/command.c (grub_command_init): Fixed the description of
16536 the `set' and `unset' commands.
16538 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16540 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16542 * commands/ieee1275/halt.c: New file.
16543 * commands/ieee1275/reboot.c: Likewise.
16544 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16545 `__attribute__ ((unused))'. Some GCS related fixed.
16546 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16547 (grub_suspend_fini): Likewise.
16548 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16550 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16551 (halt_mod_CFLAGS): New variables.
16552 * include/grub/powerpc/ieee1275/ieee1275.h
16553 (grub_ieee1275_interpret): New prototype.
16555 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16557 * include/grub/misc.h (memmove): New prototype.
16558 (memcpy): Likewise.
16560 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16562 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16563 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16565 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16567 * kern/misc.c (grub_strndup): Function rewritten.
16569 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16571 * normal/menu.c (TERM_WIDTH): Macro redefined.
16572 (TERM_TOP_BORDER_Y): Likewise.
16573 (draw_border): Replaced while-loop by a for-loop. Make the number
16574 of lines consistent with the number of lines displayed in
16575 print_entries. Added a margin below the rectangle.
16576 (print_entry): Make the entry fit in the rectangle.
16577 (print_entries): Display the scroll arrows next to the right
16580 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16582 * fs/minix.c (grub_minix_find_file): Reserve more space for
16583 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16584 `grub_strncpy' to copy `path' into it.
16586 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16588 Add the loopback device, a device via which files can be accessed
16591 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16592 (pkgdata_MODULES): Add loopback.mod.
16593 (loopback_mod_SOURCES): New variable.
16594 (loopback_mod_CFLAGS): Likewise.
16595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16597 (pkgdata_MODULES): Add loopback.mod.
16598 (loopback_mod_SOURCES): New variable.
16599 (loopback_mod_CFLAGS): Likewise.
16600 * disk/loopback.c: new file.
16601 * include/grub/normal.h (grub_loop_init): New prototype.
16602 (grub_loop_fini): New prototype.
16603 * util/grub-emu.c (main): Initialize and de-initialize loopback
16605 * include/grub/disk.h (grub_disk_dev_id): Add
16606 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16608 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16610 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16612 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16613 (suspend_mod_SOURCES): New variable.
16614 (suspend_mod_CFLAGS): Likewise.
16615 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16617 * commands/ieee1275/suspend.c: New file.
16619 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16621 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16622 ((unused))' to `__attribute__ ((used))'.
16623 (GRUB_MOD_FINI): Likewise.
16624 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16625 * genmk.rb (PModule): Assign space to common symbols when linking
16628 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16630 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16631 `unsigned' arguments to `grub_size_t'.
16632 (grub_malloc): Likewise.
16633 (grub_realloc): Likewise.
16634 (grub_memalign): Likewise.
16635 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16636 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16637 * util/misc.c (grub_malloc): Likewise.
16638 (grub_realloc): Likewise.
16639 * kern/mm.c (get_header_from_pointer): Change the casts to
16640 `unsigned' into a cast to `grub_size_t'.
16642 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16643 point to `currnode' when `currnode' is changed.
16645 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16646 Schottelius <nico-linux@schottelius.org>.
16648 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16650 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16651 (note_path): Remove variable.
16652 (GRUB_IEEE1275_NOTE_NAME): New macro.
16653 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16654 (grub_ieee1275_note_hdr): New structure.
16655 (grub_ieee1275_note_desc): Likewise.
16656 (grub_ieee1275_note): Likewise.
16657 (load_note): Remove `dir' argument. All callers updated. Remove
16658 `note_img' and `path'. Do not load a file from `note_path'.
16659 Initialize a struct grub_ieee1275_note and write that to `out'.
16660 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16662 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16664 * util/misc.c (grub_util_read_image): Revert last change. It
16665 called `grub_util_read_at', which seeks from the beginning of the
16668 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16670 * TODO: Add note about endianness in grub-mkimage.
16671 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16673 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16674 (grub_mkimage_SOURCES): New target.
16675 * include/grub/kernel.h (grub_start_addr): Remove variable.
16676 (grub_end_addr): Likewise.
16677 (grub_total_module_size): Likewise.
16678 (grub_kernel_image_size): Likewise.
16679 (GRUB_MODULE_MAGIC): New constant.
16680 (grub_module_info): New structure.
16681 (grub_arch_modules_addr): New prototype.
16682 (grub_get_end_addr): Remove prototype.
16683 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16684 * include/grub/powerpc/ieee1275/kernel.h: New file.
16685 * include/grub/util/misc.h (grub_util_get_fp_size): New
16687 (grub_util_read_at): Likewise.
16688 (grub_util_write_image_at): Likewise.
16689 * kern/main.c (grub_get_end_addr): Remove function.
16690 (grub_load_modules): Call grub_arch_modules_addr instead of using
16691 grub_end_addr. Look for a grub_module_info struct in memory. Use
16692 the grub_module_info fields instead of calling grub_get_end_addr
16693 as loop conditions. Move grub_add_unused_region code here.
16694 (grub_add_unused_region): Remove function.
16695 * kern/i386/pc/init.c: Include grub/cache.h.
16696 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16697 one call to add_mem_region.
16698 (grub_arch_modules_addr): New function.
16699 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16700 (grub_total_module_size): Likewise.
16701 Include grub/machine/kernel.h.
16702 (grub_arch_modules_addr): New function.
16703 * util/grub-emu.c (grub_end_addr): Remove variable.
16704 (grub_total_module_size): Likewise.
16705 (grub_arch_modules_addr): New function.
16706 * util/misc.c: Include unistd.h.
16707 (grub_util_get_fp_size): New function.
16708 (grub_util_read_at): Likewise.
16709 (grub_util_write_image_at): Likewise.
16710 (grub_util_read_image): Call grub_util_read_at.
16711 (grub_util_write_image): Call grub_util_write_image_at.
16712 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16713 additional memory in kernel_img for a struct grub_module_info.
16714 Fill in that grub_module_info.
16715 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16717 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16719 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16721 * include/grub/powerpc/ieee1275/ieee1275.h
16722 (grub_ieee1275_milliseconds): New prototype.
16723 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16725 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16726 grub_ieee1275_milliseconds.
16728 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16730 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16732 (find_options): New function.
16733 (cmain): Call find_options.
16734 * include/grub/powerpc/ieee1275/ieee1275.h
16735 (grub_ieee1275_realmode): New extern variable.
16736 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16737 grub_map if grub_ieee1275_realmode is false.
16739 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16741 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16742 lines are inserted and make it work like readline. Reported by
16743 Vincent Pelletier <subdino2004@yahoo.fr>.
16745 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16747 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16749 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16750 `kern/powerpc/cache.S'.
16752 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16754 * genmk.rb: Handle the `Program' class in the main loop. Written
16755 by Johan Rydberg <jrydberg@gnu.org>.
16756 (Program): New class.
16757 (programs): New variable.
16758 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16759 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16760 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16761 (help_arch): Function removed.
16762 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16763 `powerpc/libgcc.h' and `loader.h'.
16764 (pkgdata_PROGRAMS): New variable.
16765 (sbin_UTILITIES): Variable removed.
16766 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16767 (grubof_SOURCES): Variable re-defined so it only includes the
16768 core functionality.
16769 (grubof_CFLAGS): Remove `-DGRUBOF'.
16770 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16771 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16772 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16773 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16774 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16775 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16776 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16777 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16778 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16779 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16780 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16781 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16782 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16783 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16784 (pc_mod_CFLAGS): New variables.
16785 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16786 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16787 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16788 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16790 * include/grub/i386/pc/init.h (grub_os_area_addr)
16791 (rub_os_area_size): ... to here.
16792 * include/grub/powerpc/ieee1275/ieee1275.h
16793 (grub_ieee1275_entry_fn): Export symbol.
16794 * include/grub/powerpc/ieee1275/init.h: New file.
16795 * include/grub/powerpc/libgcc.h: Likewise.
16796 * include/grub/cache.h: Likewise.
16797 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16798 <hollis@penguinppc.org>.
16799 * kern/dl.c: Include <grub/cache.h>.
16800 (grub_dl_flush_cache): New function.
16801 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16803 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16804 (grub_console_init): Removed prototypes.
16805 (grub_machine_init): Don't initialize the modules anymore.
16806 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16808 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16809 Macro undef removed.
16810 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16811 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16812 relocation `R_PPC_REL32'. Return an error when the relocation is
16814 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16815 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16816 * util/misc.c (grub_arch_sync_caches): Likewise.
16818 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16820 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16821 `symlist.c', add `grubof_symlist.c'.
16822 (symlist.c): Variable removed.
16823 (grubof_HEADERS): Variable added.
16824 (grubof_symlist.c): New target.
16825 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16826 `kernel_img_HEADERS'.
16827 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16828 * kern/powerpc/dl.c: New file.
16829 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16831 (grub_arch_dl_relocate_symbols): Likewise.
16832 (grub_register_exported_symbols): Likewise.
16834 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16836 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16837 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16838 to fail instead. Reported by Vincent Pelletier
16839 <subdino2004@yahoo.fr>.
16841 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16842 it is not allocated. Reported by Vincent Pelletier
16843 <subdino2004@yahoo.fr>.
16845 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16846 output so the output looks better.
16848 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16850 Modulize the partition map support and add support for the amiga
16853 * commands/ls.c: Include <grub/partition.h> instead of
16854 <grub/machine/partition.h>.
16855 * kern/disk.c: Likewise.
16856 * kern/rescue.c: Likewise.
16857 * loader/i386/pc/chainloader.c: Likewise.
16858 * normal/cmdline.c: Likewise.
16859 * kern/powerpc/ieee1275/init.c: Likewise.
16860 (grub_machine_init): Call `grub_pc_partition_map_init',
16861 `grub_amiga_partition_map_init' and
16862 `grub_apple_partition_map_init'.
16863 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16864 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16865 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16866 `partition.h' and `pc_partition.h'.
16867 (grub_setup_SOURCES): Remove
16868 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16869 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16870 (grub_emu_SOURCES): Likewise.
16871 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16872 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16873 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16874 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16875 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16876 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16877 (grubof_SOURCES): Likewise.
16878 * disk/i386/pc/partition.c: File removed.
16879 * disk/powerpc/ieee1275/partition.c: Likewise.
16880 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16881 * include/grub/i386/pc/partition.h: Likewise.
16882 * kern/partition.c: New file.
16883 * partmap/amiga.c: Likewise.
16884 * partmap/apple.c: Likewise.
16885 * partmap/pc.c: Likewise.
16886 * include/grub/partition.h: Likewise..
16887 * include/grub/pc_partition.h: Likewise.
16888 * util/grub-emu.c: Include <grub/partition.h> instead of
16889 <grub/machine/partition.h>.
16890 (main): Call `grub_pc_partition_map_init',
16891 `grub_amiga_partition_map_init' and
16892 `grub_apple_partition_map_init' and deinitialize afterwards.
16893 * util/i386/pc/biosdisk.c: Include `#include
16894 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16895 `<grub/machine/partition.h>'.
16896 * util/i386/pc/grub-setup.c: Likewise.
16897 * util/i386/pc/biosdisk.c: Likewise.
16898 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16899 partition information in case of a PC partition.
16900 * util/i386/pc/grub-setup.c: Include `#include
16901 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16902 `<grub/machine/partition.h>'.
16903 (setup): Only access the PC specific partition information in case
16906 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16908 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16909 (grub_longjmp): Likewise.
16910 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16912 * normal/powerpc/setjmp.S: New file.
16913 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16914 `normal/powerpc/setjmp.S'.
16915 (grubof_CFLAGS): Add `-DGRUBOF'.
16916 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16917 [GRUB_UTIL && !GRUBOF].
16919 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16921 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16922 property named `name'. Correctly handle the error returned by
16923 `grub_ieee1275_finddevice' if a device can not be opened.
16925 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16927 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16928 `actual' for negativity.
16929 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16932 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16934 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16935 (PAGE_OFFSET): New macro.
16936 (CRTC_ADDR_PORT): Likewise.
16937 (CRTC_DATA_PORT): Likewise.
16938 (START_ADDR_HIGH_REGISTER): Likewise.
16939 (START_ADDR_LOW_REGISTER): Likewise.
16940 (GRAPHICS_ADDR_PORT): Likewise.
16941 (GRAPHICS_DATA_PORT): Likewise.
16942 (READ_MAP_REGISTER): Likewise.
16943 (INPUT_STATUS1_REGISTER): Likewise.
16944 (INPUT_STATUS1_VERTR_BIT): Likewise.
16945 (page): New variable.
16946 (wait_vretrace): New function.
16947 (set_read_map): Likewise.
16948 (set_start_address): Likewise.
16949 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16951 (check_vga_mem): Take the page into account.
16952 (write_char): Likewise.
16953 (write_cursor): Likewise.
16954 (scroll_up): Likewise. Copy the page to the page that is not
16955 shown and switch between both pages.
16956 (grub_vga_putchar): Fix off by one error.
16957 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16960 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16962 Add support for iso9660 (including rockridge).
16964 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16965 (iso9660_mod_SOURCES): New variable.
16966 (iso9660_mod_CFLAGS): Likewise.
16967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16968 * include/grub/fs.h (grub_iso9660_init): New prototype.
16969 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16970 * fs/iso9660.c: New file.
16972 * include/grub/misc.h (grub_strncat): New prototype.
16973 * kern/misc.c (grub_strncat): New function.
16975 * fs/hfs.c (grub_hfs_mount): Translate the error
16976 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16977 * fs/jfs.c (grub_jfs_mount): Likewise.
16978 * fs/ufs.c (grub_ufs_mount): Likewise.
16980 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16982 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16983 which initialized BAT registers.
16984 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16985 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16987 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16988 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16990 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16991 (grub_mapclaim): Likewise.
16992 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16993 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16996 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16998 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16999 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17000 -ffreestanding and -msoft-float.
17002 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17004 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17005 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17006 set in grub_ieee1275_flags.
17008 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17010 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17012 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17013 grub_console_init first.
17014 Change the memory range used for grub_ieee1275_claim and
17015 grub_mm_init_region.
17016 Print an error message if the claim fails.
17017 Include <grub/misc.h>.
17019 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17021 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17022 Call grub_children_iterate for device nodes of type `scsi',
17024 (grub_ofdisk_open): Remove manual device alias resolution.
17025 Fix memory leak when device cannot be opened.
17026 * include/grub/powerpc/ieee1275/ieee1275.h
17027 (grub_children_iterate): New prototype.
17028 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17030 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17031 Return -1 if args.size was -1.
17033 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17035 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17036 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17037 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17038 Open Firmware's memory for it; claim memory from _start to _end.
17039 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17040 (_end): New extern.
17041 (_start): Zero BSS from __bss_start to _end.
17042 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17044 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17046 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17048 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17049 -1 if args.base was -1.
17051 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17053 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17054 escape sequence instead of a literal ^L. Also call
17055 grub_ofconsole_gotoxy.
17057 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17059 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17060 void * arguments to grub_addr_t. All callers updated. Also make
17061 the `result' argument optional.
17062 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17063 All callers updated.
17065 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17067 * commands/ls.c (grub_ls_list_files): Use the string following the
17068 initial ')', if present, as the filesystem path.
17069 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17071 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17073 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17075 Make the source code of the menu interface more readable.
17077 * normal/menu.c: Include grub/mm.h.
17078 (TERM_WIDTH): New macro.
17079 (TERM_HEIGHT): Likewise.
17080 (TERM_INFO_HEIGHT): Likewise.
17081 (TERM_MARGIN): Likewise.
17082 (TERM_SCROLL_WIDTH): Likewise.
17083 (TERM_TOP_BORDER_Y): Likewise.
17084 (TERM_LEFT_BORDER_X): Likewise.
17085 (TERM_BORDER_WIDTH): Likewise.
17086 (TERM_MESSAGE_HEIGHT): Likewise.
17087 (TERM_BORDER_HEIGHT): Likewise.
17088 (TERM_NUM_ENTRIES): Likewise.
17089 (TERM_FIRST_ENTRY_Y): Likewise.
17090 (TERM_ENTRY_WIDTH): Likewise.
17091 (TERM_CURSOR_X): Likewise.
17092 (draw_border): Use macros instead of magic numbers.
17093 (print_entry): Likewise.
17094 (print_entries): Likewise.
17095 (run_menu): Likewise. Also, handle the key 'e'.
17096 (run_menu_entry): Ignore empty command lines.
17097 (print_message): Added a new argument EDIT. If EDIT is true,
17098 print a different message.
17099 (init_page): Likewise.
17100 (edit_menu_entry): New function. Not implemented yet.
17102 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17104 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17105 can be loaded from normal mode.
17107 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17109 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17110 (multiboot_mod_CFLAGS): New variables.
17111 * loader/i386/pc/linux_normal.c: New file.
17112 * loader/i386/pc/multiboot_normal.c: Likewise.
17114 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17115 attribute `unused'.
17117 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17118 `fdiro' to read the mode information from instead of `diro'.
17120 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17121 looking up a symlink.
17123 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17125 * normal/command.c (grub_command_execute): Don't parse the
17126 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17127 flags of the command.
17129 * normal/menu.c (grub_menu_run): Fix typo.
17131 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17133 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17135 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17136 `y + 1' instead of `y - 1'.
17138 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17140 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17142 From Hollis Blanchard <hollis@penguinppc.org>:
17143 * kern/misc.c (memmove): New alias for grub_memmove.
17144 (memcmp): New alias for grub_memcmp.
17145 (memset): New alias for grub_memset.
17146 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17147 Change "int handle" to "grub_ieee1275_phandle_t handle".
17148 * include/grub/powerpc/ieee1275/ieee1275.h
17149 (grub_ieee1275_get_property): Likewise.
17151 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17153 Added normal mode command `chainloader' as module chain.mod, which
17154 depends on normal.mod and _chain.mod.
17156 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17157 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17158 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17160 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17161 but arguments parsing moved to ...
17162 (grub_chainloader_cmd): ... here. New function.
17163 * include/grub/i386/pc/chainloader.h: New file.
17164 * loader/i386/pc/chainloader_normal.c: Likewise.
17166 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17168 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17169 (grub_mkimage_LDFLAGS): Likewise.
17170 (grub_emu_SOURCES): Likewise.
17171 (kernel_img_HEADERS): Added fshelp.h.
17172 * fs/ext2.c: Include <grub/fshelp.h>.
17173 (FILETYPE_REG): New macro.
17174 (FILETYPE_INO_REG): Likewise.
17175 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17177 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17179 (grub_fshelp_node): New struct.
17180 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17182 (grub_ext2_get_file_block): Removed function.
17183 (grub_ext2_read_block): New function.
17184 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17185 This function was written.
17186 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17187 (grub_ext2_find_file): Removed function.
17188 (grub_ext2_read_symlink): New function.
17189 (grub_ext2_iterate_dir): Likewise.
17190 (grub_ext2_open): Rewritten.
17191 (grub_ext2_dir): Rewritten.
17192 * include/grub/fshelp.h: New file.
17193 * fs/fshelp.c: Likewise.
17195 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17197 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17198 (print_message): Add a missing newline.
17199 (run_menu): Added timeout support.
17200 (run_menu_entry): New local function.
17201 (grub_menu_run): Added support for booting.
17203 * kern/loader.c (grub_loader_is_loaded): New function.
17205 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17206 (grub_get_rtc): Exported.
17208 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17209 (grub_get_rtc): Exported.
17211 * include/grub/normal.h (struct grub_command_list): Remove
17212 constant from the member `command'.
17214 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17216 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17218 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17220 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17222 Add support for the JFS filesystem.
17224 * fs/jfs.c: New file.
17225 * include/grub/fs.h (grub_jfs_init): New prototype.
17226 (grub_jfs_fini): New prototype.
17227 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17228 (grub_emu_SOURCES): Likewise.
17229 (pkgdata_MODULES): Add jfs.mod.
17230 (jfs_mod_SOURCES): New variable.
17231 (jfs_mod_CFLAGS): Likewise.
17232 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17233 (grubof_SOURCES): Likewise.
17234 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17236 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17237 endian to the host endian.
17238 (grub_fat_utf16_to_utf8): Move function from there...
17239 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17240 the endianness of the source string anymore.
17241 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17243 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17245 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17246 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17247 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17248 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17250 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17251 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17252 for `node_found' and `it_dir'.
17253 (grub_hfs_dir): Add prototype for `dir_hook'.
17255 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17256 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17257 and `indir32' to silence a gcc warning.
17259 * include/grub/fs.h (grub_hfs_init): New prototype.
17260 (grub_hfs_fini): Likewise.
17263 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17265 Each disk device has its own id now. This is useful to make use
17266 of multiple disk devices.
17268 * include/grub/disk.h (grub_disk_dev_id): New enum.
17269 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17270 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17272 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17273 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17275 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17276 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17278 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17279 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17281 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17282 "id" which is used by the cache manager.
17284 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17287 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17289 * fs/hfs.c: New file.
17290 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17291 (grub_emu_SOURCES): Likewise.
17292 (pkgdata_MODULES): Add hfs.mod.
17293 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17294 (grubof_SOURCES): Likewise.
17295 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17297 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17298 * kern/misc.c (grub_strncasecmp): Add function.
17300 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17302 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17305 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17306 (grub_ext2_dir): In case the directory entry type is unknown, read
17309 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17311 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17312 grub_load_linux instead of grub_rescue_cmd_linux as second
17313 argument of grub_rescue_register_command.
17315 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17317 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17319 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17321 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17322 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17323 `loader/powerpc/ieee1275/linux.c',
17324 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17325 * include/grub/powerpc/ieee1275/ieee1275.h
17326 (grub_ieee1275_release): New prototype.
17327 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17328 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17329 normal, boot, linux and linux_normal.
17330 * loader/powerpc/ieee1275/linux.c: New file.
17331 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17333 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17335 * normal/arg.c (grub_arg_parse): Correct error handling after
17336 reallocating the argumentlist (check if `argl' is not null instead
17337 of checking if `args' is not null).
17338 * kern/mm.c (grub_realloc): Return the same pointer when using the
17339 same region, instead of returning the header address.
17341 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17343 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17344 one block instead of two when looking for the initial partition.
17345 (grub_partition_probe): Initialize the local variable `p' with 0.
17346 Use base 10 for the grub_strtoul call.
17347 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17348 need for one local variable.
17349 (grub_strtoul): Don't add the new value to `num', instead of that
17352 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17354 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17355 (pxeboot_img_SOURCES): New variable.
17356 (pxeboot_img_ASFLAGS): Likewise.
17357 (pxeboot_img_LDFLAGS): Likewise.
17358 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17359 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17360 <lode_leroy@hotmail.com>.
17362 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17364 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17365 there was no input.
17367 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17369 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17370 the history buffer logic.
17372 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17374 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17375 (FILETYPE_INO_SYMLINK): New macros.
17376 (grub_ext2_find_file): Check if the node is a directory using the
17377 inode stat information instead of using the filetype in the
17378 dirent. Exclude the first character of an absolute symlink.
17379 (grub_ext2_dir): Mask out the filetype part of the mode member of
17382 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17384 Add support for UFS version 1 and 2. Add support for the minix
17385 filesystem version 1 and 2, both the variants with 14 and 30 long
17388 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17390 (grub_emu_SOURCES): Likewise.
17391 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17392 (ufs_mod_SOURCES): New variable.
17393 (ufs_mod_CFLAGS): Likewise.
17394 (minix_mod_SOURCES): Likewise.
17395 (minix_mod_CFLAGS): Likewise.
17396 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17398 (grubof_SOURCES): Likewise.
17399 * fs/ufs.c: New file.
17400 * fs/minix.c: New file.
17401 * include/grub/fs.h (grub_ufs_init): New prototype.
17402 (grub_ufs_fini): Likewise.
17403 (grub_minix_init): Likewise.
17404 (grub_minix_fini): Likewise.
17405 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17408 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17410 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17411 commands/ls.c, commands/terminal.c, commands/boot.c,
17412 commands/cmp.c and commands/cat.c.
17413 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17415 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17418 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17420 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17421 and grub_, respectively. Because the conversion is trivial and
17422 mechanical, I omit the details here. Please refer to the CVS
17423 if you need more information.
17425 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17427 * include/pupa: Renamed to ...
17428 * include/grub: ... this.
17429 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17430 * util/i386/pc/grub-mkimage.c: ... this.
17431 * util/i386/pc/pupa-setup.c: Renamed to ...
17432 * util/i386/pc/grub-setup.c: ... this.
17433 * util/pupa-emu.c: Renamed to ...
17434 * util/grub-emu.c: ... this.
17436 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17438 Add support for the newworld apple macintosh (PPC). This has been
17439 tested on the powerbook 2000 only. It only adds support for
17440 generic ieee1275 functions, console and disk support. This should
17441 be easy to port to other architectures with support for Open
17444 * configure.ac: Accept the powerpc as host_cpu. In the case of
17445 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17446 specific tests are only executed while building for the i386.
17447 Inverse test for crosscompile.
17448 * genmk.rb (Utility): Allow assembler files.
17449 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17450 * conf/powerpc-ieee1275.rmk: New file.
17451 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17452 * disk/powerpc/ieee1275/partition.c: Likewise.
17453 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17454 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17455 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17456 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17457 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17458 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17459 * include/pupa/powerpc/ieee1275/loader.h
17460 * include/pupa/powerpc/setjmp.h: Likewise.
17461 * include/pupa/powerpc/types.h: Likewise.
17462 * kern/powerpc/ieee1275/init.c: Likewise.
17463 * kern/powerpc/ieee1275/openfw.c: Likewise.
17464 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17466 These files were written by Johan Rydberg
17467 (jrydberg@night.trouble.net) and I only modified them slightly.
17469 * boot/powerpc/ieee1275/cmain.c: New file.
17470 * boot/powerpc/ieee1275/crt0.S: Likewise.
17471 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17472 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17474 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17476 * Makefile.in: Update copyright.
17477 * genmodsrc.sh: Likewise.
17478 * gensymlist.sh: Likewise.
17479 * term/i386/pc/vga.c: Indent correctly.
17481 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17482 bugreporting address.
17483 * util/i386/pc/pupa-setup.c (usage): Likewise,
17484 (main): Call pupa_ext2_init and pupa_ext2_fini.
17486 * fs/fat.c (log2): Renamed to ...
17487 (fat_log2): ... this.
17488 All callers changed.
17489 * kern/misc.c (memcpy): Alias to pupa_memmove.
17490 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17492 * util/console.c (pupa_ncurses_fini): Return 0.
17494 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17495 Move fail label here.
17496 [__GNU__]: Don't warn when using stat.
17497 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17498 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17499 long int. Use strtol instead of strtoul.
17501 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17503 * commands/boot.c: New file.
17504 * commands/cat.c: Likewise.
17505 * commands/cmp.c: Likewise.
17506 * commands/ls.c: Likewise.
17507 * commands/terminal.c: Likewise.
17508 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17509 (pupa_register_command): Changed interface to match the new
17511 (pupa_command_execute): Changed (almost rewritten) so it uses
17512 pupa_split_command. Added support for setting variables using the
17514 (rescue_command): Changed to work with the new argument parser.
17515 (terminal_command): Moved from here to commands/terminal.c.
17516 (set_command): New function.
17517 (unset_command): New function.
17518 (insmod_command): New function.
17519 (rmmod_command): New function.
17520 (lsmod_command): New function.
17521 (pupa_command_init): Don't initialize the command terminal
17522 anymore. Initialize the commands set, unset, insmod, rmmod and
17524 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17525 (kernel_img_HEADERS): Add arg.h and env.h.
17526 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17527 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17528 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17530 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17532 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17533 (boot_mod_SOURCES): New variable.
17534 (terminal_mod_SOURCES): Likewise.
17535 (ls_mod_SOURCES): Likewise.
17536 (cmp_mod_SOURCES): Likewise.
17537 (cat_mod_SOURCES): Likewise.
17539 * normal/arg.c: New file.
17540 * kern/env.c: Likewise.
17541 * include/pupa/arg.h: Likewise.
17542 * include/pupa/env.h: Likewise.
17543 * font/manager.c (font_command): Changed to match argument parsing
17545 (PUPA_MOD_INIT): Likewise.
17546 * hello/hello.c (pupa_cmd_hello): Likewise.
17547 (PUPA_MOD_INIT): Likewise.
17548 * include/pupa/disk.h: Include <pupa/device.h>.
17549 (pupa_print_partinfo): New prototype.
17550 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17551 (pupa_dl_get_prefix): Likewise.
17552 * include/pupa/misc.h: Include <pupa/err.h>.
17553 (pupa_isgraph): New prototype.
17554 (pupa_isdigit): Likewise.
17555 (pupa_split_cmdline): Likewise.
17556 * include/pupa/normal.h: Include <pupa/arg.h>.
17557 (pupa_command): Changed the prototype of the member `func' to
17558 match the argument parsing interface. Added member `options'.
17559 (pupa_register_command): Updated to match function.
17560 (pupa_arg_parse): New prototype.
17561 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17562 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17563 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17564 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17565 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17566 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17567 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17568 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17569 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17570 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17571 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17572 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17573 * kern/disk.c: Include <pupa/file.h>.
17574 (pupa_print_partinfo): New function.
17575 * kern/dl.c: Include <pupa/env.h>.
17576 (pupa_dl_dir): Variable removed.
17577 (pupa_dl_load): Use the environment variable `prefix' instead of
17578 the variable pupa_dl_dir.
17579 (pupa_dl_set_prefix): Function removed.
17580 (pupa_dl_get_prefix): Likewise.
17581 * kern/i386/pc/init.c: Include <pupa/env.h>.
17582 (pupa_machine_init): Use the environment variable `prefix' instead of
17583 using pupa_dl_set_prefix to set the prefix.
17584 * kern/main.c: Include <pupa/env.h>.
17585 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17586 using pupa_dl_get_prefix to get the prefix.
17587 * kern/misc.c: Include <pupa/env.h>.
17588 (pupa_isdigit): New function.
17589 (pupa_isgraph): Likewise.
17590 (pupa_ftoa): Likewise.
17591 (pupa_vsprintf): Added support for printing values of the type
17592 `double'. Make it possible to format variable output when using
17593 formatting like `%1.2%f'.
17594 (pupa_split_cmdline): New function.
17595 * kern/rescue.c: Include <pupa/env.h>.
17596 (next_word): Removed function.
17597 (pupa_rescue_cmd_prefix): Likewise.
17598 (pupa_rescue_cmd_set): New function.
17599 (pupa_rescue_cmd_unset): New function.
17600 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17601 split the command line instead of splitting it here. Added
17602 support for setting variables using the syntax `foo=bar'. Don't
17603 initialize the prefix command anymore. Initialized the set and
17605 * normal/cmdline.c: Include <pupa/env.h>.
17606 (pupa_tab_complete): Added prototypes for print_simple_completion,
17607 print_partition_completion, add_completion, iterate_commands,
17608 iterate_dev, iterate_part and iterate_dir. Moved code to print
17609 partition information from here to kern/disk.c.
17610 (pupa_cmdline_run): Don't check if the function exists anymore.
17611 * normal/main.c: Include <pupa/env.h>.
17612 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17613 instead of using pupa_dl_get_prefix to get the prefix.
17614 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17615 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17617 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17618 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17619 ((unused))' to silence a gcc warning.
17620 (pupa_vga_setcolor): Likewise.
17621 (debug_command): Changed to match argument parsing
17623 * util/pupa-emu.c: Include <pupa/env.h>.
17624 (options): Added 0's for unused fields to silence a gcc warning.
17626 (main): Use the environment variable `prefix' instead of using
17627 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17628 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17631 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17632 * util/misc.c: Include <malloc.h>.
17633 (pupa_malloc): Rewritten so errors are correctly reported.
17634 (pupa_realloc): Likewise.
17635 (pupa_memalign): Likewise.
17636 (pupa_mm_init_region): Declare unused variables with
17637 `__attribute__ ((unused))' to silence a gcc warning.
17638 * normal/i386/setjmp.S: Remove tab at the end of the file to
17639 silence a gcc warning.
17640 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17641 variables with `__attribute__ ((unused))' to silence a gcc
17643 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17644 local variable i unsigned to silence a gcc warning.
17646 * kern/term.c: Include <pupa/misc.h>.
17647 (pupa_more_lines): New variable.
17648 (pupa_more): Likewise.
17649 (pupa_putcode): When the pager is active pause at the end of every
17651 (pupa_set_more): New function.
17652 * include/pupa/term.h (pupa_set_more): New prototype.
17655 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17657 Now this project is GRUB 2 rather than PUPA. The location of
17658 the CVS repository was moved to GRUB's.
17660 * configure.ac: Use bug-grub as the reporting address.
17661 Use GRUB instead of PUPA.
17662 Change the version number to 1.90.
17664 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17666 * genkernsyms.sh: Updated copyright information.
17667 * genmk.rb: Likewise.
17668 * genmodsrc.sh: Likewise.
17669 * gensymlist.sh: Likewise.
17670 * boot/i386/pc/boot.S: Likewise.
17671 * boot/i386/pc/diskboot.S: Likewise.
17672 * disk/i386/pc/biosdisk.c: Likewise.
17673 * disk/i386/pc/partition.c: Likewise.
17674 * font/manager.c: Likewise.
17675 * fs/ext2.c: Likewise.
17676 * fs/fat.c: Likewise.
17677 * include/pupa/boot.h: Likewise.
17678 * include/pupa/device.h: Likewise.
17679 * include/pupa/disk.h: Likewise.
17680 * include/pupa/dl.h: Likewise.
17681 * include/pupa/elf.h: Likewise.
17682 * include/pupa/err.h: Likewise.
17683 * include/pupa/file.h: Likewise.
17684 * include/pupa/font.h: Likewise.
17685 * include/pupa/fs.h: Likewise.
17686 * include/pupa/kernel.h: Likewise.
17687 * include/pupa/loader.h: Likewise.
17688 * include/pupa/misc.h: Likewise.
17689 * include/pupa/mm.h: Likewise.
17690 * include/pupa/net.h: Likewise.
17691 * include/pupa/normal.h: Likewise.
17692 * include/pupa/rescue.h: Likewise.
17693 * include/pupa/setjmp.h: Likewise.
17694 * include/pupa/symbol.h: Likewise.
17695 * include/pupa/term.h: Likewise.
17696 * include/pupa/types.h: Likewise.
17697 * include/pupa/i386/setjmp.h: Likewise.
17698 * include/pupa/i386/types.h: Likewise.
17699 * include/pupa/i386/pc/biosdisk.h: Likewise.
17700 * include/pupa/i386/pc/boot.h: Likewise.
17701 * include/pupa/i386/pc/console.h: Likewise.
17702 * include/pupa/i386/pc/init.h: Likewise.
17703 * include/pupa/i386/pc/kernel.h: Likewise.
17704 * include/pupa/i386/pc/linux.h: Likewise.
17705 * include/pupa/i386/pc/loader.h: Likewise.
17706 * include/pupa/i386/pc/memory.h: Likewise.
17707 * include/pupa/i386/pc/multiboot.h: Likewise.
17708 * include/pupa/i386/pc/partition.h: Likewise.
17709 * include/pupa/i386/pc/time.h: Likewise.
17710 * include/pupa/i386/pc/vga.h: Likewise.
17711 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17712 * include/pupa/util/getroot.h: Likewise.
17713 * include/pupa/util/misc.h: Likewise.
17714 * include/pupa/util/resolve.h: Likewise.
17715 * kern/device.c: Likewise.
17716 * kern/disk.c: Likewise.
17717 * kern/dl.c: Likewise.
17718 * kern/err.c: Likewise.
17719 * kern/file.c: Likewise.
17720 * kern/fs.c: Likewise.
17721 * kern/loader.c: Likewise.
17722 * kern/main.c: Likewise.
17723 * kern/misc.c: Likewise.
17724 * kern/mm.c: Likewise.
17725 * kern/rescue.c: Likewise.
17726 * kern/term.c: Likewise.
17727 * kern/i386/dl.c: Likewise.
17728 * kern/i386/pc/init.c: Likewise.
17729 * kern/i386/pc/lzo1x.S: Likewise.
17730 * kern/i386/pc/startup.S: Likewise.
17731 * loader/i386/pc/chainloader.c: Likewise.
17732 * loader/i386/pc/linux.c: Likewise.
17733 * loader/i386/pc/multiboot.c: Likewise.
17734 * normal/cmdline.c: Likewise.
17735 * normal/command.c: Likewise.
17736 * normal/main.c: Likewise.
17737 * normal/menu.c: Likewise.
17738 * normal/i386/setjmp.S: Likewise.
17739 * term/i386/pc/console.c: Likewise.
17740 * term/i386/pc/vga.c: Likewise.
17741 * util/console.c: Likewise.
17742 * util/genmoddep.c: Likewise.
17743 * util/misc.c: Likewise.
17744 * util/pupa-emu.c: Likewise.
17745 * util/resolve.c: Likewise.
17746 * util/unifont2pff.rb: Likewise.
17747 * util/i386/pc/biosdisk.c: Likewise.
17748 * util/i386/pc/getroot.c: Likewise.
17749 * util/i386/pc/pupa-mkimage.c: Likewise.
17750 * util/i386/pc/pupa-setup.c: Likewise.
17752 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17754 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17755 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17756 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17757 reading and reset it after reading.
17758 (pupa_ext2_close): Return PUPA_ERR_NONE.
17760 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17762 (struct linux_kernel_header): Add kernel_version and
17764 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17765 pupa_file_read succeeds.
17766 (pupa_rescue_cmd_initrd): Implement.
17768 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17770 * fs/ext2.c (pupa_ext2_label): New function.
17771 (pupa_ext2_fs): Added label.
17772 * fs/fat.c (pupa_fat_label): New function.
17773 (pupa_fat_fs): Added label.
17774 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17776 * kern/misc.c (pupa_strndup): New function.
17777 * include/pupa/misc.h (pupa_strndup): New prototype.
17779 * include/pupa/normal.h: Include <pupa/err.h>.
17780 (pupa_set_history): New prototype.
17781 (pupa_iterate_commands): New prototype.
17782 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17783 <pupa/disk.h>, <pupa/file.h>.
17784 (hist_size): New variable.
17785 (hist_lines): Likewise.
17786 (hist_end): Likewise.
17787 (hist_used): Likewise.
17788 (pupa_set_history): New function.
17789 (pupa_history_get): Likewise.
17790 (pupa_history_add): Likewise.
17791 (pupa_history_replace): Likewise.
17792 (pupa_tab_complete): Likewise.
17793 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17794 completion shows partitionnames while completing partitions, this
17795 feature was suggested by Jeff Bailey.
17796 * normal/command.c (pupa_iterate_commands): New function.
17797 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17798 (pupa_normal_init): Initialize history buffer.
17799 (PUPA_MOD_INIT): Likewise.
17800 (pupa_normal_fini): Free the history buffer.
17801 (PUPA_MOD_FINI): Likewise.
17803 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17806 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17807 * configure.ac [i386]: Check for regparam bug.
17808 (NESTED_FUNC_ATTR) [! i386]: Defined.
17810 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17812 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17813 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17814 (pupa_emu_SOURCES): New variable.
17815 (pupa_emu_LDFLAGS): Likewise.
17816 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17817 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17818 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17819 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17820 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17821 (pupa_jmp_buf): New typedef.
17822 (pupa_setjmp) [PUPA_UTIL]: New macro.
17823 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17824 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17825 (pupa_refresh): New prototype.
17826 * include/pupa/util/getroot.h: New file.
17827 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17829 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17830 (pupa_rescue_cmd_cat): Likewise.
17831 (pupa_rescue_cmd_ls): Likewise.
17832 (pupa_rescue_cmd_testload): Likewise.
17833 (pupa_rescue_cmd_lsmod): Likewise.
17834 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17835 * normal/menu.c (run_menu): Likewise.
17836 * kern/term.c (pupa_cls): Likewise.
17837 (pupa_refresh): New function.
17838 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17839 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17840 * util/console.c: New file.
17842 * util/i386/pc/getroot.c: New file.
17843 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17844 (pupa_putchar): New function.
17845 (pupa_refresh): Likewise.
17846 (xgetcwd): Function moved to ...
17847 (strip_extra_slashes): Likewise.
17848 (get_prefix): Likewise.
17849 * util/i386/pc/getroot.c: ... here.
17850 (find_root_device): Function moved and renamed to...
17851 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17852 Changed all callers.
17853 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17855 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17856 Changed all callers.
17857 * util/misc.c (pupa_memalign): New function.
17858 (pupa_mm_init_region): Likewise.
17859 (pupa_register_exported_symbols): Likewise.
17860 (pupa_putchar): Function removed.
17861 * util/pupa-emu.c: New file.
17863 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17865 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17866 (_multiboot_mod_SOURCES): New variable.
17867 (_multiboot_mod_CFLAGS): Likewise.
17868 * loader/i386/pc/multiboot.c: New file.
17869 * include/pupa/i386/pc/multiboot.h: Likewise.
17870 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17871 (pupa_multiboot_real_boot): New function.
17872 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17873 (pupa_multiboot_real_boot): New prototype.
17874 (pupa_rescue_cmd_multiboot): Likewise
17875 (pupa_rescue_cmd_module): Likewise.
17877 * kern/loader.c (pupa_loader_set): Continue when
17878 pupa_loader_unload_func() fails.
17879 (pupa_loader_unset): New function.
17880 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17882 * kern/misc.c (pupa_stpcpy): New function.
17883 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17885 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17887 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17888 for available extensions.
17890 * include/pupa/i386/pc/time.h: New file.
17891 * kern/disk.c: Include <pupa/machine/time.h>.
17892 (PUPA_CACHE_TIMEOUT): New macro.
17893 (pupa_last_time): New variable.
17894 (pupa_disk_open): Flush the cache when there was a timeout.
17895 (pupa_disk_close): Reset the timer.
17896 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17898 * util/misc.c: Include <sys/times.h>
17899 (pupa_get_rtc): New function.
17901 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17903 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17905 (pupa_ext2_get_file_block): Use blocks member.
17907 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17908 first block. Return -1 instead of pupa_errno on error.
17910 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17912 * README: In the pupa-mkimage example use _chain instead of chain
17913 and ext2 instead of fat.
17914 * TODO: Replace ext2fs with jfs as an example. Add an item for
17915 adding journal playback for ext2fs.
17916 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17917 (pkgdata_MODULES): Added ext2.mod.
17918 (ext2_mod_SOURCES): New variable.
17919 (ext2_mod_CFLAGS): Likewise.
17920 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17921 * include/pupa/misc.h (pupa_strncpy): New prototype.
17922 (pupa_strcat): Likewise.
17923 (pupa_strncmp): Likewise.
17924 * kern/misc.c (pupa_strcat): Enable function.
17925 (pupa_strncpy): New function.
17926 (pupa_strncmp): Likewise.
17927 * fs/ext2.c: New file.
17929 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17930 when the read failed before retrying.
17931 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17932 (_FILE_OFFSET_BITS): Likewise.
17933 * configure.ac: Added AC_SYS_LARGEFILE.
17935 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17937 * genmk.rb (PModule#rule): Make sure to get only symbol names
17938 from the output of nm.
17939 Reported by Robert Millan <zeratul2@wanadoo.es>.
17941 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17943 I forgot to check in these changes for a long time. This adds
17944 incomplete support for VGA console, and this is still very
17945 buggy. Also, a lot of consideration is required for I18N,
17946 UNICODE, and VGA font issues. Therefore, assume that this is
17947 such that "better than nothing".
17949 * font/manager.c: New file.
17950 * include/pupa/font.h: Likewise.
17951 * include/pupa/i386/pc/vga.h: Likewise.
17952 * term/i386/pc/vga.c: Likewise.
17953 * util/unifont2pff.rb: Likewise.
17955 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17956 (pkgdata_MODULES): Added vga.mod and font.mod.
17957 (vga_mod_SOURCES): New variables.
17958 (vga_mod_CFLAGS): Likewise.
17959 (font_mod_SOURCES): Likewise.
17960 (font_mod_CFLAGS): Likewise.
17962 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17964 * include/pupa/term.h: Include pupa/err.h.
17965 (struct pupa_term): Added init and fini.
17966 Changed the argument of putchar to pupa_uint32_t.
17968 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17969 (pupa_console_real_putchar): New prototype.
17970 (pupa_console_putchar): Removed.
17971 (pupa_console_checkkey): Exported.
17972 (pupa_console_getkey): Likewise.
17974 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17977 * kern/term.c (pupa_term_set_current): Rewritten.
17978 (pupa_putchar): Likewise.
17979 (pupa_putcode): New function.
17981 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17982 (pupa_console_real_putchar): ... this.
17983 (pupa_vga_set_mode): New function.
17984 (pupa_vga_get_font): Likewise.
17986 * normal/command.c: Include pupa/term.h.
17987 (terminal_command): New function.
17988 (pupa_command_init): Register the command "terminal".
17990 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17991 (DISP_UP): Likewise.
17992 (DISP_RIGHT): Likewise.
17993 (DISP_DOWN): Likewise.
17994 (DISP_HLINE): Likewise.
17995 (DISP_VLINE): Likewise.
17996 (DISP_UL): Likewise.
17997 (DISP_UR): Likewise.
17998 (DISP_LL): Likewise.
17999 (DISP_LR): Likewise.
18001 * term/i386/pc/console.c (pupa_console_putchar): New function.
18003 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18005 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18006 FIX. Reverse the path_list.
18008 * include/pupa/normal.h: Export pupa_register_command and
18009 pupa_unregister_command.
18011 * hello/hello.c (pupa_cmd_hello): New module.
18012 * conf/i386-pc.rmk: Added hello.mod.
18014 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18016 * kern/i386/pc/lzo1x.S: New file.
18018 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18019 (compress_kernel): New variable.
18020 (generate_image): Heavily modified to support compressing a
18021 large part of the core image.
18023 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18025 (pupa_util_load_image): New function.
18027 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18028 (pupa_compressed_size): New variable.
18029 (codestart): Enable Gate A20 here.
18030 Decompress the compressed part of the core image.
18031 Rearrange the code to put functions and variables which are
18032 required for initialization in the non-compressed part.
18035 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18038 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18040 * include/pupa/i386/pc/kernel.h
18041 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18042 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18043 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18044 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18045 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18047 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18049 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18050 (Utility#rule): Likewise.
18052 * configure.ac: Check if LZO is available.
18054 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18056 * include/pupa/normal.h: New file.
18057 * include/pupa/setjmp.h: Likewise.
18058 * include/pupa/i386/setjmp.h: Likewise.
18059 * normal/cmdline.c: Likewise.
18060 * normal/command.c: Likewise.
18061 * normal/main.c: Likewise.
18062 * normal/menu.c: Likewise.
18063 * normal/i386/setjmp.S: Likewise.
18065 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18066 (pupa_rescue_cmd_initrd): Likewise.
18068 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18071 * kern/i386/pc/startup.S (translation_table): New variable.
18072 (translate_keycode): New function.
18073 (pupa_console_getkey): Call translate_keycode.
18075 * kern/rescue.c (attempt_normal_mode): New function.
18076 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18077 it failed, print a message.
18079 * kern/mm.c (pupa_real_malloc): Print more information when a
18080 free magic is broken.
18081 (pupa_free): If the first free header is not free actually, set
18084 * kern/main.c (pupa_load_normal_mode): Just load the module
18086 (pupa_main): Don't print the message
18087 "Entering into rescue mode..." here.
18089 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18091 (pupa_rescue_cmd_initrd): Likewise.
18092 (pupa_rescue_cmd_initrd): Likewise.
18094 * include/pupa/symbol.h (FUNCTION): Specify the type.
18095 (VARIABLE): Likewise.
18097 * include/pupa/err.h (pupa_err_t): Added
18098 PUPA_ERR_UNKNOWN_COMMAND.
18100 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18101 (pupa_dl_get_prefix): Likewise.
18103 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18104 Added _chain.mod and _linux.mod instead of chain.mod and
18106 (chain_mod_SOURCES): Renamed to ...
18107 (_chain_mod_SOURCES): ... this.
18108 (chain_mod_CFLAGS): Renamed to ...
18109 (_chain_mod_CFLAGS): ... this.
18110 (linux_mod_SOURCES): Renamed to ...
18111 (_linux_mod_SOURCES): ... this.
18112 (linux_mod_CFLAGS): Renamed to ...
18113 (_linux_mod_CFLAGS): ... this.
18114 (normal_mod_SOURCES): New variable.
18115 (normal_mod_CFLAGS): Likewise.
18116 (normal_mod_ASFLAGS): Likewise.
18118 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18120 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18123 * kern/dl.c (pupa_dl_ref): Refer depending modules
18125 (pupa_dl_unref): Unrefer depending modules recursively.
18126 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18127 a module is unloaded before one depending on that module is
18129 (pupa_dl_unload): Unload depending modules explicitly,
18132 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18134 * include/pupa/i386/pc/linux.h: New file.
18135 * loader/i386/pc/linux.c: Likewise.
18137 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18139 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18140 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18141 of PUPA_CHAINLOADER_BOOT_SECTOR.
18143 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18144 (pupa_linux_prot_size): New variable.
18145 (pupa_linux_tmp_addr): Likewise.
18146 (pupa_linux_real_addr): Likewise.
18147 (pupa_linux_boot_zimage): New function.
18148 (pupa_linux_boot_bzimage): Likewise.
18150 * kern/i386/pc/init.c (struct mem_region): New structure.
18151 (MAX_REGIONS): New macro.
18152 (mem_regions): New variable.
18153 (num_regions): Likewise.
18154 (pupa_os_area_addr): Likewise.
18155 (pupa_os_area_size): Likewise.
18156 (pupa_lower_mem): Likewise.
18157 (pupa_upper_mem): Likewise.
18158 (add_mem_region): New function.
18159 (compact_mem_regions): Likewise.
18160 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18161 the size of the conventional memory and that of so-called upper
18162 memory (before the first memory hole).
18163 Instead of adding each found region to free memory, use
18164 add_mem_region and add them after removing overlaps.
18165 Also, add only 1/4 of the upper memory to free memory. The rest
18166 is used for loading OS images. Maybe this is ad hoc, but this
18167 makes it much easier to relocate OS images when booting.
18169 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18170 (pupa_enter_rescue_mode): Don't register initrd and module.
18172 * kern/mm.c: Include pupa/dl.h.
18174 * kern/main.c: Include pupa/file.h and pupa/device.h.
18176 * kern/loader.c (pupa_loader_load_module_func): Removed.
18177 (pupa_loader_load_module): Likewise.
18179 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18182 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18183 (pupa_linux_tmp_addr): Likewise.
18184 (pupa_linux_real_addr): Likewise.
18185 (pupa_linux_boot_zimage): Likewise.
18186 (pupa_linux_boot_bzimage): Likewise.
18188 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18189 (pupa_upper_mem): Likewise.
18190 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18191 module is too dangerous.
18193 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18194 (pupa_os_area_size): Likewise.
18195 (pupa_loader_set): Remove the first argument. Loader doesn't
18196 manage modules or initrd any longer.
18197 (pupa_loader_load_module): Removed.
18199 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18200 (linux_mod_SOURCES): New variable.
18201 (linux_mod_CFLAGS): Likewise.
18203 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18205 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18206 the length of a blocklist correctly.
18208 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18209 Use ioctl only if the OS file is a block device.
18210 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18211 not very useful for normal files.
18213 * kern/main.c (pupa_set_root_dev): New function.
18214 (pupa_load_normal_mode): Likewise.
18215 (pupa_main): Call those above.
18217 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18220 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18222 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18224 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18225 (setup): Configure the installed partition information and the
18228 * loader/i386/pc/chainloader.c (my_mod): New variable.
18229 (pupa_chainloader_unload): New function.
18230 (pupa_rescue_cmd_chainloader): Refer itself.
18231 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18233 * kern/i386/pc/startup.S (install_partition): Removed.
18234 (version_string): Likewise.
18235 (config_file): Likewise.
18236 (pupa_install_dos_part): New variable.
18237 (pupa_install_bsd_part): Likewise.
18238 (pupa_prefix): Likewise.
18239 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18241 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18243 (make_install_device): New function.
18244 (pupa_machine_init): Set the dl prefix.
18246 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18247 (buf): Renamed to ...
18248 (linebuf): ... this.
18249 (pupa_rescue_cmd_prefix): New function.
18250 (pupa_rescue_cmd_insmod): Likewise.
18251 (pupa_rescue_cmd_rmmod): Likewise.
18252 (pupa_rescue_cmd_lsmod): Likewise.
18253 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18256 * kern/mm.c (pupa_memalign): If failed even after invalidating
18257 disk caches, unload unneeded modules and retry.
18259 * kern/misc.c (pupa_memmove): New function.
18260 (pupa_memcpy): Removed.
18261 (pupa_strcpy): New function.
18262 (pupa_itoa): Made static.
18264 * kern/dl.c (pupa_dl_iterate): New function.
18265 (pupa_dl_ref): Likewise.
18266 (pupa_dl_unref): Likewise.
18267 (pupa_dl_unload): Return if succeeded or not.
18268 (pupa_dl_unload_unneeded): New function.
18269 (pupa_dl_unload_all): Likewise.
18270 (pupa_dl_init): Renamed to ...
18271 (pupa_dl_set_prefix): ... this.
18272 (pupa_dl_get_prefix): New function.
18274 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18275 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18276 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18277 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18278 (pupa_install_dos_part): Declared.
18279 (pupa_install_bsd_part): Likewise.
18280 (pupa_prefix): Likewise.
18281 (pupa_boot_drive): Likewise.
18283 * include/pupa/types.h: Fix a typo.
18285 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18287 (pupa_memmove): Declared.
18288 (pupa_strcpy): Likewise.
18290 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18291 pupa_mod_init takes one argument, its own module.
18292 (pupa_dl_unload_unneeded): Declared.
18293 (pupa_dl_unload_all): Likewise.
18294 (pupa_dl_ref): Likewise.
18295 (pupa_dl_unref): Likewise.
18296 (pupa_dl_iterate): Likewise.
18297 (pupa_dl_init): Renamed to ...
18298 (pupa_dl_set_prefix): ... this.
18299 (pupa_dl_get_prefix): Declared.
18301 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18302 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18304 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18305 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18307 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18308 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18310 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18312 * util/i386/pc/pupa-setup.c (setup): Define the internal
18313 function find_first_partition_start at the top level, because GCC
18314 3.0.x cannot compile internal functions in deeper scopes
18316 (find_root_device): Use lstat instead of stat.
18317 Don't follow symbolic links.
18318 Fix the path-constructing code.
18320 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18321 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18322 by a BLKGETSIZE ioctl first, because block devices don't fill
18323 the member st_mode of the structure stat on Linux.
18324 [__linux__] (linux_find_partition): Use a temporary buffer
18325 REAL_DEV for the working space. Copy it to DEV before returning.
18326 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18327 buffer cache consistent.
18328 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18329 strncmp. The previous value was merely wrong.
18330 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18332 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18333 FAT size is 12. The previous value was merely wrong.
18335 * kern/main.c (pupa_main): Don't split the starting message from
18338 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18339 LF, because BIOS goes crazy about character attributes in this
18342 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18344 * include/i386/pc/util/biosdisk.h: New file.
18345 * util/i386/pc/biosdisk.c: Likewise.
18346 * util/i386/pc/pupa-setup.c: Likewise.
18348 * Makefile.in (INCLUDE_DISTFILES): Added
18349 include/pupa/i386/pc/util/biosdisk.h.
18350 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18351 directory util/i386/pc.
18352 (install-local): Added a rule for sbin_UTILITIES.
18353 (uninstall): Likewise.
18355 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18357 * util/misc.c (xrealloc): New function.
18358 (pupa_malloc): Likewise.
18359 (pupa_free): Likewise.
18360 (pupa_realloc): Likewise.
18361 (pupa_stop): Likewise.
18362 (pupa_putchar): Likewise.
18364 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18366 * include/pupa/util/misc.h (xrealloc): Declared.
18368 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18370 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18371 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18373 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18374 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18376 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18377 way should be implemented.
18378 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18380 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18381 the size of NAME for safety.
18382 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18385 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18386 (pupa_setup_SOURCES): Likewise.
18388 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18390 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18392 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18393 bunch of pushl's from pusha, because this destroys the return
18396 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18398 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18399 This means that any missing prototypes could be fatal. Also, you
18400 must take care when writing assembly code. See the comments at
18401 the beginning of startup.S, for more details.
18403 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18404 compilation mechanism.
18405 (pupa_chainloader_real_boot): Likewise.
18406 (pupa_biosdisk_rw_int13_extensions): Likewise.
18407 (pupa_biosdisk_rw_standard): Likewise.
18408 (pupa_biosdisk_check_int13_extensions): Likewise.
18409 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18410 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18411 (pupa_get_memsize): Likewise.
18412 (pupa_get_mmap_entry): Likewise.
18413 (pupa_console_putchar): Likewise.
18414 (pupa_console_setcursor): Likewise.
18415 (pupa_getrtsecs): Use pushl instead of push.
18417 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18418 memory instead of the stack for a mmap entry, because some
18419 BIOSes may ignore the maximum size and overflow.
18421 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18423 * genmk.rb (PModule#rule): Compile automatically generated
18424 sources with module-specific CFLAGS as well as other sources.
18426 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18428 * configure.ac: Check ld.
18429 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18430 respectively, before checking endianness and sizes.
18432 * Makefile.in (LD): New variable.
18434 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18436 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18438 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18440 * Changelog: New file.