1 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
3 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
4 (grub_jfs_uuid): New function.
5 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
7 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
9 * util/grub-mkconfig_lib.in (font_path): Move the functionality
11 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
12 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
14 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
16 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
17 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
20 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
21 not just "vmlinu[zx]".
23 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
26 * util/grub.d/10_linux.in (find_latest): Moved from here ...
27 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
30 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
32 * util/grub.d/10_freebsd.in: Use an absolute device path for
33 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
35 2009-08-06 Felix Zielcke <fzielcke@z-51.de>
37 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
38 handling of multiple abstraction modules.
40 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
42 Fix a bug resulting in black screen when loading Linux using a
45 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
48 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
49 (grub_vbe_bios_getset_dac_palette_width): New function.
50 (grub_vbe_bios_get_dac_palette_width)
51 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
52 grub_vbe_bios_getset_dac_palette_width()).
54 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
55 check for return status.
56 (grub_vbe_get_video_mode_info): When getting information for a packed
57 mode (<= 8 bpp), obtain DAC palette width using
58 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
59 {red,green,blue}_mark_size.
61 2009-08-04 Felix Zielcke <fzielcke@z-51.de>
63 * commands/search.c (options): Fix help output to match actual code.
65 2009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
67 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
70 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
72 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
75 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
77 Support Apple partition map with sector size different from 512 bytes.
79 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
80 (apple_partition_map_iterate): Respect 'aheader.blocksize'
81 and 'apart.partmap_size'.
83 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
84 2009-08-01 Robert Millan <rmh.grub@aybabtu.com>
88 * commands/i386/cpuid.c (options): New variable.
89 (grub_cmd_cpuid): Return real error.
90 (GRUB_MOD_INIT(cpuid)): Declare options.
92 2009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
94 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
97 2009-07-31 Bean <bean123ch@gmail.com>
99 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
101 (grub_fshelp_node): Move inode field to the end.
102 (grub_xfs_data): Remove inode field.
103 (grub_xfs_inode_block): Calculate inode size using sblock.
104 (grub_xfs_inode_offset): Likewise.
105 (grub_xfs_read_inode): Calculate inode size using sblock.
106 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
107 (grub_xfs_iterate_dir): Calculate inode size using sblock.
108 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
110 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
111 not accessible when data is null.
112 (grub_xfs_open): Likewise.
114 2009-07-31 Bean <bean123ch@gmail.com>
116 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
117 Don't change pv->disk if it's already set.
119 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
120 (grub_raid_register): ... here.
121 (grub_raid_rescan): Removed.
123 * include/grub/raid.h (grub_raid_rescan): Removed.
125 * util/grub-fstest.c: Remove include file <grub/raid.h>.
126 (fstest): Replace grub_raid_rescan with module fini function followed
129 * util/grub-probe.c: Add include file <grub/raid.h>.
130 (probe_raid_level): New function.
131 (probe): Detect abstraction by walking the disk device, support two
132 level of abstraction (LVM on RAID) when detecting partition map.
134 2009-07-31 Pavel Roskin <proski@gnu.org>
136 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
137 to grub_zalloc(), it was erroneous.
138 Reported by Bean <bean123ch@gmail.com>
140 2009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
142 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
143 embeding zone, not only the first one.
145 2009-07-29 Joe Auricchio <jauricchio@gmail.com>
147 * term/gfxterm.c (clear_char): New function.
148 (grub_virtual_screen_setup): Use clear_char.
149 (scroll_up): Likewise.
150 (grub_virtual_screen_cls): Likewise.
152 2009-07-29 Felix Zielcke <fzielcke@z-51.de>
154 * util/deviceiter.c (get_acceleraid_disk_name): New static
156 (grub_util_iterate_devices): Handle Accelraid devices.
157 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
159 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
161 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
162 separator for the suggested gfxpayload string (';' collides with the
163 parser and needs escaping).
165 2009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
167 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
168 Clear direction flag before jumping to OS.
169 (grub_multiboot2_real_boot): Likewise.
171 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
173 * util/i386/pc/grub-install: Fix parsing of --disk-module
176 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
178 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
181 2009-07-26 Felix Zielcke <fzielcke@z-51.de>
183 * util/grub-mkconfig.in (package_version): New variable.
184 Use it do display the version.
186 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
188 * kern/file.c (grub_file_open): Revert to previous check with
191 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
193 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
194 from help line. It's out of sync with code.
196 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
198 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
199 entries on failed boot.
201 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
203 * kern/file.c (grub_file_open): Fix an error check.
205 2009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
207 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
208 partition map couldn't be identified.
210 2009-07-23 Pavel Roskin <proski@gnu.org>
212 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
213 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
214 case of little endian words becomes just an optimization.
215 Respect const modifier.
216 (md5_final): Use code that doesn't depend on endianess.
218 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
219 to avoid loss of upper bits if align is unsigned and shorter
222 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
226 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
227 (grub_ufs_uuid): New function.
228 (grub_ufs_fs): add .uuid
230 2009-07-21 Pavel Roskin <proski@gnu.org>
232 * kern/dl.c (grub_dl_check_header): Make static.
234 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
236 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
237 add drivemap for Vista. It breaks Windows 7.
239 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
241 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
244 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
248 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
249 (grub_fstest_SOURCES): Likewise.
250 (pkglib_MODULES): Add befs.mod.
251 (befs_mod_SOURCES): New variable.
252 (befs_mod_CFLAGS): Likewise.
253 (befs_mod_LDFLAGS): Likewise.
254 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
255 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
256 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
257 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
258 (grub_setup_SOURCES): Likewise.
259 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
260 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
261 (grub_setup_SOURCES): Likewise.
262 * fs/befs.c: New file.
263 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
264 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
265 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
266 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
267 (B_KEY_INDEX_ALIGN): New declaration.
268 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
269 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
270 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
271 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
272 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
273 (grub_afs_mount) [MODE_BFS]: Likewise.
274 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
275 (grub_afs_fs): Use GRUB_AFS_FSNAME
276 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
277 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
278 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
279 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
281 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
283 * util/getroot.c (find_root_device): Add support for MacOSX.
284 * util/hostdisk.c: Likewise.
286 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
288 * font/font.c (find_glyph): Check whether a font is present to avoid
291 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
293 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
295 2009-07-20 Pavel Roskin <proski@gnu.org>
297 * configure.ac: Trim excessively wordy excuses.
299 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
301 Add symlink, mtime and label support to AtheFS.
303 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
304 (grub_afs_iterate_dir): Handle symlinks.
305 (grub_afs_open): Use grub_afs_read_symlink.
306 (grub_afs_dir): Likewise.
308 (grub_afs_label): New function.
309 (grub_afs_fs): Add grub_afs_label.
310 (grub_afs_read_symlink): New function.
312 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
316 * fs/afs.c: Fix comments style.
317 (grub_afs_blockrun): Declare as packed.
318 (grub_afs_datastream): Likewise.
319 (grub_afs_bnode): Likewise.
320 (grub_afs_btree): Likewise.
321 (grub_afs_sblock): Likewise.
322 Declare `name' as char.
323 (grub_afs_inode): Declare as packed.
324 Change void *vnode to grub_uint32_t unused.
325 (grub_afs_iterate_dir): Check that key_size is positive.
326 (grub_afs_mount): Don't read superblock twice.
327 (grub_afs_dir): Don't free node in case of error,
328 grub_fshelp_find_file already handles this.
329 (grub_afs_open): Likewise.
331 2009-07-19 Pavel Roskin <proski@gnu.org>
333 * Makefile.in: Remove LIBLZO and enable_lzo.
334 * conf/i386-pc.rmk: Remove lzo support.
335 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
336 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
338 * kern/i386/pc/lzo1x.S: Remove.
339 * kern/i386/pc/startup.S: Remove lzo support.
340 * util/i386/pc/grub-mkimage.c: Likewise.
342 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
344 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
345 * fs/xfs.c (grub_xfs_dir): Likewise.
346 * fs/afs.c (grub_afs_dir): Likewise.
347 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
348 (grub_iso9660_open): Likewise.
349 * fs/jfs.c (grub_jfs_open): Likewise.
350 * fs/ext2.c (grub_ext2_dir): Likewise.
351 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
352 * script/sh/lexer.c (grub_script_yylex): Likewise.
354 2009-07-16 Pavel Roskin <proski@gnu.org>
356 * configure.ac: Never add "-c" to CFLAGS.
358 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
360 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
361 grub_cv_cc_efiemu should be used.
363 * configure.ac: Typo fixes.
365 * kern/mm.c (grub_zalloc): New function.
366 (grub_debug_zalloc): Likewise.
367 * include/grub/mm.h: Declare grub_zalloc() and
369 * util/misc.c (grub_zalloc): New function.
370 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
371 instead of grub_malloc(), remove unneeded initializations.
372 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
373 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
374 * commands/parttool.c (grub_cmd_parttool): Likewise.
375 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
376 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
377 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
378 * disk/usbms.c (grub_usbms_finddevs): Likewise.
379 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
380 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
381 (grub_cmd_efiemu_pnvram): Likewise.
382 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
383 * fs/iso9660.c (grub_iso9660_mount): Likewise.
384 (grub_iso9660_iterate_dir): Likewise.
385 * fs/jfs.c (grub_jfs_opendir): Likewise.
386 * fs/ntfs.c (list_file): Likewise.
387 (grub_ntfs_mount): Likewise.
388 * kern/disk.c (grub_disk_open): Likewise.
389 * kern/dl.c (grub_dl_load_core): Likewise.
390 * kern/elf.c (grub_elf_file): Likewise.
391 * kern/env.c (grub_env_context_open): Likewise.
392 (grub_env_set): Likewise.
393 (grub_env_set_data_slot): Likewise.
394 * kern/file.c (grub_file_open): Likewise.
395 * kern/fs.c (grub_fs_blocklist_open): Likewise.
396 * loader/i386/multiboot.c (grub_module): Likewise.
397 * loader/xnu.c (grub_xnu_create_key): Likewise.
398 (grub_xnu_create_value): Likewise.
399 * normal/main.c (grub_normal_add_menu_entry): Likewise.
400 (read_config_file): Likewise.
401 * normal/menu_entry.c (make_screen): Likewise.
402 * partmap/sun.c (sun_partition_map_iterate): Likewise.
403 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
404 * script/sh/script.c (grub_script_parse): Likewise.
405 * video/bitmap.c (grub_video_bitmap_create): Likewise.
406 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
407 * video/readers/png.c (grub_png_output_byte): Likewise.
408 (grub_video_reader_png): Likewise.
410 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
412 Enable all targets that can be built by default
414 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
415 grub-mkfont and grub-fstest if they can be built
417 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
419 Fix hang and segmentation fault in grub-emu-usb
421 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
422 * util/usb.c (grub_libusb_devices): likewise
423 (grub_libusb_init): rename to ...
424 (GRUB_MOD_INIT (libusb)):...this
425 (grub_libusb_fini): rename to ..
426 (GRUB_MOD_FINI (libusb)):...this
427 * disk/usbms.c (grub_usbms_transfer): fix retry logic
428 * include/grub/disk.h (grub_raid_init): removed, it's useless
429 (grub_raid_fini): likewise
430 (grub_lvm_init): likewise
431 (grub_lvm_fini): likewise
432 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
435 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
439 * Makefile.in (LIBUSB): new macro
440 * genmk.rb (Utility/print_tail): new method
441 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
442 (top level): call util.print_tail at the end.
444 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
446 Make FreeBSD accept zpool.cache
448 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
449 type is /boot/zfs/zpool.cache
451 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
455 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
456 correct wrong typedef
457 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
459 2009-07-15 Pavel Roskin <proski@gnu.org>
461 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
462 * kern/disk.c (struct grub_disk_cache): Likewise.
464 * commands/probe.c (options): Typo fix.
466 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
467 Increase to 0x5a to accommodate FAT32. Adjust other offsets
469 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
471 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
472 the end of "Error" to make the message more readable.
474 * boot/i386/pc/boot.S (kernel_segment): Remove.
475 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
478 * boot/i386/pc/boot.S (boot_version): Remove.
479 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
482 * include/grub/i386/pc/boot.h: Sort all offsets.
483 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
484 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
485 * boot/i386/pc/boot.S: Assert location of every offset listed in
486 include/grub/i386/pc/boot.h.
488 2009-07-13 Pavel Roskin <proski@gnu.org>
490 * include/grub/i386/coreboot/machine.h: Rename
491 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
492 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
493 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
495 * kern/dl.c: Force native word size to suppress warnings when
498 * kern/device.c (grub_device_iterate): Change struct part_ent to
499 hold the name, not a pointer to it. Use one grub_malloc() per
500 partition, not two. Free partition_name if grub_malloc() fails.
501 Set ents to NULL only before grub_partition_iterate() is called.
503 2009-07-11 Bean <bean123ch@gmail.com>
505 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
508 2009-07-10 Bean <bean123ch@gmail.com>
509 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
511 * kern/ieee1275/openfw.c (grub_children_iterate)
512 (grub_devalias_iterate): Fix size evaluation for property or path
513 strings, which was broken since r2132.
515 2009-07-07 Pavel Roskin <proski@gnu.org>
517 * commands/search.c (search_file): Merge into ...
518 (search_fs): ... this. Accept search type as argument.
519 (grub_cmd_search): Pass search type to search_fs().
521 * include/grub/util/console.h: New file.
522 * util/console.c: Use it instead of grub/machine/console.h.
523 * util/grub-emu.c: Likewise.
525 * lib/arg.c (find_long_option): Remove.
526 (find_long): Add `len' argument, make `s' const char *.
527 (grub_arg_parse): Parse long options in place, not in a
530 2009-07-06 Pavel Roskin <proski@gnu.org>
532 * commands/search.c (search_fs): Fix potential NULL pointer
535 * commands/search.c (search_fs): Replace QUID macro with quid_fn
538 2009-07-06 Daniel Mierswa <impulze@impulze.org>
540 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
543 2009-07-05 Pavel Roskin <proski@gnu.org>
545 * include/grub/i386/linux.h (struct linux_kernel_params):
546 Restore padding3, it's still needed.
548 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
550 * util/osdetect.lua: Likewise.
552 2009-07-05 Bean <bean123ch@gmail.com>
554 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
556 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
557 (grub_lua_getenv): Likewise.
558 (grub_lua_setenv): Likewise.
559 (save_errno): New function.
560 (push_result): Likewise.
561 (grub_lua_enum_device): Likewise.
562 (grub_lua_enum_file): Likewise.
563 (grub_lua_file_open): Likewise.
564 (grub_lua_file_close): Likewise.
565 (grub_lua_file_seek): Likewise.
566 (grub_lua_file_read): Likewise.
567 (grub_lua_file_getline): Likewise.
568 (grub_lua_file_getsize): Likewise.
569 (grub_lua_file_getpos): Likewise.
570 (grub_lua_file_eof): Likewise.
571 (grub_lua_file_exist): Likewise.
572 (grub_lua_add_menu): Likewise.
574 * script/lua/grub_lua.h (isupper): New inline function.
577 (isxdigit): Likewise.
578 (strcspn): Change to normal function.
579 (strpbkr): New function declaration.
582 * script/lua/grub_main.c (scan_str): New function.
587 * script/lua/linit.c (lualibs): Enable the string library.
589 * util/osdetect.lua: New file.
591 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
593 * include/grub/i386/linux.h (struct linux_kernel_params): Add
594 `capabilities' member.
596 2009-07-02 Pavel Roskin <proski@gnu.org>
598 * genparttoollist.sh: Add missing newline at the end.
600 2009-07-01 Pavel Roskin <proski@gnu.org>
602 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
604 * util/hostdisk.c (open_device): Remove `const' from
605 `sysctl_size', as sysctlbyname() can change it (in this case it
606 doesn't actually happen).
608 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
609 using signed long int constants.
611 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
612 constant to avoid a warning on FreeBSD.
614 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
617 * Makefile.in: Install include/grub/machine symlink.
619 * Makefile.in: When installing symlinks, use "cp -fR", which
620 works on FreeBSD and MacOSX.
621 From Yves Blusseau <cl7m42e02@sneakemail.com>
623 * kern/dl.c (grub_dl_resolve_symbol): Make static.
624 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
626 * util/misc.c: Move grub_reboot() and grub_halt() ...
627 * util/grub-emu.c: ... here. Make main_env static.
628 * include/grub/util/misc.h: Remove main_env.
630 * kern/mm.c: Use correct format to print size_t.
632 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
633 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
634 * kern/powerpc/dl.c: Likewise.
635 * kern/sparc64/dl.c: Likewise.
636 * kern/x86_64/dl.c: Likewise.
638 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
640 Fix grub-emu build on sparc64-ieee1275.
642 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
643 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
645 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
647 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
648 (grub_reboot, grub_halt): New functions.
650 * util/i386/pc/misc.c: Delete. Update all users.
651 * util/sparc64/ieee1275/misc.c: Likewise.
652 * util/powerpc/ieee1275/misc.c: Likewise.
654 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
656 * conf/i386.rmk (setjmp_mod_SOURCES)
657 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
658 * conf/common.rmk (setjmp_mod_SOURCES)
659 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
660 to use $(target_cpu).
661 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
662 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
663 * conf/powerpc-ieee1275.rmk: Likewise.
664 * conf/sparc64-ieee1275.rmk: Likewise.
666 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
667 $(target_cpu) for kern/$(target_cpu)/dl.c.
668 * conf/i386-efi.rmk: Likewise.
669 * conf/i386-ieee1275.rmk: Likewise.
670 * conf/x86_64-efi.rmk: Likewise.
671 * conf/i386-coreboot.rmk: Likewise.
672 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
673 $(target_cpu) for kern/$(target_cpu)/dl.c and for
674 kern/$(target_cpu)/cache.S.
675 * conf/sparc64-ieee1275.rmk: Likewise.
677 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
679 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
680 type to `grub_uint8_t', and adjust `padding9' accordingly.
682 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
684 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
686 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
687 assembly in final jump, using register constraints.
689 (grub_linux_boot): For text mode, initialize `have_vga' using
690 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
692 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
693 right before the final jump.
695 Set `video_mode' to 0x3.
697 Document initialization of `video_page', `video_mode' and
700 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
702 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
703 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
704 and set GRUB_LINUX_FLAG_QUIET appropriately.
706 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
708 Fix build on Debian / sparc.
710 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
712 2009-06-28 Pavel Roskin <proski@gnu.org>
714 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
717 * util/grub.d/10_linux.in: Match SUSE style initrd names.
719 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
721 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
724 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
728 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
729 file can't be opened. grub_file_open() is already supposed to set
730 grub_errno / grub_errmsg appropriately.
731 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
733 2009-06-27 Pavel Roskin <proski@gnu.org>
734 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
736 * include/grub/dl.h: Include grub/elf.h.
737 (struct grub_dl): Add symtab field.
738 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
739 GRUB_MODULES_MACHINE_READONLY.
740 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
741 of the header for read-only modules.
742 (grub_dl_unload): Free mod->symtab for read-only modules.
743 * kern/i386/dl.c: Use mod->symtab.
744 * kern/powerpc/dl.c: Likewise.
745 * kern/sparc64/dl.c: Likewise.
746 * kern/x86_64/dl.c: Likewise.
748 * conf/i386-qemu.rmk: New file.
749 * kern/i386/qemu/startup.S: Likewise.
750 * kern/i386/qemu/mmap.c: Likewise.
751 * boot/i386/qemu/boot.S: Likewise.
752 * include/grub/i386/qemu/time.h: Likewise.
753 * include/grub/i386/qemu/serial.h: Likewise.
754 * include/grub/i386/qemu/kernel.h: Likewise.
755 * include/grub/i386/qemu/console.h: Likewise.
756 * include/grub/i386/qemu/boot.h: Likewise.
757 * include/grub/i386/qemu/init.h: Likewise.
758 * include/grub/i386/qemu/machine.h: Likewise.
759 * include/grub/i386/qemu/loader.h: Likewise.
760 * include/grub/i386/qemu/memory.h: Likewise.
762 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
763 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
764 [qemu] (pkglib_IMAGES): Add `boot.img'.
765 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
766 [qemu] (boot_img_FORMAT): New variables.
767 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
768 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
769 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
770 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
771 [qemu] (kernel_img_FORMAT): New variables.
773 * configure.ac: Recognise `i386-qemu'.
775 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
776 (for no compression).
777 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
778 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
779 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
780 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
783 2009-06-27 Pavel Roskin <proski@gnu.org>
785 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
787 * efiemu/prepare32.c: Likewise.
788 * efiemu/prepare64.c: Likewise.
790 2009-06-26 Pavel Roskin <proski@gnu.org>
792 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
793 * include/grub/elf.h: Define symbols without "32" or "64" based
794 on GRUB_TARGET_WORDSIZE.
795 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
796 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
798 * efiemu/loadcore64.c: Likewise.
799 * loader/i386/bsd32.c: Likewise.
800 * loader/i386/bsd64.c: Likewise.
801 * kern/dl.c: Remove own ELF definitions.
802 * util/i386/efi/grub-mkimage.c: Likewise.
804 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
806 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
807 segment 0x0 unconditionally, because the reference generated by
808 GAS is an absolute address.
810 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
812 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
813 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
815 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
817 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
818 indexes. Check for -f explicitly.
819 (search_file): Improve error message.
820 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
822 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
824 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
825 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
827 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
829 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
830 * conf/i386-ieee1275.rmk: Likewise.
831 * conf/i386-coreboot.rmk: Likewise.
833 * kern/i386/pc/startup.S (grub_stop): Remove function.
834 * kern/i386/ieee1275/startup.S: Likewise.
835 * kern/i386/coreboot/startup.S: Likewise.
836 * kern/i386/misc.S (grub_stop): New function.
838 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
840 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
841 * kern/i386/realmode.S (real_to_prot): ... to here.
843 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
845 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
847 (kernel_elf_SOURCES): Rename to ...
848 (kernel_img_SOURCES): ... this.
849 (kernel_elf_HEADERS): Rename to ...
850 (kernel_img_HEADERS): ... this. Update all users.
851 (kernel_elf_ASFLAGS): Rename to ...
852 (kernel_img_ASFLAGS): ... this.
853 (kernel_elf_CFLAGS): Rename to ...
854 (kernel_img_CFLAGS): ... this.
855 (kernel_elf_LDFLAGS): Rename to ...
856 (kernel_img_LDFLAGS): ... this.
857 * conf/i386-coreboot.rmk: Likewise.
858 * conf/powerpc-ieee1275.rmk: Likewise.
860 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
863 2009-06-21 Pavel Roskin <proski@gnu.org>
865 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
866 to match nested functions.
867 * loader/sparc64/ieee1275/linux.c: Likewise.
869 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
871 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
873 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
876 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
878 Fix asm file handling on ELF, and remove workarounds.
880 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
881 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
882 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
883 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
885 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
889 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
890 and loader/i386/bsd64.c
891 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
892 (FREEBSD_MODTYPE_ELF_MODULE): New definition
893 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
894 (grub_freebsd_load_elfmodule32): New declaration
895 (grub_freebsd_load_elfmoduleobj64): Likewise
896 (grub_freebsd_load_elf_meta32): Likewise
897 (grub_freebsd_load_elf_meta64): Likewise
898 (grub_freebsd_add_meta): Likewise
899 (grub_freebsd_add_meta_module): Likewise
900 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
901 (grub_freebsd_add_meta_module): Likewise and move module-specific
902 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
903 (grub_cmd_freebsd): Add elf-kernel specific parts
904 based on grub_freebsd_add_meta_module
905 (grub_cmd_freebsd_module): Add type parsing moved from
906 grub_freebsd_add_meta_module
907 (grub_cmd_freebsd_module_elf): New function
908 (cmd_freebsd_module_elf): New variable
909 (GRUB_MOD_INIT): Register freebsd_module_elf
910 * loader/i386/bsd32.c: New file
911 * loader/i386/bsd64.c: Likewise
912 * loader/i386/bsdXX.c: Likewise
913 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
914 (grub_elf64_load): Likewise
915 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
917 (grub_elf64_load_hook_t): Likewise
919 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
921 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
923 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
924 don't write a menu entry for recovery mode.
926 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
928 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
929 after it's no longer needed.
931 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
933 * include/grub/i386/loader.h (grub_linux_prot_size)
934 (grub_linux_tmp_addr, grub_linux_real_addr)
935 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
937 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
938 common grub_util_info() call to ...
939 (generate_image): ... here.
940 Fix use of uninitialized memory, comparison of signed with
941 unsigned integers and memory leak.
942 Remove bogus module address message.
944 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
946 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
948 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
950 2009-06-19 Pavel Roskin <proski@gnu.org>
952 * configure.ac: Remove stray AC_MSG_CHECKING.
954 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
956 * disk/scsi.c (grub_scsi_open): use continue instead of big if
958 2009-06-18 Pavel Roskin <proski@gnu.org>
960 * conf/common.rmk: Add fs_file.mod.
961 * disk/fs_file.c: New file.
962 * include/grub/disk.h (enum grub_disk_dev_id): Add
963 GRUB_DISK_DEVICE_FILE_ID.
965 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
967 Fix build with Apple's toolchain. Part 2
969 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
972 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
974 Fix build with Apple's toolchain. Part 1
976 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
978 * configure.ac: remove a leftover AC_MSG_RESULT
979 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
982 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
986 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
987 (decomp_block): initialize ch
988 use grub_memcpy instead of memcpy
990 2009-06-17 Pavel Roskin <proski@gnu.org>
992 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
993 version, use declarations needed to use vga_text as the startup
996 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
997 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
999 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1000 and grub_at_keyboard_fini(), it's done on module load and
1003 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
1005 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1006 file can't be found.
1007 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1009 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1011 Fix newline handling
1013 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1014 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1015 (grub_script_yylex): don't segfault on unterminated script
1016 newline terminates command and variable
1018 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1020 avoid double grub_adjust_range call. Bug reported by David Simner
1022 * kern/disk.c (grub_disk_write): change to raw disk access before
1025 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
1027 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1028 spaces, for the benefit of help2man.
1029 * util/i386/efi/grub-mkimage.c (usage): Likewise.
1031 2009-06-16 Pavel Roskin <proski@gnu.org>
1033 * kern/i386/halt.c: Include grub/machine/init.h.
1034 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1036 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
1038 * util/grub.d/30_os-prober.in: Use ${root} in the generated
1041 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
1043 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1046 2009-06-16 Pavel Roskin <proski@gnu.org>
1048 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
1049 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
1050 save %dx, we only need %dl and we never change it.
1051 * boot/i386/pc/cdboot.S: Don't set the root drive.
1052 * boot/i386/pc/pxeboot.S: Likewise.
1053 * include/grub/i386/pc/boot.h: Remove
1054 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1055 GRUB_BOOT_MACHINE_DRIVE_CHECK.
1056 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1057 * kern/i386/pc/init.c (make_install_device): Remove references
1059 * kern/i386/pc/startup.S: Likewise.
1060 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1062 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1066 * commands/xnu_uuid.c: new file
1067 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
1068 (xnu_uuid_mod_SOURCES): new variable
1069 (xnu_uuid_mod_CFLAGS): likewise
1070 (xnu_uuid_mod_LDFLAGS): likewise
1071 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1072 * conf/i386-ieee1275.rmk: likewise
1073 * conf/i386-pc.rmk: likewise
1074 * conf/powerpc-ieee1275.rmk: likewise
1075 * conf/sparc64-ieee1275.rmk: likewise
1076 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1078 2009-06-16 Pavel Roskin <proski@gnu.org>
1080 * configure.ac: Avoid '==' in test command, it's not portable.
1082 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1086 * commands/probe.c: new file
1087 * conf/common.rmk (pkglib_MODULES): add probe.mod
1088 (probe_mod_SOURCES): new variable
1089 (probe_mod_CFLAGS): likewise
1090 (probe_mod_LDFLAGS): likewise
1091 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1092 * conf/i386-ieee1275.rmk: likewise
1093 * conf/i386-pc.rmk: likewise
1094 * conf/powerpc-ieee1275.rmk: likewise
1095 * conf/sparc64-ieee1275.rmk: likewise
1097 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
1099 Fix handling of string like \"hello\" and "a
1102 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1103 (grub_script_yylex): fix parsing of quoting, escaping and newline
1105 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
1107 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
1110 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
1112 * util/grub-mkconfig.in: Fix parsing of --output option.
1114 2009-06-12 Pavel Roskin <proski@gnu.org>
1116 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
1117 genmk.rb don't need to be generated or installed.
1119 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
1121 * commands/i386/pc/drivemap_int13h.S: add more comments
1123 2009-06-11 Pavel Roskin <proski@gnu.org>
1125 * Makefile.in (uninstall): Uninstall manuals.
1127 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1128 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
1129 and update-grub_lib in two places.
1130 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1132 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1135 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1136 `entry_lo' to fix variable shadowing.
1138 2009-06-11 Christian Franke <franke@computer.org>
1140 * kern/misc.c (__enable_execute_stack): Add missing return type
1141 to prevent gcc warning.
1143 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1145 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1147 2009-06-11 Pavel Roskin <proski@gnu.org>
1149 * Makefile.in: Don't rely on any scripts being executable.
1150 Always use $(SHELL) to run shell scripts.
1152 * configure.ac: Always define ___main if using -nostdlib. This
1153 fixes tests on Cygwin.
1155 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1159 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
1160 is in bytes and not in blocks
1162 2009-06-11 Pavel Roskin <proski@gnu.org>
1164 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1167 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1169 * util/grub.d/30_os-prober.in: Fix a comment. Source
1170 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1171 to set the root device. Place drivemap command in the generated
1174 2009-06-11 Pavel Roskin <proski@gnu.org>
1176 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1177 have long been resolved.
1179 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
1181 * util/grub.d/10_linux.in: Capitalise "Linux".
1183 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1185 2009-06-11 Pavel Roskin <proski@gnu.org>
1187 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1188 fix a gcc warning and ensure that the function won't ever exit.
1190 * kern/i386/ieee1275/init.c: Add missing prototype for
1193 * loader/ieee1275/multiboot2.c [__i386__]: Include
1194 grub/cpu/multiboot.h.
1196 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1197 casts to short - they are not portable and cause warnings. Fix
1198 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1200 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1204 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1206 (grub_get_root_biosnumber_saved): new variable
1207 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1208 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
1209 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
1210 %dx after the call if necessary
1211 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1212 (boot_mod_SOURCES): remove
1213 (boot_mod_CFLAGS): remove
1214 (boot_mod_LDFLAGS): remove
1215 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1216 (boot_mod_SOURCES): new variable
1217 (boot_mod_CFLAGS): likewise
1218 (boot_mod_LDFLAGS): likewise
1219 * conf/i386-efi.rmk: likewise
1220 * conf/i386-ieee1275.rmk: likewise
1221 * conf/i386-pc.rmk: likewise
1222 * conf/powerpc-ieee1275.rmk: likewise
1223 * conf/sparc64-ieee1275.rmk: likewise
1224 * conf/x86_64-efi.rmk: likewise
1225 * include/grub/i386/pc/biosnum.h: new file
1226 * lib/i386/pc/biosnum.c: likewise
1227 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1228 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1229 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1231 2009-06-10 Pavel Roskin <proski@gnu.org>
1233 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1234 Use separate variables. Read only the file size at the end, but
1235 not the checksum that we don't use.
1237 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1240 * kern/ieee1275/openfw.c: Remove libc includes.
1241 * kern/ieee1275/cmain.c: Likewise.
1242 * include/grub/ieee1275/ieee1275.h: Likewise.
1244 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1247 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1249 * Makefile.in: Remove all trailing whitespace.
1250 * conf/i386-pc.rmk: Likewise.
1251 * conf/powerpc-ieee1275.rmk: Likewise.
1252 * conf/sparc64-ieee1275.rmk: Likewise.
1253 * docs/grub.texi: Likewise.
1254 * docs/texinfo.tex: Likewise.
1255 * disk/fs_uuid.c: Likewise.
1256 * disk/lvm.c: Likewise.
1257 * disk/scsi.c: Likewise.
1258 * disk/ata.c: Likewise.
1259 * disk/ieee1275/ofdisk.c: Likewise.
1260 * disk/i386/pc/biosdisk.c: Likewise.
1261 * disk/host.c: Likewise.
1262 * disk/raid.c: Likewise.
1263 * disk/efi/efidisk.c: Likewise.
1264 * disk/usbms.c: Likewise.
1265 * disk/memdisk.c: Likewise.
1266 * disk/loopback.c: Likewise.
1267 * kern/powerpc/dl.c: Likewise.
1268 * kern/device.c: Likewise.
1269 * kern/dl.c: Likewise.
1270 * kern/sparc64/dl.c: Likewise.
1271 * kern/ieee1275/ieee1275.c: Likewise.
1272 * kern/term.c: Likewise.
1273 * kern/fs.c: Likewise.
1274 * kern/i386/dl.c: Likewise.
1275 * kern/i386/pc/startup.S: Likewise.
1276 * kern/i386/pc/init.c: Likewise.
1277 * kern/i386/pc/mmap.c: Likewise.
1278 * kern/i386/pc/lzo1x.S: Likewise.
1279 * kern/i386/ieee1275/init.c: Likewise.
1280 * kern/i386/realmode.S: Likewise.
1281 * kern/i386/tsc.c: Likewise.
1282 * kern/partition.c: Likewise.
1283 * kern/corecmd.c: Likewise.
1284 * kern/file.c: Likewise.
1285 * kern/efi/efi.c: Likewise.
1286 * kern/efi/init.c: Likewise.
1287 * kern/efi/mm.c: Likewise.
1288 * kern/main.c: Likewise.
1289 * kern/err.c: Likewise.
1290 * kern/env.c: Likewise.
1291 * kern/disk.c: Likewise.
1292 * kern/generic/millisleep.c: Likewise.
1293 * kern/generic/rtc_get_time_ms.c: Likewise.
1294 * kern/misc.c: Likewise.
1295 * kern/parser.c: Likewise.
1296 * genmk.rb: Likewise.
1297 * configure.ac: Likewise.
1298 * boot/i386/pc/diskboot.S: Likewise.
1299 * boot/i386/pc/pxeboot.S: Likewise.
1300 * boot/i386/pc/boot.S: Likewise.
1301 * boot/i386/pc/lnxboot.S: Likewise.
1302 * boot/i386/pc/cdboot.S: Likewise.
1303 * parttool/pcpart.c: Likewise.
1304 * video/readers/tga.c: Likewise.
1305 * video/video.c: Likewise.
1306 * video/bitmap.c: Likewise.
1307 * lib/envblk.c: Likewise.
1308 * lib/i386/setjmp.S: Likewise.
1309 * fs/xfs.c: Likewise.
1310 * fs/afs.c: Likewise.
1311 * fs/fat.c: Likewise.
1312 * fs/ntfs.c: Likewise.
1313 * fs/udf.c: Likewise.
1314 * fs/affs.c: Likewise.
1315 * fs/iso9660.c: Likewise.
1316 * fs/hfs.c: Likewise.
1317 * fs/fshelp.c: Likewise.
1318 * fs/ext2.c: Likewise.
1319 * fs/jfs.c: Likewise.
1320 * fs/reiserfs.c: Likewise.
1321 * fs/hfsplus.c: Likewise.
1322 * fs/minix.c: Likewise.
1323 * fs/cpio.c: Likewise.
1324 * fs/sfs.c: Likewise.
1325 * fs/ufs.c: Likewise.
1326 * efiemu/prepare.c: Likewise.
1327 * efiemu/loadcore_common.c: Likewise.
1328 * efiemu/runtime/efiemu.sh: Likewise.
1329 * efiemu/runtime/efiemu.S: Likewise.
1330 * efiemu/runtime/efiemu.c: Likewise.
1331 * efiemu/pnvram.c: Likewise.
1332 * efiemu/main.c: Likewise.
1333 * efiemu/i386/pc/cfgtables.c: Likewise.
1334 * efiemu/i386/loadcore64.c: Likewise.
1335 * efiemu/i386/loadcore32.c: Likewise.
1336 * efiemu/loadcore.c: Likewise.
1337 * efiemu/symbols.c: Likewise.
1338 * efiemu/mm.c: Likewise.
1339 * include/grub/autoefi.h: Likewise.
1340 * include/grub/datetime.h: Likewise.
1341 * include/grub/term.h: Likewise.
1342 * include/grub/hfs.h: Likewise.
1343 * include/grub/lvm.h: Likewise.
1344 * include/grub/i386/tsc.h: Likewise.
1345 * include/grub/i386/linux.h: Likewise.
1346 * include/grub/i386/xnu.h: Likewise.
1347 * include/grub/i386/efiemu.h: Likewise.
1348 * include/grub/i386/pc/biosdisk.h: Likewise.
1349 * include/grub/i386/pc/memory.h: Likewise.
1350 * include/grub/i386/pc/vbe.h: Likewise.
1351 * include/grub/parttool.h: Likewise.
1352 * include/grub/video.h: Likewise.
1353 * include/grub/memory.h: Likewise.
1354 * include/grub/fs.h: Likewise.
1355 * include/grub/partition.h: Likewise.
1356 * include/grub/xnu.h: Likewise.
1357 * include/grub/efi/api.h: Likewise.
1358 * include/grub/efi/pe32.h: Likewise.
1359 * include/grub/efi/memory.h: Likewise.
1360 * include/grub/multiboot.h: Likewise.
1361 * include/grub/usbdesc.h: Likewise.
1362 * include/grub/multiboot2.h: Likewise.
1363 * include/grub/acpi.h: Likewise.
1364 * include/grub/efiemu/efiemu.h: Likewise.
1365 * include/grub/disk.h: Likewise.
1366 * include/grub/ieee1275/ieee1275.h: Likewise.
1367 * include/grub/net.h: Likewise.
1368 * include/grub/machoload.h: Likewise.
1369 * include/grub/macho.h: Likewise.
1370 * include/multiboot.h: Likewise.
1371 * genmoddep.awk: Likewise.
1372 * normal/main.c: Likewise.
1373 * normal/menu_entry.c: Likewise.
1374 * normal/menu_viewer.c: Likewise.
1375 * normal/completion.c: Likewise.
1376 * normal/cmdline.c: Likewise.
1377 * normal/misc.c: Likewise.
1378 * normal/datetime.c: Likewise.
1379 * bus/usb/usbtrans.c: Likewise.
1380 * bus/usb/ohci.c: Likewise.
1381 * bus/usb/uhci.c: Likewise.
1382 * bus/usb/usb.c: Likewise.
1383 * mmap/efi/mmap.c: Likewise.
1384 * mmap/i386/pc/mmap_helper.S: Likewise.
1385 * mmap/i386/pc/mmap.c: Likewise.
1386 * mmap/i386/mmap.c: Likewise.
1387 * mmap/i386/uppermem.c: Likewise.
1388 * mmap/mmap.c: Likewise.
1389 * commands/acpi.c: Likewise.
1390 * commands/echo.c: Likewise.
1391 * commands/blocklist.c: Likewise.
1392 * commands/loadenv.c: Likewise.
1393 * commands/usbtest.c: Likewise.
1394 * commands/boot.c: Likewise.
1395 * commands/parttool.c: Likewise.
1396 * commands/search.c: Likewise.
1397 * commands/cat.c: Likewise.
1398 * commands/i386/pc/play.c: Likewise.
1399 * commands/i386/pc/drivemap.c: Likewise.
1400 * commands/i386/pc/vbeinfo.c: Likewise.
1401 * commands/i386/pc/acpi.c: Likewise.
1402 * commands/i386/pc/vbetest.c: Likewise.
1403 * commands/ls.c: Likewise.
1404 * commands/cmp.c: Likewise.
1405 * commands/test.c: Likewise.
1406 * commands/efi/acpi.c: Likewise.
1407 * commands/gptsync.c: Likewise.
1408 * commands/help.c: Likewise.
1409 * partmap/amiga.c: Likewise.
1410 * partmap/apple.c: Likewise.
1411 * partmap/acorn.c: Likewise.
1412 * partmap/pc.c: Likewise.
1413 * partmap/sun.c: Likewise.
1414 * partmap/gpt.c: Likewise.
1415 * script/sh/lexer.c: Likewise.
1416 * script/sh/function.c: Likewise.
1417 * font/font.c: Likewise.
1418 * font/font_cmd.c: Likewise.
1419 * loader/powerpc/ieee1275/linux.c: Likewise.
1420 * loader/efi/chainloader.c: Likewise.
1421 * loader/multiboot_loader.c: Likewise.
1422 * loader/macho.c: Likewise.
1423 * loader/i386/multiboot.c: Likewise.
1424 * loader/i386/linux.c: Likewise.
1425 * loader/i386/pc/linux.c: Likewise.
1426 * loader/i386/pc/multiboot2.c: Likewise.
1427 * loader/i386/pc/chainloader.c: Likewise.
1428 * loader/i386/pc/xnu.c: Likewise.
1429 * loader/i386/bsd_trampoline.S: Likewise.
1430 * loader/i386/efi/linux.c: Likewise.
1431 * loader/i386/multiboot_elfxx.c: Likewise.
1432 * loader/i386/bsd_helper.S: Likewise.
1433 * loader/i386/bsd.c: Likewise.
1434 * loader/i386/linux_trampoline.S: Likewise.
1435 * loader/i386/xnu_helper.S: Likewise.
1436 * loader/i386/xnu.c: Likewise.
1437 * loader/i386/bsd_pagetable.c: Likewise.
1438 * loader/i386/multiboot_helper.S: Likewise.
1439 * loader/xnu.c: Likewise.
1440 * loader/xnu_resume.c: Likewise.
1441 * io/gzio.c: Likewise.
1442 * term/efi/console.c: Likewise.
1443 * term/terminfo.c: Likewise.
1444 * term/ieee1275/ofconsole.c: Likewise.
1445 * term/i386/pc/serial.c: Likewise.
1446 * term/i386/pc/vesafb.c: Likewise.
1447 * term/i386/pc/vga.c: Likewise.
1448 * term/usb_keyboard.c: Likewise.
1449 * term/gfxterm.c: Likewise.
1450 * aclocal.m4: Likewise.
1451 * util/lvm.c: Likewise.
1452 * util/grub.d/30_os-prober.in: Likewise.
1453 * util/grub.d/10_hurd.in: Likewise.
1454 * util/console.c: Likewise.
1455 * util/grub-macho2img.c: Likewise.
1456 * util/grub-probe.c: Likewise.
1457 * util/hostfs.c: Likewise.
1458 * util/i386/pc/grub-mkimage.c: Likewise.
1459 * util/i386/pc/grub-setup.c: Likewise.
1460 * util/i386/efi/grub-mkimage.c: Likewise.
1461 * util/grub-mkconfig.in: Likewise.
1462 * util/raid.c: Likewise.
1463 * util/resolve.c: Likewise.
1464 * util/grub-mkdevicemap.c: Likewise.
1465 * util/grub-emu.c: Likewise.
1466 * util/getroot.c: Likewise.
1467 * util/hostdisk.c: Likewise.
1468 * util/usb.c: Likewise.
1469 * util/grub-editenv.c: Likewise.
1470 * util/misc.c: Likewise.
1472 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1474 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1475 `genparttoollist.sh'.
1476 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1477 Add `*.sh' to the list find searches for and change `mdate.sh'
1480 2009-06-10 Pavel Roskin <proski@gnu.org>
1482 * include/grub/multiboot2.h: Provide compatibility defines for
1484 * include/multiboot2.h: Include stdint.h only if needed, using
1486 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1488 * loader/ieee1275/multiboot2.c: Likewise.
1489 * loader/multiboot2.c: Likewise.
1490 * loader/multiboot_loader.c: Likewise.
1492 * configure.ac: Use -nostdlib when probing for the target. It
1493 should not be required to have libc for the target.
1495 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1496 they fail without libc headers for the target.
1497 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1499 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1500 preprocessor conditionals.
1502 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1503 build system doesn't need to be aware of the tar.c internals.
1505 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1507 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1509 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1511 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1512 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1514 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1516 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1517 aren't available if ata.mod gets used.
1519 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1521 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1522 initialising controller.
1523 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1525 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1527 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1528 to choose between ata and biosdisk module on i386-pc.
1530 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1532 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1533 Subclass and Programming Interface fields in terms of the 3 byte
1534 Class Code register.
1535 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1537 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1538 interface is OHCI. Add grub_dprintf for symmetry with
1540 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1541 interface is UHCI. Add interf variable for programming
1542 interface. Print interface with class/subclass.
1544 * bus/usb/ohci.c: Set interf with correct field.
1546 * bus/usb/uhci.c: Remove unneeded doubled lines.
1547 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1548 Remove whitespace inside comment.
1550 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1552 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1553 as fallback an equivalent option without depth.
1555 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1557 Not fail if unable to retrieve C/H/S on LBA disks
1559 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1560 if unable to retrieve C/H/S on LBA disks
1562 2009-06-08 Pavel Roskin <proski@gnu.org>
1564 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1567 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1569 * Makefile.in (uninstall): Remove all $lib_DATA files.
1571 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1573 Bugfix: install on partitionless device
1575 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1578 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1580 * Makefile.in (uninstall): Remove all $include_DATA files.
1582 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1584 * commands/true.c: New file. Implement the true and false commands.
1585 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1586 (true_mod_SOURCES): New variable.
1587 (true_mod_CFLAGS): Likewise.
1588 (true_mod_LDFLAGS): Likewise.
1590 2009-06-05 Colin D Bennett <colin@gibibit.com>
1592 Optimized font character lookup using binary search instead of linear
1593 search. Fonts now are required to have the character index ordered by
1596 * font/font.c (load_font_index): Verify that fonts have ordered
1598 (find_glyph): Use binary search instead of linear search to find a
1599 character in a font.
1601 2009-06-05 Michael Scherer <misc@mandriva.org>
1603 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1604 uses case sensitive btree.
1605 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1606 only for case insensitive filesystems.
1608 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1610 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1611 * conf/common.rmk (search_mod_CFLAGS): likewise
1613 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1615 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1616 compensate a compiler bug
1618 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1620 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1623 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1625 Definitions for creating asm symbols with Apple's CC
1627 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1628 [APPLE_CC] (VARIABLE): likewise
1630 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1632 Disable lnxboot.img when compiled
1635 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1636 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1637 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1638 [! APPLE_CC] (CODE_LENG): skip
1639 [! APPLE_CC] (setup_sects): likewise
1640 [! APPLE_CC]: skip filling
1642 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1644 Address in trampolines based on 32-bit registers when compiled
1647 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1649 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1651 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1653 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1655 * kern/misc.c [APPLE_CC] (memcpy): new function
1656 [APPLE_CC] (memmove): likewise
1657 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1658 (memcpy): define alias conditionally on !APPLE_CC
1661 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1662 APPLE_CC are defined
1663 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1664 (grub_assert_fail): make prototype conditional
1666 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1668 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1670 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1672 (CLEANFILES): add grub-macho2img
1673 (grub_macho2img_SOURCES): new variable
1674 * kern/i386/pc/startup.S (bss_start): new variable
1676 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1677 * util/grub-macho2img.c: new file
1679 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1681 Use objconv when compiling with Apple's CC
1683 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1684 (efiemu64.o): likewise
1685 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1686 when compiling with Apple's CC
1687 (efiemu64_s.o): likewise
1688 * configure.ac: check for objconv when compiling with Apple's CC
1689 * genmk.rb: use objconv for modules when compiled with Apple's CC
1691 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1693 Define segment as well as section when compiling with
1696 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1697 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1698 (efiemu_convert_pointer): likewise
1699 (efiemu_set_virtual_address_map): likewise
1700 (efiemu_convert_pointer): likewise
1701 (efiemu_getcrc32): likewise
1702 (init_crc32_table): likewise
1704 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1705 (GRUB_MOD_DEP): likewise
1707 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1709 Allow a compilation without -mcmodel=large
1711 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1712 when compiled without -mcmodel=large
1713 (filter_memory_map): remove memory post 4 GiB when compiled
1714 without -mcmodel=large
1715 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1716 TARGET_CFLAGS when -mcmodel=large isn't supported
1718 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1720 Remove nested functions in efiemu core
1722 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1724 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1726 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1728 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1730 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1732 (grub_cpu_is_tsc_supported): likewise
1733 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1735 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1737 Absolute addressing through constant with Apple's cc
1739 * kern/i386/pc/startup.S: Define necessary constants
1740 and address through it when using ABS with Apple's CC
1741 * boot/i386/pc/diskboot.S: likewise
1742 * boot/i386/pc/boot.S: likewise
1743 * boot/i386/pc/lnxboot.S: likewise
1744 * boot/i386/pc/cdboot.S: likewise
1745 * mmap/i386/pc/mmap_helper.S: likewise
1746 * commands/i386/pc/drivemap_int13h.S: likewise
1748 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1750 Check if compiler is apple cc
1752 * Makefile.in (ASFLAGS): new variable
1753 (TARGET_ASFLAGS): likewise
1754 (TARGET_MODULE_FORMAT): likewise
1755 (TARGET_APPLE_CC): likewise
1757 (TARGET_IMG_CFLAGS): likewise
1758 (TARGET_CPPFLAGS): add includedir
1759 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1760 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1761 Check for linker script only if compiler isn't Apple's CC
1762 (TARGET_MODULE_FORMAT): set
1763 (TARGET_APPLE_CC): likewise
1764 (TARGET_ASFLAGS): likewise
1766 Check for objcopy only if compiler isn't Apple's CC
1767 Check for BSS symbol only if compiler isn't Apple's CC
1768 * genmk.rb: adapt nm options if we use Apple's utils
1769 * aclocal.m4 (grub_apple_cc): new test
1770 (grub_apple_target_cc): likewise
1772 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1774 Simplify sed expressions and improve awk
1776 * Makefile.in (install-local): simplify sed expression
1777 * gencmdlist.sh: likewise
1778 * genmoddep.awk: avoid adding module as a dependency of itself
1780 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1782 Add missing start symbols
1784 * boot/i386/pc/boot.S: add start
1785 * boot/i386/pc/pxeboot.S: likewise
1787 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1789 Fix wrong assumptions with grub-mkimage on EFI
1791 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1792 (relocate_addresses): consider both r_addend and value at offset
1793 (make_mods_section): zerofill modinfo and header
1794 (convert_elf): write prefix here
1796 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1798 Use .asciz instead of .string
1800 * i386/pc/diskboot.S: use .asciz instead of .string
1801 * i386/pc/boot.S: likewise
1802 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1803 (GRUB_MOD_NAME): likewise
1805 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1809 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1810 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1811 (grub_video_setup): remove
1812 (grub_video_set_mode): new prototype
1813 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1815 (linux_vesafb_res): compile only on PCBIOS
1816 (grub_linux_boot): support gfxpayload
1817 * loader/i386/pc/xnu.c (video_hook): new function
1818 (grub_xnu_set_video): support gfxpayload
1819 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1820 (DEFAULT_VIDEO_HEIGHT): likewise
1821 (DEFAULT_VIDEO_FLAGS): likewise
1822 (DEFAULT_VIDEO_MODE): new definition
1823 (video_hook): new function
1824 (grub_gfxterm_init): use grub_video_set_mode
1825 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1827 * video/video.c (grub_video_setup): removed
1828 (grub_video_set_mode): new function based on grub_gfxterm_init and
1831 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1833 Avoid calling biosdisk in drivemap
1835 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1836 (revparse_biosdisk): likewise
1837 (list_mappings): derive name from id directly
1838 (grub_cmd_drivemap): use tryparse_diskstring
1840 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1844 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1845 (grub_lexer_param): add tokenonhold
1846 (grub_script_create_cmdline): remove cmdline. All callers updated
1847 (grub_script_function_create): make functionname
1848 grub_script_arg. All callers updated
1849 (grub_script_execute_argument_to_string): new prototype
1850 * kern/parser.c (state_transitions): reorder
1851 (grub_parser_cmdline_state): fix a bug and make more compact
1852 * script/sh/execute.c (grub_script_execute_argument_to_string):
1854 (grub_script_execute_cmdline): use new format
1855 * script/sh/function.c (grub_script_function_create): make functionname
1856 grub_script_arg. All callers updated
1857 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1858 (grub_script_yylex): remove
1859 (grub_script_yylex2): renamed to ...
1860 (grub_script_yylex): ...renamed
1861 parse the expressions like a${b}c
1862 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1863 (GRUB_PARSER_TOKEN_VAR): remove
1864 (GRUB_PARSER_TOKEN_NAME): likewise
1865 ("if"): declare as typeless
1867 ("function"): likewise
1872 (argument): likewise
1873 (script): accept empty scripts and make exit on error
1874 (arguments): use GRUB_PARSER_TOKEN_ARG
1875 (function): likewise
1876 (command): move error handling to script
1877 (menuentry): move grub_script_lexer_ref before
1878 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1879 argument. All callers updated
1881 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1883 Prevent GRUB from probing floppies during boot.
1885 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1886 * commands/search.c (options): Add --no-floppy.
1887 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1888 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1889 --no-floppy when searching for UUIDs.
1891 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1893 Simplify the code duplication in commands/search.c.
1895 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1896 (search_fs): ... this. Update all users.
1898 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1900 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1902 2009-05-28 Pavel Roskin <proski@gnu.org>
1904 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1905 Remove the original symlink explicitly.
1907 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1908 just one slash. That's how grub_fshelp_find_file() does it.
1910 2009-05-26 Pavel Roskin <proski@gnu.org>
1912 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1915 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1918 2009-05-25 Christian Franke <franke@computer.org>
1920 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1922 (grub_atapi_identify): Add wait after drive select.
1923 (grub_ata_identify): Do more strict status register check before
1924 calling grub_atapi_identify (). Suppress error message if status
1925 register is 0x00 after command failure. Add status register
1926 check after PIO read to avoid bogus identify due to stuck DRQ.
1927 Thanks to Pavel Roskin for testing.
1928 (grub_device_initialize): Remove unsafe status register check.
1929 Thanks to 'phcoder' for problem report and patch.
1930 Prevent sign extension in debug message.
1932 2009-05-23 Colin D Bennett <colin@gibibit.com>
1934 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1935 definition file, and functions defined in `normal/menu.c' have had
1936 their prototypes moved to `include/grub/menu.h' for consistency.
1938 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1940 (grub_menu_get_entry): Likewise.
1941 (grub_menu_get_timeout): Likewise.
1942 (grub_menu_set_timeout): Likewise.
1943 (grub_menu_execute_entry): Likewise.
1944 (grub_menu_execute_with_fallback): Likewise.
1945 (grub_menu_entry_run): Likewise.
1947 * include/grub/normal.h: Re-ordered and grouped function
1948 prototypes by file that the function is defined in.
1949 (grub_menu_execute_callback): Removed; moved to menu.h.
1950 (grub_menu_get_entry): Likewise.
1951 (grub_menu_get_timeout): Likewise.
1952 (grub_menu_set_timeout): Likewise.
1953 (grub_menu_execute_entry): Likewise.
1954 (grub_menu_execute_with_fallback): Likewise.
1955 (grub_menu_entry_run): Likewise.
1956 (grub_menu_addentry): Renamed from this ...
1957 (grub_normal_add_menu_entry): ... to this.
1959 * normal/main.c (grub_menu_addentry): Renamed from this ...
1960 (grub_normal_add_menu_entry): ... to this.
1962 * script/sh/execute.c (grub_script_execute_menuentry): Update
1963 reference to renamed grub_menu_addentry function.
1965 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1967 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1969 2009-05-22 Pavel Roskin <proski@gnu.org>
1971 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1972 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1973 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1974 compiling for the i386 targets, but not for the utilities.
1976 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1978 (grub_root_drive): Likewise.
1979 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1981 (grub_root_drive): Change size to byte.
1982 (grub_start_addr): Remove.
1983 (grub_end_addr): Likewise.
1984 (grub_apm_bios_info): Likewise.
1986 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1988 * normal/i386: Remove.
1989 * normal/powerpc: Likewise.
1990 * normal/sparc64: Likewise.
1991 * normal/x86_64: Likewise.
1993 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1995 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1996 * loader/i386/linux_trampoline.S: Fix indentation
1997 * loader/i386/xnu_helper.S: Likewise
1999 2009-05-18 Colin D Bennett <colin@gibibit.com>
2001 Display error messages when parsing a Lua statement fails.
2002 Previously, executing a syntactically invalid statement like
2003 ")foo" or "bar;" would silently fail.
2005 * script/lua/grub_main.c (handle_lua_error): New function.
2006 (grub_lua_parse_line): Improved reporting of Lua parser and
2009 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2011 Remove -Werror which causes build to fail on some systems
2013 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2014 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2015 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2017 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2019 trampoline for linux on 64-bit platform
2021 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2022 loader/i386/efi/linux_trampoline.S
2023 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2025 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2027 * loader/i386/linux_trampoline.S: moved here
2028 * loader/i386/efi/linux.c (allocate_pages): reserve space for
2030 (jumpvector): removed
2031 (grub_linux_trampoline_start): new declaration
2032 (grub_linux_trampoline_end): likewise
2033 (grub_linux_boot): use trampoline when on 64-bit platform
2034 * loader/i386/linux.c: likewise
2036 2009-05-16 Pavel Roskin <proski@gnu.org>
2038 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2039 const to avoid a warning.
2040 (grub_lua_setenv): Likewise.
2041 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2042 lmsg to fix a warning.
2044 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2046 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2047 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2048 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2049 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2050 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2051 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2052 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2053 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2055 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2057 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2059 2009-05-16 Bean <bean123ch@gmail.com>
2061 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2062 (lua_mod_SOURCES): New variable.
2063 (lua_mod_CFLAGS): Likewise.
2064 (lua_mod_LDFLAGS): Likewise.
2066 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
2067 (setjmp_mod_SOURCES): New variable.
2068 (setjmp_mod_CFLAGS): Likewise.
2069 (setjmp_LDFLAGS): Likewise.
2071 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
2072 (setjmp_mod_SOURCES): New variable.
2073 (setjmp_mod_CFLAGS): Likewise.
2074 (setjmp_LDFLAGS): Likewise.
2076 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2077 (setjmp_mod_SOURCES): New variable.
2078 (setjmp_mod_CFLAGS): Likewise.
2079 (setjmp_LDFLAGS): Likewise.
2081 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2082 (setjmp_mod_SOURCES): New variable.
2083 (setjmp_mod_CFLAGS): Likewise.
2084 (setjmp_LDFLAGS): Likewise.
2086 * normal/i386/setjmp.S: Moved from here ...
2087 * lib/i386/setjmp.S: ... Moved here
2088 * normal/x86_64/setjmp.S: Moved from here ...
2089 * lib/x86_64/setjmp.S: ... Moved here
2090 * normal/powerpc/setjmp.S: Moved from here ...
2091 * lib/powerpc/setjmp.S: ... Moved here
2092 * normal/sparc64/setjmp.S: Moved from here ...
2093 * lib/sparc64/setjmp.S: ... Moved here
2095 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
2096 returns_twice in mingw.
2098 * script/lua/grub_lib.c: New file.
2099 * script/lua/grub_lib.h: Likewise.
2100 * script/lua/grub_lua.h: Likewise.
2101 * script/lua/grub_main.c: Likewise.
2102 * script/lua/lapi.c: Likewise.
2103 * script/lua/lapi.h: Likewise.
2104 * script/lua/lauxlib.c: Likewise.
2105 * script/lua/lauxlib.h: Likewise.
2106 * script/lua/lbaselib.c: Likewise.
2107 * script/lua/lcode.c: Likewise.
2108 * script/lua/lcode.h: Likewise.
2109 * script/lua/ldblib.c: Likewise.
2110 * script/lua/ldebug.c: Likewise.
2111 * script/lua/ldebug.h: Likewise.
2112 * script/lua/ldo.c: Likewise.
2113 * script/lua/ldo.h: Likewise.
2114 * script/lua/ldump.c: Likewise.
2115 * script/lua/lfunc.c: Likewise.
2116 * script/lua/lfunc.h: Likewise.
2117 * script/lua/lgc.c: Likewise.
2118 * script/lua/lgc.h: Likewise.
2119 * script/lua/linit.c: Likewise.
2120 * script/lua/liolib.c: Likewise.
2121 * script/lua/llex.c: Likewise.
2122 * script/lua/llex.h: Likewise.
2123 * script/lua/llimits.h: Likewise.
2124 * script/lua/lmathlib.c: Likewise.
2125 * script/lua/lmem.c: Likewise.
2126 * script/lua/lmem.h: Likewise.
2127 * script/lua/loadlib.c: Likewise.
2128 * script/lua/lobject.c: Likewise.
2129 * script/lua/lobject.h: Likewise.
2130 * script/lua/lopcodes.c: Likewise.
2131 * script/lua/lopcodes.h: Likewise.
2132 * script/lua/loslib.c: Likewise.
2133 * script/lua/lparser.c: Likewise.
2134 * script/lua/lparser.h: Likewise.
2135 * script/lua/lstate.c: Likewise.
2136 * script/lua/lstate.h: Likewise.
2137 * script/lua/lstring.c: Likewise.
2138 * script/lua/lstring.h: Likewise.
2139 * script/lua/lstrlib.c: Likewise.
2140 * script/lua/ltable.c: Likewise.
2141 * script/lua/ltable.h: Likewise.
2142 * script/lua/ltablib.c: Likewise.
2143 * script/lua/ltm.c: Likewise.
2144 * script/lua/ltm.h: Likewise.
2145 * script/lua/lua.h: Likewise.
2146 * script/lua/luaconf.h: Likewise.
2147 * script/lua/lualib.h: Likewise.
2148 * script/lua/lundump.c: Likewise.
2149 * script/lua/lundump.h: Likewise.
2150 * script/lua/lvm.c: Likewise.
2151 * script/lua/lvm.h: Likewise.
2152 * script/lua/lzio.c: Likewise.
2153 * script/lua/lzio.h: Likewise.
2155 2009-05-16 Bean <bean123ch@gmail.com>
2157 * include/grub/kernel.h (grub_module_header_types): Add type
2160 * kern/main.c (grub_load_config): New function.
2161 (grub_main): Call grub_load_config to read boot config.
2163 * grub-mkimage (generate_image): New parameter config_path.
2164 (options): New option --config.
2165 (main): Parse --config option, and pass it to generate_image.
2167 2009-05-14 Christian Franke <franke@computer.org>
2169 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
2170 This fixes build on Cygwin.
2172 2009-05-14 Pavel Roskin <proski@gnu.org>
2174 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
2175 jump. This saves two bytes, so the typical case of 2 swapped
2176 drives would fit 32 bytes.
2178 2009-05-13 Pavel Roskin <proski@gnu.org>
2180 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
2181 grub_uint32_t to avoid a warning.
2183 * loader/i386/linux.c (allocate_pages): When assigning
2184 real_mode_mem, cast through grub_size_t to fix a warning. The
2185 code already makes sure that the value would fit a pointer.
2186 (grub_linux_setup_video): Cast render_target->data to
2187 grub_size_t to fix a warning.
2189 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
2191 * commands/i386/pc/drivemap.c: New file - implement drivemap
2193 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
2194 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
2196 2009-05-13 Pavel Roskin <proski@gnu.org>
2198 * util/i386/pc/grub-setup.c (setup): Remove unused variable
2199 embedding_area_exists.
2201 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
2203 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
2204 it easier to understand / work with.
2205 Improve warning messages for cases where there's no embedding area,
2206 or when it is too small (or core.img too large).
2208 2009-05-13 Pavel Roskin <proski@gnu.org>
2210 * loader/i386/pc/multiboot2.c: Add necessary includes for
2211 grub_multiboot2_real_boot().
2213 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
2214 PX record is always little-endian. We only need the lower 2
2217 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
2218 facilitate code reuse.
2219 (grub_cpio_mount): Use "struct head", not a char buffer. This
2220 fixes a warning reported by gcc 4.4.
2222 * kernel/disk.c (grub_disk_read): Use void pointer for the
2224 (grub_disk_write): Use const void pointer for the buffer.
2225 Adjust all callers. Remove unnecessary casts.
2227 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
2229 * util/i386/pc/grub-install.in: Update copyright year.
2231 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2235 * commands/gptsync.c: new file
2236 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
2237 (gptsync_mod_SOURCES): new variable
2238 (gptsync_mod_CFLAGS): likewise
2239 (gptsync_mod_LDFLAGS): likewise
2240 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2242 (GRUB_PC_PARTITION_TYPE_HFS): likewise
2243 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
2244 * conf/i386-ieee1275.rmk: likewise
2245 * conf/i386-pc.rmk: likewise
2246 * conf/powerpc-ieee1275.rmk: likewise
2248 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2252 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
2253 (grub_dl_ref): likewise
2255 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
2257 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
2258 split in two functions (one for msdos and one for gpt).
2260 2009-05-08 Pavel Roskin <proski@gnu.org>
2262 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
2265 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
2266 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
2267 Initialize them with -1. Add sanity check for bad1. Eliminate
2270 2009-05-08 David S. Miller <davem@davemloft.net>
2272 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
2274 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
2276 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
2279 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
2281 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2282 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
2284 2009-05-05 David S. Miller <davem@davemloft.net>
2286 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
2288 2009-05-05 Pavel Roskin <proski@gnu.org>
2290 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
2291 of grub_dl_ref() and grub_dl_unref().
2292 * commands/parttool.c: Remove preprocessor conditionals around
2293 grub_dl_ref() and grub_dl_unref().
2294 * fs/affs.c: Likewise.
2295 * fs/afs.c: Likewise.
2296 * fs/cpio.c: Likewise.
2297 * fs/ext2.c: Likewise.
2298 * fs/fat.c: Likewise.
2299 * fs/hfs.c: Likewise.
2300 * fs/hfsplus.c: Likewise.
2301 * fs/iso9660.c: Likewise.
2302 * fs/jfs.c: Likewise.
2303 * fs/minix.c: Likewise.
2304 * fs/ntfs.c: Likewise.
2305 * fs/reiserfs.c: Likewise.
2306 * fs/sfs.c: Likewise.
2307 * fs/udf.c: Likewise.
2308 * fs/ufs.c: Likewise.
2309 * fs/xfs.c: Likewise.
2310 * include/grub/dl.h: Likewise.
2311 * loader/xnu.c: Likewise.
2313 2009-05-04 Pavel Roskin <proski@gnu.org>
2315 * commands/acpi.c: Remove unused variable my_mod.
2316 * partmap/amiga.c: Likewise.
2317 * partmap/apple.c: Likewise.
2318 * partmap/gpt.c: Likewise.
2319 * partmap/pc.c: Likewise.
2320 * partmap/sun.c: Likewise.
2321 * term/gfxterm.c: Likewise.
2322 * term/i386/pc/vesafb.c: Likewise.
2323 * term/i386/pc/vga.c: Likewise.
2325 2009-05-04 David S. Miller <davem@davemloft.net>
2327 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
2328 pointer args to grub_ieee1275_get_property().
2330 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
2332 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
2333 devices, and do not traverse down under controller nodes.
2335 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
2336 (grub_ofdisk_open): Use it to un-escape "," characters.
2337 * kern/disk.c (find_part_sep): New.
2338 (grub_disk_open): Use it to find the first non-escaped ','
2339 character in the disk name.
2340 * util/ieee1275/devicemap.c (escape_of_path): New.
2341 (grub_util_emit_devicemap_entry): Use it.
2342 * util/sparc64/ieee1275/grub-install.in: Update script to
2343 strip partition specifiers properly by not triggering on
2344 '\' escaped ',' characters.
2346 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2348 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2350 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2352 (linux_vesafb_modes): Add a lot of additional modes to the list (based
2353 on documentation from Wikipedia).
2355 2009-05-04 Pavel Roskin <proski@gnu.org>
2357 * disk/ata.c: Spelling fixes.
2358 * disk/raid.c: Likewise.
2359 * disk/usbms.c: Likewise.
2360 * disk/dmraid_nvidia.c: Likewise.
2361 * kern/ieee1275/openfw.c: Likewise.
2362 * kern/ieee1275/init.c: Likewise.
2363 * kern/ieee1275/cmain.c: Likewise.
2364 * boot/i386/pc/cdboot.S: Likewise.
2365 * video/readers/png.c: Likewise.
2366 * video/i386/pc/vbe.c: Likewise.
2367 * fs/udf.c: Likewise.
2368 * fs/hfs.c: Likewise.
2369 * fs/reiserfs.c: Likewise.
2370 * efiemu/runtime/efiemu.c: Likewise.
2371 * efiemu/main.c: Likewise.
2372 * efiemu/mm.c: Likewise.
2373 * include/grub/elf.h: Likewise.
2374 * include/grub/xnu.h: Likewise.
2375 * include/grub/usbdesc.h: Likewise.
2376 * include/grub/usb.h: Likewise.
2377 * include/grub/script_sh.h: Likewise.
2378 * include/grub/lib/LzmaEnc.h: Likewise.
2379 * include/grub/efiemu/efiemu.h: Likewise.
2380 * include/grub/command.h: Likewise.
2381 * normal/menu.c: Likewise.
2382 * normal/main.c: Likewise.
2383 * normal/datetime.c: Likewise.
2384 * bus/usb/uhci.c: Likewise.
2385 * mmap/i386/uppermem.c: Likewise.
2386 * mmap/mmap.c: Likewise.
2387 * commands/acpi.c: Likewise.
2388 * commands/test.c: Likewise.
2389 * partmap/apple.c: Likewise.
2390 * font/font.c: Likewise.
2391 * loader/sparc64/ieee1275/linux.c: Likewise.
2392 * loader/macho.c: Likewise.
2393 * loader/i386/bsd_trampoline.S: Likewise.
2394 * loader/i386/bsd.c: Likewise.
2395 * loader/xnu.c: Likewise.
2396 * term/i386/pc/vesafb.c: Likewise.
2397 * term/usb_keyboard.c: Likewise.
2398 * util/resolve.c: Likewise.
2399 * util/getroot.c: Likewise.
2401 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2403 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2405 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2407 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2410 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2412 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2413 parameter only available on BIOS.
2415 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2417 Removed wrong semicolon in declaration
2419 * grub/misc.h (grub_dprintf): remove semicolon
2421 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2423 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2424 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2425 is done by grub_cmd_linux() now).
2426 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2427 restore video to text mode.
2428 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2429 indicates lack of "vga=" parameter. "vga=0" is mapped to
2430 `GRUB_LINUX_VID_MODE_NORMAL'.
2432 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2434 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2435 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2436 and `normal/script.c'. Add `kern/rescue_reader.c',
2437 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
2438 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2439 `grub_script.tab.c'.
2441 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2442 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2443 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2444 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2445 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2447 * Makefile.in: Remove duplicated 2008 in Copyright line.
2449 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2451 * util/misc.c (grub_util_warn): New function. Emits a warning
2453 * include/grub/util/misc.h (grub_util_warn): New declaration.
2455 * util/i386/pc/grub-install.in: Understand --force and pass it down
2458 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2460 (setup): Improve error messages and add warnings when requested to
2461 install in odd layouts. Refuse to install using blocklists unless
2464 2009-05-04 martin f. krafft <madduck@madduck.net>
2466 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2468 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2470 Updated copyright year
2472 * fs/hfsplus.c: updated copyright year
2474 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2478 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2479 in the space previously used by unused3
2480 (grub_hfsplus_uuid): new function
2481 (grub_hfsplus_fs): added uuid field
2483 2009-05-03 Pavel Roskin <proski@gnu.org>
2485 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2486 suppress warnings. It's no longer needed.
2487 * disk/host.c: Likewise.
2488 * disk/ata_pthru.c: Likewise.
2489 * disk/loopback.c: Likewise.
2490 * hook/datehook.c: Likewise.
2491 * parttool/pcpart.c: Likewise.
2492 * fs/i386/pc/pxe.c: Likewise.
2493 * fs/ntfscomp.c: Likewise.
2494 * efiemu/main.c: Likewise.
2495 * mmap/mmap.c: Likewise.
2496 * commands/crc.c: Likewise.
2497 * commands/hexdump.c: Likewise.
2498 * commands/hdparm.c: Likewise.
2499 * commands/acpi.c: Likewise.
2500 * commands/echo.c: Likewise.
2501 * commands/minicmd.c: Likewise.
2502 * commands/blocklist.c: Likewise.
2503 * commands/memrw.c: Likewise.
2504 * commands/loadenv.c: Likewise.
2505 * commands/usbtest.c: Likewise.
2506 * commands/lsmmap.c: Likewise.
2507 * commands/boot.c: Likewise.
2508 * commands/parttool.c: Likewise.
2509 * commands/configfile.c: Likewise.
2510 * commands/search.c: Likewise.
2511 * commands/ieee1275/suspend.c: Likewise.
2512 * commands/cat.c: Likewise.
2513 * commands/i386/pc/pxecmd.c: Likewise.
2514 * commands/i386/pc/play.c: Likewise.
2515 * commands/i386/pc/halt.c: Likewise.
2516 * commands/i386/pc/vbeinfo.c: Likewise.
2517 * commands/i386/pc/vbetest.c: Likewise.
2518 * commands/lspci.c: Likewise.
2519 * commands/date.c: Likewise.
2520 * commands/handler.c: Likewise.
2521 * commands/ls.c: Likewise.
2522 * commands/test.c: Likewise.
2523 * commands/cmp.c: Likewise.
2524 * commands/efi/loadbios.c: Likewise.
2525 * commands/efi/fixvideo.c: Likewise.
2526 * commands/halt.c: Likewise.
2527 * commands/help.c: Likewise.
2528 * commands/reboot.c: Likewise.
2529 * hello/hello.c: Likewise.
2530 * script/sh/main.c: Likewise.
2531 * loader/xnu.c: Likewise.
2532 * term/terminfo.c: Likewise.
2533 * term/i386/pc/serial.c: Likewise.
2534 * term/usb_keyboard.c: Likewise.
2536 2009-05-03 David S. Miller <davem@davemloft.net>
2538 * normal/menu.c: Include grub/parser.h
2540 2009-05-03 Pavel Roskin <proski@gnu.org>
2542 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2544 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2545 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2547 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2548 efiemu??.o doesn't exist.
2549 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2552 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2554 FreeBSD 64-bit support
2556 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2557 and loader/i386/bsd_trampoline.S
2558 (bsd_mod_ASFLAGS): new variable
2559 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2560 (FREEBSD_MODTYPE_KERNEL64): likewise
2561 (grub_bsd64_trampoline_start): likewise
2562 (grub_bsd64_trampoline_end): likewise
2563 (grub_bsd64_trampoline_selfjump): likewise
2564 (grub_bsd64_trampoline_gdt): likewise
2565 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2566 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2567 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2568 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2569 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2571 * loader/i386/bsd_pagetable.c: new file
2572 * loader/i386/bsd_trampoline.S: likewise
2573 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2574 (ALIGN_VAR): likewise
2575 (entry_hi): new variable
2576 (kern_end_mdofs): likewise
2577 (is_64bit): likewise
2578 (grub_freebsd_add_meta): use ALIGN_VAR
2579 (grub_e820_mmap): new declaration
2580 (grub_freebsd_add_mmap): new function
2581 (grub_freebsd_add_meta_module): support 64 bit kernels
2582 (grub_freebsd_list_modules): use ALIGN_VAR
2583 (gdt_descriptor): new declaration
2584 (grub_freebsd_boot): support 64 bit kernels
2585 (grub_bsd_elf64_hook): new function
2586 (grub_bsd_load_elf): support elf64
2588 2009-05-03 Bean <bean123ch@gmail.com>
2590 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2591 after we get the result of if statement.
2593 2009-05-03 Bean <bean123ch@gmail.com>
2595 * Makefile.in (enable_efiemu): New variable.
2597 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2599 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2601 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2602 path, add -mno-red-zone option.
2603 (efiemu64_s.o): Likewise.
2604 (efiemu64.o): Use macro $^ for source file.
2606 * configure.ac (--enable-efiemu): New option.
2608 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2612 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2613 (pkglib_MODULES): add xnu.mod
2614 (xnu_mod_SOURCES): new variable
2615 (xnu_mod_CFLAGS): likewise
2616 (xnu_mod_LDFLAGS): likewise
2617 (xnu_mod_ASFLAGS): likewise
2618 * conf/i386-pc.rmk: likewise
2619 * conf/x86_64-efi.rmk: likewise
2620 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2622 * include/grub/i386/macho.h: new file
2623 * include/grub/i386/xnu.h: likewise
2624 * include/grub/macho.h: likewise
2625 * include/grub/machoload.h: likewise
2626 * include/grub/x86_64/macho.h: likewise
2627 * include/grub/x86_64/xnu.h: likewise
2628 * include/grub/xnu.h: likewise
2629 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2630 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2631 * loader/i386/efi/xnu.c: new file
2632 * loader/i386/pc/xnu.c: likewise
2633 * loader/i386/xnu.c: likewise
2634 * loader/i386/xnu_helper.S: likewise
2635 * loader/macho.c: likewise
2636 * loader/xnu.c: likewise
2637 * loader/xnu_resume.c: likewise
2638 * util/grub-dumpdevtree: likewise
2639 * include/grub/i386/pit.h: include grub/err.h
2640 (grub_pit_wait): export
2641 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2643 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2647 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2648 _linux_efi, linux_efi.
2649 new files in grub-emu
2650 new targets efiemu32.o and efiemu64.o
2651 * loader/linux_normal_efiemu.c: likewise
2652 * loader/i386/efi/linux.c: added preliminary efiemu support
2653 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2655 * include/grub/autoefi.h: new file
2656 * include/grub/i386/efiemu.h: likewise
2657 * include/grub/i386/pc/efiemu.h: likewise
2658 * include/grub/efi/api.h: add LL suffix when necessary
2659 new definitions relating to tables
2660 * include/grub/efiemu/efiemu.h: new file
2661 * include/grub/efiemu/runtime.h: likewise
2662 * efiemu/prepare.c: likewise
2663 * efiemu/loadcore_common.c: likewise
2664 * efiemu/loadcore64.c: likewise
2665 * efiemu/runtime/efiemu.sh: likewise
2666 * efiemu/runtime/efiemu.S: likewise
2667 * efiemu/runtime/efiemu.c: likewise
2668 * efiemu/runtime/config.h: likewise
2669 * efiemu/prepare32.c: likewise
2670 * efiemu/main.c: likewise
2671 * efiemu/modules/pnvram.c: likewise
2672 * efiemu/modules/i386: likewise
2673 * efiemu/modules/i386/pc: likewise
2674 * efiemu/modules/acpi.c: likewise
2675 * efiemu/i386/pc/cfgtables.c: likewise
2676 * efiemu/i386/loadcore64.c: likewise
2677 * efiemu/i386/loadcore32.c: likewise
2678 * efiemu/prepare64.c: likewise
2679 * efiemu/loadcore.c: likewise
2680 * efiemu/symbols.c: likewise
2681 * efiemu/mm.c: likewise
2682 * efiemu/loadcore32.c: likewise
2684 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2688 * commands/acpi.c: new file
2689 * commands/i386/pc/acpi.c: likewise
2690 * commands/efi/acpi.c: likewise
2691 * include/grub/acpi.h: likewise
2692 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2693 (acpi_mod_SOURCES): new variable
2694 (acpi_mod_CFLAGS): likewise
2695 (acpi_mod_LDFLAGS): likewise
2696 * conf/i386-efi.rmk: likewise
2697 * conf/x86_64-efi.rmk: likewise
2699 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2701 Missing part from mmap patch
2703 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2704 (grub_mmap_unregister)
2705 (grub_mmap_free_and_unregister): use grub_mmap_register
2707 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2711 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2712 * loader/i386/linux.c (find_mmap_size): likewise
2713 (allocate_pages): likewise
2714 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2715 (grub_fill_multiboot_mmap): likewise
2716 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2717 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2718 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2719 (OPENBSD_MMAP_RESERVED): likewise
2720 * include/grub/i386/pc/memory.h: include grub/memory.h
2721 (grub_lower_mem): removed
2722 (grub_upper_mem): likewise
2723 (GRUB_MACHINE_MEMORY_ACPI): new definition
2724 (GRUB_MACHINE_MEMORY_NVS): likewise
2725 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2726 (GRUB_MACHINE_MEMORY_HOLE): likewise
2727 (grub_machine_mmap_register): likewise
2728 (grub_machine_mmap_unregister): likewise
2729 (grub_machine_get_upper): likewise
2730 (grub_machine_get_lower): likewise
2731 (grub_machine_get_post64): likewise
2732 * include/grub/i386/efi/memory.h: new file
2733 * include/grub/x86_64/efi/memory.h: likewise
2734 * include/grub/efi/memory.h: likewise
2735 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2736 (mmap_mod_SOURCES): new variable
2737 (mmap_mod_LDFLAGS): likewise
2738 (mmap_mod_ASFLAGS): likewise
2739 * conf/i386-coreboot.rmk: likewise
2740 * conf/i386-ieee1275.rmk: likewise
2741 * conf/i386-efi.rmk: likewise
2742 * conf/x86_64-efi.rmk: likewise
2743 * include/grub/types.h (UINT_TO_PTR): new macro
2744 (PTR_TO_UINT32): likewise
2745 (PTR_TO_UINT64): likewise
2746 * include/grub/memory.h: new file
2747 * mmap/i386/pc/mmap.c: likewise
2748 * mmap/i386/pc/mmap_helper.S: likewise
2749 * mmap/i386/uppermem.c: likewise
2750 * mmap/mmap.c: likewise
2751 * mmap/efi/mmap.c: likewise
2752 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2754 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2755 (grub_upper_mem): likewise
2756 (grub_machine_init): don't use grub_upper_mem,
2757 make grub_lower_mem local
2758 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2759 grub_mmap_iterate and grub_mmap_get_upper
2760 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2762 2009-05-02 Bean <bean123ch@gmail.com>
2764 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2766 (pkglib_MODULES): Add normal.mod and sh.mod.
2767 (normal_SOURCES): New variable.
2768 (normal_mod_CFLAGS): Likewise.
2769 (normal_mod_LDFLAGS): Likewise.
2770 (sh_mod_SOURCES): Likewise.
2771 (sh_mod_CFLAGS): Likewise.
2772 (sh_mod_LDFLAGS): Likewise.
2774 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2775 script/sh/lexer.c_DEPENDENCIES.
2776 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2777 kern/rescue_reader.c and kern/rescue_parser.c.
2778 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2779 (grub_emu_SOURCES): Change source files.
2780 (pkglib_MODULES): Remove normal.mod.
2781 (normal_SOURCES): Removed.
2782 (normal_mod_CFLAGS): Likewise.
2783 (normal_mod_LDFLAGS): Likewise.
2784 * conf/i386-coreboot.rmk: Likewise.
2785 * conf/i386-efi.rmk: Likewise.
2786 * conf/i386-ieee1276.rmk: Likewise.
2787 * conf/powerpc-ieee1275.rmk: Likewise.
2788 * conf/sparc64-ieee1275.rmk: Likewise.
2789 * conf/x86_64-efi.rmk: Likewise.
2791 * include/grub/command.h (grub_command_execute): New inline function.
2793 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2795 * include/grub/normal.h: Remove <grub/setjmp.h>.
2796 (grub_fs_module_list): Moved to normal/autofs.c.
2797 (grub_exit_env): Removed.
2798 (grub_command_execute): Likewise.
2799 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2801 (read_command_list): New function declaration.
2802 (read_fs_list): Likewise.
2804 * include/parser.h: Include <grub/reader.h>.
2805 (grub_parser_split_cmdline): Change type of getline parameter.
2806 (grub_parser): New structure.
2807 (grub_parser_class): New variable.
2808 (grub_parser_execute): New function declaration.
2809 (grub_register_rescue_parser): Likewise.
2810 (grub_parser_register): New inline function.
2811 (grub_parser_unregister): Likewise.
2812 (grub_parser_get_current): Likewise.
2813 (grub_parser_set_current): Likewise.
2815 * include/grub/reader.h: New file.
2816 * kern/reader.c: Likewise.
2817 * kern/rescue_parser.c: Likewise.
2818 * kern/rescue_reader.c: Likewise.
2819 * normal/autofs.c: Likewise.
2820 * normal/dyncmd.c: Likewise.
2822 * include/grub/rescue.h: Removed.
2823 * normal/command.h: Likewise.
2825 * include/grub/script.h: Moved to ...
2826 * include/grub/script_sh.h: ... Moved here.
2827 * normal/execute.c: Moved to ...
2828 * script/sh/execute.c: ... Moved here.
2829 * normal/function.c: Moved to ...
2830 * script/sh/function.c: ... Moved here.
2831 * normal/lexer.c: Moved to ...
2832 * script/sh/lexer.c: ... Moved here.
2833 * normal/parser.y: Moved to ...
2834 * script/sh/parser.y: ... Moved here.
2835 * normal/script.c: Moved to ...
2836 * script/sh/script.c: ... Moved here.
2838 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2840 (grub_exit_env): Removed.
2841 (fs_module_list): Moved to normal/autofs.c.
2842 (grub_file_getline): Don't handle comment here.
2843 (free_menu): Skip removed field entry->commands.
2844 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2846 (read_config_file): Removed nested parameter, change getline function.
2847 (grub_enter_normal_mode): Removed.
2848 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2849 (read_command_list): Likewise.
2850 (autoload_fs_module): Moved to normal/autofs.c.
2851 (read_fs_list): Likewise.
2852 (reader_nested): New variable.
2853 (grub_normal_execute): Run parser.sh to switch to sh parser.
2854 (grub_cmd_rescue): Removed.
2855 (cmd_normal): Removed.
2856 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2858 (grub_cmdline_run): New function.
2859 (grub_normal_reader_init): Likewise.
2860 (grub_normal_read_line): Likewise.
2861 (grub_env_write_pager): Likewise.
2862 (cmdline): New variable.
2863 (grub_normal_reader): Likewise.
2864 (GRUB_MOD_INIT): Register normal reader and set as current, register
2865 pager hook, register normal command with grub_register_command_prio,
2866 so that it won't show up in command.lst.
2867 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2868 grub_fs_autoload_hook.
2870 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2871 (grub_menu_execute_entry): Replace grub_script_execute with
2872 grub_parser_execute, change parameter to grub_command_execute.
2874 * normal/menu_text.c: Remove <grub/script.h>.
2876 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2877 and <grub/parser.h>.
2878 (run): Change editor_getline to use new parser interface. Change
2879 parameter to grub_command_execute.
2881 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2882 <grub/reader.h> and <grub/parser.h>.
2883 (grub_load_normal_mode): Execute normal command.
2884 (grub_main): Call grub_register_core_commands,
2885 grub_register_rescue_parser and grub_register_rescue_reader, use
2886 grub_reader_loop to enter input loop.
2888 * kern/parser.c (grub_parser_split_cmdline): Change type of
2890 (grub_parser_class): New variable.
2891 (grub_parser_execute): New function.
2893 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2894 * loader/multiboot2.c: Likewise.
2895 * loader/sparc64/ieee1275/linux.c: Likewise.
2897 * util/grub-emu.c (read_command_list): New dummy function.
2899 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2901 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2902 count to 16 for CCISS and IDA.
2904 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2906 * normal/menu_text.c (grub_wait_after_message): Print a newline
2907 after waiting for user input.
2909 * loader/i386/linux.c: Include `<grub/normal.h>'.
2910 (grub_cmd_linux): Improve the error message about `ask' mode, by
2911 waiting for user input so it's not missed (we can do this, since
2912 user requested interaction).
2914 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2916 Added missing lst to grub-mkrescue
2918 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2919 and ${input_dir}/parttool.lst
2921 2009-04-30 David S. Miller <davem@davemloft.net>
2923 * util/hostdisk.c (device_is_wholedisk): New function.
2924 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2925 zero only if device_is_wholedisk() returns true.
2927 * util/hostdisk.c (convert_system_partition_to_system_disk):
2928 Handle virtual disk devices named /dev/vdiskX as found on sparc
2931 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2932 lettered partition specifier is found, convert to numbered.
2934 2009-04-29 David S. Miller <davem@davemloft.net>
2936 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2937 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2939 * normal/command.c: Add missing newline at end of file.
2941 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2943 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2944 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2945 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2946 ihandles have a 32-bit type but need to be stored in a "void *".
2948 2009-04-28 Pavel Roskin <proski@gnu.org>
2950 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2951 not disk. Adjust all dependencies.
2952 (grub_fs_uuid_close): Use grub_device_close(), not
2955 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2956 parent's partition, don't copy it by reference, as it gets freed
2959 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2961 Preboot hooks support
2963 * commands/boot.c (struct grub_preboot_t): new declaration
2964 (preboots_head): new variable
2965 (preboots_tail): likewise
2966 (grub_loader_register_preboot_hook): new function
2967 (grub_loader_unregister_preboot_hook): likewise
2968 (grub_loader_set): launch preboot hooks
2969 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2970 (grub_loader_register_preboot_hook): new declaration
2971 (grub_loader_unregister_preboot_hook): likewise
2973 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2977 * disk/scsi.c (grub_scsi_open): added missing cast when
2978 calling grub_dprintf
2980 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2982 Bug and warning fixes
2984 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2986 * commands/test.c (test_parse): fixed bug with file tests and corrected
2987 declaration of find_file
2989 2009-04-26 Pavel Roskin <proski@gnu.org>
2991 * Makefile.in: Don't install empty manual pages if help2man is
2992 missing. Use help2man option for output, not shell redirection.
2994 2009-04-26 David S. Miller <davem@davemloft.net>
2996 * util/grub-mkdevicemap.c (make_device_map): Add missing
2997 NESTED_FUNC_ATTR to process_device().
2999 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3003 * commands/test.c: rewritten to use bash-like test
3005 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3007 Parttool autoloading and improvements
3009 * Makefile.in (pkglib_DATA): add parttool.lst
3010 (parttool.lst): new target
3011 * genmk.rb: generate parttool-*
3012 (CLEANFILES): add #{parttool}
3013 (PARTTOOLFILES): new variable
3014 * genparttoollist.sh: new file
3015 * parttool/pcpart.c (grub_pcpart_boot): more feedback
3016 (grub_pcpart_type): likewise
3017 * commands/parttool.c (helpmsg): new variable
3018 (grub_cmd_parttool): output help if not enough arguments are supplied
3020 (GRUB_MOD_INIT(parttool)): use helpmsg
3022 2009-04-24 David S. Miller <davem@davemloft.net>
3024 Avoiding opening same device multiple times in device iterator.
3026 * kern/device.c: (grub_device_iterate): Define struct part_ent,
3027 and use it to build a list of partitions in iterate_disk() and
3028 iterate_partition().
3030 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3033 * disk/ieee1275/nand.c (grub_nand_iterate): Return
3034 grub_devalias_iterate() result instead of unconditional 0.
3035 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3036 Also, capture hook return value, either directly or via
3037 grub_children_iterate(), and propagate to caller.
3038 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3039 grub_children_iterate): Return value is now 'int' instead of
3041 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3042 like a proper iterator, stopping when hooks return non-zero.
3043 (grub_devalias_iterate): Likewise.
3045 2009-04-23 David S. Miller <davem@davemloft.net>
3047 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3049 2009-04-22 David S. Miller <davem@davemloft.net>
3051 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3052 is larger than address_cells, use that value for address_cells too.
3054 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3055 IEEE1275_MAX_PATH_LEN): Define.
3056 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3057 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3058 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3059 'devtype'. Explicitly NULL terminate devalias expansion.
3061 * util/sparc64/ieee1275/misc.c: New file.
3062 * util/sparc64/ieee1275/grub-setup.c: New file.
3063 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3064 * util/sparc64/ieee1275/grub-mkimage.c: New file.
3065 * util/sparc64/ieee1275/grub-install.in: New file.
3066 * util/ieee1275/ofpath.c: New file.
3067 * util/ieee1275/devicemap.c: New file.
3068 * util/devicemap.c: New file.
3069 * util/deviceiter.c: New file.
3070 * kern/sparc64/ieee1275/init.c: New file.
3071 * include/grub/util/ofpath.h: New file.
3072 * include/grub/util/deviceiter.h: New file.
3073 * util/grub-mkdevicemap.c: Include deviceiter.h.
3074 Implement using grub_util_emit_devicemap_entry and
3075 grub_util_iterate_devices.
3076 * conf/i386-corebook.rmk: Build util/deviceiter.c and
3077 util/devicemap.c into grub-mkdevicemap
3078 * conf/i386-efi.rmk: Likewise.
3079 * conf/i386-ieee1275.rmk: Likewise.
3080 * conf/i386-pc.rmk: Likewise.
3081 * conf/powerpc-ieee1275.rmk: Likewise.
3082 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
3083 images and installation utilities. Build kernel as image
3084 instead of as elf binary. Use common rules as much as possible.
3086 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
3088 Correct GPT definition
3090 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3093 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
3095 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
3097 2009-04-19 David S. Miller <davem@davemloft.net>
3099 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
3100 (grub_rescue_cmd_linux): Rename to...
3101 (grub_cmd_linux): and fix prototype.
3102 (grub_rescue_cmd_initrd): Rename to...
3103 (grub_cmd_initrd): and fix prototype.
3104 (cmd_linux, cmd_initrd): New.
3105 (GRUB_MOD_INIT(linux)): Use grub_register_command().
3106 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
3108 2009-04-17 Pavel Roskin <proski@gnu.org>
3110 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
3112 (grub_ohci_transfer): Likewise.
3114 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
3116 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
3117 return without a value. Fix inconsistent indentation.
3119 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
3120 match struct grub_fs.
3122 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
3123 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
3124 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3125 * commands/lspci.c (grub_lspci_iter): Likewise.
3127 2009-04-16 Bean <bean123ch@gmail.com>
3129 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
3132 2009-04-15 Pavel Roskin <proski@gnu.org>
3134 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
3135 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
3136 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
3139 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3141 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
3142 that no multiple data or metadata areas are supported and `Unknown
3145 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3147 Move loader out of the kernel
3149 * kern/loader.c: moved to ...
3150 * commands/boot.c: ... moved here
3151 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
3152 * commands/boot.c (grub_cmd_boot): moved here. All users updated
3153 * include/grub/kernel.h (grub_machine_fini): export
3154 * include/grub/loader.h (grub_loader_is_loaded): update declaration
3155 (grub_loader_set): likewise
3156 (grub_loader_unset): likewise
3157 (grub_loader_boot): likewise
3158 * conf/common.rmk: new module boot.mod
3159 (pkglib_MODULES): add boot.mod
3160 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
3161 (grub_emu_SOURCES): likewise
3162 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
3163 (grub_emu_SOURCES): likewise
3164 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
3165 (grub_emu_SOURCES): likewise
3166 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
3167 (grub_emu_SOURCES): likewise
3168 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
3169 (grub_emu_SOURCES): likewise
3170 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
3171 (grub_emu_SOURCES): likewise
3172 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
3173 (grub_emu_SOURCES): likewise
3175 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3177 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
3179 * kern/misc.c (grub_itoa): Removed function
3180 (grub_ltoa): likewise
3181 (grub_vsprintf): use grub_lltoa
3183 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3187 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
3188 * conf/i386-coreboot.rmk: likewise
3189 * conf/i386-ieee1275.rmk: likewise
3190 * conf/powerpc-ieee1275.rmk: likewise
3192 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3194 * INSTALL: Add that `./autogen.sh' needs to be run before
3197 2009-04-14 Bean <bean123ch@gmail.com>
3199 * Makefile.in (pkglib_DATA): Add handler.lst.
3200 (handler.lst): New rule.
3202 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
3203 * conf/i386-coreboot.rmk: Likewise.
3204 * conf/i386-ieee1275.rmk: Likewise.
3205 * conf/i386-efi.rmk: Likewise.
3206 * conf/x86_64-efi.rmk: Likewise.
3207 * conf/powerpc-ieee1275.rmk: Likewise.
3208 * conf/sparc64-ieee1275.rmk: Likewise.
3210 * genhandlerlist.sh: New file.
3212 * genmk.rb: Add rules to generate handler.lst.
3214 * include/grub/normal.h (grub_file_getline): New function definition.
3215 (read_handler_list): Likewise.
3216 (free_handler_list): Likewise.
3218 * include/grub/term.h (grub_term_register_input): Add name parameter
3219 for auto generation of handler.lst.
3220 (grub_term_register_output): Likewise.
3222 * normal/handler.c: New file.
3224 * normal/main.c (get_line): Renamed to grub_file_getline.
3225 (read_config_file): Use the newly renamed grub_file_getline.
3226 (read_command_list): Likewise.
3227 (read_fs_list): Likewise.
3228 (grub_normal_execute): Call read_handler_list to parse handler.lst.
3229 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
3231 * term/efi/console.c (grub_console_init): Add name parameter for auto
3232 generation of handler.lst.
3233 * term/gfxterm.c: Likewise.
3234 * term/i386/pc/at_keyboard.c: Likewise.
3235 * term/i386/pc/console.c: Likewise.
3236 * term/i386/pc/serial.c: Likewise.
3237 * term/i386/pc/vesafb.c: Likewise.
3238 * term/i386/pc/vga.c: Likewise.
3239 * term/i386/pc/vga_text.c: Likewise.
3240 * term/ieee1275/ofconsole.c: Likewise.
3241 * term/usb_keyboard.c: Likewise.
3243 2009-04-14 Bean <bean123ch@gmail.com>
3245 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
3246 properly with null character.
3248 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3250 * configure: Remove.
3251 * config.h.in: Likewise.
3252 * stamp-h.in: Likewise.
3253 * DISTLIST: Likewise.
3254 * conf/common.mk: Likewise.
3255 * conf/i386-coreboot.mk: Likewise.
3256 * conf/i386-efi.mk: Likewise.
3257 * conf/i386-ieee1275.mk: Likewise.
3258 * conf/i386.mk: Likewise.
3259 * conf/i386-pc.mk: Likewise.
3260 * conf/powerpc-ieee1275.mk: Likewise.
3261 * conf/sparc64-ieee1275.mk: Likewise.
3262 * conf/x86_64-efi.mk: Likewise.
3264 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
3267 2009-04-14 John Stanley <jpsinthemix@verizon.net>
3268 David S. Miller <davem@davemloft.net>
3270 * util/hostdisk.c (make_device_name): Fix buffer length
3273 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3275 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
3276 <sys/param.h> and <sys/sysctl.h>.
3277 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
3278 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
3279 opening the device and reset them afterwards.
3281 2009-04-13 Pavel Roskin <proski@gnu.org>
3283 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
3284 Reported by John Stanley <jpsinthemix@verizon.net>
3286 2009-04-13 Robert Millan <rmh@aybabtu.com>
3288 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
3289 that name for menuentries when appropriate.
3291 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3293 * util/grub.d/10_freebsd.in: Add a missing `fi'.
3295 2009-04-13 Robert Millan <rmh@aybabtu.com>
3297 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
3298 to Linux, simply abort telling the user it's no longer supported.
3300 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3302 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
3303 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
3304 `freebsd_loadenv' only when devices.hints exist.
3306 2009-04-13 Pavel Roskin <proski@gnu.org>
3308 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
3310 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3312 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
3314 (grub_drive): Likewise.
3316 2009-04-13 David S. Miller <davem@davemloft.net>
3318 * kern/sparc64/ieee1275/ieee1275.c: New file.
3319 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
3320 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
3321 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
3322 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
3323 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
3324 grub_ieee1275_alloc_physmem): Declare new exported functions.
3326 * include/grub/sparc64/ieee1275/loader.h: New file.
3327 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3328 * include/grub/sparc64/kernel.h: Likewise.
3329 * loader/sparc64/ieee1275/linux.c: Likewise.
3331 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
3332 (grub_fstest_SOURCES): Likewise.
3334 * util/hostdisk.c (make_device_name): Do not make any assumptions
3335 about the length of drive names.
3337 * kern/dl.c (grub_dl_load_file): Close file immediately when
3338 we are done using it.
3340 2009-04-12 David S. Miller <davem@davemloft.net>
3342 * kern/misc.c (grub_ltoa): Fix cast when handling negative
3343 values. Noticed by Pavel Roskin.
3345 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3348 * genmk.rb: Add more flexible image type specification, also
3349 pass --strip-unneeded to objcopy.
3350 * conf/i386-pc.rmk: Use *_FORMAT.
3351 * conf/i386-pc.mk: Rebuilt.
3353 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3354 (OFDISK_HASH_SZ): Define.
3355 (ofdisk_hash): New hash table.
3356 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3357 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3358 instead of device phandle which is not unique.
3360 * kern/sparc64/ieee1275/init.c: Delete, replace with...
3361 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3362 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3363 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3364 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3365 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3366 GRUB_KERNEL_MACHINE_DATA_END): Define.
3367 (grub_kernel_image_size, grub_total_module_size): Declare.
3369 2009-04-12 Pavel Roskin <proski@gnu.org>
3371 * configure.ac: Change the logic when we check for target tools.
3372 Do it when the target is specified and it's different from the
3373 specified value of the host.
3375 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
3377 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3378 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3379 GNU/kFreeBSD. Check if a device is a character device. Use
3380 DIOCGMEDIASIZE to get the size.
3381 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3382 support for GNU/kFreeBSD.
3383 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3384 is a character device instead of a block device. Add support for
3385 FreeBSD device names.
3387 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3388 is a character device instead of a block device.
3390 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3391 is a character device instead of a block device.
3393 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3395 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3396 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3397 FreeBSD. Check if a device is a character device. Use
3398 DIOCGMEDIASIZE to get the size.
3399 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3400 support for FreeBSD.
3401 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3402 is a character device instead of a block device. Add support for
3403 FreeBSD device names.
3405 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3406 a character device instead of a block device.
3407 (grub_util_check_char_device): New function.
3409 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3410 a character device instead of a block device.
3412 * include/grub/util/getroot.h (grub_util_check_char_device): New
3415 2009-04-11 David S. Miller <davem@davemloft.net>
3417 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3419 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3420 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3421 function, if present.
3422 (__bswapdi2): Likewise.
3424 * include/grub/sparc64/ieee1275/boot.h: New file.
3425 * boot/sparc64/ieee1275/boot.S: Likewise.
3426 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3428 * kern/misc.c (grub_ltoa): New function.
3429 (grub_vsprintf): Use it to format 'long' integers.
3431 2009-04-10 David S. Miller <davem@davemloft.net>
3433 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3434 slots are of type grub_ieee1275_cell_t.
3435 (grub_nand_read): Likewise.
3436 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3437 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3438 macros are used to compare values in arg/ret block of the call.
3439 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3440 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3441 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3442 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3443 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3444 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3445 grub_ieee1275_close, grub_ieee1275_set_property,
3446 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3447 grub_ieee1275_cell_t.
3448 * kern/ieee1275/openfw.c (grub_map): Likewise.
3449 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3450 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3452 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3453 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3454 (grub_devalias_iterate): Likewise.
3456 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3460 * fs/ufs.c (INODE_NBLOCKS): new definition
3461 (struct grub_ufs_dirent): added fields for non-BSD dirents
3462 (grub_ufs_get_file_block): fixed double indirect handling
3463 (grub_ufs_lookup_symlink): use more robust way to determine whether
3465 (grub_ufs_find_file): support for non-BSD dirents
3466 (grub_ufs_dir): support for non-BSD dirents
3468 2009-04-10 Bean <bean123ch@gnail.com>
3470 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3471 attribute, otherwise the size would be wrong for i386 platform.
3473 * include/grub/pci.h (grub_pci_read_word): New inline function.
3474 (grub_pci_read_byte): Likewise.
3475 (grub_pci_write): Likewise.
3476 (grub_pci_write_word): Likewise.
3477 (grub_pci_write_byte): Likewise.
3479 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3481 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3482 (find_framebuf): Scan pci to locate the frame buffer address.
3484 * commands/efi/fixvideo.c: New file.
3486 * commands/efi/loadbios.c: Likewise.
3488 * commands/memrw.c: Likewise.
3490 * util/grub-dumpbios.in: Likewise.
3492 * conf/common.rmk (grub-dumpbios): New utility.
3493 (pkglib_MODULES): New module memrw.mod.
3494 (memrw_mod_SOURCE): New macro.
3495 (memrw_mod_CFLAGS): Likewise.
3496 (memrw_mod_LDFLAGS): Likewise.
3498 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3500 (loadbios_mod_SOURCE): New macro.
3501 (loadbios_mod_CFLAGS): Likewise.
3502 (loadbios_mod_LDFLAGS): Likewise.
3503 (fixvideo_mod_SOURCE): Likewise.
3504 (fixvideo_mod_CFLAGS): Likewise.
3505 (fixvideo_mod_LDFLAGS): Likewise.
3507 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3509 (loadbios_mod_SOURCE): New macro.
3510 (loadbios_mod_CFLAGS): Likewise.
3511 (loadbios_mod_LDFLAGS): Likewise.
3512 (fixvideo_mod_SOURCE): Likewise.
3513 (fixvideo_mod_CFLAGS): Likewise.
3514 (fixvideo_mod_LDFLAGS): Likewise.
3516 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3518 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3520 2009-04-07 David S. Miller <davem@davemloft.net>
3522 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3523 support for R_SPARC_OLO10 relocations. Fix compile warning for
3524 R_SPARC_WDISP30 case.
3525 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3527 2009-04-06 Pavel Roskin <proski@gnu.org>
3529 * include/grub/misc.h (ARRAY_SIZE): New macro.
3530 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3532 * loader/i386/linux.c (allocate_pages): Use free_pages().
3533 (grub_linux_unload): Don't use free_pages().
3534 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3535 wrong index. Treat all other modes as text modes.
3536 (grub_cmd_linux): Initialize vid_mode unconditionally to
3537 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3539 * commands/help.c (print_command_help): Use cmd->prio, not
3540 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3542 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3546 * parttool/pcpart.c: new file
3547 * commands/parttool.c: likewise
3548 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3549 (parttool_mod_SOURCES): new variable
3550 (parttool_mod_CFLAGS): likewise
3551 (parttool_mod_LDFLAGS): likewise
3552 (pcpart_mod_SOURCES): likewise
3553 (pcpart_mod_CFLAGS): likewise
3554 (pcpart_mod_LDFLAGS): likewise
3555 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3556 and parttool/pcpart.c
3557 * conf/i386-efi.rmk: likewise
3558 * conf/i386-ieee1275.rmk: likewise
3559 * conf/i386-pc.rmk: likewise
3560 * conf/powerpc-ieee1275.rmk: likewise
3561 * conf/sparc64-ieee1275.rmk: likewise
3562 * conf/x86_64-ieee1275.rmk: likewise
3564 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3566 Support for mtime and further expandability of dir command
3568 * include/grub/lib/datetime.h: moved to ...
3569 * include/grub/datetime.h: ... moved here and added
3570 declaration of grub_unixtime2datetime. All users updated
3571 * include/grub/fs.h: new syntax for dir and mtime functions in
3573 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3574 and GRUB_FSHELP_FLAGS_MASK
3575 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3576 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3577 (grub_ext2_mtime): new function
3578 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3579 (grub_hfsplus_mtime): new function
3580 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3581 (GRUB_UFS_ATTR_FILE): likewise
3582 (GRUB_UFS_ATTR_LNK): likewise
3583 (struct grub_ufs_sblock): new fields mtime
3584 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3586 (grub_ufs_dir): mtime support
3587 (grub_ufs_mtime): new function
3588 * fs/affs.c (grub_affs_dir): use new dir syntax
3589 * fs/afs.c (grub_afs_dir): likewise
3590 * fs/cpio.c (grub_cpio_dir): likewise
3591 * fs/fat.c (grub_fat_find_dir): likewise
3592 * fs/hfs.c (grub_hfs_dir): likewise
3593 * fs/iso9660.c (grub_iso9660_dir): likewise
3594 * fs/jfs.c (grub_jfs_dir): likewise
3595 * fs/minix.c (grub_minix_dir): likewise
3596 * fs/ntfs.c (grub_ntfs_dir): likewise
3597 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3598 * fs/sfs.c (grub_sfs_dir): likewise
3599 * fs/xfs.c (grub_xfs_dir): likewise
3600 * util/hostfs.c (grub_hostfs_dir): likewise
3601 * lib/datetime.c: moved to ...
3602 * normal/datetime.c: ... moved here
3603 (grub_unixtime2datetime): new function
3604 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3605 * normal/completion.c (iterate_dir): use new dir syntax
3606 * normal/misc.c (grub_normal_print_device_info): tell the
3607 last modification time of a volume
3608 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3609 * conf/common.rmk: added lib/datetime.c to ls.mod
3610 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3611 (normal_mod_SOURCES): likewise
3612 (datetime_mod_SOURCES): Removed lib/datetime.c
3613 * conf/i386-efi.rmk: likewise
3614 * conf/i386-ieee1275.rmk: likewise
3615 * conf/i386-pc.rmk: likewise
3616 * conf/powerpc-ieee1275.rmk: likewise
3617 * conf/sparc64-ieee1275.rmk: likewise
3618 * conf/x86_64-efi.rmk: likewise
3620 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3622 Trim trailing spaces in FAT label and support mtools-like labels
3624 * fs/fat.c (grub_fat_iterate_dir): New function based
3625 on grub_fat_find_dir
3626 (grub_fat_find_dir): use grub_fat_iterate_dir
3627 (grub_fat_label): likewise
3629 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3631 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3633 remove extraneous kernel_elf_HEADERS
3635 2009-04-04 Bean <bean123ch@gnail.com>
3637 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3639 * util/misc.c: Likewise.
3641 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3643 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3644 instead of grub_printf.
3646 2009-04-03 Robert Millan <rmh@aybabtu.com>
3648 * loader/i386/linux.c (grub_linux_setup_video): Fill
3649 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3650 values from `mode info' structure instead of hardcoded
3653 2009-04-01 Pavel Roskin <proski@gnu.org>
3655 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3657 * genmk.rb: Likewise.
3658 * configure.ac: Likewise.
3660 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3662 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3663 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3665 2009-04-01 David S. Miller <davem@davemloft.net>
3667 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3668 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3669 (grub_setjmp): Mark with 'returns_twice' attribute.
3670 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3671 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3672 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3674 2009-04-01 Robert Millan <rmh@aybabtu.com>
3676 Reapply fix from 2008-07-28 which was accidentally reverted; also
3677 perform the same fix to a similar check in same function.
3679 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3680 with the same number are found, just use issue a warning with
3681 grub_dprintf(), as this error has been reported to be non-fatal.
3683 2009-03-31 Pavel Roskin <proski@gnu.org>
3685 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3686 for cross-compilation.
3688 2009-03-30 Robert Millan <rmh@aybabtu.com>
3690 Fix i386-ieee1275 build.
3692 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3695 2009-03-30 Pavel Roskin <proski@gnu.org>
3697 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3698 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3699 zero-terminated, rely only on the strlen value. Fix comparison
3700 of strings differing in length.
3702 2009-03-30 Robert Millan <rmh@aybabtu.com>
3704 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3705 checking for abi version. Improve error messages on BIOS to notify
3706 user about `linux16' command.
3708 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3712 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3713 in case of collision
3714 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3716 2009-03-29 Robert Millan <rmh@aybabtu.com>
3718 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3719 set `vid_mode' accordingly.
3720 (grub_linux_boot): Process `vid_mode' and set video mode.
3722 2009-03-29 Robert Millan <rmh@aybabtu.com>
3724 * util/grub.d/10_linux.in (linux_entry): New function.
3725 Factorize generation of Linux boot entries.
3727 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3729 Make the format of Environment Block plain text. The boot loader
3730 part is not tested well yet.
3732 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3735 (usage): Remove "info" and "clear". Add "unset". Update the
3736 description of "set", as this does not delete variables any
3738 (create_envblk_file): Complete rewrite.
3739 (open_envblk_file): Likewise.
3740 (cmd_info): Removed.
3741 (cmd_list): Likewise.
3742 (cmd_set): Likewise.
3743 (cmd_clear): Likewise.
3744 (list_variables): New function.
3745 (write_envblk): Likewise.
3746 (set_variables): Likewise.
3747 (unset_variables): Likewise.
3748 (main): Complete rewrite.
3750 * commands/loadenv.c (buffer): Removed.
3752 (open_envblk_file): New function.
3753 (read_envblk_file): Complete rewrite.
3754 (grub_cmd_load_env): Likewise.
3755 (grub_cmd_list_env): Likewise.
3756 (struct blocklist): New struct.
3757 (free_blocklists): New function.
3758 (check_blocklists): Likewise.
3759 (write_blocklists): Likewise.
3760 (grub_cmd_save_env): Complete rewrite.
3762 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3763 a plain text signature.
3764 (GRUB_ENVBLK_MAXLEN): Removed.
3765 (struct grub_envblk): Complete rewrite.
3766 (grub_envblk_find): Removed.
3767 (grub_envblk_insert): Likewise.
3768 (grub_envblk_open): New prototype.
3769 (grub_envblk_set): Likewise.
3770 (grub_envblk_delete): Put const to VALUE.
3771 (grub_envblk_iterate): Put const to NAME and VALUE.
3772 (grub_envblk_close): New prototype.
3773 (grub_envblk_buffer): New inline function.
3774 (grub_envblk_size): Likewise.
3776 * lib/envblk.c: Include grub/mm.h.
3777 (grub_env_find): Removed.
3778 (grub_envblk_open): New function.
3779 (grub_envblk_close): Likewise.
3780 (escaped_value_len): Likewise.
3781 (find_next_line): Likewise.
3782 (grub_envblk_insert): Removed.
3783 (grub_envblk_set): New function.
3784 (grub_envblk_delete): Complete rewrite.
3785 (grub_envblk_iterate): Likewise.
3787 2009-03-28 Robert Millan <rmh@aybabtu.com>
3789 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3790 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3791 variables. Use 16-bit loader.
3792 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3794 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3795 (grub_linux16_boot): ... this. Update all users.
3796 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3797 (grub_linux_boot): ... this. Update all users.
3799 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3800 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3801 commands to `linux16' and `initrd16'.
3802 (GRUB_MOD_FINI(linux)): Rename to ...
3803 (GRUB_MOD_FINI(linux16)): ... this.
3805 2009-03-24 Pavel Roskin <proski@gnu.org>
3807 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3808 not just for compilation.
3810 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3812 Move multiboot helper out of kernel
3814 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3815 `loader/i386/multiboot_helper.S'.
3816 * conf/i386-coreboot.rmk: Likewise
3817 * conf/i386-ieee1275.rmk: Likewise
3819 * kern/i386/loader.S: Move multiboot helpers from here...
3820 * loader/i386/multiboot_helper.S: ...moved here
3821 * include/grub/i386/loader.h: Move declarations of multiboot
3822 helpers from here...
3823 * include/grub/i386/multiboot.h: ...moved here
3824 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3826 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3828 * kern/env.c (grub_env_context_open): Added an argument to specify
3829 whether a new context inherits exported variables from current
3830 one. This is useful when making a sandbox to interpret a config
3832 All callers updated.
3834 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3836 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3838 * kern/env.c (grub_env_context_close): Fix memory leaks.
3840 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3842 * normal/main.c (grub_normal_execute): Added an argument
3843 BATCH to specify if an interactive interface should be provided
3844 after reading a config file.
3845 All callers updated.
3846 (read_command_list): Prevent being executed twice.
3847 (read_fs_list): Likewise.
3849 * include/grub/normal.h (grub_normal_execute): Updated the
3852 2009-03-22 Pavel Roskin <proski@gno.org>
3854 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3856 * kern/i386/pc/startup.S: Likewise.
3857 * kern/i386/efi/startup.S: Likewise.
3858 * kern/i386/ieee1275/startup.S: Likewise.
3859 * kern/i386/coreboot/startup.S: Likewise.
3860 * kern/x86_64/efi/startup.S: Likewise.
3862 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3863 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3864 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3866 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3868 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3870 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3872 Use vaddr of correct segment for entry_point.
3874 2009-03-21 Bean <bean123ch@gmail.com>
3876 * commands/blocklist.c: Add include file <grub/command.h>, remove
3877 <grub/normal.h> and <grub/arg.h>.
3878 (grub_cmd_blocklist): Use the new command interface.
3879 (GRUB_MOD_INIT): Likewise.
3880 (GRUB_MOD_FINI): Likewise.
3881 * commands/boot.c: Likewise.
3882 * commands/cat.c: Likewise.
3883 * commands/cmp.c: Likewise.
3884 * commands/configfile.c: Likewise.
3885 * commands/crc.c: Likewise.
3886 * commands/echo.c: Likewise.
3887 * commands/halt.c: Likewise.
3888 * commands/handler.c: Likewise.
3889 * commands/hdparm.c: Likewise.
3890 * commands/help.c: Likewise.
3891 * commands/hexdump.c: Likewise.
3892 * commands/loadenv.c: Likewise.
3893 * commands/ls.c: Likewise.
3894 * commands/lsmmap.c: Likewise.
3895 * commands/lspci.c: Likewise.
3896 * commands/loadenv.c: Likewise.
3897 * commands/read.c: Likewise.
3898 * commands/reboot.c: Likewise.
3899 * commands/search.c: Likewise.
3900 * commands/sleep.c: Likewise.
3901 * commands/test.c: Likewise.
3902 * commands/usbtest.c: Likewise.
3903 * commands/videotest.c: Likewise.
3904 * commands/i386/cpuid.c: Likewise.
3905 * commands/i386/pc/halt.c: Likewise.
3906 * commands/i386/pc/play.c: Likewise.
3907 * commands/i386/pc/pxecmd.c: Likewise.
3908 * commands/i386/pc/vbeinfo.c: Likewise.
3909 * commands/i386/pc/vbetest.c: Likewise.
3910 * commands/ieee1275/suspend.c: Likewise.
3911 * disk/loopback.c: Likewise.
3912 * font/font_cmd.c: Likewise.
3913 * hello/hello.c: Likewise.
3914 * loader/efi/appleloader.c: Likewise.
3915 * loader/efi/chainloader.c: Likewise.
3916 * loader/i386/bsd.c: Likewise.
3917 * loader/i386/efi/linux.c: Likewise.
3918 * loader/i386/ieee1275/linux.c: Likewise.
3919 * loader/i386/linux.c: Likewise.
3920 * loader/i386/pc/chainloader.c: Likewise.
3921 * loader/i386/pc/linux.c: Likewise.
3922 * loader/powerpc/ieee1275/linux.c: Likewise.
3923 * loader/multiboot_loader.c: Likewise.
3924 * term/gfxterm.c: Likewise.
3925 * term/i386/pc/serial.c: Likewise.
3926 * term/terminfo.c: Likewise.
3928 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3929 * term/i386/pc/vga.c: Likewise.
3930 * video/readers/jpeg.c: Likewise.
3931 * video/readers/png.c: Likewise.
3932 * video/readers/tga.c: Likewise.
3934 * util/grub-fstest (cmd_loopback): Removed.
3935 (cmd_blocklist): Likewise.
3937 (grub_register_command): Likewise.
3938 (grub_unregister_command): Likewise.
3939 (execute_command): Use grub_command_find to locate command and execute
3942 * include/grub/efi/chainloader.h: Removed.
3943 * loader/efi/chainloader_normal.c: Likewise.
3944 * loader/i386/bsd_normal.c: Likewise.
3945 * loader/i386/pc/chainloader_normal.c: Likewise.
3946 * loader/i386/pc/multiboot_normal.c: Likewise.
3947 * loader/linux_normal.c: Likewise.
3948 * loader/multiboot_loader_normal.c: Likewise.
3949 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3951 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3952 and grub_register_command_p1.
3954 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3955 kern/command.c, lib/arg.c and commands/extcmd.c.
3956 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3957 (minicmd_mod_SOURCES): New variable.
3958 (minicmd_mod_CFLAGS): Likewise.
3959 (minicmd_mod_LDFLAGS): Likewise.
3960 (extcmd_mod_SOURCES): Likewise.
3961 (extcmd_mod_CFLAGS): Likewise.
3962 (extcmd_mod_LDFLAGS): Likewise.
3963 (boot_mod_SOURCES): Removed.
3964 (boot_mod_CFLAGS): Likewise.
3965 (boot_mod_LDFLAGS): Likewise.
3967 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3969 (kernel_img_HEADERS): Add command.h.
3970 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3971 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3973 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3974 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3975 remove the corresponding normal mode command.
3976 (normal_mod_SOURCES): Remove normal/arg.c.
3977 * conf/i386-coreboot.rmk: Likewise.
3978 * conf/i386-efi.rmk: Likewise.
3979 * conf/i386-ieee1275.rmk: Likewise.
3980 * conf/powerpc-ieee1275.rmk: Likewise.
3981 * conf/x86_64-efi.rmk: Likewise.
3983 * include/grub/arg.h: Move from here ...
3984 * include/grub/lib/arg.h: ... to here.
3986 * normal/arg.c: Move from here ...
3987 * lib/arg.c: ... to here.
3989 * commands/extcmd.c: New file.
3990 * commands/minicmd.c: Likewise.
3991 * include/grub/command.h: Likewise.
3992 * include/grub/extcmd.h: Likewise.
3993 * kern/command.c: Likewise.
3994 * kern/corecmd.c: Likewise.
3996 * kern/list.c (grub_list_iterate): Return int instead of void.
3997 (grub_list_insert): New function.
3998 (grub_prio_list_insert): Likewise.
4000 * kern/rescue.c (grub_rescue_command): Removed.
4001 (grub_rescue_command_list): Likewise.
4002 (grub_rescue_register_command): Likewise.
4003 (grub_rescue_unregister_command): Likewise.
4004 (grub_rescue_cmd_boot): Move to minicmd.c
4005 (grub_rescue_cmd_help): Likewise.
4006 (grub_rescue_cmd_info): Likewise.
4007 (grub_rescue_cmd_boot): Likewise.
4008 (grub_rescue_cmd_testload): Likewise.
4009 (grub_rescue_cmd_dump): Likewise.
4010 (grub_rescue_cmd_rmmod): Likewise.
4011 (grub_rescue_cmd_lsmod): Likewise.
4012 (grub_rescue_cmd_exit): Likewise.
4013 (grub_rescue_print_devices): Moved to corecmd.c.
4014 (grub_rescue_print_files): Likewise.
4015 (grub_rescue_cmd_ls): Likewise.
4016 (grub_rescue_cmd_insmod): Likewise.
4017 (grub_rescue_cmd_set): Likewise.
4018 (grub_rescue_cmd_unset): Likewise.
4019 (attempt_normal_mode): Use grub_command_find to get normal module.
4020 (grub_enter_rescue_mode): Use grub_register_core_commands to register
4021 commands, remove grub_rescue_register_command calls.
4023 * normal/command.c (grub_register_command): Removed.
4024 (grub_unregister_command): Likewise.
4025 (grub_command_find): Likewise.
4026 (grub_iterate_commands): Likewise.
4027 (rescue_command): Likewise.
4028 (export_command): Moved to corecmd.c.
4029 (set_command): Removed.
4030 (unset_command): Likewise.
4031 (insmod_command): Likewise.
4032 (rmmod_command): Likewise.
4033 (lsmod_command): Likewise.
4034 (grub_command_init): Likewise.
4036 * normal/completion.c (iterate_command): Use cmd->prio to check for
4038 (complete_arguments): Use grub_extcmd_t structure to find options.
4039 (grub_normal_do_completion): Change function grub_iterate_commands to
4040 grub_command_iterate.
4042 * normal/execute.c (grub_script_execute_cmd): No need to parse
4045 * normal/main.c (grub_dyncmd_dispatcher): New function.
4046 (read_command_list): Register unload commands as dyncmd.
4047 (grub_cmd_normal): Use new command interface, register rescue,
4048 unregister normal at entry, register normal, unregister rescue at exit.
4050 * include/grub/list.h (grub_list_test_t): New type.
4051 (grub_list_iterate): Return int instead of void.
4052 (grub_list_insert): New function.
4053 (GRUB_AS_NAMED_LIST_P): New macro.
4054 (GRUB_AS_PRIO_LIST): Likewise.
4055 (GRUB_AS_PRIO_LIST_P): Likewise.
4056 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4057 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4058 (grub_prio_list): New structure.
4059 (grub_prio_list_insert): New function.
4060 (grub_prio_list_remove): New inline function.
4062 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4063 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4064 (GRUB_COMMAND_FLAG_MENU): Likewise.
4065 (GRUB_COMMAND_FLAG_BOTH): Likewise.
4066 (GRUB_COMMAND_FLAG_TITLE): Likewise.
4067 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
4068 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
4069 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
4070 (grub_command): Likewise.
4071 (grub_register_command): Likewise.
4072 (grub_command_find): Likewise.
4073 (grub_iterate_commands): Likewise.
4074 (grub_command_init): Likewise.
4075 (grub_arg_parse): Likewise.
4076 (grub_arg_show_help): Likewise.
4078 * include/grub/rescue.h (grub_rescue_register_command): Removed.
4079 (grub_rescue_unregister_command): Likewise.
4081 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
4082 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
4083 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
4085 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
4086 grub_rescue_cmd_initrd.
4087 * include/grub/i386/loader.h: Likewise.
4088 * include/grub/x86_64/loader.h: Likewise.
4090 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
4092 2009-03-21 Bean <bean123ch@gmail.com>
4094 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4095 instead of stat in mingw environment.
4097 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
4099 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
4101 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
4104 2009-03-21 Bean <bean123ch@gmail.com>
4106 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
4109 2009-03-18 Michel Dänzer <michel@daenzer.net>
4111 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
4112 checking inode flags for EXT4_EXTENTS_FLAG.
4114 2009-03-18 Robert Millan <rmh@aybabtu.com>
4116 * loader/i386/linux.c: Include `<grub/video.h>' and
4117 `<grub/i386/pc/vbe.h>'..
4118 (grub_linux_setup_video): New function. Loosely based on the EFI one.
4119 (grub_linux32_boot): Attempt to configure video settings with
4120 grub_linux_setup_video().
4121 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
4122 to avoid grub_console_fini() which would step out of graphical mode
4125 2009-03-14 Robert Millan <rmh@aybabtu.com>
4127 Fix build on powerpc.
4128 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
4130 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
4132 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
4133 background image command.
4135 2009-03-12 Colin D Bennett <colin@gibibit.com>
4137 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
4138 (grub_gfxterm_putchar): Extract pairs of identical calls to
4139 draw_cursor out of conditional blocks.
4141 2009-03-11 Pavel Roskin <proski@gnu.org>
4143 * fs/hfs.c (grub_hfs_strncasecmp): New function.
4144 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
4146 2009-03-11 Robert Millan <rmh@aybabtu.com>
4148 * loader/i386/multiboot_elfxx.c
4149 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
4151 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
4153 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
4156 2009-03-11 Robert Millan <rmh@aybabtu.com>
4158 * loader/i386/multiboot.c (code_size): New variable.
4159 (grub_multiboot): Define offsets by adding to `code_size' rather
4160 than subtracting from `grub_multiboot_payload_size'. Provide
4161 4-byte alignment to MBI and others by increasing
4162 `boot_loader_name_length' appropriately.
4164 * loader/i386/multiboot_elfxx.c
4165 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
4167 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
4169 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
4172 2009-03-08 Robert Millan <rmh@aybabtu.com>
4174 Make loader/i386/linux.c usable on i386-pc again.
4176 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
4178 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
4181 2009-03-07 Bean <bean123ch@gmail.com>
4183 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
4186 2009-03-06 Robert Millan <rmh@aybabtu.com>
4188 Fix display issue on terminals with screen size other than 80x25
4189 (e.g. gfxterm with resolution higher than 640x480).
4191 * normal/main.c (grub_normal_init_page): Display title text in a
4192 position relative to the center of the terminal instead of relying
4193 on a hardcoded offset.
4195 2009-03-04 Robert Millan <rmh@aybabtu.com>
4197 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
4200 * Makefile.in (host_kernel): New variable.
4201 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
4202 scripts instead of just the windows one.
4203 * configure.ac: Initialize and AC_SUBST `host_kernel'.
4205 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4207 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
4209 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4210 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4211 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4212 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4213 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4214 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4216 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4218 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
4219 or if there's no space for the disk label and print the partition number on a
4222 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4224 * util/misc.c: Include <time.h>.
4225 (grub_millisleep): New function.
4227 2009-03-04 Bean <bean123ch@gmail.com>
4229 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
4230 another option -mno-red-zone.
4232 * commands/handler.c: Change module description.
4234 * kern/handler.c: Add missing space at the end of description line.
4236 * kern/list.c: Likewise.
4238 2009-03-03 Robert Millan <rmh@aybabtu.com>
4240 Move more components to the relocation area, and fix mbi pointer
4241 handling to use the destination rather than the origin (thanks to
4242 Vladimir Serbinenko for spotting).
4244 * loader/i386/multiboot.c (mbi_dest): New variable.
4245 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
4246 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
4249 2009-03-01 Bean <bean123ch@gmail.com>
4251 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
4252 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
4253 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
4254 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
4256 * loader/i386/efi/linux.c (acpi_guid): New variable.
4257 (acpi_guid): Likewise.
4258 (EBDA_SEG_ADDR): New constant.
4259 (LOW_MEM_ADDR): Likewise.
4260 (FAKE_EBDA_SEG): Likewise.
4261 (fake_bios_data): New function.
4262 (grub_linux_boot): Call fake_bios_data.
4264 2009-03-01 Bean <bean123ch@gmail.com>
4266 * commands/terminal.c: Removed.
4268 * commands/handler.c: New file.
4270 * include/grub/list.h: Likewise.
4272 * include/grub/handler.h: Likewise.
4274 * kern/list.c: Likewise.
4276 * kern/handler.c: Likewise.
4278 * kern/term.h: Include header file <grub/handler.h>.
4279 (grub_term_input): Move next field to the beginning.
4280 (grub_term_output): Likewise.
4281 (grub_term_input_class): New variable.
4282 (grub_term_output_class): Likewise.
4283 (grub_term_register_input): Changed to inline function.
4284 (grub_term_register_output): Likewise.
4285 (grub_term_unregister_input): Likewise.
4286 (grub_term_unregister_output): Likewise.
4287 (grub_term_set_current_input): Likewise.
4288 (grub_term_set_current_output): Likewise.
4289 (grub_term_get_current_input): Likewise.
4290 (grub_term_get_current_output): Likewise.
4291 (grub_term_iterate_input): Removed.
4292 (grub_term_iterate_output): Likewise.
4294 * kern/term.c (grub_term_list_input): Removed.
4295 (grub_term_list_output): Likewise.
4296 (grub_term_input_class): New variable.
4297 (grub_term_output_class): Likewise.
4298 (grub_cur_term_input): Change variable as macro.
4299 (grub_cur_term_output): Likewise.
4300 (grub_term_register_input): Removed.
4301 (grub_term_register_output): Likewise.
4302 (grub_term_unregister_input): Likewise.
4303 (grub_term_unregister_output): Likewise.
4304 (grub_term_set_current_input): Likewise.
4305 (grub_term_set_current_output): Likewise.
4306 (grub_term_iterate_input): Likewise.
4307 (grub_term_iterate_output): Likewise.
4308 (grub_term_get_current_input): Likewise.
4309 (grub_term_get_current_output): Likewise.
4311 * util/grub-editenv.c: Include header file <grub/handler.h>.
4312 (grub_term_get_current_input): Removed.
4313 (grub_term_get_current_output): Likewise.
4314 (grub_term_input_class): New variable.
4315 (grub_term_output_class): Likewise.
4317 * util/grub-fstest.c (grub_term_get_current_input): Removed.
4318 (grub_term_get_current_output): Likewise.
4319 (grub_term_input_class): New variable.
4320 (grub_term_output_class): Likewise.
4322 * util/grub-probe.c (grub_term_get_current_input): Removed.
4323 (grub_term_get_current_output): Likewise.
4324 (grub_term_input_class): New variable.
4325 (grub_term_output_class): Likewise.
4327 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
4328 (grub_term_get_current_output): Likewise.
4329 (grub_term_input_class): New variable.
4330 (grub_term_output_class): Likewise.
4332 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
4333 (terminal_mod_SOURCES): Likewise.
4334 (terminal_mod_CFLAGS): Likewise.
4335 (terminal_mod_LDFLAGS): Likewise.
4337 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4339 (kernel_img_SOURCES): Add list.c and handler.c.
4340 (kernel_img_HEADERS): Add list.h and handler.h.
4342 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4344 (kernel_mod_SOURCES): Add list.c and handler.c.
4345 (kernel_mod_HEADERS): Add list.h and handler.h.
4347 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4349 (kernel_elf_SOURCES): Add list.c and handler.c.
4350 (kernel_elf_HEADERS): Add list.h and handler.h.
4352 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4354 (kernel_elf_SOURCES): Add list.c and handler.c.
4355 (kernel_elf_HEADERS): Add list.h and handler.h.
4357 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4359 (kernel_mod_SOURCES): Add list.c and handler.c.
4360 (kernel_mod_HEADERS): Add list.h and handler.h.
4362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4364 (kernel_elf_SOURCES): Add list.c and handler.c.
4365 (kernel_elf_HEADERS): Add list.h and handler.h.
4367 2009-02-27 Robert Millan <rmh@aybabtu.com>
4369 Factorize elf32 / elf64 code in Multiboot loader. This will
4370 prevent it from getting out of sync again.
4372 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4373 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4374 grub_multiboot_load_elf64): Move from here ...
4375 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4376 grub_multiboot_load_elf): ... to here (new file).
4378 2009-02-27 Robert Millan <rmh@aybabtu.com>
4380 * util/grub.d/10_linux.in: Rename "single-user mode" to
4383 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4385 Don't leak in SCSI code.
4386 * disk/scsi.c (grub_scsi_close): free `scsi'.
4388 2009-02-27 Robert Millan <rmh@aybabtu.com>
4390 * loader/i386/pc/multiboot.c: Move from here ...
4391 * loader/i386/multiboot.c: ... to here. Update all users.
4393 2009-02-27 Robert Millan <rmh@aybabtu.com>
4395 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4396 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4398 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
4400 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4403 2009-02-27 Robert Millan <rmh@aybabtu.com>
4405 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4406 `0x' qualifier as 0 when base is specified as parameter).
4408 2009-02-24 Bean <bean123ch@gmail.com>
4410 * configure.ac: Check for -mcmodel=large in x86_64 target.
4412 * include/grub/efi/api.h (efi_call_10): New macro.
4413 (efi_wrap_10): New function.
4415 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4416 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4417 (GRUB_PE32_REL_BASED_LOW): Likewise.
4418 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4419 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4420 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4421 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4422 (GRUB_PE32_REL_BASED_REL): Likewise.
4423 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4424 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4425 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4427 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4430 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4431 (efi_wrap_10): New function.
4433 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4435 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4436 MB/MBP model (NV chipset).
4437 (devdata_devs): Add devpath_5 to the list.
4439 * load/i386/efi/linux.c (video_base): Remove variable.
4440 (RGB_MASK): New macro.
4441 (RGB_MAGIC): Likewise.
4442 (LINE_MIN): Likewise.
4443 (LINE_MAX): Likewise.
4444 (FBTEST_STEP): Likewise.
4445 (FBTEST_COUNT): Likewise.
4446 (fb_list): New variable.
4447 (grub_find_video_card): Remove function.
4448 (find_framebuf): New function.
4449 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4452 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4455 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4457 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4459 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4462 2009-02-22 Robert Millan <rmh@aybabtu.com>
4464 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4465 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4466 in our relocation, instead of using it directly from heap. Also
4467 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4469 2009-02-21 Robert Millan <rmh@aybabtu.com>
4471 Implement USB keyboard support (based on patch by Marco Gerards)
4473 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4474 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4475 (usb_keyboard_mod_LDFLAGS): New variables.
4477 * term/usb_keyboard.c: New file.
4479 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4481 Corrected wrong declaration
4483 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4485 2009-02-14 Christian Franke <franke@computer.org>
4487 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4488 (grub_lspci_iter): Print class code and programming interface byte.
4490 2009-02-14 Christian Franke <franke@computer.org>
4492 * gendistlist.sh: Ignore `.svn' directories.
4494 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4496 * fs/fat.c: Add 2009 to Copyright line.
4498 2009-02-14 Christian Franke <franke@computer.org>
4500 * commands/hdparm.c: New file. Provides `hdparm' command
4501 which sends ATA commands via grub_disk_ata_pass_through ().
4503 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4505 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4506 and <grub/cpu/io.h> to include/grub/ata.h.
4507 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4508 (GRUB_CDROM_SECTOR_SIZE): Remove.
4509 (GRUB_ATA_*): Move to include/grub/ata.h.
4510 (GRUB_ATAPI_*): Likewise.
4511 (enum grub_ata_commands): Likewise.
4512 (enum grub_ata_timeout_milliseconds): Likewise.
4513 (struct grub_ata_device): Likewise.
4514 (grub_ata_regset): Likewise.
4515 (grub_ata_regget): Likewise.
4516 (grub_ata_regset2): Likewise.
4517 (grub_ata_regget2): Likewise.
4518 (grub_ata_check_ready): Likewise.
4519 (grub_ata_wait_not_busy): Remove static, exported in
4521 (grub_ata_wait_drq): Likewise.
4522 (grub_ata_pio_read): Likewise.
4524 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4525 function for hdparm.mod.
4527 * include/grub/ata.h: New file, contains declarations from
4529 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4531 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4532 (grub_disk_ata_pass_through): New exported variable.
4534 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4536 2009-02-13 Colin D Bennett <colin@gibibit.com>
4538 Support multiple fallback entries, and provide an API to support
4539 executing default+fallback menu entries. Renamed the `terminal' menu
4542 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4543 variable declaration.
4544 (grub_menu_execute_callback): New structure declaration.
4545 (grub_menu_execute_callback_t): New typedef.
4546 (grub_menu_execute_with_fallback): New function declaration.
4547 (grub_menu_get_entry): Likewise.
4548 (grub_menu_get_timeout): Likewise.
4549 (grub_menu_set_timeout): Likewise.
4551 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4553 * normal/menu.c (grub_wait_after_message): Moved to
4554 `normal/menu_text.c'.
4555 (draw_border): Likewise.
4556 (print_message): Likewise.
4557 (print_entry): Likewise.
4558 (print_entries): Likewise.
4559 (grub_menu_init_page): Likewise.
4560 (get_entry_number): Likewise.
4561 (print_timeout): Likewise.
4562 (run_menu): Likewise.
4563 (grub_menu_execute_entry): Likewise.
4564 (show_text_menu): Likewise.
4565 (get_and_remove_first_entry_number): New function.
4566 (grub_menu_execute_with_fallback): Likewise.
4567 (get_entry): Renamed to ...
4568 (grub_menu_get_entry): .. this and made it global.
4569 (get_timeout): Renamed to ...
4570 (grub_menu_get_timeout): ... this and made it global.
4571 (set_timeout): Renamed to ...
4572 (grub_menu_set_timeout): ... this and made it global.
4573 (grub_normal_terminal_menu_viewer): Renamed to ...
4574 (grub_normal_text_menu_viewer): ... this.
4576 * normal/menu_text.c: New file. Extracted text-menu-specific code
4579 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4580 (normal_mod_SOURCES): Likewise.
4582 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4583 (normal_mod_SOURCES): Likewise.
4585 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4586 (normal_mod_SOURCES): Likewise.
4588 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4589 (normal_mod_SOURCES): Likewise.
4591 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4592 (normal_mod_SOURCES): Likewise.
4594 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4595 (normal_mod_SOURCES): Likewise.
4597 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4598 (normal_mod_SOURCES): Likewise.
4600 2009-02-11 Robert Millan <rmh@aybabtu.com>
4602 * util/grub.d/00_header.in: Update old reference to `font' command.
4604 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4606 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4608 Based on patch from Javier MartÃn.
4610 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4612 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4613 to avoid false positives with FAT.
4614 (grub_fstest_SOURCES): Likewise.
4615 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4616 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4617 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4618 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4619 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4620 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4622 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4624 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4625 bpb.version_specific.fat12_or_fat16.fstype and
4626 bpb.version_specific.fat32.fstype.
4628 2009-02-08 Robert Millan <rmh@aybabtu.com>
4630 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4632 2009-02-08 Robert Millan <rmh@aybabtu.com>
4634 * Makefile.in (host_os, host_cpu): New variables.
4635 (target_os): Remove. Update all users.
4637 2009-02-08 Marco Gerards <marco@gnu.org>
4639 * Makefile.in (enable_grub_emu_usb): New variable.
4640 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4641 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4642 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4643 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4644 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4645 `usbtest.mod' and `usbms.mod'.
4646 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4647 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4648 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4649 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4650 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4653 * disk/usbms.c: New file.
4655 * include/grub/usb.h: Likewise.
4657 * include/grub/usbtrans.h: Likewise.
4659 * include/grub/usbdesc.h: Likewise.
4661 * bus/usb/usbtrans.c: Likewise.
4663 * bus/usb/ohci.c: Likewise.
4665 * bus/usb/uhci.c: Likewise.
4667 * bus/usb/usbhub.c: Likewise.
4669 * bus/usb/usb.c: Likewise.
4671 * commands/usbtest.c: Likewise.
4673 * util/usb.c: Likewise.
4675 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4677 * configure.ac: Test for libusb presence.
4679 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4681 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4683 * kern/mm.c: Add more comments.
4685 2009-02-08 Robert Millan <rmh@aybabtu.com>
4687 Patch from Javier MartÃn.
4688 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4689 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4691 2009-02-08 Robert Millan <rmh@aybabtu.com>
4693 * fs/cpio.c: Split tar functionality to ...
4694 * fs/tar.c: ... here (new file). Update all users.
4696 2009-02-07 Robert Millan <rmh@aybabtu.com>
4698 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4699 backward-incompatible features.
4701 Based on patch from Javier MartÃn, with some adjustments.
4703 2009-02-07 Michael Scherer <misc@mandriva.org>
4705 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4707 2009-02-07 Robert Millan <rmh@aybabtu.com>
4709 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4710 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4711 after the RAID stuff.
4713 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4715 Fixes problem when running vbetest command as reported by
4716 Vladimir Serbinenko <phcoder@gmail.com>.
4718 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4720 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4722 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4723 /dev/md/NpN style mdraid devices.
4725 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4727 * util/unifont2pff.rb: Remove.
4729 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4731 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4734 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4736 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4737 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4738 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4739 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4741 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4742 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4744 2009-02-02 Christian Franke <franke@computer.org>
4746 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4748 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4750 * INSTALL: Note that we now require at least autoconf 2.59 and
4751 that LZO is optional.
4753 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4755 Base on patch on bug #24154 created by Tomas Tintera
4758 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4760 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4762 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4763 <bero@arklinux.org>.
4765 * normal/parser.y (script_init): Add missing semicolon.
4767 2009-01-31 Colin D Bennett <colin@gibibit.com>
4769 * normal/main.c: Add include to grub/menu_viewer.h.
4770 (free_menu_entry_classes): Added.
4771 (grub_normal_menu_addentry): Added class property handling.
4772 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4773 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4775 * normal/menu_viewer.c: New file.
4777 * normal/menu.c (run_menu_entry): Renamed to ...
4778 (grub_menu_execute_entry): ... this and made it as global.
4779 (grub_menu_run): Renamed to ...
4780 (show_text_menu): ... this and made it local.
4781 (show_text_menu): Adapt to new function names.
4782 (grub_normal_terminal_menu_viewer): New global variable.
4784 * include/grub/menu.h: New file.
4786 * include/grub/menu_viewer.h: New file.
4788 * include/grub/normal.h: Added include to grub/menu.h.
4789 (grub_menu_entry): Moved to include/grub/menu.h.
4790 (grub_menu_entry_t): Likewise.
4791 (grub_menu): Likewise.
4792 (grub_menu_t): Likewise.
4793 (grub_normal_terminal_menu_viewer): Added.
4794 (grub_menu_execute_entry): Likewise.
4795 (grub_menu_run): Removed.
4797 * DISTLIST: Added include/grub/menu.h.
4798 Added include/grub/menu_viewer.h.
4799 Added normal/menu_viewer.c.
4801 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4803 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4804 arglist for menutitle arguments.
4806 * normal/main.c (grub_normal_menu_addentry): Likewise.
4808 * normal/parser.y (menuentry): Likewise.
4810 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4812 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4813 (grub_script_create_cmdmenu): Likewise.
4815 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4817 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4820 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4822 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4824 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4826 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4828 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4830 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4832 2009-01-30 Christian Franke <franke@computer.org>
4834 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4835 in option help text.
4837 2009-01-27 Pavel Roskin <proski@gnu.org>
4839 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4841 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4843 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4845 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4847 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4848 unregister function.
4850 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4852 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4854 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4856 * util/grub-mkfont.c (usage): Fix typo.
4858 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4860 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4862 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4864 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4866 * kern/misc.c (grub_strcasecmp): New function.
4867 (grub_strcasecmp): Use grub_size_t instead of int for length.
4869 * include/grub/misc.h: Update function prototypes.
4871 2009-01-26 Robert Millan <rmh@aybabtu.com>
4873 * configure.ac: Fix cross-compilation check.
4875 2009-01-22 Christian Franke <franke@computer.org>
4877 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4878 (precision) digit string. Allow `.format2' without `format1' (width).
4879 Limit input chars for `%s' output to `format2' if specified. This is
4880 compatible with standard printf ().
4882 2009-01-22 Christian Franke <franke@computer.org>
4884 * disk/ata.c (grub_ata_wait_status): Replace by ...
4885 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4886 other status bits may be invalid while BSY is asserted.
4887 (grub_ata_check_ready): New function.
4888 (grub_ata_cmd): Removed.
4889 (grub_ata_wait_drq): New function.
4890 (grub_ata_strncpy): Remove inline.
4891 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4892 and error check now done by grub_ata_wait_drq ().
4893 (grub_ata_pio_write): Likewise.
4894 (grub_atapi_identify): Set DEV before check for !BSY. Use
4895 grub_ata_wait_drq () to wait for data.
4896 (grub_ata_device_initialize): Add status register check to
4897 detect missing SATA slave devices. Add debug messages.
4898 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4899 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4900 transfer loop by grub_ata_pio_write ().
4901 (grub_ata_identify): Set DEV before check for !BSY. Use
4902 grub_ata_wait_drq () to wait for data.
4903 (grub_ata_setaddress): Set DEV before check for !BSY.
4904 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4905 read/write in one loop. Fix invalid command on write. Fix incomplete
4906 command on (size % batch) == 0. Add missing error check after write of
4907 last block. Add debug messages.
4908 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4910 2009-01-19 Christian Franke <franke@computer.org>
4912 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4913 (GRUB_ATAPI_IREASON_*): Likewise.
4914 (grub_ata_pio_write): Fix timeout error return.
4915 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4916 (grub_atapi_wait_drq): New function.
4917 (grub_atapi_packet): New parameter `size'.
4918 Use grub_atapi_wait_drq () and direct write instead of
4919 grub_ata_pio_write ().
4920 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4921 reads the number of bytes requested by the device for each DRQ
4923 (grub_atapi_write): Remove old implementation, return not
4924 implemented instead.
4926 2009-01-19 Christian Franke <franke@computer.org>
4928 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4929 of 512 to calculate data size.
4930 (grub_scsi_read12): Likewise.
4931 (grub_scsi_write10): Likewise.
4932 (grub_scsi_write12): Likewise.
4933 (grub_scsi_read): Adjust size according to blocksize.
4934 Add checks for invalid blocksize and unaligned transfer.
4936 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4938 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4940 * term/gfxterm.c (write_char): Fix background rendering for wide
4943 2009-01-19 Robert Millan <rmh@aybabtu.com>
4945 * config.guess: Update to latest version from config git.
4946 * config.sub: Likewise.
4948 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4950 * Makefile.in: Change font compilation to use new grub-mkfont instead
4953 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4954 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4955 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4956 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4957 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4958 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4959 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4960 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4961 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4963 2009-01-16 Christian Franke <franke@computer.org>
4965 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4966 (enum grub_ata_timeout_milliseconds): New enum.
4967 (grub_ata_wait_status): Add parameter milliseconds.
4968 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4969 recovery from timed-out commands.
4970 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4971 return grub_errno instead of REG_ERROR.
4972 (grub_ata_pio_write): Add parameter milliseconds.
4973 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4974 Pass milliseconds to grub_ata_wait_status () and
4975 grub_ata_pio_read ().
4976 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4977 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4978 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4979 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4980 It is not suitable for device detection, because DEV bit is ignored,
4981 the command may run too long, and not all devices set the signature
4983 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4984 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4985 Fix device selection, DEV bit must be set first to address the registers
4986 of the correct device.
4987 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4988 grub_ata_pio_read/write ().
4989 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4990 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4992 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4994 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4996 2009-01-13 Bean <bean123ch@gmail.com>
4998 * util/grub-mkfont.c (write_font): forget to remove some debug code.
5000 2009-01-13 Bean <bean123ch@gmail.com>
5002 * Makefile.in: (enable_grub_mkfont): New variable.
5003 (freetype_cflags): Likewise.
5004 (freetype_libs): Likewise.
5006 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5007 (grub_mkfont_SOURCES): New variable.
5008 (grub_mkfont_CFLAGS): Likewise.
5009 (grub_mkfont_LDFLAGS): Likewise.
5011 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5012 library if `--enable-grub-mkfont' is requested.
5013 (enable_grub_mkfont): New variable.
5014 (freetype_cflags): Likewise.
5015 (freetype_libs): Likewise.
5017 * util/grub-mkfont.c: New file.
5019 2009-01-12 Christian Franke <franke@computer.org>
5021 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5022 mode check. Fix setting of compat_use[].
5024 2009-01-10 Robert Millan <rmh@aybabtu.com>
5026 Update a few copyright years which we forgot to do in 2008 (only for
5027 files whose changes made in 2008 were copyright-significant)
5029 * Makefile.in: Add 2008 to Copyright line.
5030 * disk/ieee1275/ofdisk.c: Likewise.
5031 * disk/efi/efidisk.c: Likewise.
5032 * kern/dl.c: Likewise.
5033 * kern/sparc64/ieee1275/init.c: Likewise.
5034 * kern/mm.c: Likewise.
5035 * kern/efi/mm.c: Likewise.
5036 * boot/i386/pc/boot.S: Likewise.
5037 * genfslist.sh: Likewise.
5038 * fs/iso9660.c: Likewise.
5039 * fs/hfs.c: Likewise.
5040 * fs/jfs.c: Likewise.
5041 * fs/minix.c: Likewise.
5042 * fs/ufs.c: Likewise.
5043 * gensymlist.sh.in: Likewise.
5044 * genkernsyms.sh.in: Likewise.
5045 * include/grub/misc.h: Likewise.
5046 * include/grub/types.h: Likewise.
5047 * include/grub/symbol.h: Likewise.
5048 * include/grub/elf.h: Likewise.
5049 * include/grub/kernel.h: Likewise.
5050 * include/grub/disk.h: Likewise.
5051 * include/grub/dl.h: Likewise.
5052 * include/grub/i386/linux.h: Likewise.
5053 * include/grub/i386/pc/biosdisk.h: Likewise.
5054 * include/grub/efi/api.h: Likewise.
5055 * include/grub/efi/pe32.h: Likewise.
5056 * include/grub/util/misc.h: Likewise.
5057 * normal/execute.c: Likewise.
5058 * normal/arg.c: Likewise.
5059 * normal/completion.c: Likewise.
5060 * normal/lexer.c: Likewise.
5061 * normal/parser.y: Likewise.
5062 * normal/misc.c: Likewise.
5063 * commands/i386/pc/vbeinfo.c: Likewise.
5064 * commands/hexdump.c: Likewise.
5065 * commands/terminal.c: Likewise.
5066 * commands/ls.c: Likewise.
5067 * commands/help.c: Likewise.
5068 * partmap/pc.c: Likewise.
5069 * loader/efi/chainloader.c: Likewise.
5070 * loader/multiboot_loader.c: Likewise.
5071 * loader/i386/pc/multiboot2.c: Likewise.
5072 * term/efi/console.c: Likewise.
5073 * term/i386/pc/serial.c: Likewise.
5074 * util/lvm.c: Likewise.
5075 * util/console.c: Likewise.
5076 * util/i386/efi/grub-mkimage.c: Likewise.
5077 * util/raid.c: Likewise.
5079 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
5081 * commands/videotest.c: Removed include to grub/machine/memory.h.
5083 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
5084 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
5085 (video_mod_SOURCES): Removed.
5086 (video_mod_CFLAGS): Likewise.
5087 (video_mod_LDFLAGS): Likewise.
5088 (gfxterm_mod_SOURCES): Likewise.
5089 (gfxterm_mod_CFLAGS): Likewise.
5090 (gfxterm_mod_LDFLAGS): Likewise.
5091 (videotest_mod_SOURCES): Likewise.
5092 (videotest_mod_CFLAGS): Likewise.
5093 (videotest_mod_LDFLAGS): Likewise.
5094 (bitmap_mod_SOURCES): Likewise.
5095 (bitmap_mod_CFLAGS): Likewise.
5096 (bitmap_mod_LDFLAGS): Likewise.
5097 (tga_mod_SOURCES): Likewise.
5098 (tga_mod_CFLAGS): Likewise.
5099 (tga_mod_LDFLAGS): Likewise.
5100 (jpeg_mod_SOURCES): Likewise.
5101 (jpeg_mod_CFLAGS): Likewise.
5102 (jpeg_mod_LDFLAGS): Likewise.
5103 (png_mod_SOURCES): Likewise.
5104 (png_mod_CFLAGS): Likewise.
5105 (png_mod_LDFLAGS): Likewise.
5107 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
5108 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
5109 (video_mod_SOURCES): Added.
5110 (video_mod_CFLAGS): Likewise.
5111 (video_mod_LDFLAGS): Likewise.
5112 (videotest_mod_SOURCES): Likewise.
5113 (videotest_mod_CFLAGS): Likewise.
5114 (videotest_mod_LDFLAGS): Likewise.
5115 (bitmap_mod_SOURCES): Likewise.
5116 (bitmap_mod_CFLAGS): Likewise.
5117 (bitmap_mod_LDFLAGS): Likewise.
5118 (tga_mod_SOURCES): Likewise.
5119 (tga_mod_CFLAGS): Likewise.
5120 (tga_mod_LDFLAGS): Likewise.
5121 (jpeg_mod_SOURCES): Likewise.
5122 (jpeg_mod_CFLAGS): Likewise.
5123 (jpeg_mod_LDFLAGS): Likewise.
5124 (png_mod_SOURCES): Likewise.
5125 (png_mod_CFLAGS): Likewise.
5126 (png_mod_LDFLAGS): Likewise.
5127 (gfxterm_mod_SOURCES): Likewise.
5128 (gfxterm_mod_CFLAGS): Likewise.
5129 (gfxterm_mod_LDFLAGS): Likewise.
5131 * term/gfxterm.c: Removed include to grub/machine/memory.h,
5132 grub/machine/console.h.
5134 2009-01-04 Jerone Young <jerone@gmail.com>
5136 Make on screen instructions clearer
5138 Based on patch created by Jidanni <jidanni@jidanni.org>
5140 * normal/menu.c: print clearer instructions on the screen
5142 2009-01-02 Colin D Bennett <colin@gibibit.com>
5146 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
5147 build system and fixed gfxterm.c to work with different sized fonts.
5149 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
5151 * configure: Re-generated.
5153 * DISTLIST: Removed font/manager.c.
5155 Added font/font_cmd.c.
5157 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
5160 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
5162 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
5164 * kern/term.c: Changed users of grub_utf8_to_ucs4.
5166 * normal/menu.c: Likewise.
5168 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
5169 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
5171 * include/grub/font.h: Replaced with new file.
5173 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
5174 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
5175 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
5176 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
5177 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
5178 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
5179 fg_red, fg_green, fg_blue, fg_alpha.
5180 (grub_video_adapter): Removed blit_glyph.
5181 (grub_video_blit_glyph): Removed.
5183 * font/manager.c: Removed file.
5185 * font/font.c: New file.
5187 * font/font_cmd.c: Likewise.
5189 * video/video.c (grub_video_blit_glyph): Removed.
5191 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
5192 (grub_video_vbe_map_rgba): Likewise.
5193 (grub_video_vbe_unmap_color_int): Likewise.
5194 (grub_video_vbe_blit_glyph): Removed.
5195 (grub_video_vbe_adapter): Removed blit_glyph.
5197 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
5198 (get_pixel): Likewise.
5199 (set_pixel): Likewise.
5201 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
5203 * term/gfxterm.c: Adapted to new font engine.
5205 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
5207 * term/i386/pc/vga.c: Likewise.
5209 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
5211 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5213 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5215 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5217 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5219 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5221 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5223 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5225 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5227 * util/grub.d/00_header.in: Changed to use new loadfont command.
5229 * util/grub-mkconfig_lib.in: Changed font extension.
5231 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
5233 * util/getroot.c (grub_util_get_grub_dev): Add support for
5234 /dev/md/dNNpNN style partitionable mdraid devices.
5236 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
5238 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
5239 at a time limit of the PXE TFTP API correctly.
5240 (grub_pxefs_close): Likewise.
5242 2008-11-29 Robert Millan <rmh@aybabtu.com>
5244 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
5245 grub_ata_device_initialize() calls.
5247 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
5249 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
5251 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
5253 2008-11-28 Robert Millan <rmh@aybabtu.com>
5255 Fix build on powerpc-ieee1275. Based on patch created by
5256 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
5257 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5258 `kern/ieee1275/mmap.c'.
5259 * include/grub/powerpc/ieee1275/memory.h: New file.
5261 Provide grub-install on coreboot.
5262 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
5263 (grub_install_SOURCES): New variable.
5264 * util/i386/pc/grub-install.in: Add a few condition checks to make it
5267 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
5269 * util/grub-fstest.c (grub_term_get_current_input): Change return type
5270 to `grub_term_input_t'.
5271 (grub_term_get_current_output): Change return type to
5272 `grub_term_output_t'.
5274 2008-11-22 Robert Millan <rmh@aybabtu.com>
5276 Fix breakage on coreboot due to declaration mismatch.
5277 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
5278 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
5279 grub_vga_text_cls().
5281 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
5282 comments. Avoid copying one more byte than necessary (just in case).
5284 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
5285 to 0x200000 (avoids trouble with some OFW implementations, and matches
5286 with the one in Yaboot).
5287 Reported by Manoel Abranches
5289 2008-11-20 Robert Millan <rmh@aybabtu.com>
5291 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
5292 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
5294 * util/grub-mkconfig_lib.in (grub_warn): New function.
5295 (convert_system_path_to_grub_path): Use grub_warn() when issuing
5296 warnings, to obtain consistent formatting.
5297 * util/grub.d/00_header.in: Likewise.
5298 * util/update-grub_lib.in: Likewise.
5300 * loader/i386/linux.c (allocate_pages): Fix a warning.
5301 Move comment text to `#error' stanza.
5303 Harmonize ieee1275's grub_available_iterate() with the generic
5304 grub_machine_mmap_iterate() interface (fixes a recently-introduced
5305 build problem on i386-ieee1275):
5306 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
5307 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
5308 parameter `type'. Update all users of this function.
5309 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5310 `kern/ieee1275/mmap.c'.
5311 * kern/ieee1275/init.c
5312 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
5314 (grub_machine_mmap_iterate): ... this.
5315 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
5316 return type to `grub_err_t'. Update all implementations of this
5318 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
5321 Add `lsmmap' command (lists firmware-provided memory map):
5322 * commands/lsmmap.c: New file.
5323 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
5324 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
5326 * conf/powerpc-ieee1275.rmk: Likewise.
5327 * conf/i386-coreboot.rmk: Likewise.
5328 * conf/i386-ieee1275.rmk: Likewise.
5330 2008-11-19 Robert Millan <rmh@aybabtu.com>
5332 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
5333 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5334 constraints to initrd allocation (based on code from
5335 loader/i386/pc/linux.c). Without them, initrd was allocated too high
5336 for Linux to find it.
5338 2008-11-14 Robert Millan <rmh@aybabtu.com>
5340 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5341 order to cope with duplicate slashes.
5343 2008-11-14 Robert Millan <rmh@aybabtu.com>
5345 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5346 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
5347 don't want to mess with lower memory, because it is used in the Linux
5350 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
5351 an appropriate place in lower memory, between 0x10000 and 0x90000,
5352 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
5353 is in our heap (probably as a result of it being corrupted during
5354 decompression). Add #error instance with comment to explain why this
5355 loader isn't currently usable on PC/BIOS.
5357 2008-11-14 Robert Millan <rmh@aybabtu.com>
5359 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
5360 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
5362 2008-11-12 Robert Millan <rmh@aybabtu.com>
5364 Make loader/i386/linux.c buildable on i386-pc (although disabled).
5366 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5367 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5369 * include/grub/i386/pc/memory.h: ... to here.
5371 2008-11-12 Robert Millan <rmh@aybabtu.com>
5373 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5376 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5377 (grub_console_cur_color, grub_console_real_putchar)
5378 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5379 (grub_console_setcolorstate, grub_console_setcolor)
5380 (grub_console_getcolor): Move from here ...
5381 * include/grub/i386/vga_common.h: ... to here (new file).
5383 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5384 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5386 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5387 `<grub/i386/vga_common.h>'.
5389 2008-11-12 Robert Millan <rmh@aybabtu.com>
5391 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5392 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5393 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5395 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5396 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5398 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5399 grub_console_init() with call to grub_vga_text_init().
5400 (grub_machine_fini): Replace call to
5401 grub_console_fini() with call to grub_vga_text_fini() and
5402 grub_at_keyboard_fini().
5404 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5405 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5406 (grub_console_setcolorstate, grub_console_setcolor)
5407 (grub_console_getcolor): New function prototypes.
5409 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5410 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5411 (grub_vga_text_setcursor): Static-ize.
5412 (grub_vga_text_term): New structure.
5413 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5415 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5416 (grub_console_cur_color, grub_console_standard_color)
5417 (grub_console_normal_color, grub_console_highlight_color)
5418 (map_char, grub_console_putchar, grub_console_getcharwidth)
5419 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5420 (grub_console_getcolor): Move from here ...
5421 * term/i386/vga_common.c: ... to here (same function names).
5423 2008-11-12 Robert Millan <rmh@aybabtu.com>
5425 Use newly-added Multiboot support in coreboot.
5427 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5428 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5430 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5431 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5432 (codestart): Store the MBI in `startup_multiboot_info' when we're
5433 being loaded using Multiboot.
5435 * kern/i386/coreboot/init.c (grub_machine_init): Move
5436 grub_at_keyboard_init() call to beginning of function (useful for
5437 debugging). Call grub_machine_mmap_init() before attempting to use
5438 grub_machine_mmap_iterate().
5439 (grub_lower_mem, grub_upper_mem): Move from here ...
5440 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5443 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5446 2008-11-12 Robert Millan <rmh@aybabtu.com>
5448 Fix a regression introduced by the at_keyboard.mod split. Because
5449 some terminals are default on some platforms and non-default on
5450 others, the first terminal being registered determines which is
5451 going to be default.
5453 * kern/term.c (grub_term_register_input): If this is the first
5454 terminal being registered, set it as the current one.
5455 (grub_term_register_output): Likewise.
5457 * term/efi/console.c (grub_console_init): Do not call
5458 grub_term_set_current_output() or grub_term_set_current_input().
5459 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5460 * term/i386/pc/console.c (grub_console_init): Likewise.
5461 (grub_console_fini): Do not call grub_term_set_current_input()
5462 (but leave grub_term_set_current_output() to restore text mode).
5464 2008-11-10 Robert Millan <rmh@aybabtu.com>
5466 * util/grub.d/00_header.in: Add backward compatibility check for
5467 versions of terminal.mod that don't understand `terminal_input' or
5470 2008-11-09 Robert Millan <rmh@aybabtu.com>
5472 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5473 `terminal_input' / `terminal_output', not `terminal'.
5475 2008-11-08 Robert Millan <rmh@aybabtu.com>
5477 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5478 (DISTCLEANFILES): Add `build_env.mk'.
5480 2008-11-08 Robert Millan <rmh@aybabtu.com>
5482 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5483 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5484 members. Update all users.
5485 * util/console.c (grub_ncurses_term): Split in ...
5486 (grub_ncurses_term_input): ... this, and ...
5487 (grub_ncurses_term_output): ... this. Update all users.
5488 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5490 2008-11-08 Robert Millan <rmh@aybabtu.com>
5492 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5493 (PKGDATA): Add $(pkgdata_SRCDIR).
5494 (pkglib_BUILDDIR): New variable.
5495 (pkgdata_SRCDIR): New variable.
5496 (build_env.mk): New target.
5497 (include_DATA): New variable.
5498 (install-local): Install $(include_DATA) files in $(includedir).
5500 2008-11-07 Pavel Roskin <proski@gnu.org>
5502 * gendistlist.sh: Use C locale for sorting to ensure consistent
5503 output on all systems.
5505 * util/grub.d/00_header.in: Remove incorrect space before
5508 2008-11-07 Robert Millan <rmh@aybabtu.com>
5510 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5512 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5513 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5514 (based on find_multi_boot1_header).
5515 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5516 using find_multi_boot2_header(), and abort if neither Multiboot or
5517 Multiboot headers were found.
5519 2008-11-07 Robert Millan <rmh@aybabtu.com>
5521 Modularize at_keyboard.mod:
5523 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5524 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5525 (at_keyboard_mod_LDFLAGS): New variables.
5527 Actual terminal split:
5529 * include/grub/term.h (struct grub_term): Split in ...
5530 (struct grub_term_input): ... this, and ...
5531 (struct grub_term_output): ... this. Update all users.
5532 (grub_term_set_current): Split in ...
5533 (grub_term_set_current_input): ... this, and ...
5534 (grub_term_set_current_output): ... this.
5535 (grub_term_get_current): Split in ...
5536 (grub_term_get_current_input): ... this, and ...
5537 (grub_term_get_current_output): ... this.
5538 (grub_term_register): Split in ...
5539 (grub_term_register_input): ... this, and ...
5540 (grub_term_register_output): ... this.
5541 (grub_term_unregister): Split in ...
5542 (grub_term_unregister_input): ... this, and ...
5543 (grub_term_unregister_output): ... this.
5544 (grub_term_iterate): Split in ...
5545 (grub_term_iterate_input): ... this, and ...
5546 (grub_term_iterate_output): ... this.
5548 * kern/term.c (grub_term_list): Split in ...
5549 (grub_term_list_input): ... this, and ...
5550 (grub_term_list_output): ... this. Update all users.
5551 (grub_cur_term): Split in ...
5552 (grub_cur_term_input): ... this, and ...
5553 (grub_cur_term_output): ... this. Update all users.
5554 (grub_term_set_current): Split in ...
5555 (grub_term_set_current_input): ... this, and ...
5556 (grub_term_set_current_output): ... this.
5557 (grub_term_get_current): Split in ...
5558 (grub_term_get_current_input): ... this, and ...
5559 (grub_term_get_current_output): ... this.
5560 (grub_term_register): Split in ...
5561 (grub_term_register_input): ... this, and ...
5562 (grub_term_register_output): ... this.
5563 (grub_term_unregister): Split in ...
5564 (grub_term_unregister_input): ... this, and ...
5565 (grub_term_unregister_output): ... this.
5566 (grub_term_iterate): Split in ...
5567 (grub_term_iterate_input): ... this, and ...
5568 (grub_term_iterate_output): ... this.
5570 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5571 a check for input and one for output (and only attempt to get keys
5572 from user when input works).
5574 * util/grub-probe.c (grub_term_get_current): Split in ...
5575 (grub_term_get_current_input): ... this, and ...
5576 (grub_term_get_current_output): ... this.
5577 * util/grub-fstest.c: Likewise.
5578 * util/i386/pc/grub-setup.c: Likewise.
5579 * util/grub-editenv.c: Likewise.
5581 Portability adjustments:
5583 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5584 `term/i386/pc/at_keyboard.c'.
5585 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5586 grub_keyboard_controller_init() (now handled by terminal .init).
5587 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5588 grub_at_keyboard_init().
5589 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5590 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5591 at_keyboard.mod via input terminal interface).
5592 * include/grub/i386/coreboot/console.h: Convert into a stub for
5593 `<grub/i386/pc/console.h>'.
5595 Migrate full terminals to new API:
5597 * term/efi/console.c (grub_console_term): Split into ...
5598 (grub_console_term_input): ... this, and ...
5599 (grub_console_term_output): ... this. Update all users.
5600 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5601 (grub_ofconsole_init): Split into ...
5602 (grub_ofconsole_init_input): ... this, and ...
5603 (grub_ofconsole_init_output): ... this.
5604 (grub_ofconsole_term): Split into ...
5605 (grub_ofconsole_term_input): ... this, and ...
5606 (grub_ofconsole_term_output): ... this. Update all users.
5607 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5608 (grub_serial_term_input): ... this, and ...
5609 (grub_serial_term_output): ... this. Update all users.
5610 * term/i386/pc/console.c (grub_console_term): Split into ...
5611 (grub_console_term_input): ... this, and ...
5612 (grub_console_term_output): ... this. Update all users.
5613 (grub_console_term_input): Only enable it on PC/BIOS platform.
5614 (grub_console_init): Remove grub_keyboard_controller_init() call.
5616 Migrate input terminals to new API:
5618 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5619 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5620 i386-specific anyway).
5621 (grub_console_checkkey): Rename to ...
5622 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5624 (grub_keyboard_controller_orig): New variable.
5625 (grub_console_getkey): Rename to ...
5626 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5628 (grub_keyboard_controller_init): Static-ize. Save original
5629 controller value so that it can be restored ...
5630 (grub_keyboard_controller_fini): ... here (new function).
5631 (grub_at_keyboard_term): New structure.
5632 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5635 Migrate output terminals to new API:
5637 * term/i386/pc/vga.c (grub_vga_term): Change type to
5638 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5639 members. Update all users.
5640 * term/gfxterm.c (grub_video_term): Change type to
5641 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5642 members. Update all users.
5643 * include/grub/i386/pc/console.h (grub_console_checkkey)
5644 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5647 Migrate `terminal' command and userland tools to new API:
5649 * commands/terminal.c (grub_cmd_terminal): Split into ...
5650 (grub_cmd_terminal_input): ... this, and ...
5651 (grub_cmd_terminal_output): ... this.
5652 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5653 `terminal_input' and `terminal_output'.
5654 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5655 `terminal_input' / `terminal_output' API.
5656 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5657 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5658 provided ${GRUB_TERMINAL}, convert it).
5660 2008-11-04 Robert Millan <rmh@aybabtu.com>
5662 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5664 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5666 2008-11-03 Bean <bean123ch@gmail.com>
5668 * kern/elf.c (grub_elf32_load): Revert to previous code.
5669 (grub_elf64_load): Likewise.
5671 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5673 2008-11-01 Robert Millan <rmh@aybabtu.com>
5675 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5676 (TARGET_CPPFLAGS): Likewise.
5677 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5679 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5681 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5683 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5685 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5686 addition of objects until the code is not going to be able to fail.
5688 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5690 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5691 (add a missing NULL check, and correct them by moving the pointer
5692 operations after the actual check).
5694 2008-10-29 Robert Millan <rmh@aybabtu.com>
5696 * util/i386/pc/grub-install.in: Handle empty string as output from
5697 make_system_path_relative_to_its_root().
5699 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5701 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5702 circular metadata worst case scenario. If the metadata is circular
5703 then copy the wrap in place.
5704 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5705 project lib/format_text/layout.h
5706 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5708 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5710 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5712 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5714 * util/update-grub_lib.in: Mention filename in warning message.
5716 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5718 * NEWS: Update for rename of update-grub to grub-mkconfig.
5720 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5722 * util/update-grub_lib.in: Copy to ...
5723 * util/grub-mkconfig_lib.in: ... this. Update all users.
5724 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5725 * util/update-grub.in: Rename to ...
5726 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5727 option. Add `--output' option to allow users to specify the generated
5728 configuration file. Default to stdout.
5729 (update_grub_dir): Rename to ...
5730 (grub_mkconfig_dir): ... this.
5731 (grub_cfg): Default to an empty string.
5732 * conf/common.rmk (update-grub): Rename to ...
5733 (grub-mkconfig): ... this.
5734 (update-grub_lib): Copy to ...
5735 (grub-mkconfig_lib): ... this.
5736 (update-grub_SCRIPTS): Copy to ...
5737 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5738 (update-grub_DATA): Rename to ...
5739 (grub-mkconfig_DATA): ... this.
5741 2008-09-28 Robert Millan <rmh@aybabtu.com>
5743 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5744 to `modified'. Add the real `created' field.
5745 (grub_iso9660_uuid): Use `modified' rather than `created' for
5746 constructing the UUID.
5748 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5750 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5751 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5753 2008-09-28 Bean <bean123ch@gmail.com>
5755 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5756 Thanks to Christian Franke for finding this bug.
5758 2008-09-25 Robert Millan <rmh@aybabtu.com>
5760 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5761 instances of grub_util_get_disk_name() (see previous commit).
5763 2008-09-25 Robert Millan <rmh@aybabtu.com>
5765 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5766 `util/i386/get_disk_name.c'.
5767 * conf/i386-efi.rmk: Likewise.
5768 * conf/x86_64-efi.rmk: Likewise.
5769 * conf/i386-coreboot.rmk: Likewise.
5770 * conf/i386-ieee1275.rmk: Likewise.
5771 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5772 `util/ieee1275/get_disk_name.c'.
5773 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5774 * util/ieee1275/get_disk_name.c: Remove file.
5775 * util/i386/get_disk_name.c: Remove file.
5776 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5777 "hd%d" for device.map entries, rather than using
5778 grub_util_get_disk_name().
5780 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5782 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5784 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5786 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5788 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5790 (GRUB_TERM_PPAGE): Changed to 0x4900.
5792 2008-09-24 Robert Millan <rmh@aybabtu.com>
5794 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5795 macros (they were i386-pc specific).
5796 * include/grub/sparc64/ieee1275/console.h: Likewise.
5797 * include/grub/efi/console.h: Likewise.
5799 2008-09-22 Bean <bean123ch@gmail.com>
5801 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5802 resident and in attribute list.
5804 * include/grub/ntfs.h (BMP_LEN): Removed.
5806 2008-09-22 Bean <bean123ch@gmail.com>
5808 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5809 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5811 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5812 error occurs, as grub_disk_open will call grub_disk_close, which will
5813 call p->close (scsi).
5815 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5817 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5818 (AC_PREREQ): Bumped to 2.59.
5819 (AC_TRY_COMPILE): Replace obsolete macro with ...
5820 (AC_COMPILE_IFELSE): ... this.
5821 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5822 (AC_LINK_IFELSE): ... this.
5824 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5826 * autogen.sh: Add a call to `gendistlist.sh'.
5828 2008-09-19 Christian Franke <franke@computer.org>
5830 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5831 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5832 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5833 Export __enable_execute_stack() to modules.
5834 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5837 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5839 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5842 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5844 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5845 #include <grub/util/hostdisk.h>.
5847 2008-09-08 Robert Millan <rmh@aybabtu.com>
5849 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5850 segments when their filesz is zero (grub_file_read() interprets
5851 zero-size as "read until EOF", which results in memory corruption).
5852 Use `lowest_segment' rather than 0 for calculating the current
5853 segment load address.
5855 2008-09-08 Robert Millan <rmh@aybabtu.com>
5857 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5858 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5859 clobbered useful information.
5861 2008-09-08 Robert Millan <rmh@aybabtu.com>
5863 * include/grub/util/biosdisk.h: Move to ...
5864 * include/grub/util/hostdisk.h: ... here. Update all users.
5865 * util/biosdisk.c: Move to ...
5866 * util/hostdisk.c: ... here. Update all users.
5868 2008-09-07 Robert Millan <rmh@aybabtu.com>
5870 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5872 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5873 and length can be stored directly in the `mbi->mmap_addr' and
5874 `mbi->mmap_length' struct fields.
5876 2008-09-07 Robert Millan <rmh@aybabtu.com>
5878 * conf/i386.rmk: New file. Provides declaration for building
5880 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5881 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5883 Include `conf/i386.mk'.
5884 * conf/i386-efi.rmk: Likewise.
5885 * conf/x86_64-efi.rmk: Likewise.
5886 * conf/i386-coreboot.rmk: Likewise.
5887 * conf/i386-ieee1275.rmk: Likewise.
5889 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5891 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5892 Adds optimization support for BGR based modes.
5894 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5895 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5896 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5897 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5898 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5899 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5900 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5901 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5902 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5903 (grub_video_i386_vbeblit_index_index): Likewise.
5904 (grub_video_i386_vbeblit_replace_directN): Added.
5905 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5906 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5907 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5908 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5909 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5910 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5911 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5912 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5913 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5914 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5915 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5916 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5917 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5919 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5920 (grub_video_i386_vbefill_R8G8B8): Likewise.
5921 (grub_video_i386_vbefill_index): Likewise.
5922 (grub_video_i386_vbefill_direct32): Added.
5923 (grub_video_i386_vbefill_direct24): Likewise.
5924 (grub_video_i386_vbefill_direct16): Likewise.
5925 (grub_video_i386_vbefill_direct8): Likewise.
5927 * include/grub/video.h (grub_video_blit_format): Removed
5928 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5929 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5930 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5931 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5932 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5934 * video/video.c (grub_video_get_blit_format): Updated to use new
5935 blit formats. Added handling for 16 bit color modes.
5937 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5939 (common_blitter): Updated to use new blitters.
5941 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5943 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5944 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5945 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5946 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5947 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5948 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5949 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5950 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5951 (grub_video_i386_vbeblit_index_index): Likewise.
5952 (grub_video_i386_vbeblit_replace_directN): Added.
5953 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5954 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5955 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5956 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5957 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5958 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5959 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5960 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5961 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5962 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5963 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5964 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5965 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5967 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5968 (grub_video_i386_vbefill_R8G8B8): Likewise.
5969 (grub_video_i386_vbefill_index): Likewise.
5970 (grub_video_i386_vbefill_direct32): Added.
5971 (grub_video_i386_vbefill_direct24): Likewise.
5972 (grub_video_i386_vbefill_direct16): Likewise.
5973 (grub_video_i386_vbefill_direct8): Likewise.
5975 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5978 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5981 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5984 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5987 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5989 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5992 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5994 * fs/iso9660.c (grub_iso9660_date): New structure.
5995 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5996 (grub_iso9660_uuid): New function.
5998 2008-09-05 Bean <bean123ch@gmail.com>
6000 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6002 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6003 insensitive bit for names in Win32 and Win32 & DOS namespace.
6005 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6007 * include/grub/types.h (LONG_MAX): Likewise.
6009 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6011 * util/getroot.c: Include <config.h>.
6012 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6013 add support for /dev/md/N devices and handle LVM double dash escaping.
6015 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6017 * config.guess: Update to latest version from config git.
6018 * config.sub: Likewise.
6020 2008-09-03 Robert Millan <rmh@aybabtu.com>
6022 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6023 `disk->total_sectors'.
6025 2008-09-01 Colin D Bennett <colin@gibibit.com>
6027 * include/grub/normal.h: Fixed incorrect comment for
6028 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6030 2008-09-01 Colin D Bennett <colin@gibibit.com>
6032 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6033 values with defines.
6035 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6036 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6037 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6038 (GRUB_VBE_MODEATTR_COLOR): Likewise.
6039 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6040 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6041 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6042 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6043 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6044 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6045 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6046 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6047 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6048 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6049 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6050 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6051 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6052 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6053 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6055 2008-08-31 Robert Millan <rmh@aybabtu.com>
6057 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6059 (grub_multiboot): Fix a few warnings.
6061 2008-08-31 Robert Millan <rmh@aybabtu.com>
6063 * loader/i386/pc/multiboot.c: Update comment not to say that
6064 boot_device support is unimplemented.
6066 2008-08-31 Robert Millan <rmh@aybabtu.com>
6068 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
6069 or memory map support are unimplemented.
6071 2008-08-31 Colin D Bennett <colin@gibibit.com>
6073 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
6075 2008-08-31 Colin D Bennett <colin@gibibit.com>
6077 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
6078 total video memory in 'vbeinfo' output; show color format details for
6081 2008-08-30 Pavel Roskin <proski@gnu.org>
6083 * util/genmoddep.c: Remove for real this time.
6084 * DISTLIST: Remove util/genmoddep.c.
6086 2008-08-30 Robert Millan <rmh@aybabtu.com>
6088 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
6089 as required by Multiboot spec (it was already 4-byte aligned, but
6092 2008-08-29 Pavel Roskin <proski@gnu.org>
6094 * kern/powerpc/ieee1275/crt0.S: Rename to ...
6095 * kern/powerpc/ieee1275/startup.S: ... this.
6096 * conf/powerpc-ieee1275.rmk: Adjust for the above.
6097 * DISTLIST: Likewise.
6099 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
6100 grub/cpu/kernel.h. Add start label for consistency with other
6101 platforms. Add grub_prefix immediately after start. Add jump
6102 to the code after grub_prefix.
6103 * include/grub/powerpc/kernel.h: Provide valid values for
6104 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
6106 2008-08-29 Bean <bean123ch@gmail.com>
6108 * configure.ac: Change host_os to cygwin for mingw.
6109 (asprintf): New check for function.
6111 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
6112 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
6114 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
6115 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6116 sync, sleep and grub_util_get_disk_size for mingw.
6118 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
6119 to get size in mingw.
6120 (open_device): Use flag O_BINARY if it's defined.
6121 (find_root_device): Add dummy code for mingw.
6123 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
6124 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
6125 (get_scsi_disk_name): Return 0 for mingw.
6127 * util/hostfs.c: #include <grub/util/misc.h>.
6128 (grub_hostfs_open): Use "rb" flag to open file, use
6129 grub_util_get_disk_size to get disk size for mingw.
6131 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
6132 (asprintf): New function if HAVE_ASPRINTF is not set.
6133 (sync): New function for mingw.
6135 (grub_util_get_disk_size): Likewise.
6137 2008-08-28 Pavel Roskin <proski@gnu.org>
6139 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6142 2008-08-28 Robert Millan <rmh@aybabtu.com>
6144 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
6146 2008-08-28 Robert Millan <rmh@aybabtu.com>
6148 Change find_grub_drive() syntax so it doesn't prevent it from
6149 detecting NULL names as errors.
6151 * util/biosdisk.c (find_grub_drive): Move free slot search code
6153 (find_free_slot): ... to here.
6154 (read_device_map): Use find_free_slot() to search for free slots.
6156 2008-08-27 Marco Gerards <marco@gnu.org>
6158 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
6159 (scsi_mod_SOURCES): New variable.
6160 (scsi_mod_CFLAGS): Likewise
6161 (scsi_mod_LDFLAGS): Likewise.
6163 * disk/scsi.c: New file.
6165 * include/grub/scsi.h: Likewise.
6167 * include/grub/scsicmd.h: Likewise.
6169 * disk/ata.c: Include <grub/scsi.h>.
6170 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
6172 (grub_ata_iterate): Skip ATAPI devices.
6173 (grub_ata_open): Only handle ATAPI devices.
6174 (struct grub_atapi_read): Removed.
6175 (grub_atapi_readsector): Likewise.
6176 (grub_ata_read): No longer handle ATAPI devices.
6177 (grub_ata_write): Likewise.
6178 (grub_atapi_iterate): New function.
6179 (grub_atapi_read): Likewise.
6180 (grub_atapi_write): Likewise.
6181 (grub_atapi_open): Likewise.
6182 (grub_atapi_close): Likewise.
6183 (grub_atapi_dev): New variable.
6184 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
6185 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
6187 * include/grub/disk.h (enum grub_disk_dev_id): Add
6188 `GRUB_DISK_DEVICE_SCSI_ID'.
6190 2008-08-26 Robert Millan <rmh@aybabtu.com>
6192 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
6193 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
6196 2008-08-23 Bean <bean123ch@gmail.com>
6198 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
6199 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6200 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
6201 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
6203 (raid5rec_mod_SOURCES): New macro.
6204 (raid5rec_mod_CFLAGS): Likewise.
6205 (raid5rec_mod_LDFLAGS): Likewise.
6206 (raid6rec_mod_SOURCES): Likewise.
6207 (raid6rec_mod_CFLAGS): Likewise.
6208 (raid6rec_mod_LDFLAGS): Likewise.
6209 (mdraid_mod_SOURCES): Likewise.
6210 (mdraid_mod_CFLAGS): Likewise.
6211 (mdraid_mod_LDFLAGS): Likewise.
6212 (dm_nv_mod_SOURCES): Likewise.
6213 (dm_nv_mod_CFLAGS): Likewise.
6214 (dm_nv_mod_LDFLAGS): Likewise.
6216 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
6217 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6218 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6220 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
6221 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6223 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6225 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6227 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6231 * disk/raid5_recover.c: New file.
6233 * disk/raid6_recover.c: Likewise.
6235 * disk/mdraid_linux.c: Likewise.
6237 * disk/dmraid_nvidia.c: Likewise.
6239 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
6242 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
6243 calculate the size of raid device.
6244 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
6245 different layout of raid5.
6246 (grub_raid_scan_device): Remove code specific to mdraid.
6247 (grub_raid_list): New variable.
6248 (free_array): New function.
6249 (grub_raid_register): Likewise.
6250 (grub_raid_unregister): Likewise.
6251 (grub_raid_rescan): Likewise.
6252 (GRUB_MOD_INIT): Don't iterate device here.
6253 (GRUB_MOD_FINI): Use free_array to release resource.
6255 * include/grub/raid.h: Remove macro and structure specific to mdraid.
6256 (grub_raid5_recover_func_t): New function variable type.
6257 (grub_raid6_recover_func_t): Likewise.
6258 (grub_raid5_recover_func): New variable.
6259 (grub_raid6_recover_func): Likewise.
6260 (grub_raid_register): New function.
6261 (grub_raid_unregister): Likewise.
6262 (grub_raid_rescan): Likewise.
6263 (grub_raid_block_xor): Likewise.
6265 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
6266 (CMD_CRC): New macro.
6268 (read_file): Handle device as well as file.
6269 (cmd_crc): New function.
6270 (fstest): Handle multiple disks.
6271 (options): Remove part, raw and long, add root and diskcount.
6272 (usage): Add crc, remove -p, -r, -l, add -r and -c.
6273 (main): Find the first non option entry and ignore subsequent options,
6274 add handling for the new options, support multiple disks.
6276 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
6278 2008-08-23 Bean <bean123ch@gmail.com>
6280 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
6282 * genfslist.sh: Ignore kernel.mod.
6284 * genpartmaplist.sh: Likewise.
6286 2008-08-23 Robert Millan <rmh@aybabtu.com>
6288 * util/getroot.c (find_root_device): Skip anything that starts with
6289 a dot, not just directories. This avoids things like /dev/.tmp.md0.
6291 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
6293 * util/update-grub.in (GRUB_GFXMODE): Export variable.
6294 * util/grub.d/00_header.in: Allow the administrator to change default
6295 gfxmode via ${GRUB_GFXMODE}.
6297 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
6299 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
6301 2008-08-21 Robert Millan <rmh@aybabtu.com>
6303 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
6305 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
6306 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
6308 2008-08-20 Carles Pina i Estany <carles@pina.cat>
6310 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
6311 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
6313 2008-08-19 Robert Millan <rmh@aybabtu.com>
6315 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
6316 (struct grub_virtual_screen): Remove `cursor_color'.
6317 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
6319 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
6321 2008-08-18 Robert Millan <rmh@aybabtu.com>
6323 Unify (identical) linux_normal.c files.
6324 * loader/i386/efi/linux_normal.c: Move from here ...
6325 * loader/linux_normal.c: ... to here. Update all users.
6326 * loader/i386/pc/linux_normal.c: Delete. Update all users.
6327 * loader/i386/ieee1275/linux_normal.c: Likewise.
6329 2008-08-18 Robert Millan <rmh@aybabtu.com>
6331 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
6332 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
6333 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
6334 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
6335 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
6337 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6338 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6339 (GRUB_LINUX_CL_END_OFFSET): ... to here.
6340 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6341 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
6342 (GRUB_EFI_CL_END_OFFSET): Rename to ...
6343 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
6344 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6345 Initialize `params->video_cursor_x' and `params->video_cursor_y'
6346 portably using grub_getxy().
6347 Replace `-EFI' with `-bzImage' in boot message.
6349 2008-08-17 Robert Millan <rmh@aybabtu.com>
6351 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6353 2008-08-17 Robert Millan <rmh@aybabtu.com>
6355 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6357 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6358 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6359 (grub_machine_mmap_iterate): New function declaration.
6360 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6362 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6365 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6366 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6367 Move e820 parsing from here ...
6368 * kern/i386/pc/mmap.c: New file.
6369 (grub_machine_mmap_iterate): ... to here.
6371 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6372 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6373 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
6374 (grub_available_iterate): Redeclare to return `void', and redeclare
6375 its hook to use grub_uint64_t as addr and size parameters, and rename
6377 (grub_machine_mmap_iterate): ... this. Update all users.
6379 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6380 to make it more readable. Rename to ...
6381 (grub_machine_mmap_iterate): ... this.
6383 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6384 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6385 (grub_multiboot): Allocate an extra region after the payload, and fill
6386 it with a Multiboot memory map. Adjust a.out loader to calculate size
6387 with the extra space.
6388 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6389 with the extra space.
6391 2008-08-17 Carles Pina i Estany <carles@pina.cat>
6393 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
6395 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
6397 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6398 mdate-sh to the list `find' searches for.
6399 * DISTLIST: Regenerated.
6401 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
6403 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6404 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
6405 genmoddep.awk, gensymlist.sh.in.
6406 (DISTDIRS): Add bus, docs, hook, lib.
6407 * DISTLIST: Regenerated.
6408 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
6410 2008-08-16 Robert Millan <rmh@aybabtu.com>
6412 * disk/raid.c (grub_raid_init): Handle/report errors set by
6413 grub_device_iterate().
6414 * disk/lvm.c (grub_lvm_init): Likewise.
6416 2008-08-15 Bean <bean123ch@gmail.com>
6418 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6420 (datetime_mod_SOURCES): New macro.
6421 (datetime_mod_CFLAGS): Likewise.
6422 (datetime_mod_LDFLAGS): Likewise.
6423 (date_mod_SOURCES): Likewise.
6424 (date_mod_CFLAGS): Likewise.
6425 (date_mod_LDFLAGS): Likewise.
6426 (datehook_mod_SOURCES): Likewise.
6427 (datehook_mod_CFLAGS): Likewise.
6428 (datehook_mod_LDFLAGS): Likewise.
6430 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6432 (datetime_mod_SOURCES): New macro.
6433 (datetime_mod_CFLAGS): Likewise.
6434 (datetime_mod_LDFLAGS): Likewise.
6435 (date_mod_SOURCES): Likewise.
6436 (date_mod_CFLAGS): Likewise.
6437 (date_mod_LDFLAGS): Likewise.
6438 (datehook_mod_SOURCES): Likewise.
6439 (datehook_mod_CFLAGS): Likewise.
6440 (datehook_mod_LDFLAGS): Likewise.
6442 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6444 (datetime_mod_SOURCES): New macro.
6445 (datetime_mod_CFLAGS): Likewise.
6446 (datetime_mod_LDFLAGS): Likewise.
6447 (date_mod_SOURCES): Likewise.
6448 (date_mod_CFLAGS): Likewise.
6449 (date_mod_LDFLAGS): Likewise.
6450 (datehook_mod_SOURCES): Likewise.
6451 (datehook_mod_CFLAGS): Likewise.
6452 (datehook_mod_LDFLAGS): Likewise.
6454 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6456 (datetime_mod_SOURCES): New macro.
6457 (datetime_mod_CFLAGS): Likewise.
6458 (datetime_mod_LDFLAGS): Likewise.
6459 (date_mod_SOURCES): Likewise.
6460 (date_mod_CFLAGS): Likewise.
6461 (date_mod_LDFLAGS): Likewise.
6462 (datehook_mod_SOURCES): Likewise.
6463 (datehook_mod_CFLAGS): Likewise.
6464 (datehook_mod_LDFLAGS): Likewise.
6466 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6468 (datetime_mod_SOURCES): New macro.
6469 (datetime_mod_CFLAGS): Likewise.
6470 (datetime_mod_LDFLAGS): Likewise.
6471 (date_mod_SOURCES): Likewise.
6472 (date_mod_CFLAGS): Likewise.
6473 (date_mod_LDFLAGS): Likewise.
6474 (datehook_mod_SOURCES): Likewise.
6475 (datehook_mod_CFLAGS): Likewise.
6476 (datehook_mod_LDFLAGS): Likewise.
6478 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6480 * commands/date.c: New file.
6482 * hook/datehook.c: Likewise.
6484 * include/grub/lib/datetime.h: Likewise.
6486 * include/grub/i386/cmos.h: Likewise.
6488 * lib/datetime.c: Likewise.
6490 * lib/i386/datetime.c: Likewise.
6492 * lib/efi/datetime.c: Likewise.
6494 2008-08-14 Robert Millan <rmh@aybabtu.com>
6496 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6497 (grub_mkelfimage_SOURCES): New variable.
6498 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6500 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6501 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6502 * conf/powerpc-ieee1275.rmk: Likewise.
6503 * conf/i386-ieee1275.rmk: Likewise.
6505 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6506 * kern/i386/coreboot/init.c: Likewise.
6508 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6509 with `<grub/cpu/kernel.h>'.
6510 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6512 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6513 * kern/i386/coreboot/startup.S: Likewise.
6515 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6516 (GRUB_MOD_GAP): Remove.
6517 * include/grub/powerpc/kernel.h: New file.
6518 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6519 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6520 * include/grub/i386/kernel.h: New file.
6521 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6522 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6523 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6525 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6527 Use --directory when invoking grub_mkimage.
6529 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6530 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6531 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6532 and GRUB_KERNEL_CPU_PREFIX.
6534 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6536 * include/grub/err.h (grub_err_printf): New function prototype.
6537 * util/misc.c (grub_err_printf): New function.
6538 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6540 * kern/err.c (grub_print_error): Use grub_err_printf.
6542 2008-08-13 Robert Millan <rmh@aybabtu.com>
6544 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6546 2008-08-13 Robert Millan <rmh@aybabtu.com>
6548 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6551 2008-08-12 Robert Millan <rmh@aybabtu.com>
6553 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6554 of the relocation code from here ...
6555 (grub_multiboot): ... to here.
6556 (forward_relocator, backward_relocator): Move from here ...
6557 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6558 (grub_multiboot_backward_relocator): ... to here.
6559 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6560 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6561 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6562 (grub_multiboot_forward_relocator_end)
6563 (grub_multiboot_backward_relocator)
6564 (grub_multiboot_backward_relocator_end): New variables.
6566 2008-08-12 Bean <bean123ch@gmail.com>
6568 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6570 2008-08-11 Robert Millan <rmh@aybabtu.com>
6572 * kern/i386/linuxbios/startup.S: Move from here ...
6573 * kern/i386/coreboot/startup.S: ... to here.
6575 * kern/i386/linuxbios/init.c: Move from here ...
6576 * kern/i386/coreboot/init.c: ... to here.
6578 * kern/i386/linuxbios/table.c: Move from here ...
6579 * kern/i386/coreboot/mmap.c: ... to here.
6581 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6583 2008-08-11 Robert Millan <rmh@aybabtu.com>
6585 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6586 errors. Leave it to the upper layer to handle them.
6588 2008-08-09 Christian Franke <franke@computer.org>
6590 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6591 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6592 Install `grub.d/10_windows' only on Cygwin.
6593 * configure.ac: Add subst of `target_os'.
6594 Check `target_os' also before setting TARGET_OBJ2ELF.
6595 Add `--enable-grub-pe2elf'.
6597 2008-08-08 Robert Millan <rmh@aybabtu.com>
6599 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6600 (grub_last_time): Change type to grub_uint64_t.
6601 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6602 (grub_disk_close): Likewise.
6604 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6605 (run_menu): Migrate code from to using grub_get_time_ms().
6607 * util/misc.c (grub_get_time_ms): New function.
6609 2008-08-08 Marco Gerards <marco@gnu.org>
6611 * disk/ata.c (grub_ata_regget): Change return type to
6613 (grub_ata_regget2): Likewise.
6614 (grub_ata_wait_status): New function.
6615 (grub_ata_wait_busy): Removed function, updated all users to use
6616 `grub_ata_wait_status'.
6617 (grub_ata_wait_drq): Likewise.
6618 (grub_ata_cmd): New function.
6619 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6621 (grub_ata_pio_write): Add error handling.
6622 (grub_atapi_identify): Likewise.
6623 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6625 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6626 handling. Actually use the detected registers. Reorder the
6627 detection logic such that it is easier to read.
6628 (grub_ata_pciinit): Do not assign the same ID to each controller.
6629 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6631 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6633 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6635 2008-08-08 Marco Gerards <marco@gnu.org>
6639 2008-08-07 Bean <bean123ch@gmail.com>
6641 * include/grub/x86_64/pci.h: New file.
6643 2008-08-07 Christian Franke <franke@computer.org>
6645 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6646 (TIMER2_GATE): Likewise.
6647 (grub_pit_wait): Add enable/disable of the timer2 gate
6648 bit of port 0x61. This fixes a possible infinite loop.
6650 2008-08-07 Bean <bean123ch@gmail.com>
6652 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6653 kern/i386/tsc.c and kern/i386/pit.c.
6655 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6658 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6661 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6663 2008-08-07 Bean <bean123ch@gmail.com>
6665 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6667 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6669 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6670 multiple inclusion. Add #include <grub/types.h>.
6672 2008-08-06 Christian Franke <franke@computer.org>
6674 * conf/common.rmk: Build and install `10_windows'.
6675 * util/grub.d/10_windows.in: New script.
6677 2008-08-06 Pavel Roskin <proski@gnu.org>
6679 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6681 2008-08-06 Robert Millan <rmh@aybabtu.com>
6683 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6684 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6686 2008-08-06 Bean <bean123ch@gmail.com>
6688 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6689 (grub_pxefs_fs_int): Remove dummy definition.
6690 (grub_pxefs_open): Use data->block_size to store the current block
6692 (grub_pxefs_read): Use block size stored in data->block_size. As the
6693 value of grub_pxe_blksize can be changed after the file is opened.
6695 2008-08-06 Bean <bean123ch@gmail.com>
6697 * fs/i386/pc/pxe.c (curr_file): new variable.
6698 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6699 require the dummy internal file system anymore.
6700 (grub_pxefs_read): Removed.
6701 (grub_pxefs_close): Likewise.
6702 (grub_pxefs_fs_int): Likewise.
6703 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6704 connection when we switch file.
6705 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6707 2008-08-06 Robert Millan <rmh@aybabtu.com>
6709 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6711 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6712 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6714 * kern/i386/halt.c: New file.
6715 * kern/i386/reboot.c: Likewise.
6716 * include/grub/i386/reboot.h: Likewise.
6717 * include/grub/i386/halt.h: Likewise.
6719 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6720 Include `<grub/cpu/halt.h>'.
6721 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6722 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6724 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6725 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6726 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6727 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6728 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6729 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6731 * include/grub/i386/at_keyboard.h: ... to here.
6733 2008-08-05 Robert Millan <rmh@aybabtu.com>
6735 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6736 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6737 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6738 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6739 `kern/generic/millisleep.c'.
6741 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6742 instead of grub_get_rtc().
6743 (grub_tsc_init): Initialize `tsc_boot_time'.
6745 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6746 (grub_machine_init): Use grub_tsc_init() rather than
6747 installing an RTC-based handler via grub_install_get_time_ms().
6749 * kern/i386/pit.c: New file.
6750 * include/grub/i386/pit.h: Likewise.
6752 2008-08-05 Bean <bean123ch@gmail.com>
6754 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6756 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6757 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6758 (pxe_mod_SOURCES): New macro.
6759 (pxe_mod_CFLAGS): Likewise.
6760 (pxe_mod_LDFLAGS): Likewise.
6761 (pxecmd_mod_SOURCES): Likewise.
6762 (pxecmd_mod_CFLAGS): Likewise.
6763 (pxecmd_mod_LDFLAGS): Likewise.
6765 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6766 (grub_pxe_call): Likewise.
6768 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6770 * commands/i386/pc/pxecmd.c: New file.
6772 * fs/i386/pc/pxe.c: Likewise.
6774 * include/grub/i386/pc/pxe.h: Likewise.
6776 2008-08-05 Bean <bean123ch@gmail.com>
6778 * util/console.c (grub_console_cur_color): New variable.
6779 (grub_console_standard_color): Likewise.
6780 (grub_console_normal_color): Likewise.
6781 (grub_console_highlight_color): Likewise.
6782 (color_map): Likewise.
6783 (use_color): Likewise.
6784 (NUM_COLORS): New macro.
6785 (grub_ncurses_setcolorstate): Handle color properly.
6786 (grub_ncurses_setcolor): Don't change color here, just remember the
6787 settings, color will be set in grub_ncurses_setcolorstate.
6788 (grub_ncurses_getcolor): New function.
6789 (grub_ncurses_init): Initialize color pairs.
6790 (grub_ncurses_term): New member grub_ncurses_getcolor.
6792 2008-08-05 Colin D Bennett <colin@gibibit.com>
6794 High resolution timer support. Implemented for x86 CPUs using TSC.
6795 Extracted generic grub_millisleep() so it's linked in only as needed.
6796 This requires a Pentium compatible CPU; if the RDTSC instruction is
6797 not supported, then it falls back on the generic grub_get_time_ms()
6798 implementation that uses the machine's RTC.
6800 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6801 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6802 `kern/generic/millisleep.c'.
6804 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6805 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6807 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6808 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6810 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6812 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6813 `kern/generic/millisleep.c'.
6815 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6817 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6819 * kern/generic/rtc_get_time_ms.c: New file.
6821 * kern/generic/millisleep.c: New file.
6823 * kern/misc.c: Don't include
6824 <kern/time.h> anymore.
6825 (grub_millisleep_generic): Removed.
6827 * commands/sleep.c (grub_interruptible_millisleep): Uses
6828 grub_get_time_ms() instead of grub_get_rtc().
6830 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6832 (grub_cpu_is_cpuid_supported): New inline function.
6833 (grub_cpu_is_tsc_supported): New inline function.
6834 (grub_tsc_init): New function prototype.
6835 (grub_tsc_get_time_ms): New function prototype.
6837 * kern/i386/tsc.c (grub_get_time_ms): New file.
6839 * include/grub/time.h: Include <grub/types.h.
6840 (grub_millisleep_generic): Removed.
6841 (grub_get_time_ms): New prototype.
6842 (grub_install_get_time_ms): New prototype.
6843 (grub_rtc_get_time_ms): New prototype.
6845 * kern/time.c (grub_get_time_ms): New function.
6846 (grub_install_get_time_ms): New function.
6848 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6849 <grub/time.h> anymore.
6850 (grub_millisleep): Removed.
6851 (grub_machine_init): Call grub_tsc_init.
6853 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6854 get_time_ms() implementation.
6856 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6857 (ieee1275_get_time_ms): New function.
6858 (grub_machine_init): Install get_time_ms() implementation.
6860 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6861 (grub_machine_init): Call grub_tsc_init().
6862 (grub_millisleep): Removed.
6864 * kern/ieee1275/init.c (grub_millisleep): Removed.
6865 (grub_machine_init): Install ieee1275_get_time_ms()
6867 (ieee1275_get_time_ms): New function.
6868 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6871 2008-08-05 Marco Gerards <marco@gnu.org>
6873 * disk/ata.c: Include <grub/pci.h>.
6874 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6875 (grub_ata_initialize): Rewritten.
6876 (grub_ata_device_initialize): New function.
6878 2008-08-04 Pavel Roskin <proski@gnu.org>
6880 * kern/main.c: Include grub/mm.h.
6882 2008-08-04 Robert Millan <rmh@aybabtu.com>
6884 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6885 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6886 corruption problem).
6888 2008-08-04 Robert Millan <rmh@aybabtu.com>
6890 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6891 warnings introduced in my last commit.
6893 2008-08-03 Robert Millan <rmh@aybabtu.com>
6895 Make PCI available on all i386 architectures.
6897 * include/grub/i386/pc/pci.h: Move from here ...
6898 * include/grub/i386/pci.h: ... to here.
6900 * include/grub/i386/pc/pci.h: Remove.
6901 * include/grub/i386/efi/pci.h: Remove.
6902 * include/grub/x86_64/efi/pci.h: Remove.
6904 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6907 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6908 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6909 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6911 * conf/i386-ieee1275.rmk: Likewise.
6913 2008-08-03 Robert Millan <rmh@aybabtu.com>
6915 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6916 (grub_console_setcursor): Make it possible to set cursor off.
6918 2008-08-03 Robert Millan <rmh@aybabtu.com>
6920 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6921 of modules instead of assuming which platform provides what.
6922 * util/update-grub.in: Likewise.
6924 2008-08-03 Robert Millan <rmh@aybabtu.com>
6926 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6927 instead of `grub_install_dos_part' to determine whether a drive needs
6928 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6929 because it can be overridden when loading GRUB via Multiboot).
6931 2008-08-02 Robert Millan <rmh@aybabtu.com>
6933 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6935 2008-08-02 Robert Millan <rmh@aybabtu.com>
6937 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6938 of informational grub_dprintf() calls.
6940 2008-08-02 Robert Millan <rmh@aybabtu.com>
6942 * disk/memdisk.c (memdisk_size): Don't initialize.
6943 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6945 * include/grub/i386/pc/kernel.h
6946 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6947 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6948 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6949 (grub_arch_memdisk_size): Remove.
6951 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6952 field (was only used to transfer a constant). Add `type' field to
6953 support multiple module types.
6954 (grub_module_iterate): New function.
6956 * kern/device.c (grub_device_open): Do not hide error messages
6957 when grub_disk_open() fails. Use grub_print_error() instead.
6959 * kern/i386/pc/init.c (grub_arch_modules_addr)
6960 (grub_arch_memdisk_size): Remove functions.
6961 (grub_arch_modules_addr): Return the module address in high memory
6962 (now that it isn't copied anymore).
6964 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6965 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6966 decompression routine (grub_total_module_size already includes that
6967 now). Don't copy modules back to low memory.
6969 * kern/main.c: Include `<grub/mm.h>'.
6970 (grub_load_modules): Split out (and use) ...
6971 (grub_module_iterate): ... this function, which iterates through
6972 module objects and runs a hook.
6973 Comment out grub_mm_init_region() call, as it would cause non-ELF
6974 modules to be overwritten.
6976 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6977 the memdisk image in its own region, make it part of the module list.
6978 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6979 (main): Parse --memdisk|-m option, and pass user-provided path as
6980 parameter to generate_image().
6981 (add_segments): Pass `memdisk_path' down to load_modules().
6982 (load_modules): Embed memdisk image in module section when requested.
6983 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6984 `header.type' instead of `header.offset'.
6986 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6987 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6988 (memdisk_mod_LDFLAGS): New variables.
6989 * conf/i386-coreboot.rmk: Likewise.
6990 * conf/i386-ieee1275.rmk: Likewise.
6992 2008-08-02 Robert Millan <rmh@aybabtu.com>
6994 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6995 (backward_relocator): New variables. Used to allocate and relocate
6996 the payload, respectively.
6997 (grub_multiboot_load_elf32): Load into heap instead of requested
6998 address, install the appropriate relocator code in each bound of
6999 the payload, and set the entry point such that
7000 grub_multiboot_real_boot() will jump to one of them.
7002 * kern/i386/loader.S (grub_multiboot_payload_size)
7003 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7004 (grub_multiboot_payload_entry_offset): New variables.
7005 (grub_multiboot_real_boot): Set cpu context to what the relocator
7006 expects, and jump to the relocator instead of the payload.
7008 * include/grub/i386/loader.h (grub_multiboot_payload_size)
7009 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7010 (grub_multiboot_payload_entry_offset): Export.
7012 2008-08-01 Bean <bean123ch@gmail.com>
7014 * normal/menu_entry.c (editor_getline): Don't return the original
7015 string as result, as it will be released by lexer once it has done
7018 2008-08-01 Robert Millan <rmh@aybabtu.com>
7020 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7021 within menuentries, not before them.
7022 util/grub.d/10_hurd.in: Likewise.
7024 2008-08-01 Bean <bean123ch@gmail.com>
7026 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7027 (bufio_mod_SOURCES): New macro.
7028 (bufio_mod_CFLAGS): Likewise.
7029 (bufio_mod_LDFLAGS): Likewise.
7031 * include/grub/bufio.h: New file.
7033 * io/bufio.c: Likewise.
7035 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7036 (grub_video_reader_png): Use grub_buffile_open to open file.
7038 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7039 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7041 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7042 (grub_video_reader_tga): Use grub_buffile_open to open file.
7044 * font/manager.c: Include <grub/bufio.h>.
7045 (add_font): Use grub_buffile_open to open file.
7047 2008-07-31 Robert Millan <rmh@aybabtu.com>
7049 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7050 ELF segments, use a macro for arbitrarily accessing any of them instead
7051 of preparing a pointer that allows access to one at a time.
7052 (grub_multiboot_load_elf64): Likewise.
7054 2008-07-31 Bean <bean123ch@gmail.com>
7056 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7057 GRUB_KERNEL_MACHINE_DATA_END.
7059 2008-07-30 Robert Millan <rmh@aybabtu.com>
7061 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7062 Increase from 0x50 to 0x60.
7063 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7064 use UUIDs to identify the root drive for them. If that's not
7066 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
7067 check, for cross-disk installs.
7069 2008-07-30 Robert Millan <rmh@aybabtu.com>
7071 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
7072 is non-empty, use it to set the `prefix' environment variable instead
7073 of the usual approach.
7074 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
7075 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
7076 environment variable instead of dummy make_install_device().
7078 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
7079 (start): Insert a data section, with `grub_prefix' variable.
7080 * kern/i386/linuxbios/startup.S: Likewise.
7082 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
7083 New variable reference.
7084 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
7085 New macro. Defines offset of `grub_prefix' within startup.S (relative
7087 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
7088 section within startup.S (relative to `start').
7089 * include/grub/i386/coreboot/kernel.h: Likewise.
7091 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
7092 Overwrite grub_prefix with its contents, at the beginning of the
7094 (main): Understand -p|--prefix.
7096 2008-07-30 Robert Millan <rmh@aybabtu.com>
7098 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
7100 2008-07-30 Robert Millan <rmh@aybabtu.com>
7102 * term/i386/pc/vga_text.c (grub_console_cls): Use
7103 grub_console_gotoxy() to go back to beginning of the screen.
7104 Found by Patrick Georgi <patrick.georgi@coresystems.de>
7106 2008-07-29 Christian Franke <franke@computer.org>
7108 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7109 Add conversion of emulated mount points on Cygwin.
7111 2008-07-29 Christian Franke <franke@computer.org>
7113 * util/update-grub.in: Add a check for admin
7115 Remove old `grub.cfg.new' before creation.
7116 Add `-f' to `mv' to handle the different filesystem
7117 semantics of Windows.
7119 2008-07-29 Bean <bean123ch@gmail.com>
7121 * normal/main.c (get_line): Fix buffer overflow bug.
7123 2008-07-28 Robert Millan <rmh@aybabtu.com>
7125 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
7126 (struct grub_apple_header): New struct. Describes the layout of
7128 (apple_partition_map_iterate): Check the header magic as well as the
7129 partition magic (which was already being checked).
7131 2008-07-28 Pavel Roskin <proski@gnu.org>
7133 * genmk.rb: Add a warning to the beginning of the output that
7134 it's a generated file and should not be edited.
7136 2008-07-28 Robert Millan <rmh@aybabtu.com>
7138 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
7139 with the same number are found, just use issue a warning with
7140 grub_dprintf(), as this error has been reported to be non-fatal.
7142 2008-07-27 Robert Millan <rmh@aybabtu.com>
7144 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
7147 2008-07-27 Bean <bean123ch@gmail.com>
7149 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
7150 (grub_fat_find_dir): Ignore case when comparing filename.
7152 2008-07-27 Bean <bean123ch@gmail.com>
7154 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
7155 smallino, as it's more descriptive, and i8count can be confused with
7156 the other field count.
7157 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
7160 2008-07-27 Bean <bean123ch@gmail.com>
7162 * commands/crc.c: New file.
7164 * lib/crc.c: Likewise.
7166 * include/grub/lib/crc.h: Likewise.
7168 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
7170 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
7171 (hexdump): Move this function to ...
7173 * lib/hexdump.c: ... here.
7175 * include/grub/hexdump.h: Renamed to ...
7177 * include/grub/lib/hexdump.h: ... this.
7179 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
7181 * util/grub-editenv.c: Likewise.
7183 * include/envblk.h: Renamed to ...
7185 * include/lib/envblk.h: ... this.
7187 * util/envblk.c: Renamed to ...
7189 * lib/envblk.c: ... this.
7191 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
7193 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
7194 (pkglib_MODULES): Add crc.mod.
7195 (hexdump_mod_SOURCES): Add lib/hexdump.c.
7196 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
7197 (crc_mod_SOURCES): New macro.
7198 (crc_mod_CFLAGS): Likewise.
7199 (crc_mod_LDFLAGS): Likewise.
7201 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
7203 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7205 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7207 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7209 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7211 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
7213 * commands/help.c: Include <grub/term.h>.
7214 (TERM_WIDTH): Removed. Updated all users.
7216 2008-07-27 Pavel Roskin <proski@gnu.org>
7218 * util/getroot.c (find_root_device): Rephrase a comment to avoid
7219 spurious warnings about a comment within a comment.
7221 2008-07-25 Robert Millan <rmh@aybabtu.com>
7223 * util/getroot.c (find_root_device): Skip devices that match
7224 /dev/dm-[0-9]. This lets the real device be found for any type of
7225 abstraction (LVM, EVMS, RAID..).
7226 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
7227 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
7228 device is found first, find_root_device() will now skip it.
7230 2008-07-24 Pavel Roskin <proski@gnu.org>
7232 * include/grub/types.h: Use __builtin_bswap32() and
7233 __builtin_bswap64() with gcc 4.3 and newer.
7235 2008-07-24 Christian Franke <franke@computer.org>
7237 * util/i386/pc/grub-install.in: If `--debug' is specified,
7238 pass `--verbose' to grub-setup.
7239 Abort script if make_system_path_relative_to_its_root() fails.
7241 2008-07-24 Bean <bean123ch@gmail.com>
7243 * configure.ac: Fixed a bug caused by the previous cygwin patch,
7244 variable `target_platform' should be `platform'.
7246 2008-07-24 Bean <bean123ch@gmail.com>
7248 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
7249 (grub_png_init_fixed_block): New function.
7250 (grub_png_decode_image_data): Handle fixed huffman code compression.
7252 2008-07-24 Bean <bean123ch@gmail.com>
7254 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
7255 (grub_pe2elf_SOURCES): New macro.
7256 (CLEANFILES): Add grub-pe2elf.
7258 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
7259 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
7260 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
7261 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
7262 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
7263 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
7264 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
7265 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
7266 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
7267 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
7268 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
7269 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
7270 (GRUB_PE32_DT_FUNCTION): Likewise.
7271 (GRUB_PE32_REL_I386_DIR32): Likewise.
7272 (GRUB_PE32_REL_I386_REL32): Likewise.
7273 (grub_pe32_symbol): New structure.
7274 (grub_pe32_reloc): Likewise.
7276 * util/grub-pe2elf.c: New file.
7278 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
7279 start symbol in non pc platform.
7281 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
7283 The following patches are from Christian Franke.
7285 * include/grub/dl.h: Remove .previous, gas supports this only
7288 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
7289 Remove .type, gas supports this only for ELF format.
7291 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
7292 nullbytes in symbol table. This fixes an infinite loop if table is
7295 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
7296 TARGET_IMG_LDFLAGS and EXEEXT.
7298 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
7299 TARGET_IMG_LDFLAGS_AC.
7300 (grub_CHECK_STACK_ARG_PROBE): New function.
7302 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
7304 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
7306 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
7307 to set TARGET_IMG_LD* accordingly.
7308 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
7309 Add call to grub_CHECK_STACK_ARG_PROBE.
7310 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
7312 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
7314 * genmk.rb: Add EXEEXT to CLEANFILES.
7316 2008-07-23 Robert Millan <rmh@aybabtu.com>
7318 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
7319 define the codes for arrows and lines used for the menu).
7320 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
7323 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
7324 fonts, because the latter are too slow.
7326 2008-07-21 Bean <bean123ch@gmail.com>
7328 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
7329 a20. Run keyboard test last, as it will cause macbook to halt.
7331 2008-07-18 Pavel Roskin <proski@gnu.org>
7333 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
7334 load foreign architecture modules correctly anyway. Keep
7335 support for loading host architecture modules, whether we
7336 compile them or not.
7338 2008-07-17 Pavel Roskin <proski@gnu.org>
7340 * configure.ac: Use -m32 or -m64 regardless of whether we had to
7341 change target_cpu. The compiler default can mismatch target_cpu
7344 * disk/efi/efidisk.c: Fix format warnings on x86_64.
7345 * kern/efi/efi.c: Likewise.
7347 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
7348 target compiler is functional.
7349 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7352 * configure.ac: Default to efi platform for x86_64-apple. Allow
7353 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
7354 adjustments from the rest, only do them if target is not
7355 explicitly given. Merge other adjustments with the final sanity
7356 check. Remove an extraneous check for supported CPU. Be
7357 specific which CPU and which platform is not supported.
7359 * configure.ac: Default to pc platform for x86_64.
7361 2008-07-17 Robert Millan <rmh@aybabtu.com>
7363 Partial LinuxBIOS -> Coreboot rename.
7365 * conf/i386-linuxbios.rmk: Renamed to ...
7366 * conf/i386-coreboot.rmk: ... this.
7367 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7368 * configure.ac: Accept "coreboot" as input platform (but maintain
7369 compatibility with "linuxbios").
7370 * include/grub/i386/linuxbios: Renamed to ...
7371 * include/grub/i386/coreboot: ... this.
7373 2008-07-17 Bean <bean123ch@gmail.com>
7375 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
7376 (appleldr_mod_SOURCE): New variable.
7377 (appleldr_mod_CFLAGS): Likewise.
7378 (appleldr_mod_LDFLAGS): Likewise.
7379 (pci_mod_SOURCES): Likewise.
7380 (pci_mod_CFLAGS): Likewise.
7381 (pci_mod_LDFLAGS): Likewise.
7382 (lspci_mod_SOURCES): Likewise.
7383 (lspci_mod_CFLAGS): Likewise.
7384 (lspci_mod_LDFLAGS): Likewise.
7386 * conf/x86_64-efi.rmk: New file.
7388 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7390 (grub_efidisk_write): Likewise.
7392 * include/efi/api.h (efi_call_0): New macro.
7393 (efi_call_1): Likewise.
7394 (efi_call_2): Likewise.
7395 (efi_call_3): Likewise.
7396 (efi_call_4): Likewise.
7397 (efi_call_5): Likewise.
7398 (efi_call_6): Likewise.
7400 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7401 grub_rescue_cmd_chainloader.
7403 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7404 (grub_pe32_optional_header): Change some fields based on i386 or
7406 (GRUB_PE32_PE32_MAGIC): Likewise.
7408 * include/grub/efi/uga_draw.h: New file.
7410 * include/grub/elf.h (STN_ABS): New constant.
7411 (R_X86_64_NONE): Relocation constant for x86_64.
7412 (R_X86_64_64): Likewise.
7413 (R_X86_64_PC32): Likewise.
7414 (R_X86_64_GOT32): Likewise.
7415 (R_X86_64_PLT32): Likewise.
7416 (R_X86_64_COPY): Likewise.
7417 (R_X86_64_GLOB_DAT): Likewise.
7418 (R_X86_64_JUMP_SLOT): Likewise.
7419 (R_X86_64_RELATIVE): Likewise.
7420 (R_X86_64_GOTPCREL): Likewise.
7421 (R_X86_64_32): Likewise.
7422 (R_X86_64_32S): Likewise.
7423 (R_X86_64_16): Likewise.
7424 (R_X86_64_PC16): Likewise.
7425 (R_X86_64_8): Likewise.
7426 (R_X86_64_PC8): Likewise.
7428 * include/grub/i386/efi/pci.h: New file.
7430 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7431 Change it value based on platform.
7432 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7433 (GRUB_E820_RAM): Likewise.
7434 (GRUB_E820_RESERVED): Likewise.
7435 (GRUB_E820_ACPI): Likewise.
7436 (GRUB_E820_NVS): Likewise.
7437 (GRUB_E820_EXEC_CODE): Likewise.
7438 (GRUB_E820_MAX_ENTRY): Likewise.
7439 (grub_e820_mmap): New structure.
7440 (linux_kernel_header): Change the efi field according to different
7441 kernel version, also field from linux_kernel_header.
7443 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7445 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7446 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7447 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7448 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7449 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7450 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7451 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7452 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7453 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7454 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7456 * include/grub/x86_64/efi/kernel.h: New file.
7458 * include/grub/x86_64/efi/loader.h: Likewise.
7460 * include/grub/x86_64/efi/machine.h: Likewise.
7462 * include/grub/x86_64/efi/pci.h: Likewise.
7464 * include/grub/x86_64/efi/time.h: Likewise.
7466 * include/grub/x86_64/linux.h: Likewise.
7468 * include/grub/x86_64/setjmp.h: Likewise.
7470 * include/grub/x86_64/time.h: Likewise.
7472 * include/grub/x86_64/types.h: Likewise.
7474 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7475 GRUB_TARGET_SIZEOF_VOID_P.
7477 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7478 (grub_efi_locate_handle): Likewise.
7479 (grub_efi_open_protocol): Likewise.
7480 (grub_efi_set_text_mode): Likewise.
7481 (grub_efi_stall): Likewise.
7482 (grub_exit): Likewise.
7483 (grub_reboot): Likewise.
7484 (grub_halt): Likewise.
7485 (grub_efi_exit_boot_services): Likewise.
7486 (grub_get_rtc): Likewise.
7488 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7489 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7490 (grub_efi_allocate_pages): Wrap efi calls.
7491 (grub_efi_free_pages): Wrap efi calls.
7492 (grub_efi_get_memory_map): Wrap efi calls.
7494 * kern/x86_64/dl.c: New file.
7496 * kern/x86_64/efi/callwrap.S: Likewise.
7498 * kern/x86_64/efi/startup.S: Likewise.
7500 * loader/efi/appleloader.c: Likewise.
7502 * loader/efi/chainloader.c (cmdline): New variable.
7503 (grub_chainloader_unload): Wrap efi calls.
7504 (grub_chainloader_boot): Likewise.
7505 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7508 * loader/efi/chainloader_normal.c (chainloader_command):
7509 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7512 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7514 (grub_e820_add_region): New function.
7515 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7517 (grub_find_video_card): New function.
7518 (grub_linux_setup_video): New function.
7519 (grub_rescue_cmd_linux): Probe for video information.
7521 * normal/x86_64/setjmp.S: New file.
7523 * term/efi/console.c (map_char): New function.
7524 (grub_console_putchar): Map unicode char.
7525 (grub_console_checkkey): Wrap efi calls.
7526 (grub_console_getkey): Likewise.
7527 (grub_console_getwh): Likewise.
7528 (grub_console_gotoxy): Likewise.
7529 (grub_console_cls): Likewise.
7530 (grub_console_setcolorstate): Likewise.
7531 (grub_console_setcursor): Likewise.
7533 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7535 2008-07-16 Pavel Roskin <proski@gnu.org>
7537 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7540 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7541 pointer, not an integer. This fixes a warning and prevents
7542 precision loss on 64-bit systems.
7543 (relocate_addresses): Remove unneeded cast.
7545 2008-07-15 Pavel Roskin <proski@gnu.org>
7547 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7549 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7551 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7552 Fix comparison between signed and unsigned.
7554 * include/grub/i386/ieee1275/console.h: Declare
7555 grub_console_init() and grub_console_fini().
7557 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7558 It's empty and unused.
7560 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7561 beginning to avoid warnings with some compilers.
7563 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7564 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7566 2008-07-14 Pavel Roskin <proski@gnu.org>
7568 * kern/env.c (grub_register_variable_hook): Don't copy empty
7569 string, it leaks memory. Pass "" to grub_env_set(), it should
7570 handle constant strings.
7572 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7573 * commands/cmp.c (grub_cmd_cmp): Likewise.
7574 * kern/dl.c (grub_dl_flush_cache): Likewise.
7575 (grub_dl_load_core): Likewise.
7576 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7577 (grub_elf64_load_phdrs): Likewise.
7579 2008-07-13 Pavel Roskin <proski@gnu.org>
7581 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7582 between signed and unsigned.
7583 (LzmaEnc_Finish): Fix warning about an unused parameter.
7585 2008-07-13 Bean <bean123ch@gmail.com>
7587 * Makefile.in (enable_lzo): New rule.
7589 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7591 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7593 * boot/i386/pc/lnxboot.S: #include <config.h>.
7595 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7596 its value according to the compression algorithm used, lzo or lzma.
7598 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7599 compression algorithm according to configure macro.
7601 * kern/i386/pc/startup.S (codestart): Likewise.
7603 * kern/i386/pc/lzma_decode.S: New file.
7605 * include/grub/lib/LzFind.h: Likewise.
7607 * include/grub/lib/LzHash.h: Likewise.
7609 * include/grub/lib/LzmaDec.h: Likewise.
7611 * include/grub/lib/LzmaEnc.h: Likewise.
7613 * include/grub/lib/LzmaTypes.h: Likewise.
7615 * lib/LzFind.c: Likewise.
7617 * lib/LzmaDec.c: Likewise.
7619 * lib/LzmaEnc.c: Likewise.
7621 2008-07-13 Bean <bean123ch@gmail.com>
7623 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7624 (grub_ext4_extent_header): New structure.
7625 (grub_ext4_extent): Likewise.
7626 (grub_ext4_extent_idx): Likewise.
7627 (grub_ext4_find_leaf): New function.
7628 (grub_ext2_read_block): Handle extents.
7630 2008-07-12 Robert Millan <rmh@aybabtu.com>
7632 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7634 2008-07-11 Robert Millan <rmh@aybabtu.com>
7636 * util/grub.d/40_custom.in: New file. Example on how to add custom
7637 entries to /etc/grub.d.
7638 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7639 40_custom (implicitly, by merging all the grub.d rules).
7641 2008-07-11 Pavel Roskin <proski@gnu.org>
7643 * commands/read.c (grub_getline): Fix invalid memory access.
7644 Don't add newline to the variable value.
7646 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7647 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7648 (serial_hw_get_port): Check validity of the port number.
7649 (grub_cmd_serial): Check return value of serial_hw_get_port().
7651 2008-07-07 Pavel Roskin <proski@gnu.org>
7653 * boot/i386/pc/diskboot.S (notification_string): Replace
7654 "Loading kernel" with just "loading". This is shorter, less
7655 confusing and saves a few bytes for possible future changes.
7657 2008-07-05 Pavel Roskin <proski@gnu.org>
7659 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7660 size for ATAPI devices, they are undefined. Output sector
7661 number in decimal form.
7663 * disk/ata.c: Use named constants for status bits.
7665 2008-07-04 Pavel Roskin <proski@gnu.org>
7667 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7668 grub_addr_t before casting it to the void pointer to fix a
7669 warning. Non-addressable regions are discarded earlier.
7670 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7671 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7672 (check_signature): Don't shadow table_header.
7673 (grub_linuxbios_table_iterate): Cast numeric constants to
7674 grub_linuxbios_table_header_t.
7675 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7678 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7681 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7682 pointer, which can cause warnings. Support 64-bit addresses.
7684 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7685 of sizeof(long). This fixes PowerPC image generation on x86_64.
7687 2008-07-04 Robert Millan <rmh@aybabtu.com>
7689 This fixes a performance issue when pc & gpt partmap iterators
7690 didn't abort iteration even after our hook found what it was
7691 looking for (often causing expensive probes of non-existent drives).
7693 Some callers relied on previous buggy behaviour, since they would
7694 raise an error when their own hooks caused early abortion of its
7697 * kern/device.c (grub_device_open): Improve error message.
7698 * disk/lvm.c (grub_lvm_open): Likewise.
7699 * disk/raid.c (grub_raid_open): Likewise.
7701 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7702 when hook requests it, independently of grub_errno.
7703 (pc_partition_map_probe): Do not fail when find_func() caused
7704 early abortion of pc_partition_map_iterate().
7706 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7707 when hook requests it, independently of grub_errno.
7708 (gpt_partition_map_probe): Do not fail when find_func() caused
7709 early abortion of gpt_partition_map_iterate().
7711 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7712 when hook requests it, independently of grub_errno. Do not fail when
7713 part_map_iterate_hook() caused early abortion of p->iterate().
7715 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7716 when grub_partition_iterate() returned with non-zero.
7718 2008-07-03 Pavel Roskin <proski@gnu.org>
7720 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7721 like we do in grub_ata_pio_read().
7722 (grub_ata_readwrite): Always write individual sectors. Fix the
7723 sector count for the remainder.
7724 (grub_ata_write): Enable writing to ATA devices. Correctly
7725 report error for ATAPI devices.
7727 2008-07-02 Pavel Roskin <proski@gnu.org>
7729 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7732 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7733 for every read sector, we already increment it for the whole
7734 batch. This fixes reading more than 256 sectors at once.
7736 * util/grub-editenv.c (cmd_info): Cast argument to long
7737 explicitly. ptrdiff_t reduces to int on i386.
7739 * util/grub-editenv.c (main): Be specific which parameter is
7742 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7743 (memdisk): Make memdisk_orig_addr a pointer.
7745 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7746 for file offsets, use grub_off_t instead. Fix printf format
7749 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7750 there. Real unexpected warnings should not drown in the noise
7751 about known problems.
7753 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7754 grub_disk_addr_t for memory addresses.
7756 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7757 explicitly to fix a warning.
7759 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7761 * Makefile.in (MODULE_LDFLAGS): New variable.
7762 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7763 the linker accepts --build-id=none.
7764 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7766 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7768 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7769 those in Linux XFS code. Provide a way to access 64-bit parent
7771 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7772 the end of struct grub_xfs_dir_header.
7774 2008-07-02 Bean <bean123ch@gmail.com>
7776 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7777 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7778 and GRUB_IEEE1275_FLAG_NO_ANSI.
7780 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7781 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7782 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7784 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7785 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7787 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7788 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7790 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7791 esc sequence on non ANSI terminal.
7792 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7794 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7797 2008-07-02 Bean <bean123ch@gmail.com>
7799 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7800 (grub_editenv_SOURCES): New variable.
7801 (pkglib_MODULES): Add loadenv.mod.
7802 (loadenv_mod_SOURCES): New variable.
7803 (loadenv_mod_CFLAGS): Likewise.
7804 (loadenv_mod_LDFLAGS): Likewise.
7806 * include/grub/envblk.h: New file.
7808 * util/envblk.c: New file.
7810 * util/grub-editenv.c: New file.
7812 * commands/loadenv.c: New file.
7814 2008-07-01 Pavel Roskin <proski@gnu.org>
7816 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7817 not unsigned char. This fixes warnings and is consistent with
7820 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7822 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7824 * term/tparm.c (analyze): Always set *popcount.
7826 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7827 cast to fix a warning.
7829 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7830 cast to suppress a warning.
7832 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7833 grub_fshelp_read_file() expects.
7835 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7836 write uuid as a 32-bit value in CPU byte order, so declare and
7839 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7840 long if the format specifier expects it.
7841 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7842 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7843 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7844 long to fix a warning.
7845 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7846 grub_dprintf() arguments to fix warnings.
7848 2008-06-30 Pavel Roskin <proski@gnu.org>
7850 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7851 install_bsd_part immediately before core.img is embedded or
7852 modified on disk. This fixes core.img verification if core.img
7855 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7856 core_path to calculate the blocklist.
7857 Patch from Javier MartÃn <lordhabbit@gmail.com>
7859 2008-06-29 Robert Millan <rmh@aybabtu.com>
7861 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7862 block to disk block.
7863 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7864 Patch from Niels Böhm <bitbucket@arcor.de>
7866 2008-06-29 Robert Millan <rmh@aybabtu.com>
7868 * util/update-grub_lib.in (font_path): Search for fonts in
7869 /boot/grub first, which is more likely to be readable (we aren't
7870 deciding where fonts live, just looking for them).
7872 2008-06-26 Pavel Roskin <proski@gnu.org>
7874 * util/biosdisk.c (read_device_map): Don't leave dead map
7875 entries for devices failing stat() check.
7877 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7878 core_path_dev for the core.img path on the target device.
7880 2008-06-26 Robert Millan <rmh@aybabtu.com>
7882 * disk/fs_uuid.c: New file.
7883 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7884 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7885 (fs_uuid_mod_LDFLAGS): New variables.
7886 * include/grub/disk.h (grub_disk_dev_id): Add
7887 `GRUB_DISK_DEVICE_UUID_ID'.
7888 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7889 implement iterate().
7891 2008-06-26 Robert Millan <rmh@aybabtu.com>
7893 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7894 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7895 Linux image includes no initrd.
7897 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7899 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7900 call to resolve the core image location that effectively appended the
7903 2008-06-21 Robert Millan <rmh@aybabtu.com>
7905 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7908 * util/grub.d/10_hurd.in: ... to here ...
7909 * util/grub.d/10_linux.in: ... and here.
7911 2008-06-19 Robert Millan <rmh@aybabtu.com>
7913 * kern/main.c (grub_main): Export `prefix' variable immediately
7914 after it has been set by grub_machine_set_prefix().
7916 2008-06-19 Robert Millan <rmh@aybabtu.com>
7918 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7919 search result when not saving to variable, not the other way around.
7920 When saving to variable, abort iteration as soon as a match is found.
7922 2008-06-19 Robert Millan <rmh@aybabtu.com>
7924 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7925 check for partition that provides /boot/grub. Its logic is flawed,
7926 as it prevents prepare_grub_to_access_device() from being called
7929 2008-06-19 Robert Millan <rmh@aybabtu.com>
7931 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7932 "insmod" command directly when abstraction modules are needed,
7933 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7934 since it had already been processed).
7936 2008-06-19 Pavel Roskin <proski@gnu.org>
7938 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7939 changed. This is needed in case GRUB_LIBDIR changes.
7940 * conf/i386-ieee1275.rmk: Likewise.
7941 * conf/i386-linuxbios.rmk: Likewise.
7942 * conf/i386-pc.rmk: Likewise.
7943 * conf/powerpc-ieee1275.rmk: Likewise.
7945 2008-06-18 Pavel Roskin <proski@gnu.org>
7947 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7948 kernel_elf_symlist.c to symlist.c for consistency with other
7949 architectures. Update all users.
7950 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7952 2008-06-18 Robert Millan <rmh@aybabtu.com>
7954 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7957 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7958 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7959 a RAID device, run setup() for all members independently on whether
7960 LVM abstraction is being used.
7961 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7962 If grub-mkimage has set `*install_dos_part == -2', don't override this
7964 Perform *install_dos_part adjustments independently on whether
7965 we're embedding or not.
7966 Clarify error message when image is too big for embedding.
7967 Remove duplicate *install_dos_part stanza.
7969 2008-06-17 Robert Millan <rmh@aybabtu.com>
7971 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7972 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7974 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7975 values in grub_ofconsole_normal_color and
7976 grub_ofconsole_highlight_color (they're not directly related to
7977 background and foreground).
7978 (grub_ofconsole_setcolorstate): Extract background and foreground
7979 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7981 2008-06-17 Robert Millan <rmh@aybabtu.com>
7983 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7984 /boot/grub for the check in last commit, not /boot (they could be
7985 different partitions).
7987 2008-06-16 Robert Millan <rmh@aybabtu.com>
7989 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7990 asked to setup access for the same partition that provides /boot,
7991 don't bother using UUIDs since our root already has the value we
7994 2008-06-16 Robert Millan <rmh@aybabtu.com>
7996 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7998 Patch from Sven Mueller <sven@debian.org>.
8000 2008-06-16 Robert Millan <rmh@aybabtu.com>
8002 * util/update-grub.in: Check for $EUID instead of $UID.
8003 Reported by Vincent Zweije.
8005 2008-06-16 Bean <bean123ch@gmail.com>
8007 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8008 (grub_ext2_read_block): Likewise.
8009 (grub_ext2_read_inode): Likewise.
8010 (grub_ext2_mount): Likewise.
8011 (grub_ext2_close): Likewise.
8012 (grub_ext3_get_journal): Removed.
8014 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8015 (grub_reiserfs_read_symlink): Likewise.
8016 (grub_reiserfs_mount): Likewise.
8017 (grub_reiserfs_open): Likewise.
8018 (grub_reiserfs_read): Likewise.
8019 (grub_reiserfs_close): Likewise.
8020 (grub_reiserfs_get_journal): Removed.
8022 * fs/fshelp.c (grub_fshelp_read): Removed.
8023 (grub_fshelp_map_block): Likewise.
8025 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8026 (grub_fshelp_journal): Likewise.
8027 (grub_fshelp_read): Likewise.
8028 (grub_fshelp_map_block): Likewise.
8030 2008-06-16 Pavel Roskin <proski@gnu.org>
8032 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8033 floating point anymore.
8034 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8036 2008-06-15 Pavel Roskin <proski@gnu.org>
8038 * commands/ls.c (grub_ls_list_files): Use integer calculations
8039 for human readable format, avoid floating point use.
8040 * kern/misc.c (grub_ftoa): Remove.
8041 (grub_vsprintf): Remove floating point support.
8043 2008-06-15 Robert Millan <rmh@aybabtu.com>
8045 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8047 Reported by Max Vozeler.
8049 2008-06-15 Robert Millan <rmh@aybabtu.com>
8051 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8052 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8054 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8055 the beginning of the prefix.
8057 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8058 It is assumed that if we have a memdisk, grub-mkimage has set
8059 grub_prefix to include the "(memdisk)" drive in it.
8061 2008-06-15 Robert Millan <rmh@aybabtu.com>
8063 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8064 Initialize keyboard controller after registering the terminal, so that
8065 grub_printf() can be called from grub_keyboard_controller_init().
8067 2008-06-15 Robert Millan <rmh@aybabtu.com>
8069 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
8070 extent-btree which is written as big endian on disk.
8071 Reported by Alain Greppin <al@chilibi.org>.
8073 2008-06-14 Robert Millan <rmh@aybabtu.com>
8075 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
8076 * util/i386/pc/grub-install.in (modules): Likewise.
8078 2008-06-13 Pavel Roskin <proski@gnu.org>
8080 * commands/ls.c (grub_ls_list_files): Fix format warnings.
8082 2008-06-13 Bean <bean123ch@gmail.com>
8084 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
8086 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
8088 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
8089 to indicate sparse block.
8091 2008-06-12 Pavel Roskin <proski@gnu.org>
8093 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
8094 number, grub_fshelp_read() does it for us.
8096 * fs/fshelp.c (grub_fshelp_read): New function. Implement
8097 linear disk read with journal translation.
8098 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
8099 * include/grub/fshelp.h: Declare grub_fshelp_read().
8101 2008-06-09 Pavel Roskin <proski@gnu.org>
8103 * fs/minix.c (grub_minix_mount): Handle error reading
8106 2008-06-08 Robert Millan <rmh@aybabtu.com>
8108 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
8109 don't append the RAID prefix afterwards.
8110 Reported by Clint Adams.
8112 2008-06-08 Robert Millan <rmh@aybabtu.com>
8114 Based on description from Pavel:
8115 * kern/disk.c (grub_disk_check_range): Rename to ...
8116 (grub_disk_adjust_range): ... this. Add a comment explaining the
8117 tasks performed by this function.
8119 2008-06-08 Robert Millan <rmh@aybabtu.com>
8121 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
8122 `num_serial' (for consistency with other variables).
8123 (struct grub_ntfs_data): Add `uuid' member.
8124 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
8125 (grub_ntfs_uuid): New function.
8126 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
8128 2008-06-07 Pavel Roskin <proski@gnu.org>
8130 * util/biosdisk.c (open_device): Revert last change to the
8131 function, it broke installation. The sector needs to be
8132 different dependent on which device is opened.
8134 2008-06-06 Robert Millan <rmh@aybabtu.com>
8136 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
8137 rest of GRUB, and breakage doesn't happen if its value were modified.
8139 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8140 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
8141 a constant (same value).
8142 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
8143 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
8145 2008-06-06 Robert Millan <rmh@aybabtu.com>
8147 * util/biosdisk.c (open_device): Do not modify sector offset when
8148 accessing a partition. kern/disk.c already handles this for us.
8150 2008-06-06 Robert Millan <rmh@aybabtu.com>
8152 * util/grub-emu.c (grub_machine_init): Move code in this function from
8154 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
8155 segfault in case grub_printf() is called).
8157 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
8158 grub_probe. Update all users not to explicitly add it again.
8159 (grub_device): New variable; contains corresponding device for grubdir.
8160 (fs_module, partmap_module, devabstraction_module): Pass
8161 `--device ${grub_device}' to grub_probe to avoid traversing /dev
8164 2008-06-05 Robert Millan <rmh@aybabtu.com>
8166 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
8167 is found, print it (same layout as with labels).
8169 2008-06-04 Robert Millan <rmh@aybabtu.com>
8171 * util/biosdisk.c (get_drive): Rename to ...
8172 (find_grub_drive): ... this. Update all users.
8174 (get_os_disk): Rename to ...
8175 (convert_system_partition_to_system_disk): ... this. Update all users.
8177 (find_drive): Rename to ...
8178 (find_system_device): ... this. Update all users.
8180 2008-06-04 Robert Millan <rmh@aybabtu.com>
8182 * util/biosdisk.c (get_os_disk): Handle IDA devices.
8183 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8184 (make_device_map): Likewise.
8186 2008-06-01 Robert Millan <rmh@aybabtu.com>
8188 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
8189 before dereferencing it.
8191 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
8192 union with fat12/fat16-specific ones. Add some new fields, including
8193 `num_serial' for both versions.
8194 (struct grub_fat_data): Add `uuid' member.
8195 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
8196 names. Initialize `data->uuid' using `num_serial'.
8197 (grub_fat_uuid): New function.
8198 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
8200 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
8201 (grub_reiserfs_uuid): New function.
8202 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
8205 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
8206 (grub_xfs_uuid): New function.
8207 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
8209 2008-06-01 Robert Millan <rmh@aybabtu.com>
8211 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
8212 code that is backward compatible with pre-uuid search command.
8214 2008-05-31 Robert Millan <rmh@aybabtu.com>
8216 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
8217 floppies after everything else, to ensure floppy drive isn't accessed
8218 unnecessarily (patch from Bean).
8220 2008-05-31 Robert Millan <rmh@aybabtu.com>
8222 * commands/search.c (search_label, search_fs_uuid, search_file): Do
8223 not print device names when we were asked to set a variable.
8225 2008-05-31 Robert Millan <rmh@aybabtu.com>
8227 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
8228 using "cursor-on" and "cursor-off" commands (understood at least by
8229 the Open Firmware flavour on OLPC).
8231 2008-05-31 Michael Gorven <michael@gorven.za.net>
8233 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
8234 on and off sequences.
8236 2008-05-31 Robert Millan <rmh@aybabtu.com>
8238 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
8239 * util/update-grub.in: Likewise.
8241 2008-05-30 Pavel Roskin <proski@gnu.org>
8243 * util/biosdisk.c (linux_find_partition): Simplify logic and
8244 make the code more universal. Keep special processing for
8245 devfs, but use a simple rule for all other devices. If the
8246 device ends with a number, append 'p' and the partition number.
8247 Otherwise, append only the partition number.
8249 2008-05-30 Robert Millan <rmh@aybabtu.com>
8251 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
8252 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
8253 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
8254 the `root' parameter to Linux.
8256 2008-05-30 Robert Millan <rmh@aybabtu.com>
8258 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
8259 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
8260 --fs_uuid with --fs-uuid.
8261 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
8262 all filesystems support them).
8264 2008-05-30 Robert Millan <rmh@aybabtu.com>
8266 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
8267 grub_printf() flags, since we're printing in units of 2 bytes.
8269 2008-05-30 Robert Millan <rmh@aybabtu.com>
8271 * util/grub.d/00_header.in: Remove obsolete comment referencing
8272 convert_system_path_to_grub_path().
8273 * util/update-grub.in: Likewise.
8274 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
8275 (convert_system_path_to_grub_path): Add a warning message explaining
8276 that this function is deprecated. Rely on is_path_readable_by_grub()
8277 for the readability checks.
8278 (font_path): Use is_path_readable_by_grub() for the readability
8279 check rather than convert_system_path_to_grub_path().
8281 2008-05-30 Robert Millan <rmh@aybabtu.com>
8283 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
8284 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
8285 converting it first.
8286 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
8287 grub.cfg for access to font file, and afterwards call it again to set
8290 2008-05-30 Robert Millan <rmh@aybabtu.com>
8292 * commands/search.c (options): Add --fs_uuid option.
8293 (search_fs_uuid): New function.
8294 (grub_cmd_search): Fix --set argument passing.
8295 Use search_fs_uuid() when requested via --fs_uuid.
8296 (grub_search_init): Update help message.
8297 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
8298 and redeclare it as an array of 16-bit words.
8299 (grub_ext2_uuid): New function.
8300 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
8301 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
8302 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
8303 (GRUB_DEVICE_BOOT_UUID): New variables.
8304 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
8305 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
8307 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
8308 just assume `root' variable has the right value.
8309 * util/grub.d/10_linux.in: Likewise.
8310 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
8312 (main): Recognise `-t fs_uuid' argument.
8314 2008-05-30 Robert Millan <rmh@aybabtu.com>
8316 * util/biosdisk.c (map): Redefine structure to hold information
8317 about GRUB drive name.
8318 (get_drive): Reimplement without assuming (and verifying) BIOS-like
8320 (call_hook): Remove.
8321 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
8322 member. Assume drive has partitions.
8323 (grub_util_biosdisk_open): Access device names via `.device' struct
8325 (open_device): Likewise.
8326 (find_drive): Likewise.
8327 (read_device_map): Adjust map[] usage to match the new struct
8328 definition. Don't check for duplicates (still possible, but not cheap
8330 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
8331 (make_device_name): Remove assumption of BIOS-like drive names.
8333 2008-05-30 Pavel Roskin <proski@gnu.org>
8335 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
8336 compiling execute.c doesn't need grub_script.tab.h anymore.
8337 (normal/command.c_DEPENDENCIES): Likewise.
8338 (normal/function.c_DEPENDENCIES): Likewise.
8339 * conf/i386-ieee1275.rmk: Likewise.
8340 * conf/i386-linuxbios.rmk: Likewise.
8341 * conf/i386-pc.rmk: Likewise.
8342 * conf/powerpc-ieee1275.rmk: Likewise.
8343 * conf/sparc64-ieee1275.rmk: Likewise.
8345 2008-05-29 Pavel Roskin <proski@gnu.org>
8347 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8348 when scanning metadata for volume group name.
8350 * include/grub/script.h: Don't include grub_script.tab.h. It's
8351 a generated file, which may only be included from the files with
8352 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
8353 use union YYSTYPE, as the later allows forward declaration.
8354 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8356 2008-05-29 Robert Millan <rmh@aybabtu.com>
8358 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8359 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8360 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8361 (grub_console_checkkey): Add grub_dprintf() call to report unknown
8364 2008-05-29 Robert Millan <rmh@aybabtu.com>
8366 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8367 control key combinations.
8369 2008-05-29 Robert Millan <rmh@aybabtu.com>
8371 * util/powerpc/ieee1275/grub-install.in: Move from here ...
8372 * util/ieee1275/grub-install.in: ... to here.
8373 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8374 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8375 (grub_install_SOURCES): Likewise.
8377 2008-05-29 Robert Millan <rmh@aybabtu.com>
8379 * fs/affs.c: Update copyright year.
8380 * fs/ext2.c: Likewise.
8381 * fs/fshelp.c: Likewise.
8382 * fs/hfsplus.c: Likewise.
8383 * fs/ntfs.c: Likewise.
8384 * fs/xfs.c: Likewise.
8385 * include/grub/fshelp.h: Likewise.
8386 * util/grub-mkdevicemap.c: Likewise.
8388 2008-05-28 Robert Millan <rmh@aybabtu.com>
8390 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8391 might need to be fatfs to support some firmware implementations
8394 2008-05-28 Robert Millan <rmh@aybabtu.com>
8396 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8398 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8399 (make_device_map): Likewise.
8401 2008-05-20 Bean <bean123ch@gmail.com>
8403 * fs/fshelp.c (grub_fshelp_map_block): New function.
8404 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8405 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8407 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8408 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8409 (grub_fshelp_journal): New structure.
8410 (grub_fshelp_map_block): New function prototype.
8411 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8412 (grub_fshelp_map_block): Likewise.
8414 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8415 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8416 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8417 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8418 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8419 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8420 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8421 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8422 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8423 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8424 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8425 (grub_ext2_sblock): New members for journal support.
8426 (grub_ext3_journal_header): New structure.
8427 (grub_ext3_journal_revoke_header): Likewise.
8428 (grub_ext3_journal_block_tag): Likewise.
8429 (grub_ext3_journal_sblock): Likewise.
8430 (grub_fshelp_node): New members logfile and journal.
8431 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8432 grub_fshelp_map_block to get real block number.
8433 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8435 (grub_ext2_read_inode): Likewise.
8436 (grub_ext3_get_journal): New function.
8437 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8438 (grub_ext2_close): Release memory used by journal.
8440 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8441 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8442 (grub_reiserfs_transaction_header): Renamed to
8443 grub_reiserfs_description_block, replace field data with real_blocks.
8444 (grub_reiserfs_commit_block): New structure.
8445 (grub_reiserfs_data): New member journal.
8446 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8448 (grub_reiserfs_read_symlink): Likewise.
8449 (grub_reiserfs_iterate_dir): Likewise.
8450 (grub_reiserfs_open): Likewise.
8451 (grub_reiserfs_read): Likewise.
8452 (grub_reiserfs_get_journal): New function.
8453 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8454 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8455 using grub_reiserfs_get_journal.
8456 (grub_reiserfs_close): Release memory used by journal.
8458 * fs/affs.c (grub_affs_read_block): Change block type to
8459 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8461 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8463 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8465 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8467 * fs/udf.c (grub_udf_read_block): Change block type to
8468 grub_disk_addr_t. Use type cast to avoid warning.
8470 * fs/xfs.c (grub_xfs_read_block): Likewise.
8472 2008-05-16 Christian Franke <franke@computer.org>
8474 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8475 to ensure that break with ESC will always work.
8476 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8477 Remove ESC from keyboard queue.
8479 2008-05-16 Christian Franke <franke@computer.org>
8481 * util/biosdisk.c: [__CYGWIN__] Add includes.
8482 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8483 (get_os_disk): Move variable declarations to OS specific
8484 parts to avoid warning.
8485 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8486 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8487 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8489 * util/getroot.c: [__CYGWIN__] Add includes.
8490 (strip_extra_slashes): Fix "/" case.
8491 [__CYGWIN__] (get_win32_path): New function.
8492 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8493 [__CYGWIN__] (find_root_device): Disable.
8494 [__CYGWIN__] (get_bootsec_serial): New function.
8495 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8496 [__linux__] (grub_guess_root_device): Add early returns to simplify
8498 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8499 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8500 check for Linux only.
8502 2008-05-15 Bean <bean123ch@gmail.com>
8504 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8505 keyboard hang problem in apple's intel mac.
8507 2008-05-09 Robert Millan <rmh@aybabtu.com>
8509 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8511 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8512 (make_device_map): Likewise.
8513 Reported by Aurelien Jarno <aurel32@debian.org>
8515 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8517 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8518 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8519 (make_device_map): Output entries for xvd type disks.
8521 2008-05-07 Robert Millan <rmh@aybabtu.com>
8523 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8525 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8526 (make_device_map): Likewise.
8527 Reported by Roland Dreier <rdreier@cisco.com>
8529 2008-05-07 Robert Millan <rmh@aybabtu.com>
8531 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8532 grub_strstr() call. Correct a few mistakes in failure path handling.
8534 2008-05-06 Robert Millan <rmh@aybabtu.com>
8536 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8537 Do not print a trailing slash (therefore, the root directory is an
8539 (convert_system_path_to_grub_path): Do not remove trailing slash
8540 from make_system_path_relative_to_its_root() output.
8542 * util/i386/pc/grub-install.in: Add trailing slash to output from
8543 make_system_path_relative_to_its_root().
8545 2008-05-06 Robert Millan <rmh@aybabtu.com>
8547 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8548 ensures that output lines aren't intermangled with those sent to
8549 stderr (via grub_util_info()).
8550 * util/grub-probe.c (grub_refresh): Likewise.
8551 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8553 2008-05-05 Christian Franke <franke@computer.org>
8555 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8556 Add Cygwin device names.
8557 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8558 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8559 (check_device): Return error instead of success on empty name.
8560 (make_device_map): Move label inside linux specific code to
8561 prevent compiler warning.
8563 2008-04-30 Robert Millan <rmh@aybabtu.com>
8565 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8566 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8568 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8570 2008-04-29 Robert Millan <rmh@aybabtu.com>
8572 * docs/grub.cfg: New file (example GRUB configuration).
8574 2008-04-26 Robert Millan <rmh@aybabtu.com>
8576 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8577 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8578 and `disk/ieee1275/nand.c'.
8580 2008-04-25 Bean <bean123ch@gmail.com>
8582 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8585 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8586 change the buffer size to 4096 for cdrom device.
8588 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8590 (_linux_mod_SOURCES): New variable.
8591 (_linux_mod_CFLAGS): Likewise.
8592 (_linux_mod_LDFLAGS): Likewise.
8593 (linux_mod_SOURCES): Likewise.
8594 (linux_mod_CFLAGS): Likewise.
8595 (linux_mod_LDFLAGS): Likewise.
8596 (nand_mod_SOURCES): Likewise.
8597 (nand_mod_CFLAGS): Likewise.
8598 (nand_mod_LDFLAGS): Likewise.
8600 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8601 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8602 type property. (nand device in olpc don't have this property)
8604 * include/grub/disk.h (grub_disk_dev_id): New macro
8605 GRUB_DISK_DEVICE_NAND_ID.
8607 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8609 (grub_rescue_cmd_initrd): Likewise.
8611 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8612 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8613 ofw_cif_handler and ofw_idt, adjust padding number.
8615 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8616 GRUB_MACHINE_IEEE1275 is defined.
8618 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8619 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8621 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8622 on nested function heap_init.
8623 (grub_upper_mem): New variable for i386-ieee1275.
8624 (grub_get_extended_memory): New function for i386-ieee1275.
8625 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8627 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8628 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8631 * loader/i386/ieee1275/linux.c: New file.
8633 * loader/i386/ieee1275/linux_normal.c: New file.
8635 * disk/ieee1275/nand.c: New file.
8637 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8639 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8641 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8643 2008-04-18 Robert Millan <rmh@aybabtu.com>
8645 Restructures early code path on ieee1275 to unify grub_main() as
8646 the first C function that is executed in every platform.
8648 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8649 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8651 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8652 * kern/ieee1275/cmain.c (cmain): Rename to ...
8653 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8654 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8657 2008-04-18 Robert Millan <rmh@aybabtu.com>
8659 * util/update-grub.in: Fix syntax error when setting
8660 `GRUB_PRELOAD_MODULES'.
8661 Reported by Stephane Chazelas <stephane@artesyncp.com>
8663 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8665 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8666 section into account, newer toolchains generate unique build ids
8667 * configure.ac: remove the test for --build-id=none acceptance,
8668 we want build ids to be preserved
8669 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8670 far from other sections don't cause the raw binary images grow
8673 2008-04-15 Robert Millan <rmh@aybabtu.com>
8675 * disk/lvm.c: Update copyright year.
8676 * kern/misc.c: Likewise.
8678 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8680 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8681 there is no memory left for physical volume name.
8683 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8685 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8686 volume name mapping to support bigger than 9 character names properly.
8688 2008-04-13 Robert Millan <rmh@aybabtu.com>
8690 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8691 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8693 2008-04-13 Christian Franke <franke@computer.org>
8695 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8696 to create a floppy emulation boot CD when non emulation mode
8698 Enable Joliet CD filesystem extension.
8700 2008-04-13 Robert Millan <rmh@aybabtu.com>
8702 * kern/misc.c (grub_strncat): Fix off-by-one error.
8703 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8705 * kern/env.c (grub_env_context_close): Clear current context, not
8707 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8709 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8711 2008-04-13 Robert Millan <rmh@aybabtu.com>
8713 Improve robustness when handling LVM.
8715 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8716 (and leave `*p' unmodified).
8717 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8719 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8720 iterating through it.
8721 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8723 (grub_lvm_scan_device): Check the return value (and fail gracefully
8724 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8725 Don't assume `vg->pvs != NULL' when iterating through it.
8727 2008-04-13 Robert Millan <rmh@aybabtu.com>
8729 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8730 * genmk.rb (partmap): New variable.
8731 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8732 (#{partmap}): New target rule.
8733 * genpartmaplist.sh: New file.
8734 * Makefile.in (pkglib_DATA): Add partmap.lst.
8735 (partmap.lst): New target rule.
8736 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8737 modules (including all partition maps), instead of preloading them.
8739 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8741 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8742 `linux-boot-prober' (if installed) to detect other operating
8743 systems which are installed on the computer and add them to
8745 * conf/common.rmk: Build and install 30_os-prober.
8747 2008-04-12 Robert Millan <rmh@aybabtu.com>
8749 * kern/powerpc/ieee1275/init.c: Move from here ...
8750 * kern/ieee1275/init.c: ... to here. Update all users.
8752 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8753 * kern/ieee1275/cmain.c: ... to here. Update all users.
8755 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8756 * kern/ieee1275/openfw.c: ... to here. Update all users.
8758 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8759 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8761 2008-04-10 Pavel Roskin <proski@gnu.org>
8763 * configure.ac: Always use "_cv_" in cache variables for
8764 compatibility with Autoconf 2.62.
8766 2008-04-07 Robert Millan <rmh@aybabtu.com>
8768 Revert grub/machine/init.h addition by Pavel (since it breaks on
8769 i386-ieee1275 and others):
8770 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8771 * util/powerpc/ieee1275/misc.c: Likewise.
8773 2008-04-07 Robert Millan <rmh@aybabtu.com>
8775 * util/grub-probe.c (probe): Improve error message.
8777 2008-04-07 Robert Millan <rmh@aybabtu.com>
8779 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8780 (this prevents the presence of a bogus entry from ruining the whole
8783 2008-04-06 Pavel Roskin <proski@gnu.org>
8785 * util/biosdisk.c: Include grub/util/biosdisk.h.
8786 * util/grub-fstest.c (execute_command): Make static.
8787 * util/grub-mkdevicemap.c (check_device): Likewise.
8788 * util/i386/pc/misc.c: Include grub/machine/init.h.
8789 * util/powerpc/ieee1275/misc.c: Likewise.
8790 * util/lvm.c: Include grub/util/lvm.h.
8791 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8793 * util/raid.c: Include grub/util/raid.h.
8794 (grub_util_getdiskname): Make static.
8796 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8797 grub_hostfs_fini(), as they are called from grub_init_all() and
8798 grub_fini_all() respectively. This fixes an infinite loop in
8799 grub-fstest due to double registration of hostfs.
8800 Reported by Christian Franke <Christian.Franke@t-online.de>
8802 2008-04-05 Pavel Roskin <proski@gnu.org>
8804 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8805 all 8 functions. Otherwise, probe function 0 only.
8807 2008-04-04 Pavel Roskin <proski@gnu.org>
8809 * commands/lspci.c (grub_lspci_iter): Print the bus number
8812 * commands/lspci.c (grub_pci_classes): Fix typos.
8813 (grub_lspci_iter): Don't print func twice. Print vendor ID
8814 before device ID, as it's normally done.
8816 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8817 Fix signedness warnings.
8818 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8820 * util/ieee1275/get_disk_name.c: Include config.h so that
8821 _GNU_SOURCE is defined and getline() is declared. Mark an
8822 unused argument as such. Fix a signedness warning.
8824 2008-04-02 Pavel Roskin <proski@gnu.org>
8826 * genkernsyms.sh.in: Use more robust assignments for CC and
8827 srcdir. Quote srcdir.
8828 * gensymlist.sh.in: Likewise. Assert at the compile time that
8829 the symbol table is not empty.
8831 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8832 * fs/cpio.c (grub_cpio_read): Likewise.
8834 2008-04-01 Pavel Roskin <proski@gnu.org>
8836 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8837 * disk/host.c (grub_host_open): Likewise.
8838 * disk/loopback.c (grub_loopback_open): Likewise.
8839 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8840 disk->id as in disk/host.c, not a multi-character constant.
8842 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8843 later is obsolete, potentially dangerous and sets a bad example.
8844 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8845 * util/misc.c (grub_util_get_image_size): Likewise.
8847 * disk/loopback.c (options): Improve help for "--partitions".
8849 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8850 options to align them with the short options, e.g. "echo -e".
8852 2008-03-31 Bean <bean123ch@gmail.com>
8854 * video/reader/png.c (grub_png_data): New member is_16bit and
8856 (grub_png_decode_image_header): Detect 16 bit png image.
8857 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8858 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8859 (grub_video_reader_png): Release memory occupied by image_data.
8861 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8863 (grub_nfs_mount): Skip the test for sector per cluster.
8865 * include/grub/ntfs.h (MAX_SPC): Removed.
8867 2008-03-31 Bean <bean123ch@gmail.com>
8869 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8870 (grub_probe_SOURCES): Add fs/afs.c.
8871 (grub_fstest_SOURCES): Likewise.
8872 (afs_mod_SOURCES): New variable.
8873 (afs_mod_CFLAGS): Likewise.
8874 (afs_mod_LDFLAGS): Likewise.
8876 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8877 (grub_emu_SOURCES): Likewise.
8879 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8881 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8883 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8885 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8887 * fs/afs.c: New file.
8889 2008-03-30 Pavel Roskin <proski@gnu.org>
8891 * disk/host.c: Include grub/misc.h to fix a warning.
8892 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8893 warnings about implicit declarations.
8895 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8897 * include/grub/i386/loader.h: Change declaration of
8898 grub_linux_boot() to match what grub_loader_set() expects.
8899 * util/getroot.c (grub_guess_root_device): Return const char* to
8901 * util/grub-probe.c (probe): Fix a warning about uninitialized
8902 abstraction_name variable.
8903 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8904 second argument as unused to fix a warning.
8906 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8907 missing grub_error() call.
8909 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8910 2.60 and newer uses it to define datadir.
8912 * commands/sleep.c: Fix warning about implicit declaration.
8913 * disk/memdisk.c: Likewise.
8914 * loader/aout.c: Likewise.
8915 * loader/i386/bsd_normal.c: Likewise.
8916 * util/grub-probe.c: Likewise.
8918 * commands/i386/cpuid.c (has_longmode): Make static.
8919 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8920 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8922 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8923 GDT. This is more robust, as %ds can change.
8924 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8925 calling real_to_prot().
8926 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8928 2008-03-28 Pavel Roskin <proski@gnu.org>
8930 * kern/i386/pc/startup.S: Assert that uncompressed functions
8931 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8932 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8933 code, as they push parts of the code (error handlers) beyond
8934 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8935 code as correctness and size.
8937 2008-03-28 Pavel Roskin <proski@gnu.org>
8939 * kern/i386/pc/startup.S
8940 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8941 data block address to the real mode, keep offset minimal. This
8942 works around a bug in AWARD BIOS on old Athlon systems, which
8943 makes CD detection hang.
8945 2008-03-26 Pavel Roskin <proski@gnu.org>
8947 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8949 * include/grub/normal.h: Add grub_parse_color_name_pair()
8952 2008-03-24 Bean <bean123ch@gmail.com>
8954 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8955 (cd_count): Removed.
8956 (cd_drive): New variable.
8957 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8958 (grub_biosdisk_call_hook): Likewise.
8959 (grub_biosdisk_iterate): Change cdrom detection method.
8960 (grub_biosdisk_open): Replace cd_start with cd_drive.
8961 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8962 detect cdrom device.
8964 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8966 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8967 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8968 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8969 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8970 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8971 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8972 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8973 (grub_biosdisk_cdrp): New structure.
8974 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8976 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8978 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8981 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8984 2008-03-20 Robert Millan <rmh@aybabtu.com>
8986 Remove 2 TiB limit in ata.mod.
8987 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8988 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8989 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8990 grub_uint64_t instead of grub_uint32_t.
8992 2008-03-05 Bean <bean123ch@gmail.com>
8994 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8995 (grub_multiboot): Set boot device.
8997 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8999 2008-03-02 Bean <bean123ch@gmail.com>
9001 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9004 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
9006 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9009 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9012 * docs/fdl.texi: New file.
9014 * docs/mdate-sh: New file. Copied from gnulib.
9015 * docs/texinfo.tex: Likewise.
9017 * config.guess: Updated from gnulib.
9018 * install-sh: Likewise.
9020 2008-02-28 Robert Millan <rmh@aybabtu.com>
9022 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9023 (aout_mod_SOURCES): New variable.
9024 (aout_mod_CFLAGS): Likewise.
9025 (aout_mod_LDFLAGS): Likewise.
9027 * conf/i386-ieee1275.rmk: Likewise.
9029 2008-02-28 Robert Millan <rmh@aybabtu.com>
9031 * util/update-grub.in: Reorganise terminal validity check. Accept
9032 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9033 Based on suggestion by Franklin PIAT.
9035 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
9037 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9039 * util/getroot.c (grub_util_check_block_device): New function that
9040 returns the given argument if it is a block device and returns NULL else.
9041 * util/grub-probe.c (argument_is_device): New variable.
9042 (probe): Promote device_name from a variable to an argument. Receive
9043 device_name from grub_util_check_block_device() if path is NULL and from
9044 grub_guess_root_device() else. Do not free() device_name anymore.
9045 (options): Introduce new parameter '-d, --device'.
9046 (main): Add description of the new parameter to the help screen.
9047 Rename path variable to argument. Set argument_is_device if the '-d'
9048 option is given. Pass argument to probe() depending on
9051 2008-02-24 Bean <bean123ch@gmail.com>
9053 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9054 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9055 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9056 (GRUB_ISO9660_VOLDESC_PART): Likewise.
9057 (GRUB_ISO9660_VOLDESC_END): Likewise.
9058 (grub_iso9660_primary_voldesc): New member escape.
9059 (grub_iso9660_data): New member joliet.
9060 (grub_iso9660_convert_string): New function.
9061 (grub_iso9660_mount): Detect joliet extension.
9062 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9063 (grub_iso9660_iso9660_label): Likewise.
9065 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
9066 (grub_setup_SOURCES): Add fs/udf.c.
9067 (grub_fstest_SOURCES): Likewise.
9068 (udf_mod_SOURCES): New variable.
9069 (udf_mod_CFLAGS): Likewise.
9070 (udf_mod_LDFLAGS): Likewise.
9072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
9073 (grub_emu_SOURCES): Likewise.
9075 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9077 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9079 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9083 * fs/udf.c: New file.
9085 2008-02-24 Robert Millan <rmh@aybabtu.com>
9087 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
9088 (normal/lexer.c_DEPENDENCIES): New variables.
9089 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9090 (normal/lexer.c_DEPENDENCIES): Likewise.
9091 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
9092 (normal/lexer.c_DEPENDENCIES): Likewise.
9093 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
9094 (normal/lexer.c_DEPENDENCIES): Likewise.
9095 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9096 (normal/lexer.c_DEPENDENCIES): Likewise.
9097 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9098 (normal/lexer.c_DEPENDENCIES): Likewise.
9100 2008-02-23 Robert Millan <rmh@aybabtu.com>
9102 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
9103 since they were intended to be in hex. This didn't break previously
9104 because of a bug in gpt_partition_map_iterate() (see below).
9106 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
9107 when checking the validity of GPT header.
9108 Remove `partno', since it always provides the same information as `i'.
9110 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
9112 * include/grub/efi/time.h: Fix a wrong comment.
9114 2008-02-19 Pavel Roskin <proski@gnu.org>
9116 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
9119 2008-02-19 Bean <bean123ch@gmail.com>
9121 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
9122 (aout_mod_SOURCES): New variable.
9123 (aout_mod_CFLAGS): Likewise.
9124 (aout_mod_LDFLAGS): Likewise.
9125 (_bsd_mod_SOURCES): New variable.
9126 (_bsd_mod_CFLAGS): Likewise.
9127 (_bsd_mod_LDFLAGS): Likewise.
9128 (bsd_mod_SOURCES): New variable.
9129 (bsd_mod_CFLAGS): Likewise.
9130 (bsd_mod_LDFLAGS): Likewise.
9132 * include/grub/aout.h: New file.
9134 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
9136 * include/grub/i386/bsd.h: New file.
9138 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
9141 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
9142 function is called, so that it's possible to change it inside the hook.
9143 (grub_elf64_load): Likewise.
9144 (grub_elf_file): Don't close the file if elf header is not found.
9145 (grub_elf_close): Close the file if grub_elf_file fails (The new
9146 grub_elf_file won't close it).
9147 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
9148 (grub_elf64_size): Likewise.
9150 * kern/i386/loader.S (grub_unix_real_boot): New function.
9152 * loader/aout.c: New file.
9154 * loader/i386/bsd.c: New file.
9156 * loader/i386/bsd_normal.c: New file.
9158 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
9160 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
9161 can test other formats.
9163 2008-02-19 Robert Millan <rmh@aybabtu.com>
9165 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
9166 (grub_gpt_partition_type_empty): Redefine with macro from
9167 `<grub/gpt_partition.h>'.
9168 (gpt_partition_map_iterate): Adjust partition type comparison.
9170 Export `entry' as partmap-specific `part.data' struct.
9171 (grub_gpt_header, grub_gpt_partentry): Move from here ...
9173 * include/grub/gpt_partition.h (grub_gpt_header)
9174 (grub_gpt_partentry): ... to here (new file).
9176 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
9178 (grub_gpt_partition_type_bios_boot): New const variable, defined
9179 with macro from `<grub/gpt_partition.h>'.
9181 (setup): Replace `first_start' with `embed_region', which keeps
9182 track of the embed region (and is partmap-agnostic).
9184 Replace find_first_partition_start() with find_usable_region(),
9185 which finds a usable region for embedding using partmap-specific
9186 knowledge (supports PC/MSDOS and GPT).
9188 Fix all assumptions that the embed region start at sector 1, using
9189 `embed_region.start' from now on. Similarly, use `embed_region.end'
9190 rather than `first_start' to calculate available size.
9192 In grub_util_info() message, replace "into after the MBR" with an
9193 indication of the specific sector our embed region starts at.
9195 2008-02-19 Robert Millan <rmh@aybabtu.com>
9197 * DISTLIST: Replace `commands/ieee1275/halt.c' and
9198 `commands/ieee1275/reboot.c' with `commands/halt.c' and
9199 `commands/reboot.c'.
9200 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9201 (halt_mod_SOURCES): Likewise.
9202 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9203 (halt_mod_SOURCES): Likewise.
9205 2008-02-17 Christian Franke <franke@computer.org>
9207 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
9209 2008-02-17 Robert Millan <rmh@aybabtu.com>
9211 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9212 set `first_start' to 0 for non-PC/MSDOS partition maps.
9214 2008-02-16 Robert Millan <rmh@aybabtu.com>
9216 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9217 do not assume partition map is PC/MSDOS before performing checks that
9218 are specific to that layout.
9220 2008-02-13 Robert Millan <rmh@aybabtu.com>
9222 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
9223 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
9224 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
9226 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
9228 * configure.ac: Only a cosmetic change on the handling of
9229 -fno-stack-protector.
9231 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
9233 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
9234 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
9236 (grub_install_SOURCES): Add halt.mod and reboot.mod.
9237 (halt_mod_SOURCES): New variable.
9238 (halt_mod_CFLAGS): Likewise.
9239 (halt_mod_LDFLAGS): Likewise.
9240 (reboot_mod_SOURCES): Likewise.
9241 (reboot_mod_CFLAGS): Likewise.
9242 (reboot_mod_LDFLAGS): Likewise.
9244 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
9245 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
9247 (halt_mod_SOURCES): Likewise.
9248 (reboot_mod_SOURCES): Likewise.
9250 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
9251 commands/i386/pc/reboot.c by commands/reboot.c.
9252 (reboot_mod_SOURCES): Likewise.
9254 * commands/i386/pc/reboot.c: merge this file ...
9256 * commands/ieee1275/reboot.c: ... and this file ...
9258 * commands/reboot.c: ... to this file.
9259 Add some precompiler directive to include the correct header for
9262 * commands/ieee1275/halt.c: move this file ...
9264 * commands/halt.c: ... to here.
9265 Add some precompiler directive to include the correct header for
9268 * include/grub/efi/efi.h (grub_reboot): New function declaration.
9269 (grub_halt): Likewise.
9271 * kern/efi/efi.c (grub_reboot): New function.
9272 (grub_halt): Likewise.
9274 2008-02-12 Robert Millan <rmh@aybabtu.com>
9276 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
9277 /dev (like it is done for /dev/mapper). This doesn't provide support
9278 for EVMS, but at least it is now easy to identify the problem when it
9281 2008-02-11 Robert Millan <rmh@aybabtu.com>
9283 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
9284 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
9285 comparing it with -1, not 0.
9287 2008-02-10 Robert Millan <rmh@aybabtu.com>
9289 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
9291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9292 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
9294 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
9295 `disk/lvm.c' to the end of the list.
9296 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9297 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9299 2008-02-10 Robert Millan <rmh@aybabtu.com>
9301 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
9302 grub_print_error() instead. This will let user know why we're entering
9304 Based on suggestions from Sam Morris.
9306 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
9308 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
9309 on remaining N args, instead of "--" arg N times.
9311 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
9313 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
9314 (fill_with_default_glyph): Changed to use unknown_glyph for fill
9315 pattern for unknown glyphs.
9317 2008-02-09 Robert Millan <rmh@aybabtu.com>
9319 * configure.ac: Probe for `help2man'.
9320 * Makefile.in (builddir): New variable.
9321 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
9322 or otherwise add a few flags/options to it.
9323 (install-local): For every executable utility or script that is
9324 installed, invoke $(HELP2MAN) to install a manpage based on --help
9327 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
9328 that it doesn't prevent --help from working in build tree.
9330 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
9331 with `bug-grub@gnu.org'.
9332 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
9333 * util/update-grub.in (usage): New function.
9334 Implement proper argument check, with support for --help and --version
9335 (as well as existing -y).
9337 2008-02-09 Christian Franke <franke@computer.org>
9339 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9340 avoid overwriting previous output.
9341 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9343 2008-02-09 Robert Millan <rmh@aybabtu.com>
9345 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9348 2008-02-09 Robert Millan <rmh@aybabtu.com>
9350 * commands/sleep.c: New file.
9351 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9352 (sleep_mod_SOURCES): New variable.
9353 (sleep_mod_CFLAGS): Likewise.
9354 (sleep_mod_LDFLAGS): Likewise.
9356 2008-02-09 Robert Millan <rmh@aybabtu.com>
9358 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9359 situations in which we can deduce the RAID size and the superblock
9362 2008-02-09 Robert Millan <rmh@aybabtu.com>
9364 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
9365 and return a grub_diskmemberlist_t composed of LVM physical volumes.
9366 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9368 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
9369 and return a grub_diskmemberlist_t composed of physical array members.
9370 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9372 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9374 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9375 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9376 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9378 * util/grub-probe.c (probe): Move partmap probing code from here ...
9379 (probe_partmap): ... to here.
9380 (probe): Use probe_partmap() once for the disk we're probing, and
9381 additionally, when such disk contains a memberlist() struct member,
9382 once for each disk that is contained in the structure returned by
9385 2008-02-09 Robert Millan <rmh@aybabtu.com>
9387 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9388 environment variable to 'all' in order to obtain debug output from
9390 * util/i386/pc/grub-setup.c (main): Likewise.
9392 2008-02-08 Robert Millan <rmh@aybabtu.com>
9394 * disk/raid.c (grub_raid_scan_device): Check for
9395 `array->device[sb.this_disk.number]' rather than for
9396 `array->device[sb.this_disk.number]->name', since the latter is not
9397 guaranteed to be accessible.
9399 2008-02-08 Robert Millan <rmh@aybabtu.com>
9401 * disk/raid.c: Update copyright.
9402 * fs/cpio.c: Likewise.
9403 * include/grub/raid.h: Likewise.
9404 * loader/i386/pc/multiboot.c: Likewise.
9405 * util/hostfs.c: Likewise.
9407 2008-02-08 Robert Millan <rmh@aybabtu.com>
9409 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9410 to a grub_disk_t array.
9411 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9413 (grub_raid_scan_device): Replace `device[x].name' accesses with
9414 `device[x]->name'. Simplify initialization of `array->device[x]'.
9416 2008-02-08 Robert Millan <rmh@aybabtu.com>
9418 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9419 grub_dprintf() calls.
9420 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9423 2008-02-07 Christian Franke <franke@computer.org>
9425 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9426 instead of fseek and ftell to support large files.
9427 (grub_hostfs_read): Likewise.
9429 2008-02-07 Robert Millan <rmh@aybabtu.com>
9431 Patch from Jeroen Dekkers.
9432 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
9433 failure, since successfully reading all array members might not be
9436 2008-02-06 Robert Millan <rmh@aybabtu.com>
9438 * util/grub-probe.c (probe): Simplify partmap probing (with the
9439 assumption that the first word up to the underscore equals to
9442 2008-02-06 Christian Franke <franke@computer.org>
9444 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9445 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9446 last block of a cpio or tar stream.
9447 Check for "TRAILER!!!" instead of any empty data
9448 block to detect last block of a cpio stream.
9449 (grub_cpio_dir): Fix constness of variable np.
9450 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9451 cpio or tar trailer is detected. This fixes a crash
9452 on open of a non existing file.
9454 2008-02-05 Bean <bean123ch@gmail.com>
9456 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9458 (grub_multiboot_load_elf64): Likewise.
9459 (grub_multiboot): Initialize mbi structure.
9461 * util/grub-fstest.c: Don't include unused header file script.h.
9463 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9465 (grub_fstest_SOURCES): Likewise.
9467 2008-02-05 Robert Millan <rmh@aybabtu.com>
9469 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9470 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9471 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9472 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9474 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9475 (translation_table): Replace hardcoded values with macros
9476 provided by `<grub/term.h>'.
9478 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9479 (keyboard_map): Correct/add a few values, with macros provided
9481 (keyboard_map_shift): Zero values that don't differ from their
9482 `keyboard_map' equivalents.
9483 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9484 Discard the second scan code that is always sent by Caps lock.
9485 Only use `keyboard_map_shift' when it provides a non-zero value,
9486 otherwise fallback to `keyboard_map'.
9488 2008-02-04 Bean <bean123ch@gmail.com>
9490 * Makefile.in (enable_grub_fstest): New variable.
9492 * conf/common.rmk (grub_fstest_init.lst): New rule.
9493 (grub_fstest_init.h): Likewise.
9494 (grub_fstest_init.c): Likewise.
9495 (util/grub-fstest.c_DEPENDENCIES): New variable.
9496 (grub_fstest_SOURCES): Likewise.
9498 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9500 * util/grub-fstest.c: New file.
9502 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9504 Make grub-setup handle a separate root device.
9506 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9507 so that the root device can be compared with the destination
9509 When embedding the core image, if the root and destination devices
9510 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9512 When not embedding, set ROOT_DRIVE to 0xFF.
9514 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9516 Add support for having a grub directory in a different drive. This
9517 is still only the data handling part.
9519 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9520 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9521 (grub_root_drive): New variable.
9523 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9524 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9525 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9528 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9530 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9532 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9534 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9535 is bogus, because PXE booting does not specify any drive
9538 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9539 am not sure if this is really correct.
9541 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9542 is always identical to the boot drive when booting from a CD.
9544 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9546 (root_drive): New variable.
9547 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9548 (setup_sectors): Push %dx right after popping it, because %dh will
9550 (copy_buffer): Restore %dx.
9552 2008-02-03 Robert Millan <rmh@aybabtu.com>
9554 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9555 use `cdboot.img' for cdrom images.
9557 2008-02-03 Robert Millan <rmh@aybabtu.com>
9559 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9560 only setup gfxterm when `font' command has succeeded.
9562 2008-02-03 Robert Millan <rmh@aybabtu.com>
9564 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9565 (grub_rescue_cmd_multiboot_loader)
9566 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9568 2008-02-03 Pavel Roskin <proski@gnu.org>
9570 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9571 %edx and %esi from stack only after grub_gate_a20() is called.
9572 grub_gate_a20() clobbers %edx.
9574 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9576 * configure.ac (AC_INIT): Bumped to 1.96.
9578 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9579 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9580 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9581 video/readers/png.c.
9583 2008-02-03 Bean <bean123ch@gmail.com>
9585 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9586 (cdboot_img_SOURCES): New variable.
9587 (cdboot_img_ASFLAGS): New variable.
9588 (cdboot_img_LDFLAGS): New variable.
9590 * boot/i386/pc/cdboot.S: New file.
9592 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9593 (cd_count): Likewise.
9594 (grub_biosdisk_get_drive): Add support for cd device.
9595 (grub_biosdisk_call_hook): Likewise.
9596 (grub_biosdisk_iterate): Likewise.
9597 (grub_biosdisk_open): Likewise.
9598 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9599 (grub_biosdisk_rw): Support reading from cd device.
9600 (GRUB_MOD_INIT): Iterate cd devices.
9602 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9603 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9604 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9606 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9608 2008-02-02 Robert Millan <rmh@aybabtu.com>
9610 * commands/read.c: New file.
9611 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9612 (read_mod_SOURCES): New variable.
9613 (read_mod_CFLAGS): Likewise.
9614 (read_mod_LDFLAGS): Likewise.
9616 2008-02-02 Robert Millan <rmh@aybabtu.com>
9618 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9619 determining whether menu has to be displayed.
9621 2008-02-02 Marco Gerards <marco@gnu.org>
9623 * bus/pci.c: New file.
9625 * include/grub/pci.h: Likewise.
9627 * include/grub/i386/pc/pci.h: Likewise.
9629 * commands/lspci.c: Likewise.
9631 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9633 (pci_mod_SOURCES): New variable.
9634 (pci_mod_CFLAGS): Likewise.
9635 (pci_mod_LDFLAGS): Likewise.
9636 (lspci_mod_SOURCES): Likewise.
9637 (lspci_mod_CFLAGS): Likewise.
9638 (lspci_mod_LDFLAGS): Likewise.
9640 2008-02-02 Bean <bean123ch@gmail.com>
9642 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9643 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9645 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9646 (grub_xfs_btree_node): New structure.
9647 (grub_xfs_btree_root): New structure.
9648 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9649 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9650 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9651 (GRUB_XFS_EXTENT_SIZE): Likewise.
9652 (grub_xfs_read_block): Support btree format type.
9653 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9654 Use directory block as basic unit.
9656 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9658 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9659 __attribute__ ((__regparm__ (1))).
9661 2008-02-01 Robert Millan <rmh@aybabtu.com>
9663 Correct a mistake in previous commit.
9665 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9667 (normal/command.c_DEPENDENCIES): New variable.
9669 2008-02-01 Robert Millan <rmh@aybabtu.com>
9671 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9673 (normal/command.c_DEPENDENCIES): New variable.
9674 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9675 * conf/i386-ieee1275.rmk: Likewise.
9676 * conf/i386-linuxbios.rmk: Likewise.
9677 * conf/i386-pc.rmk: Likewise.
9678 * conf/sparc64-ieee1275.rmk: Likewise.
9679 * conf/powerpc-ieee1275.rmk: Likewise.
9680 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9682 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9684 2008-02-01 Robert Millan <rmh@aybabtu.com>
9686 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9687 call at beginning of function.
9689 2008-01-31 Pavel Roskin <proski@gnu.org>
9691 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9692 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9693 (grub_mkrescue_SOURCES): Likewise.
9694 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9696 2008-01-30 Robert Millan <rmh@aybabtu.com>
9698 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9699 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9700 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9701 (grub_probe_SOURCES): ... to here.
9703 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9704 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9705 * conf/i386-ieee1275.rmk: Likewise.
9706 * conf/i386-linuxbios.rmk: Likewise.
9707 * conf/powerpc-ieee1275.rmk: Likewise.
9709 2008-01-30 Tristan Gingold <gingold@free.fr>
9711 * kern/rescue.c: Silently accept empty lines.
9713 2008-01-29 Bean <bean123ch@gmail.com>
9715 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9716 (real_code_2): Code cleanup and change comment style.
9717 (move_memory): Avoid using 32-bit address mode.
9719 2008-01-29 Bean <bean123ch@gmail.com>
9721 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9722 (png_mod_SOURCES): New variable.
9723 (png_mod_CFLAGS): Likewise.
9724 (png_mod_LDFLAGS): Likewise.
9726 * video/readers/png.c: New file.
9728 2008-01-28 Robert Millan <rmh@aybabtu.com>
9730 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9731 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9732 `ifndef GRUB_MOD_GAP' hack.
9733 * util/elf/grub-mkimage.c (add_segments): Likewise.
9735 2008-01-27 Robert Millan <rmh@aybabtu.com>
9737 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9738 `GRUB_MOD_GAP' for platforms in which it's not defined.
9739 * util/elf/grub-mkimage.c (add_segments): Likewise.
9741 2008-01-27 Robert Millan <rmh@aybabtu.com>
9743 Get grub-emu to build again (including parallel builds).
9745 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9747 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9748 (normal/execute.c_DEPENDENCIES): ... this, ...
9749 (grub-emu_DEPENDENCIES): ... and this.
9751 * conf/i386-efi.rmk: Likewise.
9752 * conf/i386-linuxbios.rmk: Likewise.
9753 * conf/i386-ieee1275.rmk: Likewise.
9754 * conf/powerpc-ieee1275.rmk: Likewise.
9755 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9757 2008-01-27 Robert Millan <rmh@aybabtu.com>
9759 * NEWS: Add a few items.
9761 2008-01-27 Robert Millan <rmh@aybabtu.com>
9763 Fix parallel builds with grub-emu. Based on earlier commit for
9764 grub-probe and grub-setup.
9766 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9767 (util/grub-emu.c_DEPENDENCIES): ... this.
9768 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9769 (util/grub-emu.c_DEPENDENCIES): ... this.
9770 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9771 (util/grub-emu.c_DEPENDENCIES): ... this.
9772 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9773 (util/grub-emu.c_DEPENDENCIES): ... this.
9774 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9775 (util/grub-emu.c_DEPENDENCIES): ... this.
9777 2008-01-27 Pavel Roskin <proski@gnu.org>
9779 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9780 to create a gap between _end and the modules added to the image
9781 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9782 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9783 * util/elf/grub-mkimage.c (add_segments): Likewise.
9785 2008-01-26 Pavel Roskin <proski@gnu.org>
9787 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9788 just return an error.
9790 2008-01-26 Bean <bean123ch@gmail.com>
9792 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9793 (grub_reiserfs_get_item): Save offset of the next item.
9794 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9796 2008-01-25 Robert Millan <rmh@aybabtu.com>
9798 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9799 make all filesystem sources appear together (possibly fixing omissions
9801 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9802 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9803 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9804 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9806 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9808 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9809 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9810 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9811 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9813 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9814 (probe): Add a sanity check to make sure of our ability to read
9815 requested files when probing for filesystem type.
9817 * genmk.rb: Update copyright year (2007).
9819 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9820 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9821 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9822 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9823 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9824 : Remove function prototypes.
9826 2008-01-25 Robert Millan <rmh@aybabtu.com>
9828 Revert my previous commits (based on wrong assumption of how grub_errno
9831 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9832 * kern/file.c (grub_file_open): Likewise.
9834 2008-01-24 Pavel Roskin <proski@gnu.org>
9836 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9837 that hang if GRUB tries to setup colors.
9838 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9839 colors for firmwares that don't support it.
9840 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9841 Recognize Open Hack'Ware, set flags to work around its
9844 2008-01-24 Robert Millan <rmh@aybabtu.com>
9846 * kern/file.c (grub_file_open): Do not account previous failures of
9847 unrelated functions when grub_errno is checked for.
9848 Reported by Oleg Strikov.
9850 2008-01-24 Bean <bean123ch@gmail.com>
9852 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9853 (grub_ufs_sblock): New member volume name.
9854 (grub_ufs_find_file): Fix string copy bug.
9855 (grub_ufs_label): Implement this function properly.
9857 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9858 (grub_hfs_iterate_records): Use the correct file number for extents
9859 and catalog file. Fix problem in next index calculation.
9860 (grub_hfs_find_node): Replace recursive function call with loop.
9861 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9863 2008-01-23 Robert Millan <rmh@aybabtu.com>
9865 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9866 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9867 (grub_multiboot2_real_boot): New function prototype.
9869 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9870 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9872 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9873 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9875 2008-01-23 Robert Millan <rmh@aybabtu.com>
9877 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9878 #ifdef'ed out grub_printf().
9880 2008-01-23 Robert Millan <rmh@aybabtu.com>
9882 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9883 grub_dprintf calls, since they make "debug=all" mode unusable.
9884 (grub_console_checkkey): Likewise.
9886 2008-01-23 Robert Millan <rmh@aybabtu.com>
9888 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9889 `term/i386/pc/at_keyboard.c'.
9890 (pkglib_MODULES): Add `serial.mod'.
9891 (serial_mod_SOURCES): New variable.
9892 (serial_mod_CFLAGS): Likewise.
9893 (serial_mod_LDFLAGS): Likewise.
9895 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9896 `<grub/powerpc/ieee1275/console.h>'.
9897 (grub_keyboard_controller_init): New function prototype.
9898 (grub_console_checkkey): Likewise.
9899 (grub_console_getkey): Likewise.
9901 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9904 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9905 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9907 2008-01-23 Robert Millan <rmh@aybabtu.com>
9909 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9910 present, "(memdisk)/boot/grub" becomes the default prefix.
9912 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9913 a memdisk tarball with all the modules. Add --overlay=DIR option that
9914 allows users to overlay additional files into the image.
9916 2008-01-23 Robert Millan <rmh@aybabtu.com>
9918 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9919 and `machine/memory.h'.
9920 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9921 (_multiboot_mod_SOURCES): New variable.
9922 (_multiboot_mod_CFLAGS): Likewise.
9923 (_multiboot_mod_LDFLAGS): Likewise.
9924 (multiboot_mod_SOURCES): Likewise.
9925 (multiboot_mod_CFLAGS): Likewise.
9926 (multiboot_mod_LDFLAGS): Likewise.
9928 * include/grub/i386/ieee1275/loader.h: New file.
9930 * include/grub/i386/ieee1275/machine.h: Likewise.
9932 * include/grub/i386/ieee1275/memory.h: Likewise.
9934 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9935 variable declaration.
9936 (grub_os_area_size): Likewise.
9938 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9939 (grub_lower_mem, grub_upper_mem): New variables.
9940 (grub_stop_floppy): New function (just to make
9941 grub_multiboot2_real_boot() happy).
9943 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9944 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9945 (grub_stop): New function.
9946 Include `"../realmode.S"' and `"../loader.S"'.
9948 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9949 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9951 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9952 rely on grub_multiboot2_real_boot() for final boot.
9954 2008-01-22 Robert Millan <rmh@aybabtu.com>
9956 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9957 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9958 device that doesn't look like an SD card.
9959 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9960 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9961 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9962 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9965 2008-01-22 Robert Millan <rmh@aybabtu.com>
9967 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9968 avoid claiming over our own code.
9970 2008-01-22 Bean <bean123ch@gmail.com>
9972 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9973 (jpeg_mod_SOURCES): New variable.
9974 (jpeg_mod_CFLAGS): Likewise.
9975 (jpeg_mod_LDFLAGS): Likewise.
9977 * video/readers/jpeg.c : New file.
9979 2008-01-22 Bean <bean123ch@gmail.com>
9981 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9982 there are no more items.
9984 2008-01-21 Robert Millan <rmh@aybabtu.com>
9986 * kern/mm.c (grub_mm_init_region): Improve debug message.
9988 2008-01-21 Robert Millan <rmh@aybabtu.com>
9990 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9991 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9993 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9995 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9996 Indicates start of upper memory.
9997 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9998 (generate_image): Abort when image size is big enough to corrupt
10001 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10002 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10003 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10004 instead of hardcoding 0xA0000.
10005 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10006 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10007 instead of hardcoding 0xA0000.
10009 2008-01-21 Robert Millan <rmh@aybabtu.com>
10011 * disk/memdisk.c (memdisk_size): New variable.
10012 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10014 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
10015 image to dynamic memory.
10016 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10017 `memdisk_size'. Free memdisk block.
10019 2008-01-21 Robert Millan <rmh@aybabtu.com>
10021 Fix detection of very small filesystems (like tar).
10023 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10024 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10025 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10026 a problem with this disk).
10028 2008-01-21 Robert Millan <rmh@aybabtu.com>
10030 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10031 on grub_biosdisk_rw_standard() error.
10033 2008-01-21 Robert Millan <rmh@aybabtu.com>
10035 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10037 * kern/elf.c: Likewise.
10038 * kern/ieee1275/ieee1275.c: Likewise.
10039 * kern/powerpc/ieee1275/openfw.c: Likewise.
10040 * term/ieee1275/ofconsole.c: Likewise.
10042 2008-01-21 Robert Millan <rmh@aybabtu.com>
10044 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10046 * include/grub/kernel.h (grub_arch_memdisk_addr)
10047 (grub_arch_memdisk_size): Moved from here ...
10049 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10050 (grub_arch_memdisk_size): ... to here.
10052 2008-01-21 Robert Millan <rmh@aybabtu.com>
10054 Mostly based on bugfix from Bean.
10056 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10057 attribute with hook() parameter.
10058 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10060 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10061 attribute with hook() parameter.
10062 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10065 2008-01-21 Robert Millan <rmh@aybabtu.com>
10067 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
10068 (pkglib_MODULES): Add `memdisk.mod'.
10069 (memdisk_mod_SOURCES): New variable.
10070 (memdisk_mod_CFLAGS): Likewise.
10071 (memdisk_mod_LDFLAGS): Likewise.
10073 * disk/memdisk.c: New file.
10075 * include/grub/disk.h (grub_disk_dev_id): Add
10076 `GRUB_DISK_DEVICE_MEMDISK_ID'.
10078 * include/grub/i386/pc/kernel.h
10079 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
10080 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
10081 (grub_kernel_image_size): New variable declaration.
10082 (grub_total_module_size): Likewise.
10083 (grub_memdisk_image_size): Likewise.
10085 * include/grub/i386/pc/memory.h
10086 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
10088 * include/grub/kernel.h: Include `<grub/symbol.h>'.
10089 (grub_arch_memdisk_addr): New variable declaration.
10090 (grub_arch_memdisk_size): Likewise.
10092 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
10093 (grub_arch_memdisk_size): Likewise.
10095 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
10096 (codestart): Replace hardcoded `0x100000' with
10097 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
10099 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
10100 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
10101 not NULL, append the contents of the file it refers to, at the end of
10102 the compressed kernel image. Initialize `grub_memdisk_image_size'
10103 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
10104 (options): Add "memdisk"|'m' option.
10105 (main): Parse --memdisk|-m option, and pass user-provided path as
10106 parameter to generate_image().
10108 2008-01-20 Robert Millan <rmh@aybabtu.com>
10110 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
10111 grub_dprintf() calls from here ...
10112 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
10114 2008-01-20 Robert Millan <rmh@aybabtu.com>
10116 Fix detection of "real mode" when /options/real-mode? doesn't exist.
10118 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
10120 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
10121 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
10122 `GRUB_IEEE1275_FLAG_REAL_MODE'.
10123 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
10125 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
10126 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
10128 2008-01-19 Robert Millan <rmh@aybabtu.com>
10130 Get rid of confusing function (superseded by
10131 `grub_ieee1275_get_integer_property')
10132 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
10134 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
10136 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
10137 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
10138 in native endianness from grub_ieee1275_get_integer_property().
10140 2008-01-19 Robert Millan <rmh@aybabtu.com>
10142 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
10143 command after "shut-down", since implementations differ on which
10144 the command for halt is.
10146 2008-01-19 Robert Millan <rmh@aybabtu.com>
10148 * include/grub/i386/linuxbios/console.h: Add header protection.
10149 (grub_keyboard_controller_init): New function prototype.
10150 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
10151 (KEYBOARD_COMMAND_READ): Likewise.
10152 (KEYBOARD_COMMAND_WRITE): Likewise.
10153 (KEYBOARD_SCANCODE_SET1): Likewise.
10154 (grub_keyboard_controller_write): New function.
10155 (grub_keyboard_controller_read): Likewise.
10156 (grub_keyboard_controller_init): Likewise.
10158 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
10159 (grub_console_init): On coreboot/LinuxBIOS, call
10160 grub_keyboard_controller_init().
10162 2008-01-19 Robert Millan <rmh@aybabtu.com>
10164 PowerPC changes provided by Pavel Roskin.
10166 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
10167 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
10168 don't rely on cmain() doing it.
10169 * kern/i386/ieee1275/startup.S (_start): Store %eax in
10170 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
10172 2008-01-16 Robert Millan <rmh@aybabtu.com>
10174 * include/grub/i386/linuxbios/memory.h
10175 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
10176 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
10177 receive `table_header' as argument. Instead, probe for it in the
10178 known memory ranges where it can be present.
10179 (grub_available_iterate): Do not pass a fixed `table_header' address
10180 to grub_linuxbios_table_iterate().
10182 2008-01-15 Robert Millan <rmh@aybabtu.com>
10184 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
10185 * conf/i386-ieee1275.rmk: New file.
10186 * include/grub/i386/ieee1275/console.h: Likewise.
10187 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
10188 * include/grub/i386/ieee1275/kernel.h: Likewise.
10189 * include/grub/i386/ieee1275/time.h: Likewise.
10190 * kern/i386/ieee1275/init.c: Likewise.
10191 * kern/i386/ieee1275/startup.S: Likewise.
10193 2008-01-15 Robert Millan <rmh@aybabtu.com>
10195 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
10196 when pointers are 32-bit (but still do set it to one when they are
10199 2008-01-15 Robert Millan <rmh@aybabtu.com>
10201 * include/grub/ieee1275/ieee1275.h
10202 (grub_ieee1275_get_integer_property): New function prototype.
10204 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
10205 (grub_ieee1275_get_integer_property): New function. Wraps around
10206 grub_ieee1275_get_property() to handle endianness.
10208 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
10209 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
10211 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
10212 (grub_map): Likewise.
10213 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
10215 2008-01-15 Bean <bean123ch@gmail.com>
10217 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
10218 (grub_script_execute_cmdline): Reset grub_errno.
10220 * normal/main.c (read_config_file): Reset grub_errno.
10222 * normal/parse.y (script_init): New.
10223 (script): Move function and menuentry here.
10225 (command): Add delimiter at the end of command.
10226 (commands): Adjust to match the new command.
10227 (commandblock): Remove grub_script_lexer_record_start.
10228 (menuentry): Add grub_script_lexer_record_start, use the new commands.
10229 (if): Use the new commands.
10231 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
10233 2008-01-15 Robert Millan <rmh@aybabtu.com>
10235 * normal/menu.c (run_menu): Move timeout message from here ...
10236 (print_timeout): ... to here.
10237 (run_menu): Use print_timeout() once during initial draw to print
10238 the whole message, and again in every clock tick to update only
10239 the number of seconds.
10241 2008-01-15 Robert Millan <rmh@aybabtu.com>
10243 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
10244 actual size of `available' from grub_ieee1275_get_property(), and
10245 restrict parsing to that bound.
10247 2008-01-15 Christian Franke <franke@computer.org>
10249 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
10250 (argp_program_version): Remove variable.
10251 (argp_program_bug_address): Likewise.
10252 (options): Convert from struct argp_option to struct option.
10253 (struct arguments): Remove.
10254 (parse_opt): Remove.
10255 (usage): New function.
10256 (main): Replace struct args members by simple variables.
10257 Replace argp_parse() by getopt_long().
10258 Add switch to evaluate options.
10259 Add missing "(...)" around root_dev in prefix string.
10261 2008-01-14 Robert Millan <rmh@aybabtu.com>
10263 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
10264 for grub_ieee1275_exit(), in order to improve portability.
10266 2008-01-14 Robert Millan <rmh@aybabtu.com>
10268 * util/grub.d/10_linux.in (prefix): Define.
10269 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
10271 2008-01-13 Pavel Roskin <proski@gnu.org>
10273 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
10274 grub_errno if no errors have been detected.
10276 2008-01-12 Robert Millan <rmh@aybabtu.com>
10278 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
10279 (grub_util_get_dev_abstraction): New function prototype.
10281 * util/getroot.c: Include `<grub/util/getroot.h>'
10282 (grub_util_get_grub_dev): Move detection of abstraction type to ...
10283 (grub_util_get_dev_abstraction): ... here (new function).
10285 * util/grub-probe.c: Convert PRINT_* to an enum. Add
10286 `PRINT_ABSTRACTION'.
10287 (probe): Probe for abstraction type when requested.
10288 (main): Understand `--target=abstraction'.
10290 * util/i386/efi/grub-install.in: Add abstraction module to core
10291 image when it is found to be necessary.
10292 * util/i386/pc/grub-install.in: Likewise.
10293 * util/powerpc/ieee1275/grub-install.in: Likewise.
10295 * util/update-grub_lib.in (font_path): Return system path without
10296 converting to GRUB path.
10297 * util/update-grub.in: Convert system path returned by font_path()
10298 to a GRUB path. Use `grub-probe -t abstraction' to determine what
10299 abstraction module is needed for loading fonts (if any). Export
10300 that as `GRUB_PRELOAD_MODULES'.
10301 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
10304 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
10306 Remove some unused code from reiserfs.
10308 * fs/reiserfs.c (struct grub_reiserfs_key)
10309 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
10310 (struct grub_reiserfs_node_body): Removed.
10311 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10313 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10315 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10317 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10319 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10321 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
10323 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10324 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10325 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10327 2008-01-10 Robert Millan <rmh@aybabtu.com>
10329 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
10330 Determines if a file is garbage left by packaging systems, etc.
10331 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
10332 for processing /etc/grub.d scripts.
10333 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
10334 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
10335 as a condition for processing Linux images.
10337 2008-01-10 Pavel Roskin <proski@gnu.org>
10339 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
10340 to compile reiserfs.c on PowerPC.
10342 2008-01-10 Robert Millan <rmh@aybabtu.com>
10344 * kern/device.c (grub_device_iterate): Do not abort device iteration
10345 when one of the devices cannot be opened.
10346 * kern/disk.c (grub_disk_open): Do not account previous failures of
10347 unrelated functions when grub_errno is checked for.
10349 2008-01-08 Robert Millan <rmh@aybabtu.com>
10351 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10352 `! grub_linux_is_bzimage', change order of address comparison to make
10353 it more intuitive, and improve "too big zImage" error message.
10355 2008-01-08 Robert Millan <rmh@aybabtu.com>
10357 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10358 `$(update-grub_DATA)'.
10359 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10362 2008-01-07 Robert Millan <rmh@aybabtu.com>
10364 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10365 which instruction is modified by grub-setup during installation
10366 (since it wasn't obvious by only looking at this file).
10368 2008-01-07 Robert Millan <rmh@aybabtu.com>
10370 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
10371 listing actual TODO items.
10373 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10375 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10377 (grub_reiserfs_get_key_offset): Likewise.
10378 (grub_reiserfs_set_key_offset): Likewise.
10379 (grub_reiserfs_set_key_type): Likewise.
10380 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
10382 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10383 better to remove the bitfield version completely.
10385 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10387 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10388 allocated from the heap, due to the fshelp implementation.
10389 (grub_reiserfs_dir): Free NODE, due to the same reason.
10391 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10393 Mostly from Vincent Pelletier:
10395 * fs/reiserfs.c: New file.
10397 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10398 (reiserfs_mod_SOURCES): New variable.
10399 (reiserfs_mod_CFLAGS): Likewise.
10400 (reiserfs_mod_LDFLAGS): Likewise.
10402 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10403 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10404 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10407 2008-01-06 Robert Millan <rmh@aybabtu.com>
10409 * normal/color.c: Remove `<grub/env.h>'.
10411 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10413 * include/grub/normal.h: Include <grub/env.h>.
10415 2008-01-05 Robert Millan <rmh@aybabtu.com>
10417 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10418 usage example with `(hd0,1)'.
10419 Reported by Samuel Thibault.
10421 2008-01-05 Robert Millan <rmh@aybabtu.com>
10423 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10424 (grub_linux_boot_zimage): Rename to ...
10425 (grub_linux_boot): ... this.
10426 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10427 (grub_linux_boot_zimage): Conditionalize zImage copy.
10429 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10430 (grub_linux_boot_bzimage): Remove prototype.
10431 (grub_linux_boot_zimage): Rename to ...
10432 (grub_linux_boot): ... this.
10434 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10435 (grub_linux_boot): Remove function.
10437 2008-01-05 Robert Millan <rmh@aybabtu.com>
10439 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10440 (grub_env_write_color_highlight): Likewise.
10441 (grub_wait_after_message): Likewise.
10443 * normal/color.c: New file.
10445 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10446 (normal_mod_DEPENDENCIES): Likewise.
10448 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10449 (normal_mod_DEPENDENCIES): Likewise.
10451 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10452 (normal_mod_DEPENDENCIES): Likewise.
10454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10455 (normal_mod_DEPENDENCIES): Likewise.
10457 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10458 for waiting after a message is printed.
10459 * normal/main.c (read_config_file): Likewise.
10460 (grub_normal_init): Register grub_env_write_color_normal() and
10461 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10462 `color_highlight' variables as global.
10464 * normal/menu.c (grub_wait_after_message): New function.
10465 (grub_color_menu_normal): New variable. Replaces ...
10466 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10467 (grub_color_menu_highlight): New variable. Replaces ...
10468 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10469 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10470 `GRUB_TERM_COLOR_STANDARD'.
10471 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10472 `normal_code' and `highlight_code' to `old_color_normal' and
10473 `old_color_highlight', respectively.
10474 (grub_menu_init_page): Update colors when drawing the menu, based on
10475 `menu_color_normal' and `menu_color_highlight' variables.
10476 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10477 a message is printed.
10479 2008-01-05 Robert Millan <rmh@aybabtu.com>
10481 * kern/env.c (grub_env_context_open): Propagate hooks for global
10482 variables to new context.
10484 * kern/main.c (grub_set_root_dev): Export `root' variable.
10486 2008-01-05 Robert Millan <rmh@aybabtu.com>
10488 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10489 discs unconditionally, since udev and others have options to provide
10492 2008-01-05 Robert Millan <rmh@aybabtu.com>
10494 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10496 2008-01-04 Christian Franke <franke@computer.org>
10498 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10501 2008-01-03 Pavel Roskin <proski@gnu.org>
10503 * kern/i386/linuxbios/init.c: Put "void" to all function
10504 declarations with no arguments.
10505 * kern/powerpc/ieee1275/init.c: Likewise.
10506 * term/i386/pc/at_keyboard.c: Likewise.
10507 * term/i386/pc/vga_text.c: Likewise.
10508 * util/grub-mkdevicemap.c: Likewise.
10510 2008-01-02 Robert Millan <rmh@aybabtu.com>
10512 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10513 message when loaded image is out of bounds.
10514 (grub_multiboot_load_elf64): Likewise.
10516 2008-01-02 Pavel Roskin <proski@gnu.org>
10518 * util/grub.d/10_linux.in: Try version without ".old" when
10519 looking for initrd. It's better to use initrd from the newer
10520 kernel of the same version than no initrd at all.
10522 2008-01-01 Robert Millan <rmh@aybabtu.com>
10524 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10526 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10528 * include/grub/video.h: Added grub_video_unmap_color and
10529 grub_video_get_active_render_target.
10530 (grub_video_adapter): Added unmap_color and get_active_render_target.
10532 * video/video.c: Added grub_video_unmap_color and
10533 grub_video_get_active_render_target.
10534 (grub_video_get_info): Changed method to accept NULL pointer as an
10535 argument to allow detection of active video adapter.
10537 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10538 grub_video_vbe_unmap_color_int.
10539 Added grub_video_vbe_unmap_color and
10540 grub_video_vbe_get_active_render_target.
10541 (grub_video_vbe_adapter): Added unmap_color and
10542 get_active_render_target.
10544 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10545 with grub_video_vbe_unmap_color_int.
10547 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10548 (DEFAULT_NORMAL_COLOR): Likewise.
10549 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10550 (DEFAULT_FG_COLOR): Removed.
10551 (DEFAULT_BG_COLOR): Likewise.
10552 (DEFAULT_CURSOR_COLOR): Changed value.
10553 (grub_virtual_screen): Added standard_color_setting,
10554 normal_color_setting, highlight_color_setting and term_color.
10555 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10556 (bitmap_width): Added.
10557 (bitmap_height): Likewise.
10558 (bitmap): Likewise.
10559 (set_term_color): Likewise.
10560 (grub_virtual_screen_setup): Changed to use new terminal coloring
10562 (grub_gfxterm_init): Added init for bitmap.
10563 (grub_gfxterm_fini): Added destroy for bitmap.
10564 (redraw_screen_rect): Updated to use background bitmap and new
10566 (scroll_up): Added optimization for case when there is no bitmap.
10567 (grub_gfxterm_cls): Fixed to use correct background color.
10568 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10570 (grub_virtual_screen_setcolor): Likewise.
10571 (grub_virtual_screen_getcolor): Added.
10572 (grub_gfxterm_background_image_cmd): Likewise.
10573 (grub_video_term): Added setcolor and getcolor.
10574 (MOD_INIT): Added registration of background_image command.
10575 (MOD_TERM): Added unregistration for background_image command.
10577 2007-12-30 Pavel Roskin <proski@gnu.org>
10579 * loader/multiboot_loader.c: Fix multiboot command
10580 unregistration. Fix all typos in the word "multiboot".
10582 2007-12-29 Pavel Roskin <proski@gnu.org>
10584 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10585 support for initrd names used in Fedora.
10587 2007-12-26 Bean <bean123ch@gmail.com>
10589 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10590 (cpio_mod_SOURCES): New variable.
10591 (cpio_mod_CFLAGS): Likewise.
10592 (cpio_mod_LDFLAGS): Likewise.
10594 * fs/cpio.c: New file.
10596 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10598 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10600 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10602 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10604 2007-12-25 Robert Millan <rmh@aybabtu.com>
10606 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10607 (grub_getcolor): New function.
10609 * kern/term.c (grub_getcolor): New function.
10610 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10611 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10612 (print_entry): Set normal and highlight colors to
10613 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10614 respectively, before printing and restore them to old
10616 (grub_menu_init_page): Likewise. Fill an additional colored space
10617 that would otherwise be left blank.
10619 * term/efi/console.c (grub_console_getcolor): New function.
10620 (struct grub_console_term.getcolor): New variable.
10621 * term/i386/pc/console.c (grub_console_getcolor): New function.
10622 (struct grub_console_term.getcolor): New variable.
10623 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10624 (struct grub_console_term.getcolor): New variable.
10626 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10627 (struct grub_console_term.setcolor): Remove variable.
10628 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10629 (struct grub_console_term.setcolor): Remove variable.
10630 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10631 (struct grub_console_term.setcolor): Remove variable.
10632 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10633 (struct grub_console_term.setcolor): Remove variable.
10635 2007-12-25 Robert Millan <rmh@aybabtu.com>
10637 * configure.ac: Search for possible unifont.hex locations, and
10638 define UNIFONT_HEX if found.
10640 * Makefile.in (UNIFONT_HEX): Define variable.
10641 (DATA): Rename to ...
10642 (PKGLIB): ... this. Update all users.
10643 (PKGDATA): New variable.
10644 (pkgdata_IMAGES): Rename to ...
10645 (pkglib_IMAGES): ... this. Update all users.
10646 (pkgdata_MODULES): Rename to ...
10647 (pkglib_MODULES): ... this. Update all users.
10648 (pkgdata_PROGRAMS): Rename to ...
10649 (pkglib_PROGRAMS): ... this. Update all users.
10650 (pkgdata_DATA): Rename to ...
10651 (pkglib_DATA): ... this. Update all users.
10652 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10653 (unicode.pff, ascii.pff): New rules.
10654 (all-local): Add `$(PKGDATA)' dependency.
10655 (install-local): Process `$(PKGDATA)'.
10657 * util/update-grub_lib.in (font_path): Search for *.pff files in
10658 a few more locations, including `${pkgdata}'.
10660 2007-12-23 Robert Millan <rmh@aybabtu.com>
10662 Patch from Bean <bean123ch@gmail.com>:
10663 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10666 2007-12-21 Bean <bean123ch@gmail.com>
10668 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10669 (ntfscomp_mod_SOURCES): New variable.
10670 (ntfscomp_mod_CFLAGS): Likewise.
10671 (ntfscomp_mod_LDFLAGS): Likewise.
10673 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10674 (grub_probe_SOURCES): Likewise.
10675 (grub_emu_SOURCES): Likewise.
10677 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10678 (grub_emu_SOURCES): Likewise.
10680 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10681 (grub_emu_SOURCES): Likewise.
10683 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10684 (grub_emu_SOURCES): Likewise.
10686 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10687 (read_run_list): Renamed to grub_ntfs_read_run_list.
10688 (decomp_nextvcn): Moved to ntfscomp.c.
10689 (decomp_getch): Likewise.
10690 (decomp_get16): Likewise.
10691 (decomp_block): Likewise.
10692 (read_block): Likewise.
10693 (read_data): Partially moved to ntfscomp.c.
10694 (fixup): Change unsigned to grub_uint16_t.
10695 (read_mft): Change unsigned long to grub_uint32_t.
10696 (read_attr): Likewise.
10697 (read_data): Likewise.
10698 (read_run_data): Likewise.
10699 (read_run_list): Likewise.
10700 (read_mft): Likewise.
10702 * fs/ntfscomp.c: New file.
10704 * include/grub/ntfs.h: New file.
10706 2007-12-16 Robert Millan <rmh@aybabtu.com>
10708 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10709 IDE disk check, since Linux is known to support 20 IDE disks.
10710 Reported by Colin Watson.
10712 2007-12-15 Bean <bean123ch@gmail.com>
10714 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10715 (lnxboot_img_SOURCES): New variable.
10716 (lnxboot_img_ASFLAGS): Likewise.
10717 (lnxboot_img_LDFLAGS): Likewise.
10719 * boot/i386/pc/lnxboot.S: New file.
10721 2007-11-24 Pavel Roskin <proski@gnu.org>
10723 * configure.ac: Test if '--build-id=none' is supported by the
10724 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10725 objcopy to generate incorrect binary files (binutils
10726 2.17.50.0.18-1 as shipped by Fedora 8).
10727 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10728 linking, so that build ID doesn't break the test.
10730 2007-11-24 Pavel Roskin <proski@gnu.org>
10732 * include/grub/i386/time.h: use "void" in the argument list
10733 of grub_cpu_idle().
10734 * include/grub/powerpc/time.h: Likewise.
10735 * include/grub/sparc64/time.h: Likewise.
10737 2007-11-18 Christian Franke <franke@computer.org>
10739 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10740 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10741 This fixes the problem that function keys did not work in grub-emu.
10743 2007-11-18 Christian Franke <franke@computer.org>
10745 * disk/host.c (grub_host_open): Remove attribute unused from
10746 name parameter. Add check for "host". This fixes the problem
10747 that grub-emu does not find partitions.
10749 2007-11-18 Christian Franke <franke@computer.org>
10751 * util/hostfs.c (is_dir): New function.
10752 (grub_hostfs_dir): Handle missing dirent.d_type case.
10753 (grub_hostfs_read): Add missing fseek().
10754 (grub_hostfs_label): Clear label pointer. This fixes a crash
10755 of grub-emu on "ls (host)".
10757 2007-11-18 Christian Franke <franke@computer.org>
10759 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10760 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10761 to 64 bit boundary by default.
10763 2007-11-18 Bean <bean123ch@gmail.com>
10765 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10766 (hexdump_mod_SOURCES): New variable.
10767 (hexdump_mod_CFLAGS): Likewise.
10768 (hexdump_mod_LDFLAGS): Likewise.
10770 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10772 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10774 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10778 * include/grub/hexdump.h: New file.
10780 * commands/hexdump.c: New file.
10782 2007-11-10 Robert Millan <rmh@aybabtu.com>
10784 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10785 in grub_outb() calls.
10786 (beep_on): Likewise.
10788 2007-11-10 Christian Franke <franke@computer.org>
10790 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10791 (grub_menu_run): Likewise.
10793 2007-11-10 Robert Millan <rmh@aybabtu.com>
10795 * include/grub/i386/efi/machine.h: New file.
10796 * include/grub/i386/linuxbios/machine.h: Likewise.
10797 * include/grub/i386/pc/machine.h: Likewise.
10798 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10799 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10801 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10802 (serial_hw_io_addr): New variable.
10803 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10804 instead of `(unsigned short *) 0x400'.
10806 2007-11-10 Bean <bean123ch@gmail.com>
10808 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10810 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10812 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10813 (vga_mod_SOURCES): Added.
10814 (vga_mod_CFLAGS): Likewise.
10815 (vga_mod_LDFLAGS): Likewise.
10817 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10819 (set_map_mask): Likewise.
10820 (set_read_map): Likewise.
10821 (set_read_address): Likewise.
10822 (vga_font): Removed variable.
10823 (get_vga_glyph): Removed function.
10824 (invalidate_char): Likewise.
10825 (write_char): Changed to use grub_font_get_glyph() for font
10827 (grub_vga_putchar): Likewise.
10828 (grub_vga_getcharwidth): Likewise.
10830 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10832 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10834 (pxeboot_img_LDFLAGS): Likewise.
10835 (diskboot_img_LDFLAGS): Likewise.
10836 (kernel_img_LDFLAGS): Likewise.
10838 2007-11-06 Robert Millan <rmh@aybabtu.com>
10840 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10841 in grub_outb() calls.
10842 (serial_hw_init): Likewise.
10844 2007-11-05 Robert Millan <rmh@aybabtu.com>
10846 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10847 spaces. Skip non-regular files.
10849 2007-11-05 Robert Millan <rmh@aybabtu.com>
10851 * kern/disk.c (grub_disk_firmware_fini)
10852 (grub_disk_firmware_is_tainted): New variables.
10854 * include/grub/disk.h (grub_disk_firmware_fini)
10855 (grub_disk_firmware_is_tainted): Likewise.
10857 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10858 (grub_disk_biosdisk_fini): ... to here.
10859 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10860 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10861 is set. Register grub_disk_biosdisk_fini() in
10862 `grub_disk_firmware_fini'.
10864 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10865 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10866 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10867 to finish existing firmware disk interface.
10869 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10870 (ata_mod_SOURCES): New variable.
10871 (ata_mod_CFLAGS): Likewise.
10872 (ata_mod_LDFLAGS): Likewise.
10874 2007-11-05 Robert Millan <rmh@aybabtu.com>
10876 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10877 (grub_ata_wait): Reimplement using grub_millisleep().
10879 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10880 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10882 2007-11-03 Marco Gerards <marco@gnu.org>
10884 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10885 (CRTC_ADDR_PORT): New macro.
10886 (CRTC_DATA_PORT): Likewise.
10887 (CRTC_CURSOR): Likewise.
10888 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10889 (CRTC_CURSOR_ADDR_LOW): Likewise.
10890 (update_cursor): New function.
10891 (grub_console_real_putchar): Call `update_cursor'.
10892 (grub_console_gotoxy): Likewise.
10893 (grub_console_cls): Set the default color when clearing the
10895 (grub_console_setcursor): Implemented.
10897 2007-11-03 Marco Gerards <marco@gnu.org>
10899 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10901 (grub_ata_pio_write): Likewise.
10903 (grub_atapi_identify): Wait after issuing an ATA command.
10904 (grub_atapi_packet): Likewise.
10905 (grub_ata_identify): Likewise.
10906 (grub_ata_readwrite): Likewise.
10908 2007-11-03 Marco Gerards <marco@gnu.org>
10910 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10911 (grub_ata_pio_write): Likewise.
10912 (grub_ata_readwrite): Use `grub_error', instead of
10913 returning `grub_errno'.
10915 2007-11-03 Marco Gerards <marco@gnu.org>
10917 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10918 grub_ata_pio_write once for every single sector, instead of for
10921 2007-10-31 Robert Millan <rmh@aybabtu.com>
10923 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10925 * conf/i386-linuxbios.rmk: New file.
10927 * kern/i386/pc/hardware.c: Likewise.
10928 * term/i386/pc/at_keyboard.c: Likewise.
10929 * term/i386/pc/vga_text.c: Likewise.
10931 * include/grub/i386/linuxbios/boot.h: Likewise.
10932 * include/grub/i386/linuxbios/console.h: Likewise.
10933 * include/grub/i386/linuxbios/init.h: Likewise.
10934 * include/grub/i386/linuxbios/kernel.h: Likewise.
10935 * include/grub/i386/linuxbios/loader.h: Likewise.
10936 * include/grub/i386/linuxbios/memory.h: Likewise.
10937 * include/grub/i386/linuxbios/serial.h: Likewise.
10938 * include/grub/i386/linuxbios/time.h: Likewise.
10940 * kern/i386/linuxbios/init.c: Likewise.
10941 * kern/i386/linuxbios/startup.S: Likewise.
10942 * kern/i386/linuxbios/table.c: Likewise.
10944 2007-10-31 Marco Gerards <marco@gnu.org>
10946 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10947 (ata_mod_SOURCES): New variable.
10948 (ata_mod_CFLAGS): Likewise.
10949 (ata_mod_LDFLAGS): Likewise.
10951 * disk/ata.c: New file.
10953 * include/grub/disk.h (grub_disk_dev_id): Add
10954 `GRUB_DISK_DEV_ATA_ID'.
10956 2007-10-31 Robert Millan <rmh@aybabtu.com>
10958 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10959 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10961 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10962 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10964 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10967 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10969 2007-10-27 Robert Millan <rmh@aybabtu.com>
10971 * include/grub/types.h (ULONG_MAX): Define macro.
10973 2007-10-22 Robert Millan <rmh@aybabtu.com>
10975 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10977 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10979 2007-10-22 Robert Millan <rmh@aybabtu.com>
10981 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10982 (pkgdata_MODULES): Add `biosdisk.mod'.
10983 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10986 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10987 (grub_biosdisk_init): Replace with ...
10988 (GRUB_MOD_INIT(biosdisk)): ... this.
10989 (grub_biosdisk_fini): Replace with ...
10990 (GRUB_MOD_FINI(biosdisk)): ... this.
10992 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10993 (grub_machine_init): Remove call to grub_biosdisk_init().
10994 (grub_machine_fini): Remove call to grub_machine_fini().
10996 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10998 2007-10-22 Robert Millan <rmh@aybabtu.com>
11000 * include/grub/time.h: New file.
11001 * include/grub/i386/time.h: Likewise.
11002 * include/grub/powerpc/time.h: Likewise.
11003 * include/grub/sparc64/time.h: Likewise.
11005 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11007 (KERNEL_MACHINE_TIME_HEADER): ... this.
11008 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11010 (KERNEL_MACHINE_TIME_HEADER): ... this.
11011 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11013 (KERNEL_MACHINE_TIME_HEADER): ... this.
11015 * kern/i386/efi/init.c: Include `<grub/time.h>'.
11016 (grub_millisleep): New function.
11017 * kern/i386/pc/init.c: Include `<grub/time.h>'.
11018 (grub_millisleep): New function.
11019 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11020 Remove `grub/machine/time.h' include.
11021 (grub_millisleep): New function.
11022 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11023 Remove `grub/machine/time.h' include.
11024 (grub_millisleep): New function.
11026 * include/grub/misc.h (grub_div_roundup): New function.
11028 * kern/misc.c: Include `<grub/time.h>'.
11029 (grub_millisleep_generic): New function.
11031 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11033 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11035 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11036 `machine/time.h'. Add `time.h'.
11037 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11039 2007-10-21 Robert Millan <rmh@aybabtu.com>
11041 * include/grub/misc.h (grub_max): New function.
11043 2007-10-21 Robert Millan <rmh@aybabtu.com>
11045 * util/misc.c (grub_util_info): Call fflush() before returning.
11047 2007-10-20 Robert Millan <rmh@aybabtu.com>
11049 * genmk.rb (Image): Copy `extra_flags' from here ...
11050 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
11052 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11053 to `argc' and `args' arguments.
11055 2007-10-17 Robert Millan <rmh@aybabtu.com>
11057 * kern/i386/loader.S: New file.
11059 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11060 * kern/i386/loader.S (grub_linux_prot_size)... to here.
11061 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11062 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11063 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11064 * kern/i386/loader.S (grub_linux_real_addr)... to here.
11065 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
11066 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
11067 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
11068 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
11069 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
11070 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
11071 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
11072 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
11074 * kern/i386/realmode.S: New file.
11076 * kern/i386/pc/startup.S (protstack): Moved from here ...
11077 * kern/i386/realmode.S (protstack)... to here.
11078 * kern/i386/pc/startup.S (gdt): Moved from here ...
11079 * kern/i386/realmode.S (gdt)... to here.
11080 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
11081 * kern/i386/realmode.S (prot_to_real)... to here.
11083 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
11084 `kern/i386/realmode.S'.
11086 2007-10-17 Robert Millan <rmh@aybabtu.com>
11088 * include/grub/i386/loader.h: New file.
11090 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
11091 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11092 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11093 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11094 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
11095 * include/grub/i386/loader.h (grub_linux_prot_size)
11096 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11097 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11098 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11099 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
11101 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
11103 2007-10-15 Robert Millan <rmh@aybabtu.com>
11105 * normal/misc.c (grub_normal_print_device_info): Do not probe for
11106 filesystem when dev->disk is unset.
11107 Do probe for filesystem even when dev->disk->has_partitions is set.
11108 In case a filesystem is found, always report it.
11109 In case it isn't, if dev->disk->has_partitions is set, report that
11110 a partition table was found instead of reporting that no filesystem
11111 could be identified.
11113 2007-10-12 Robert Millan <rmh@aybabtu.com>
11115 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
11116 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
11118 * include/grub/types.h (grub_host_to_target16): New macro.
11119 (grub_host_to_target32): Likewise.
11120 (grub_host_to_target64): Likewise.
11121 (grub_target_to_host16): Likewise.
11122 (grub_target_to_host32): Likewise.
11123 (grub_target_to_host64): Likewise.
11125 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11126 Renamed from to ...
11127 (GRUB_MOD_ALIGN): ...this. Update all users.
11129 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
11130 grub_host_to_target32.
11131 Replace grub_be_to_cpu32 with grub_target_to_host32.
11132 (load_modules): Likewise.
11133 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
11134 Replace grub_be_to_cpu32 with grub_target_to_host32.
11135 Replace grub_cpu_to_be16 with grub_host_to_target16.
11136 Replace grub_cpu_to_be32 grub_host_to_target32.
11138 2007-10-12 Robert Millan <rmh@aybabtu.com>
11140 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
11141 * util/elf/grub-mkimage.c: ... here.
11143 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
11144 `util/powerpc/ieee1275/grub-mkimage.c'.
11146 2007-10-07 Robert Millan <rmh@aybabtu.com>
11148 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
11149 and make it easier to figure out.
11150 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
11151 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
11152 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
11153 leave us with less than HEAP_MIN_SIZE total heap.
11154 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
11156 2007-10-03 Robert Millan <rmh@aybabtu.com>
11158 * include/grub/i386/io.h: New file.
11159 * commands/i386/pc/play.c (inb): Removed.
11161 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11163 * term/i386/pc/serial.c (inb): Removed.
11165 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11167 * term/i386/pc/vga.c (inb): Removed.
11169 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11172 2007-10-02 Robert Millan <rmh@aybabtu.com>
11174 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
11175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11176 Reported by Marcin Kurek.
11178 2007-09-07 Robert Millan <rmh@aybabtu.com>
11180 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
11181 SmartFirmware version updates (as released by Sven Luther), and avoid
11182 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
11183 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
11186 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11188 From Hitoshi Ozeki:
11189 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
11190 when merging two regions.
11192 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11194 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
11195 * normal/completion.c (grub_normal_do_completion): Likewise.
11196 Reported by Hitoshi Ozeki.
11198 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11200 Do not use devices at boot in chainloading.
11202 * loader/i386/pc/chainloader.c (boot_drive): New variable.
11203 (boot_part_addr): Likewise.
11204 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
11205 with BOOT_DRIVE and BOOT_PART_ADDR.
11206 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
11207 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
11209 2007-08-29 Robert Millan <rmh@aybabtu.com>
11211 Patch from Simon Peter <dn.tlp@gmx.net>:
11212 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
11213 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
11214 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
11215 util/i386/pc/grub-setup.c_DEPENDENCIES.
11216 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
11217 util/grub-probe.c_DEPENDENCIES.
11218 * conf/powerpc-ieee1275.rmk: Likewise.
11220 2007-08-28 Robert Millan <rmh@aybabtu.com>
11222 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
11223 to tell grub-mkdevicemap how to name devices.
11224 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
11227 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
11228 util/i386/get_disk_name.c.
11229 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
11230 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
11231 util/ieee1275/get_disk_name.c.
11233 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
11235 * DISTLIST: Add util/i386/get_disk_name.c and
11236 util/ieee1275/get_disk_name.c.
11238 * util/grub-mkdevicemap.c: Replace device naming logic with
11239 grub_util_get_disk_name() calls.
11241 2007-08-20 Robert Millan <rmh@aybabtu.com>
11243 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
11244 (so that it works for both plural and singular quantities).
11246 2007-08-05 Robert Millan <rmh@aybabtu.com>
11248 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
11249 so that [xz] isn't taken into account when determining order.
11251 2007-08-02 Marco Gerards <marco@gnu.org>
11253 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
11254 `include/multiboot2.h', `include/grub/elfload.h',
11255 `include/multiboot.h', `include/grub/multiboot.h',
11256 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
11257 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
11258 `kern/elf.c', `loader/multiboot_loader.c',
11259 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
11260 `loader/i386/pc/multiboot2.c',
11261 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
11262 `util/i386/pc/grub-mkrescue.in'. Remove
11263 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
11264 `include/grub/i386/pc/util/biosdisk.h' and
11265 `include/grub/powerpc/ieee1275/multiboot.h'.
11267 2007-08-02 Bean <bean123ch@gmail.com>
11269 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
11270 (ntfs_mod_SOURCES): New variable.
11271 (ntfs_mod_CFLAGS): Likewise.
11272 (ntfs_mod_LDFLAGS): Likewise.
11274 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
11275 (grub_probe_SOURCES): Likewise.
11276 (grub_emu_SOURCES): Likewise.
11278 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11279 (grub_emu_SOURCES): Likewise.
11281 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11282 (grub_emu_SOURCES): Likewise.
11284 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
11286 * fs/ntfs.c: New file.
11288 2007-08-02 Bean <bean123ch@gmail.com>
11290 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
11292 * file.h (grub_file): Likewise.
11294 * fshelp.h (grub_fshelp_read_file): Likewise.
11296 * util/i386/pc/grub-setup.c (setup): Likewise.
11297 (save_first_sector): Likewise.
11298 (save_blocklists): Likewise.
11300 * fs/affs.c (grub_affs_read_file): Likewise.
11302 * fs/ext2.c (grub_ext2_read_file): Likewise.
11304 * fs/fat.c (grub_fat_read_data): Likewise.
11306 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
11308 * fs/hfs.c (grub_hfs_read_file): Likewise.
11310 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11312 * fs/jfs.c (grub_jfs_read_file): Likewise.
11314 * fs/minix.c (grub_minix_read_file): Likewise.
11316 * fs/sfs.c (grub_sfs_read_file): Likewise.
11318 * fs/ufs.c (grub_ufs_read_file): Likewise.
11320 * fs/xfs.c (grub_xfs_read_file): Likewise.
11322 * command/blocklist.c (read_blocklist): Likewise.
11323 (print_blocklist): Likewise.
11325 2007-08-02 Marco Gerards <marco@gnu.org>
11327 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
11330 * disk/host.c: New file.
11332 * util/hostfs.c: Likewise.
11334 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
11335 return `GRUB_ERR_BAD_FS'.
11336 * fs/sfs.c (grub_sfs_mount): Likewise.
11337 * fs/xfs.c (grub_xfs_mount): Likewise.
11339 * include/grub/disk.h (enum grub_disk_dev_id): Add
11340 `GRUB_DISK_DEVICE_HOST_ID'.
11342 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11344 2007-07-24 Jerone Young <jerone@gmail.com>
11346 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
11347 modules for compilation.
11348 * conf/powerpc-ieee1275.rmk: Likewise.
11350 * include/multiboot.h: Move multiboot definitions to one file. Rename
11351 many definitions to not get grub specific.
11352 * include/multiboot2.h: Create header with multiboot 2 definitions.
11353 * include/grub/multiboot.h: Header for grub specific function
11354 prototypes and definitions.
11355 * include/grub/multiboot2.h: Likewise.
11356 * include/grub/multiboot_loader.h: Likewise.
11357 * include/grub/i386/pc/multiboot.h: Removed.
11358 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11360 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11361 and 2 to allow for one multiboot and module commands.
11362 * loader/multiboot2.c: Add multiboot2 functionality.
11363 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11364 and definition names.
11365 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11367 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11368 ieee1275 specific multiboot2 code.
11370 * kern/i386/pc/startup.S: Change headers and definition names for
11371 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11373 2007-07-22 Robert Millan <rmh@aybabtu.com>
11375 * geninitheader.sh: Process file specified in first parameter rather
11376 than hardcoding grub_modules_init.lst.
11377 * geninit.sh: Likewise. Also, construct header name dynamically rather
11378 than hardcoding grub_modules_init.h.
11380 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11381 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11382 grub_probe_init.[ch] and grub_setup_init.[ch].
11384 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11385 grub_modules_init.h with grub_emu_init.h.
11386 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11387 grub_probe_init.[ch] files.
11388 * conf/i386-efi.rmk: Likewise.
11389 * conf/i386-pc.rmk: Likewise.
11390 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11391 grub_setup_init.[ch] files.
11393 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11394 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11395 to initialize modules rather than a list of hardcoded functions.
11396 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11397 grub_init_all() to initialize modules rather than a list of hardcoded
11400 2007-07-22 Robert Millan <rmh@aybabtu.com>
11402 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11403 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11405 2007-07-22 Robert Millan <rmh@aybabtu.com>
11407 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11408 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11409 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11410 flag when running on SmartFirmware.
11411 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11412 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11415 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11416 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11417 rather than decreasing it.
11419 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11420 there's not enough space to do it, fail in the same way as when it
11421 can't be done because there are no partitions.
11423 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11424 when nvsetenv failed.
11426 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11428 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11429 because this rule is automatically generated.
11430 (grub-mkrescue): Removed for the same reason as above.
11432 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11434 Migrate to GNU General Public License Version 3.
11436 * COPYING: Replaced with the plain text version of GPLv3.
11438 * config.guess: Updated from gnulib.
11439 * config.sub: Likewise.
11441 * geninit.sh: Output a GPLv3 copyright notice.
11442 * geninitheader.sh: Likewise.
11443 * genmodsrc.sh: Likewise.
11444 * gensymlist.sh.in: Likewise.
11446 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11447 * boot/i386/pc/diskboot.S: Likewise.
11448 * boot/i386/pc/pxeboot.S: Likewise.
11449 * commands/blocklist.c: Likewise.
11450 * commands/boot.c: Likewise.
11451 * commands/cat.c: Likewise.
11452 * commands/cmp.c: Likewise.
11453 * commands/configfile.c: Likewise.
11454 * commands/echo.c: Likewise.
11455 * commands/help.c: Likewise.
11456 * commands/ls.c: Likewise.
11457 * commands/search.c: Likewise.
11458 * commands/terminal.c: Likewise.
11459 * commands/test.c: Likewise.
11460 * commands/videotest.c: Likewise.
11461 * commands/i386/cpuid.c: Likewise.
11462 * commands/i386/pc/halt.c: Likewise.
11463 * commands/i386/pc/play.c: Likewise.
11464 * commands/i386/pc/reboot.c: Likewise.
11465 * commands/i386/pc/vbeinfo.c: Likewise.
11466 * commands/i386/pc/vbetest.c: Likewise.
11467 * commands/ieee1275/halt.c: Likewise.
11468 * commands/ieee1275/reboot.c: Likewise.
11469 * commands/ieee1275/suspend.c: Likewise.
11470 * disk/loopback.c: Likewise.
11471 * disk/lvm.c: Likewise.
11472 * disk/raid.c: Likewise.
11473 * disk/efi/efidisk.c: Likewise.
11474 * disk/i386/pc/biosdisk.c: Likewise.
11475 * disk/ieee1275/ofdisk.c: Likewise.
11476 * font/manager.c: Likewise.
11477 * fs/affs.c: Likewise.
11478 * fs/ext2.c: Likewise.
11479 * fs/fat.c: Likewise.
11480 * fs/fshelp.c: Likewise.
11481 * fs/hfs.c: Likewise.
11482 * fs/hfsplus.c: Likewise.
11483 * fs/iso9660.c: Likewise.
11484 * fs/jfs.c: Likewise.
11485 * fs/minix.c: Likewise.
11486 * fs/sfs.c: Likewise.
11487 * fs/ufs.c: Likewise.
11488 * fs/xfs.c: Likewise.
11489 * hello/hello.c: Likewise.
11490 * include/grub/acorn_filecore.h: Likewise.
11491 * include/grub/arg.h: Likewise.
11492 * include/grub/bitmap.h: Likewise.
11493 * include/grub/boot.h: Likewise.
11494 * include/grub/cache.h: Likewise.
11495 * include/grub/device.h: Likewise.
11496 * include/grub/disk.h: Likewise.
11497 * include/grub/dl.h: Likewise.
11498 * include/grub/elfload.h: Likewise.
11499 * include/grub/env.h: Likewise.
11500 * include/grub/err.h: Likewise.
11501 * include/grub/file.h: Likewise.
11502 * include/grub/font.h: Likewise.
11503 * include/grub/fs.h: Likewise.
11504 * include/grub/fshelp.h: Likewise.
11505 * include/grub/gzio.h: Likewise.
11506 * include/grub/hfs.h: Likewise.
11507 * include/grub/kernel.h: Likewise.
11508 * include/grub/loader.h: Likewise.
11509 * include/grub/lvm.h: Likewise.
11510 * include/grub/misc.h: Likewise.
11511 * include/grub/mm.h: Likewise.
11512 * include/grub/net.h: Likewise.
11513 * include/grub/normal.h: Likewise.
11514 * include/grub/parser.h: Likewise.
11515 * include/grub/partition.h: Likewise.
11516 * include/grub/pc_partition.h: Likewise.
11517 * include/grub/raid.h: Likewise.
11518 * include/grub/rescue.h: Likewise.
11519 * include/grub/script.h: Likewise.
11520 * include/grub/setjmp.h: Likewise.
11521 * include/grub/symbol.h: Likewise.
11522 * include/grub/term.h: Likewise.
11523 * include/grub/terminfo.h: Likewise.
11524 * include/grub/tparm.h: Likewise.
11525 * include/grub/types.h: Likewise.
11526 * include/grub/video.h: Likewise.
11527 * include/grub/efi/api.h: Likewise.
11528 * include/grub/efi/chainloader.h: Likewise.
11529 * include/grub/efi/console.h: Likewise.
11530 * include/grub/efi/console_control.h: Likewise.
11531 * include/grub/efi/disk.h: Likewise.
11532 * include/grub/efi/efi.h: Likewise.
11533 * include/grub/efi/pe32.h: Likewise.
11534 * include/grub/efi/time.h: Likewise.
11535 * include/grub/i386/linux.h: Likewise.
11536 * include/grub/i386/setjmp.h: Likewise.
11537 * include/grub/i386/types.h: Likewise.
11538 * include/grub/i386/efi/kernel.h: Likewise.
11539 * include/grub/i386/efi/loader.h: Likewise.
11540 * include/grub/i386/efi/time.h: Likewise.
11541 * include/grub/i386/pc/biosdisk.h: Likewise.
11542 * include/grub/i386/pc/boot.h: Likewise.
11543 * include/grub/i386/pc/chainloader.h: Likewise.
11544 * include/grub/i386/pc/console.h: Likewise.
11545 * include/grub/i386/pc/init.h: Likewise.
11546 * include/grub/i386/pc/kernel.h: Likewise.
11547 * include/grub/i386/pc/loader.h: Likewise.
11548 * include/grub/i386/pc/memory.h: Likewise.
11549 * include/grub/i386/pc/multiboot.h: Likewise.
11550 * include/grub/i386/pc/serial.h: Likewise.
11551 * include/grub/i386/pc/time.h: Likewise.
11552 * include/grub/i386/pc/vbe.h: Likewise.
11553 * include/grub/i386/pc/vbeblit.h: Likewise.
11554 * include/grub/i386/pc/vbefill.h: Likewise.
11555 * include/grub/i386/pc/vbeutil.h: Likewise.
11556 * include/grub/i386/pc/vga.h: Likewise.
11557 * include/grub/ieee1275/ieee1275.h: Likewise.
11558 * include/grub/ieee1275/ofdisk.h: Likewise.
11559 * include/grub/powerpc/libgcc.h: Likewise.
11560 * include/grub/powerpc/setjmp.h: Likewise.
11561 * include/grub/powerpc/types.h: Likewise.
11562 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11563 * include/grub/powerpc/ieee1275/console.h: Likewise.
11564 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11565 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11566 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11567 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11568 * include/grub/powerpc/ieee1275/time.h: Likewise.
11569 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11570 * include/grub/sparc64/libgcc.h: Likewise.
11571 * include/grub/sparc64/setjmp.h: Likewise.
11572 * include/grub/sparc64/types.h: Likewise.
11573 * include/grub/sparc64/ieee1275/console.h: Likewise.
11574 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11575 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11576 * include/grub/sparc64/ieee1275/time.h: Likewise.
11577 * include/grub/util/biosdisk.h: Likewise.
11578 * include/grub/util/getroot.h: Likewise.
11579 * include/grub/util/lvm.h: Likewise.
11580 * include/grub/util/misc.h: Likewise.
11581 * include/grub/util/raid.h: Likewise.
11582 * include/grub/util/resolve.h: Likewise.
11583 * io/gzio.c: Likewise.
11584 * kern/device.c: Likewise.
11585 * kern/disk.c: Likewise.
11586 * kern/dl.c: Likewise.
11587 * kern/elf.c: Likewise.
11588 * kern/env.c: Likewise.
11589 * kern/err.c: Likewise.
11590 * kern/file.c: Likewise.
11591 * kern/fs.c: Likewise.
11592 * kern/loader.c: Likewise.
11593 * kern/main.c: Likewise.
11594 * kern/misc.c: Likewise.
11595 * kern/mm.c: Likewise.
11596 * kern/parser.c: Likewise.
11597 * kern/partition.c: Likewise.
11598 * kern/rescue.c: Likewise.
11599 * kern/term.c: Likewise.
11600 * kern/efi/efi.c: Likewise.
11601 * kern/efi/init.c: Likewise.
11602 * kern/efi/mm.c: Likewise.
11603 * kern/i386/dl.c: Likewise.
11604 * kern/i386/efi/init.c: Likewise.
11605 * kern/i386/efi/startup.S: Likewise.
11606 * kern/i386/pc/init.c: Likewise.
11607 * kern/i386/pc/lzo1x.S: Likewise.
11608 * kern/i386/pc/startup.S: Likewise.
11609 * kern/ieee1275/ieee1275.c: Likewise.
11610 * kern/powerpc/cache.S: Likewise.
11611 * kern/powerpc/dl.c: Likewise.
11612 * kern/powerpc/ieee1275/cmain.c: Likewise.
11613 * kern/powerpc/ieee1275/crt0.S: Likewise.
11614 * kern/powerpc/ieee1275/init.c: Likewise.
11615 * kern/powerpc/ieee1275/openfw.c: Likewise.
11616 * kern/sparc64/cache.S: Likewise.
11617 * kern/sparc64/dl.c: Likewise.
11618 * kern/sparc64/ieee1275/init.c: Likewise.
11619 * kern/sparc64/ieee1275/openfw.c: Likewise.
11620 * loader/efi/chainloader.c: Likewise.
11621 * loader/efi/chainloader_normal.c: Likewise.
11622 * loader/i386/efi/linux.c: Likewise.
11623 * loader/i386/efi/linux_normal.c: Likewise.
11624 * loader/i386/pc/chainloader.c: Likewise.
11625 * loader/i386/pc/chainloader_normal.c: Likewise.
11626 * loader/i386/pc/linux.c: Likewise.
11627 * loader/i386/pc/linux_normal.c: Likewise.
11628 * loader/i386/pc/multiboot.c: Likewise.
11629 * loader/i386/pc/multiboot_normal.c: Likewise.
11630 * loader/powerpc/ieee1275/linux.c: Likewise.
11631 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11632 * normal/arg.c: Likewise.
11633 * normal/cmdline.c: Likewise.
11634 * normal/command.c: Likewise.
11635 * normal/completion.c: Likewise.
11636 * normal/execute.c: Likewise.
11637 * normal/function.c: Likewise.
11638 * normal/lexer.c: Likewise.
11639 * normal/main.c: Likewise.
11640 * normal/menu.c: Likewise.
11641 * normal/menu_entry.c: Likewise.
11642 * normal/misc.c: Likewise.
11643 * normal/parser.y: Likewise.
11644 * normal/script.c: Likewise.
11645 * normal/i386/setjmp.S: Likewise.
11646 * normal/powerpc/setjmp.S: Likewise.
11647 * normal/sparc64/setjmp.S: Likewise.
11648 * partmap/acorn.c: Likewise.
11649 * partmap/amiga.c: Likewise.
11650 * partmap/apple.c: Likewise.
11651 * partmap/gpt.c: Likewise.
11652 * partmap/pc.c: Likewise.
11653 * partmap/sun.c: Likewise.
11654 * term/gfxterm.c: Likewise.
11655 * term/terminfo.c: Likewise.
11656 * term/efi/console.c: Likewise.
11657 * term/i386/pc/console.c: Likewise.
11658 * term/i386/pc/serial.c: Likewise.
11659 * term/i386/pc/vesafb.c: Likewise.
11660 * term/i386/pc/vga.c: Likewise.
11661 * term/ieee1275/ofconsole.c: Likewise.
11662 * util/biosdisk.c: Likewise.
11663 * util/console.c: Likewise.
11664 * util/genmoddep.c: Likewise.
11665 * util/getroot.c: Likewise.
11666 * util/grub-emu.c: Likewise.
11667 * util/grub-mkdevicemap.c: Likewise.
11668 * util/grub-probe.c: Likewise.
11669 * util/lvm.c: Likewise.
11670 * util/misc.c: Likewise.
11671 * util/raid.c: Likewise.
11672 * util/resolve.c: Likewise.
11673 * util/update-grub.in: Likewise.
11674 * util/update-grub_lib.in: Likewise.
11675 * util/grub.d/00_header.in: Likewise.
11676 * util/grub.d/10_hurd.in: Likewise.
11677 * util/grub.d/10_linux.in: Likewise.
11678 * util/i386/efi/grub-install.in: Likewise.
11679 * util/i386/efi/grub-mkimage.c: Likewise.
11680 * util/i386/pc/grub-install.in: Likewise.
11681 * util/i386/pc/grub-mkimage.c: Likewise.
11682 * util/i386/pc/grub-mkrescue.in: Likewise.
11683 * util/i386/pc/grub-setup.c: Likewise.
11684 * util/i386/pc/misc.c: Likewise.
11685 * util/powerpc/ieee1275/grub-install.in: Likewise.
11686 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11687 * util/powerpc/ieee1275/misc.c: Likewise.
11688 * video/bitmap.c: Likewise.
11689 * video/video.c: Likewise.
11690 * video/i386/pc/vbe.c: Likewise.
11691 * video/i386/pc/vbeblit.c: Likewise.
11692 * video/i386/pc/vbefill.c: Likewise.
11693 * video/i386/pc/vbeutil.c: Likewise.
11694 * video/readers/tga.c: Likewise.
11696 2007-07-02 Robert Millan <rmh@aybabtu.com>
11698 * conf/i386-efi.rmk: Replace obsolete reference to
11699 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11700 with util/getroot.c.
11701 * conf/powerpc-ieee1275.rmk: Likewise.
11702 * conf/sparc64-ieee1275.rmk: Likewise.
11704 * util/grub-emu.c (main): Fix unchecked pointer handling.
11706 2007-07-02 Robert Millan <rmh@aybabtu.com>
11708 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11709 invocation to fail, in order to support partition-less media.
11711 * util/i386/pc/grub-install.in: Likewise.
11713 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11714 which fs or partmap modules are needed (akin to its sister scripts).
11716 Also use grub-probe to get rid of unportable /proc/mounts check.
11718 Print the same informational message that the other scripts do, before
11721 2007-06-23 Robert Millan <rmh@aybabtu.com>
11723 * util/update-grub_lib.in (font_path): New function. Determine whether
11724 a font file can be found and, if so, echo the GRUB path to it.
11726 * util/update-grub.in: Handle multiple terminals depending on user
11727 input, platform availability and font file presence. Propagate
11728 variables of our findings to /etc/grub.d/ children.
11730 * util/grub.d/00_header.in: Handle multiple terminals, based on
11731 environment setup by update-grub.
11733 2007-06-23 Robert Millan <rmh@aybabtu.com>
11735 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11737 2007-06-21 Robert Millan <rmh@aybabtu.com>
11739 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11740 indicate end of data section in kernel image.
11741 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11742 GRUB_KERNEL_MACHINE_DATA_END.
11744 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11746 * kern/i386/efi/startup.S: Likewise.
11748 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11749 during image generation. Implement --prefix option to override this
11751 * util/i386/efi/grub-mkimage.c: Likewise.
11753 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11754 code to make path relative to its root into a separate function.
11756 * util/i386/pc/grub-install.in: Use newly provided
11757 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11758 pass the result to grub-install --prefix.
11760 2007-06-13 Robert Millan <rmh@aybabtu.com>
11762 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11763 DEFAULT_DEVICE_MAP.
11764 * util/grub-emu.c: Use above definitions from misc.h instead of
11766 * util/grub-mkdevicemap.c: Likewise.
11767 * util/i386/pc/grub-setup.c: Likewise.
11768 * util/grub-probe.c: Likewise.
11769 (probe): Abort with grub_util_error() when either
11770 grub_guess_root_device or grub_util_get_grub_dev fails.
11772 2007-06-12 Robert Millan <rmh@aybabtu.com>
11774 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11775 "pager" assignment.
11776 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11778 * util/grub-probe.c (probe): Likewise for "drive_name".
11780 2007-06-11 Robert Millan <rmh@aybabtu.com>
11782 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11783 not just the cdrom one.
11785 2007-06-11 Robert Millan <rmh@aybabtu.com>
11787 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11788 Add --pkglibdir=DIR option to override pkglibdir.
11789 Mention --image-type=TYPE in help output.
11790 Fix --grub-mkimage (it was a no-op).
11791 Abort gracefully when no parameter is given.
11793 2007-06-11 Robert Millan <rmh@aybabtu.com>
11795 * util/i386/pc/grub-mkrescue.in: New file.
11796 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11797 * Makefile.in: Handle bin_SCRIPTS.
11799 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11801 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11802 list of video modes.
11804 2007-06-06 Robert Millan <rmh@aybabtu.com>
11806 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11807 file doesn't exist, or if it is in a filesystem grub can't read.
11809 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11810 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11811 header comment to fit in 80 columns when the variables are resolved.
11813 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11814 could be identified by update-grub. Remove redundant check for
11815 unifont.pff existence (since convert_system_path_to_grub_path now
11818 2007-06-04 Robert Millan <rmh@aybabtu.com>
11820 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11822 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11824 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11826 2007-06-04 Robert Millan <rmh@aybabtu.com>
11828 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11830 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11831 grub_apple_partition_map_fini.
11834 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11835 to access >2 TiB disks).
11837 Print disk->total_sectors with %llu instead of %lu, since this
11838 variable is always 64-bit (prevents wrong disk size from being displayed
11839 on either >2 TiB disk or big-endian CPU).
11841 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11842 into a generic case that supports all (sane) partition maps.
11844 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11847 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11848 and grub_apple_partition_map_fini() after that.
11850 2007-06-01 Robert Millan <rmh@aybabtu.com>
11852 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11854 * util/grub.d/00_header.in: Only enable gfxterm when
11855 convert_system_path_to_grub_path() succeeds.
11857 2007-05-20 Robert Millan <rmh@aybabtu.com>
11859 * util/update-grub_lib.in: New file.
11860 * DISTLIST: Add update-grub_lib.in.
11861 * conf/common.rmk: Generate update-grub_lib and install it in
11863 * Makefile.in: Add install routine for $(lib_DATA).
11865 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11866 function provided by update-grub_lib to support arbitrary paths of
11868 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11869 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11871 2007-05-19 Robert Millan <rmh@aybabtu.com>
11873 * commands/i386/cpuid.c: New module.
11874 * DISTLIST: Add it.
11875 * conf/i386-efi.rmk: Enable cpuid.mod.
11876 * conf/i386-pc.rmk: Likewise.
11878 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11880 * kern/disk.c (grub_disk_read): Check return value of
11883 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11885 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11887 * disk/raid.c (grub_raid_open): Likewise.
11889 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11891 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11892 stack instead of on the heap.
11894 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11895 before doing a read on it.
11897 * configure.ac: Only use -fno-stack-protector for the target
11900 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11902 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11903 __attribute_ ((unused)) to mode_type argument.
11905 * util/getroot.c (grub_guess_root_device): Fix #endif.
11907 * kern/misc.c (memcmp): Fix prototype.
11909 * include/grub/partition.h [GRUB_UTIL]
11910 (grub_gpt_partition_map_init): Add prototype.
11911 (grub_gpt_partition_map_fini): Likewise.
11913 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11914 at the right place.
11916 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11917 (grub_fat_read_data): Likewise.
11918 (grub_fat_find_dir): Likewise.
11920 * font/manager.c (find_glyph): Make table a const.
11921 (grub_font_get_glyph): Remove bitmap from if statement.
11923 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11925 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11926 code, first search for device in /dev/mapper, then in /dev.
11927 (grub_util_get_grub_dev): New function.
11928 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11930 * util/grub-probe.c (probe): Remove check for RAID, call
11931 grub_util_get_grub_dev() instead of
11932 grub_util_biosdisk_get_grub_dev().
11933 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11934 grub_util_biosdisk_get_grub_dev().
11935 * util/i386/pc/grub-setup.c (main): Likewise.
11937 2007-05-16 Robert Millan <rmh@aybabtu.com>
11939 * DISTLIST: Update for the latest changes.
11940 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11941 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11942 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11943 grub/util/biosdisk.h.
11944 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11945 grub/util/biosdisk.h.
11947 2007-05-16 Robert Millan <rmh@aybabtu.com>
11949 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11951 2007-05-16 Robert Millan <rmh@aybabtu.com>
11953 * util/i386/efi/grub-install.in: New.
11954 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11955 newly added grub-install.
11956 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11958 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11959 grub/util/biosdisk.h.
11960 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11961 grub/util/biosdisk.h.
11963 2007-05-16 Robert Millan <rmh@aybabtu.com>
11965 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11966 * include/grub/util/biosdisk.h: ... here.
11967 * util/i386/pc/biosdisk.c: Moved to ...
11968 * util/biosdisk.c: ... here.
11969 * util/i386/pc/getroot.c: Moved to ...
11970 * util/getroot.c: ... here.
11971 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11972 * util/grub-mkdevicemap.c: ... here.
11973 * util/i386/pc/grub-probe.c: Moved to ...
11974 * util/grub-probe.c: ... here.
11976 2007-05-15 Robert Millan <rmh@aybabtu.com>
11978 * util/update-grub.in: Remove duplicated line in grub.cfg header
11981 2007-05-13 Robert Millan <rmh@aybabtu.com>
11983 * util/update-grub.in: Fix a few assumptions about the devices holding
11984 /, /boot and /boot/grub being the same.
11985 * util/grub.d/00_header.in: Likewise.
11986 * util/grub.d/10_hurd.in: Likewise.
11987 * util/grub.d/10_linux.in: Likewise.
11989 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11990 patterns. Use that to define the `.old' suffix as older than `'.
11992 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11994 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11995 the grub.cfg header message.
11997 2007-05-11 Robert Millan <rmh@aybabtu.com>
11999 * util/update-grub.in: Create device.map if it doesn't already exist,
12000 before attempting to run grub-probe.
12001 Check for grub-probe and grub-mkdevicemap with the same code
12002 grub-install is using.
12005 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
12007 * Makefile.in: Add the datarootdir autoconf variable.
12009 2007-05-09 Robert Millan <rmh@aybabtu.com>
12011 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12012 fail gracefully if dev->disk->partition == NULL.
12014 2007-05-07 Robert Millan <rmh@aybabtu.com>
12016 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12017 determine partition map module.
12018 * util/i386/pc/grub-install.in: Use this feature to decide which
12019 partition module to load, instead of hardcoding pc and gpt.
12021 2007-05-07 Robert Millan <rmh@aybabtu.com>
12023 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12024 source directory differs from build directory.
12026 2007-05-05 Robert Millan <rmh@aybabtu.com>
12028 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12031 2007-05-05 Robert Millan <rmh@aybabtu.com>
12033 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12035 2007-05-05 Robert Millan <rmh@aybabtu.com>
12037 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12038 command-line arguments via ${GRUB_CMDLINE_LINUX}.
12040 2007-05-05 Robert Millan <rmh@aybabtu.com>
12042 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12043 (grub_probe_SOURCES): Likewise.
12044 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12045 GPT and initialize dos_part and bsd_part accordingly.
12046 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12048 (main): Activate gpt module for use during partition identification,
12049 and deactivate it afterwards.
12050 * util/i386/pc/grub-install.in: Add gpt module to core.img.
12051 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12052 partition identification, and deactivate it afterwards.
12054 2007-05-05 Robert Millan <rmh@aybabtu.com>
12056 * term/i386/pc/console.c (grub_console_fini): Call
12057 grub_term_set_current() before grub_term_unregister().
12059 2007-05-04 Robert Millan <rmh@aybabtu.com>
12061 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12062 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12063 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
12064 and update-grub_DATA.
12065 * conf/common.rmk: Build and install update-grub components.
12066 * conf/common.mk: Regenerate.
12067 * util/update-grub.in: New. Core of update-grub.
12068 * util/grub.d/00_header.in: New. Generates grub.cfg header.
12069 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
12070 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
12071 * util/grub.d/README: New. Document grub.d directory layout.
12073 2007-05-01 Robert Millan <rmh@aybabtu.com>
12075 * util/grub-emu.c: Move initialization functions
12076 grub_util_biosdisk_init() and grub_init_all() before
12077 grub_util_biosdisk_get_grub_dev(), which relies on them.
12079 2007-04-19 Robert Millan <rmh@aybabtu.com>
12081 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
12084 2007-04-18 Jerone Young <jerone@gmail.com>
12086 * kernel/elf.c: Add missing parenthesis for conditional statement
12089 2007-04-10 Jerone Young <jerone@gmail.com>
12091 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
12092 continue on and look for device node with real device name.
12094 2007-04-10 Jerone Young <jerone@gmail.com>
12096 * configure.ac: Add argument for autoconf to use transformation
12098 * Makefile.in: Add autoconf package transformation code.
12099 * util/i386/pc/grub-install.in: Likewise.
12100 * util/powerpc/ieee1275/grub-install.in: Likewise.
12102 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12104 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
12105 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
12106 (EXT2_REVISION): Likewise.
12107 (EXT2_INODE_SIZE): Likewise.
12108 (struct grub_ext2_block_group): Added a missing member
12110 (grub_ext2_read_inode): Divide by the inode size in a superblock
12111 instead of 128 to obtain INODES_PER_BLOCK.
12112 Use the macro EXT2_INODE_SIZE instead of directly using
12113 SBLOCK->INODE_SIZE.
12115 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12117 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
12118 superblock instead of the structure size to compute an
12119 offset. This fixes the problem that GRUB could not read a
12120 filesystem when inode size is different from 128-byte.
12122 2007-03-05 Marco Gerards <marco@gnu.org>
12124 * normal/main.c (read_config_file): When "menu" is not set, create
12125 an initial context.
12127 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12129 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
12130 (HEAP_LIMIT): New macro.
12131 (grub_claim_heap): Claim memory up to `heaplimit'.
12133 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12135 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
12136 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
12137 (_start): Likewise.
12138 (grub_arch_modules_addr): Return address after `_end'.
12139 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
12140 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
12141 (add_segments): Calculate `_end' from phdr size and location.
12142 (ALIGN_UP): Moved to ...
12143 * include/grub/misc.h: here.
12144 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12146 (GRUB_IEEE1275_MODULE_BASE): Removed.
12148 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12150 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
12153 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12155 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
12157 (grub_elf64_load_hook_t): Likewise.
12158 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
12161 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12163 * kern/mm.c: Update copyright.
12164 (grub_mm_debug): Correct syntax error.
12165 (grub_mm_dump_free): New function.
12166 (grub_debug_free): Call `grub_free'.
12167 * include/grub/mm.h: Update copyright.
12168 (grub_mm_dump_free): Add declaration.
12170 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12172 * include/grub/ieee1275/ieee1275.h: Update copyright.
12173 * kern/powerpc/ieee1275/init.c: Likewise.
12174 * kern/powerpc/ieee1275/openfw.c: Likewise.
12176 * loader/powerpc/ieee1275/linux.c: Likewise.
12177 * include/grub/elfload.h: Likewise.
12178 * kern/elf.c: Likewise.
12179 (grub_elf32_load): Pass `base' and `size' parameters. Update all
12181 (grub_elf64_load): Likewise.
12182 (grub_elf32_load_segment): Move to a nested function.
12183 (grub_elf64_load_segment): Likewise.
12185 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12187 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
12189 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
12190 (grub_heap_len): Likewise.
12191 (HEAP_SIZE): New macro.
12192 (grub_claim_heap): New function.
12193 (grub_machine_init): Don't claim heap directly. Call
12195 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
12196 (grub_available_iterate): New function.
12198 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
12200 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
12201 * configure.ac: Use it for testing the HOST and TARGET compilers.
12203 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
12205 * Makefile.in (enable_grub_emu): New variable.
12206 * configure.ac (--enable-grub-emu): New option.
12207 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
12208 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
12209 * conf/i386-pc.rmk: Likewise.
12210 * conf/powerpc-ieee1275.rmk: Likewise.
12211 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
12213 2006-12-12 Marco Gerards <marco@gnu.org>
12215 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
12217 * kern/env.c (grub_env_unset): Don't free the member `value' when
12218 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
12221 * normal/main.c (current_menu): Removed.
12222 (free_menu): Unset the `menu' environment variable.
12223 (grub_normal_menu_addentry): Make use of the environment variable
12224 `menu', instead of using the global `current_menu'. Allocate
12225 memory for the sourcecode of this entry.
12226 (read_config_file): New argument `nested', changed all callers.
12227 Only in the case of a new context, initialize a new menu. Set the
12228 `menu' environment variable.
12229 (grub_normal_execute): Don't set and unset the environment
12230 variable `menu' here anymore. Only free the menu when leaving the
12233 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
12236 2006-12-11 Marco Gerards <marco@gnu.org>
12238 * normal/menu_entry.c (run): Fix off by one bug so the last line
12239 is executed. Move the loader check to outside the loop.
12241 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
12243 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
12245 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
12247 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
12248 the number of sectors. Reported by Andrey Shuvikov
12249 <mr_hyro@yahoo.com>.
12251 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
12253 * kern/disk.c (grub_disk_read): When there is a read error, always
12254 try to read only the necessary data.
12256 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
12258 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
12260 [GRUB_UTIL] (grub_raid_fini): Likewise.
12261 [GRUB_UTIL] (grub_lvm_init): Likewise.
12262 [GRUB_UTIL] (grub_lvm_fini): Likewise.
12263 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
12264 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
12265 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
12266 and grub_raid_fini().
12268 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12270 * include/grub/types.h (__unused): Rename to UNUSED.
12271 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
12272 (grub_elf64_size): Likewise.
12274 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12276 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
12277 grub_error_push and grub_error_pop in the error-handling path.
12278 (grub_elf32_load_segment): Only call grub_file_read with non-zero
12281 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12283 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
12284 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12286 (kernel_elf_SOURCES): Likewise.
12287 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
12288 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
12289 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12290 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12291 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
12292 (elf_mod_SOURCES): New variable.
12293 (elf_mod_CFLAGS): Likewise.
12294 (elf_mod_LDFLAGS): Likewise.
12295 * include/grub/types.h (__unused): New macro.
12296 * include/grub/elfload.h: New file.
12297 * kern/elf.c: Likewise.
12298 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
12299 (ELF32_LOADMASK): New macro.
12300 (ELF64_LOADMASK): Likewise.
12301 (vmlinux): Removed.
12302 (grub_linux_load32): New function.
12303 (grub_linux_load64): Likewise.
12304 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
12305 Use grub_elf_t instead of grub_file_t.
12307 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
12309 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
12310 `catch_result' to struct set_color_args.
12312 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12314 * normal/menu.c: Include grub/script.h.
12315 * normal/menu_entry.c: Likewise.
12316 * include/grub/normal.h: Do not include grub/script.h.
12318 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12320 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
12322 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12324 * kern/disk.c (grub_disk_open): Print debug messages when opening a
12326 (grub_disk_close): Print debug messages when closing a disk.
12327 (grub_disk_read): Print debug messages when disk read fails.
12328 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
12330 * kern/partition.c: Include misc.h.
12331 (grub_partition_iterate): Print debug messages when detecting
12334 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12336 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
12338 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12340 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
12342 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12343 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12345 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
12347 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12348 instead of sizeof(lv). Patch by Michael Guntsche.
12350 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
12352 * disk/lvm.c: Rename VGS to VG_LIST.
12353 (grub_lvm_iterate): Change VGS->LV to VG-LV.
12354 (grub_lvm_open): Likewise.
12355 Thanks to Michael Guntsche for finding this bug.
12357 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12359 * configure.ac (AC_INIT): Bumped to 1.95.
12361 2006-10-14 Robert Millan <rmh@aybabtu.com>
12363 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12364 with "/dev/.static/dev/md".
12366 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12368 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12369 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12370 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12371 DRIVE_NAME are always freed.
12373 * util/i386/pc/biosdisk.c (make_device_name): Add one into
12374 DOS_PART, as a DOS partition is counted from one instead of zero
12375 now. Reported by Robert Millan.
12377 2006-10-14 Robert Millan <rmh@aybabtu.com>
12379 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12380 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12381 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12382 string returned by grub_guess_root_device.
12383 * util/i386/pc/grub-setup.c: Likewise.
12384 * util/i386/pc/grub-probefs.c: Likewise.
12386 * util/i386/pc/grub-probefs.c: Rename to ...
12387 * util/i386/pc/grub-probe.c: ... this.
12388 * DISTLIST: Remove grub-probefs, add grub-probe.
12389 * conf/i386-efi.rmk: Likewise.
12390 * conf/i386-pc.rmk: Likewise.
12391 * util/i386/pc/grub-install.in: Likewise.
12393 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12394 choose which information we want to print.
12396 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12398 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12399 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12400 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12401 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12402 video/readers/tga.c and video/i386/pc/vbeutil.c.
12404 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12406 Added support for RAID and LVM.
12408 * disk/lvm.c: New file.
12409 * disk/raid.c: Likewise.
12410 * include/grub/lvm.h: Likewise.
12411 * include/grub/raid.h: Likewise.
12412 * include/grub/util/lvm.h: Likewise.
12413 * include/grub/util/raid.h: Likewise.
12414 * util/lvm.c: Likewise.
12415 * util/raid.c: Likewise.
12417 * include/grub/disk.h (grub_disk_dev_id): Add
12418 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12419 (grub_disk_get_size): New prototype.
12420 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12421 returns a partition.
12422 (grub_disk_get_size): New function.
12424 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12425 verbatim if grub_install_dos_part is -2.
12427 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12430 * util/i386/pc/grub-setup.c (setup): New argument
12431 MUST_EMBED. Force embedding of GRUB when the argument is
12432 true. Close FILE before returning.
12433 (main): Add support for RAID and LVM.
12435 * conf/common.rmk: Add RAID and LVM modules.
12436 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12438 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12440 * kern/misc.c (grub_strstr): New function.
12441 * include/grub/misc.h (grub_strstr): New prototype.
12443 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12445 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12447 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12449 * kern/misc.c (grub_strtoull): Guess the base only if not
12452 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12454 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12457 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12459 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12461 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12462 Remove `flags' argument. All callers changed.
12463 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12464 (IEEE1275_IHANDLE_INVALID): New variable.
12465 (IEEE1275_CELL_INVALID): New variable.
12466 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12467 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12468 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12469 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12470 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12471 codes from Open Firmware. All callers updated.
12472 (grub_ieee1275_next_property): Directly return Open Firmware return
12474 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12475 Standardize error checking from `grub_ieee1275_get_property'.
12476 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12477 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12479 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12481 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12482 `instance_to_package_args' to `instance_to_path_args'.
12484 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12485 `grub_ieee1275_chosen'.
12487 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12488 `grub_ieee1275_interpret'.
12490 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12492 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12494 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12496 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12497 (__cmpdi): Likewise.
12499 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12500 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12503 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12505 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12506 to type `grub_ssize_t'.
12507 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12509 2006-09-22 Marco Gerards <marco@gnu.org>
12511 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12514 2006-09-22 Marco Gerards <marco@gnu.org>
12516 * commands/echo.c: New file.
12518 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12520 * conf/common.rmk (echo_mod_SOURCES): New variable.
12521 (echo_mod_CFLAGS): Likewise.
12522 (echo_mod_LDFLAGS): Likewise.
12524 2006-09-22 Marco Gerards <marco@gnu.org>
12526 * normal/main.c (get_line): Malloc memory instead of using
12527 preallocated memory. Removed the arguments `cmdline' and
12528 `max_len'. Updated all callers.
12530 2006-09-22 Marco Gerards <marco@gnu.org>
12532 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12533 (normal_mod_DEPENDENCIES): Likewise.
12535 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12536 (normal_mod_DEPENDENCIES): Likewise.
12538 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12540 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12542 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12544 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12545 (normal_mod_DEPENDENCIES): Likewise.
12546 * conf/i386-pc.mk: Regenerate.
12547 * conf/i386-efi.mk: Likewise
12548 * conf/common.mk: Likewise.
12549 * conf/powerpc-ieee1275.mk: Likewise.
12550 * conf/sparc64-ieee1275.mk: Likewise.
12552 2006-09-22 Robert Millan <rmh@aybabtu.com>
12554 Sync with i386 version.
12555 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12556 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12558 2006-09-21 Robert Millan <rmh@aybabtu.com>
12560 Import from GRUB Legacy (lib/device.c):
12561 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12562 (init_device_map) [__linux__]: Add support for I2O devices.
12564 2006-09-14 Marco Gerards <marco@gnu.org>
12566 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12569 2006-09-14 Robert Millan <rmh@aybabtu.com>
12571 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12574 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12576 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12577 before adding it to device.map.
12579 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12581 * genmk.rb: Let GCC generate dependencies the first time it
12582 compiles a file; using the -MD option.
12583 * conf/common.mk: Regenerate.
12584 * conf/i386-pc.mk: Likewise.
12585 * conf/i386-efi.mk: Likewise.
12586 * conf/powerpc-ieee1275.mk: Likewise.
12587 * conf/sparc64-ieee1275.mk: Likewise.
12589 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12591 Move the prototypes of grub_setjmp and grub_longjmp to
12592 cpu/setjmp.h, so that each architecture may specify different
12595 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12596 (grub_longjmp): Likewise.
12597 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12598 (grub_longjmp): Likewise.
12599 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12600 (grub_longjmp): Likewise.
12602 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12603 [!GRUB_UTIL] (grub_longjmp): Removed.
12605 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12607 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12608 "color!" method does not return any value.
12610 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12612 * include/grub/bitmap.h: New file.
12614 * include/grub/i386/pc/vbeutil.h: Likewise.
12616 * video/bitmap.c: Likewise.
12618 * video/readers/tga.c: Likewise.
12620 * video/i386/pc/vbeutil.c: Likewise.
12622 * commands/videotest.c: Code cleanup and updated to reflect to new
12625 * term/gfxterm.c: Likewise.
12627 * video/video.c: Likewise.
12629 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12630 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12631 (bitmap_mod_SOURCES): New entry.
12632 (bitmap_mod_CFLAGS): Likewise.
12633 (bitmap_mod_LDFLAGS): Likewise.
12634 (tga_mod_SOURCES): Likewise.
12635 (tga_mod_CFLAGS): Likewise.
12636 (tga_mod_LDFLAGS): Likewise.
12638 * include/grub/video.h (grub_video_blit_operators): New enum type.
12639 (grub_video_render_target): Changed as forward declaration and moved
12640 actual definition to be video driver specific.
12641 (grub_video_adapter.blit_bitmap): Added blitting operator.
12642 (grub_video_adapter.blit_render_target): Likewise.
12643 (grub_video_blit_bitmap): Likewise.
12644 (grub_video_blit_render_target): Likewise.
12646 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12647 driver specific render target definition.
12648 (grub_video_vbe_map_rgba): Added driver internal helper.
12649 (grub_video_vbe_unmap_color): Updated to use
12650 grub_video_i386_vbeblit_info.
12651 (grub_video_vbe_get_video_ptr): Likewise.
12653 * include/grub/i386/pc/vbeblit.h
12654 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12655 grub_video_i386_vbeblit_info.
12656 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12657 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12658 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12659 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12660 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12661 (grub_video_i386_vbeblit_index_index): Likewise.
12662 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12663 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12664 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12665 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12667 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12670 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12671 include/grub/i386/pc/vbeblit.h.
12673 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12674 Updated to use grub_video_i386_vbeblit_info.
12675 (grub_video_i386_vbefill_R8G8B8): Likewise.
12676 (grub_video_i386_vbefill_index): Likewise.
12677 (grub_video_i386_vbefill): Added generic filler.
12679 * video/i386/pc/vbefill.c: Updated to reflect changes on
12680 include/grub/i386/pc/vbefill.h.
12682 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12683 grub_video_i386_vbeblit_info.
12684 (grub_video_vbe_unmap_color): Likewise.
12685 (grub_video_vbe_blit_glyph): Likewise.
12686 (grub_video_vbe_scroll): Likewise.
12687 (grub_video_vbe_draw_pixel): Removed function.
12688 (grub_video_vbe_get_pixel): Likewise.
12689 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12690 updated code to use it.
12691 (common_blitter): Added common blitter for render target and bitmap.
12692 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12693 (grub_video_vbe_blit_render_target): Likewise.
12695 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12697 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12698 is in text mode if there is no console control protocol instance
12701 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12703 * include/grub/video.h: Code cleanup.
12705 * include/grub/i386/pc/vbe.h: Likewise.
12707 * video/i386/pc/vbe.c: Likewise.
12709 * video/i386/pc/vbeblit.c: Likewise.
12711 * video/i386/pc/vbefill.c: Likewise.
12713 * video/video.c: Likewise. Also added more comments.
12715 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12717 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12718 (struct grub_biosdisk_dap): Likewise.
12720 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12721 linkage settings for all functions.
12723 2006-07-12 Marco Gerards <marco@gnu.org>
12725 * configure.ac (--enable-mm-debug): Fix typo.
12727 * genkernsyms.sh.in: Use proper quoting for `CC'.
12729 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12731 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12732 (normal_mod_ASFLAGS): Remove "-m32".
12734 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12736 * util/misc.c: Include config.h.
12737 [!HAVE_MEMALIGN]: Do not include malloc.h.
12738 (grub_memalign): Use posix_memalign, if present. Then, use
12739 memalign, if present. Otherwise, emit an error.
12741 * util/grub-emu.c: Do not include malloc.h.
12743 * include/grub/util/misc.h: Include unistd.h. This is required for
12744 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12745 D. Eades III <hde@foobar-qux.org>.
12747 * configure.ac (AC_GNU_SOURCE): Added.
12748 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12751 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12753 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12754 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12756 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12758 * include/grub/types.h (grub_host_addr_t): Rename to
12759 grub_target_addr_t.
12760 (grub_host_off_t): Rename to grub_target_off_t.
12761 (grub_host_size_t): Rename to grub_target_size_t.
12762 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12763 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12765 * include/grub/kernel.h (struct grub_module_header): Change type
12766 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12767 (grub_module_info): Likewise.
12769 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12771 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12772 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12773 Velazquez <jesus.velazquez@gmail.com>.
12775 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12777 Count partitions from 1 instead of 0 in the string representation
12778 of partitions. Still use 0-based internally.
12780 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12781 (sun_partition_map_iterate): Use grub_partition_t instead of
12782 struct grub_partition *. Cast DESC->START_CYLINDER to
12783 grub_uint64_t after converting the endian.
12784 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12785 (sun_partition_map_get_name): Add 1 to P->INDEX.
12787 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12789 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12791 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12792 zero instead of one.
12793 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12794 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12796 * partmap/apple.c (apple_partition_map_iterate): Change the type
12797 of POS to unsigned.
12798 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12799 (apple_partition_map_get_name): Add 1 into P->INDEX.
12801 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12802 of POS to unsigned.
12803 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12804 calculate the offset of a partition.
12805 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12806 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12808 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12809 SECTOR to grub_disk_addr_t.
12810 (acorn_partition_map_iterate): Likewise.
12811 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12812 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12814 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12816 * kern/i386/pc/init.c (make_install_device): Add 1 into
12817 GRUB_INSTALL_DOS_PART.
12819 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12822 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12824 Clean up the code to support 64-bit addressing in disks and
12825 files. This change is not enough for filesystems yet.
12827 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12828 type of "start" to grub_uint64_t.
12829 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12830 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12831 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12834 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12835 to grub_disk_addr_t.
12837 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12840 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12842 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12845 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12847 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12849 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12851 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12852 to grub_off_t, to detect an error from grub_file_seek.
12853 (grub_multiboot_load_elf32): Likewise.
12855 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12856 maximum unsigned long value when an overflow is detected.
12857 (grub_strtoull): New function.
12858 (grub_divmod64): Likewise.
12859 (grub_lltoa): use grub_divmod64.
12861 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12863 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12864 the pointer to next character. Use grub_strtoull instead of
12866 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12867 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12870 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12871 return value is signed.
12872 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12873 test if OFFSET is less than zero, as OFFSET is unsigned now.
12875 * kern/disk.c (struct grub_disk_cache): Change the type of
12876 "sector" to grub_disk_addr_t.
12877 (grub_disk_cache_get_index): Change the type of SECTOR to
12878 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12879 unsigned after shifting.
12880 (grub_disk_cache_invalidate): Change the type of SECTOR to
12882 (grub_disk_cache_unlock): Likewise.
12883 (grub_disk_cache_store): Likewise.
12884 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12885 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12886 grub_disk_addr_t and grub_uint64_t, respectively.
12887 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12888 body, as the value of OFFSET is tweaked by
12889 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12890 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12892 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12893 body, as the value of OFFSET is tweaked by
12894 grub_disk_check_range. Change the types of LEN and N to
12897 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12898 and "saved_offset" to grub_off_t.
12899 (test_header): Cast BUF to char *.
12900 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12902 (grub_gzio_read): Change the types of OFFSET and SIZE to
12903 grub_off_t and grub_size_t, respectively.
12905 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12907 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12908 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12909 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12910 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12911 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12913 * include/grub/types.h (grub_off_t): Unconditionally set to
12915 (grub_disk_addr_t): Changed to grub_uint64_t.
12917 * include/grub/partition.h (struct grub_partition): Change the
12918 types of "start", "len" and "offset" to grub_disk_addr_t,
12919 grub_uint64_t and grub_disk_addr_t, respectively.
12920 (grub_partition_get_start): Return grub_disk_addr_t.
12921 (grub_partition_get_len): Return grub_uint64_t.
12923 * include/grub/misc.h (grub_strtoull): New prototype.
12924 (grub_divmod64): Likewise.
12926 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12927 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12928 grub_off_t, respectively.
12929 All callers and references changed.
12931 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12932 grub_size_t in "read".
12933 All callers and references changed.
12935 * include/grub/file.h (struct grub_file): Change the types of
12936 "offset" and "size" to grub_off_t and grub_off_t,
12937 respectively. Change the type of SECTOR to grub_disk_addr_t in
12939 (grub_file_read): Change the type of LEN to grub_size_t.
12940 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12942 (grub_file_size): Return grub_off_t.
12943 (grub_file_tell): Likewise.
12944 All callers and references changed.
12946 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12947 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12949 (struct grub_disk): Change the type of "total_sectors" to
12950 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12952 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12953 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12954 (grub_disk_write): Likewise.
12955 All callers and references changed.
12957 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12958 char * for grub_strncmp to silence gcc.
12959 (grub_iso9660_mount): Likewise.
12960 (grub_iso9660_mount): Likewise.
12961 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12963 (grub_iso9660_iterate_dir): Likewise.
12964 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12966 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12967 LEN to grub_disk_addr_t and grub_size_t, respectively.
12969 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12971 * fs/jfs.c (grub_jfs_read_file): Likewise.
12973 * fs/minix.c (grub_jfs_read_file): Likewise.
12975 * fs/sfs.c (grub_jfs_read_file): Likewise.
12977 * fs/ufs.c (grub_jfs_read_file): Likewise.
12979 * fs/xfs.c (grub_jfs_read_file): Likewise.
12981 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12982 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12985 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12986 BLKNR to -1 instead of returning GRUB_ERRNO.
12987 (grub_ext2_read_file): Change the types of SECTOR and
12988 LEN to grub_disk_addr_t and grub_size_t, respectively.
12990 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12991 LEN to grub_disk_addr_t and grub_size_t, respectively.
12993 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12996 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12997 string. Do not cast SECTOR explicitly.
12999 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13000 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13001 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13002 grub_disk_addr_t and grub_size_t, respectively. If the sector is
13003 over 2TB and LBA mode is not supported, raise an error.
13004 (get_safe_sectors): New function.
13005 (grub_biosdisk_read): Use get_safe_sectors.
13006 (grub_biosdisk_write): Likewise.
13008 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13009 (grub_efidisk_write): Likewise.
13011 * disk/loopback.c (delete_loopback): Cosmetic changes.
13012 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13014 (grub_loopback_open): Likewise.
13015 (grub_loopback_read): Likewise. Also, change the type of POS to
13016 grub_off_t, and fix the usage of grub_memset.
13018 * commands/i386/pc/play.c: Include grub/machine/time.h.
13020 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13023 * commands/configfile.c: Include grub/env.h.
13025 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13026 GRUB_ERRNO directly instead. Change the type of POS to
13027 grub_off_t. Follow the coding standard.
13029 * commands/blocklist.c: Include grub/partition.h.
13030 (grub_cmd_blocklist): Return an error if the underlying device is
13031 not a disk. Take the starting sector of a partition into account,
13032 if a partition is used.
13034 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13036 (lba_mode): Support 64-bit addresses.
13037 (chs_mode): Likewise.
13038 (copy_buffer): Adapted to the new offsets of a length field and a
13040 (blocklist_default_start): Allocate 64-bit space.
13042 * boot/i386/pc/boot.S (force_lba): Removed.
13043 (boot_drive): Moved to under KERNEL_SECTOR.
13044 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13046 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13048 (lba_mode): Refactored to support a 64-bit address. More size
13050 (setup_sectors): Likewise.
13052 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13054 * DISTLIST: Added include/grub/i386/linux.h. Removed
13055 include/grub/i386/pc/linux.h
13057 * configure.ac (AC_INIT): Bumped to 1.94.
13059 * config.guess: Updated from gnulib.
13060 * config.sub: Likewise.
13061 * install-sh: Likewise.
13062 * mkinstalldirs: Likewise.
13064 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13066 * conf/common.rmk (grub_modules_init.lst): Depended on
13067 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
13070 * genmk.rb (PModule::rule): Reverted the previous change.
13072 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13074 * conf/common.rmk (grub_modules_init.lst): Depends on
13075 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
13076 that the target does not exist before producing.
13077 (grub_modules_init.h): Remove the target before generating.
13078 (grub_emu_init.c): Likewise.
13080 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
13082 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
13084 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
13085 for the target-specific tests. Make sure that we also have the
13086 up-to-date target variables for those tests.
13088 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13090 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
13091 (PModule::rule): Likewise.
13093 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13095 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
13096 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
13097 target-specific flags should be prefixed.
13098 (PModule::rule): Likewise.
13100 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
13102 * configure.ac (CMP): Check if cmp is available explicitly.
13104 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
13106 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
13107 (target_cpu): New variable.
13108 (pkglibdir): Use target_cpu instead of host_cpu.
13110 * util/i386/pc/grub-install.in (host_cpu): Removed.
13111 (target_cpu): New variable.
13112 (pkglibdir): Use target_cpu instead of host_cpu.
13114 * util/genmoddep.c: Removed.
13116 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
13117 instead of GRUB_HOST_SIZEOF_VOID_P.
13118 * kern/dl.c: Likewise.
13120 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
13122 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13123 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13124 (GRUB_TARGET_SIZEOF_LONG): ... this.
13125 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13126 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13127 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13129 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13130 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13131 (GRUB_TARGET_SIZEOF_LONG): ... this.
13132 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13133 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13134 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13136 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13137 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13138 (GRUB_TARGET_SIZEOF_LONG): ... this.
13139 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13140 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13142 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
13143 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
13144 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
13145 instead of GRUB_HOST_SIZEOF_LONG.
13146 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
13147 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
13148 GRUB_CPU_WORDS_BIGENDIAN.
13149 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
13150 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
13153 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
13154 (genmoddep_SOURCES): Likewise.
13155 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
13156 (genmoddep_SOURCES): Likewise.
13157 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
13158 (genmoddep_SOURCES): Likewise.
13159 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
13161 (genmoddep_SOURCES): Likewise.
13163 * genmoddep.awk: New file.
13165 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
13166 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
13167 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
13168 (PModule::rule): Likewise.
13169 (Program::rule): Likewise.
13170 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
13171 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
13174 * configure.ac: Rewritten intensively to use host and target
13175 instead of build and host, respectively.
13177 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
13178 (host_cpu): Removed.
13179 (target_cpu): New variable.
13180 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
13181 (BUILD_CC): Removed.
13182 (BUILD_CFLAGS): Likewise.
13183 (BUILD_CPPFLAGS): Likewise.
13184 (TARGET_CC): New variable.
13185 (TARGET_CFLAGS): Likewise.
13186 (TARGET_CPPFLAGS): Likewise.
13187 (TARGET_LDFLAGS): Likewise.
13189 (include): Use target_cpu instead of host_cpu.
13190 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
13192 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
13194 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
13196 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
13197 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
13198 field 'false' to 'exec_on_false'.
13199 (grub_script_create_cmdif): Renamed argument names to reflect above
13202 * normal/execute.c (grub_script_execute_cmdif): Likewise.
13204 * normal/script.c (grub_script_create_cmdif): Likewise.
13206 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
13208 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
13210 (grub_hfsplus_btree_recptr): Likewise.
13211 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
13212 FILEBLOCK both to pass a block number and store next block
13214 (grub_hfsplus_read_block): Rewritten heavily to support an extent
13215 overflow file correctly. Specify errors appropriately, because
13216 fshelp expects that GRUB_ERRNO is set when fails. Reuse
13217 grub_hfsplus_btree_recptr to get the pointer to a found key.
13218 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
13221 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
13223 (_linux_mod_SOURCES): New variable.
13224 (_linux_mod_CFLAGS): Likewise.
13225 (_linux_mod_LDFLAGS): Likewise.
13226 (linux_mod_SOURCES): Likewise.
13227 (linux_mod_CFLAGS): Likewise.
13228 (linux_mod_LDFLAGS): Likewise.
13230 * DISTLIST: Added loader/i386/efi/linux.c,
13231 loader/i386/efi/linux_normal.c and
13232 include/grub/i386/efi/loader.h.
13234 * loader/i386/efi/linux.c: New file.
13235 * loader/i386/efi/linux_normal.c: Likewise.
13236 * include/grub/i386/efi/loader.h: Likewise.
13238 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
13240 * commands/blocklist.c: New file.
13242 * DISTLIST: Added commands/blocklist.c.
13244 * term/efi/console.c (grub_console_highlight_color): Use a lighter
13245 color for the background, and a darker color for the foreground.
13246 (grub_console_checkkey): Return READ_KEY.
13247 (grub_console_cls): Set the background to
13248 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
13250 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
13252 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
13253 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
13255 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
13258 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
13259 BG. The spec is wrong again.
13261 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
13263 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
13265 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13266 commands/blocklist.c.
13267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13269 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
13270 (blocklist_mod_SOURCES): New variable.
13271 (blocklist_mod_CFLAGS): Likewise.
13272 (blocklist_mod_LDFLAGS): Likewise.
13274 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
13276 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
13278 (lba_mode): Use %eax more intensively to reduce the code size.
13280 2006-05-20 Marco Gerards <marco@gnu.org>
13282 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
13284 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
13286 (script): Accept leading newlines.
13287 (newlines): New rule to describe 0 or more newlines.
13288 (commands): Accept `command' with trailing newline. Fixed the
13289 order in which arguments were passed to `grub_script_add_cmd'.
13290 Accept commands separated by newlines.
13291 (function): Changed to accept newlines.
13292 (menuentry) Rewritten.
13294 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
13295 front of the list, instead of to the end.
13297 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
13299 * util/i386/pc/grub-install.in (bindir): New variable.
13300 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
13301 Shaver <lbgwjl@gmail.com>.
13303 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
13305 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
13306 grub/machine/linux.h
13307 * loader/i386/pc/linux.c: Likewise.
13309 * include/grub/i386/pc/linux.h: Moved to ...
13310 * include/grub/i386/linux.h: ... here.
13312 * include/grub/i386/linux.h (struct linux_kernel_params): New
13315 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
13317 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
13319 (grub_video_vbe_blit_glyph): Likewise.
13320 (grub_video_vbe_blit_bitmap): Likewise.
13321 (grub_video_vbe_blit_render_target): Likewise.
13323 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
13325 * configure.ac (--with-platform): Properly quote the square
13328 2006-05-08 Marco Gerards <marco@gnu.org>
13330 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
13332 (kernel_elf_HEADERS): ...to this. Updated all users.
13333 (grubof_symlist.c): Renamed from this...
13334 (kernel_elf_symlist.c): ...to this. Updated all users.
13335 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13336 (grubof_SOURCES): Renamed from this...
13337 (kernel_elf_SOURCES): ...to this.
13338 (grubof_HEADERS): Renamed from this...
13339 (kernel_elf_HEADERS): ...to this.
13340 (grubof_CFLAGS): Renamed from this...
13341 (kernel_elf_CFLAGS): ...to this.
13342 (grubof_ASFLAGS): Renamed from this...
13343 (kernel_elf_ASFLAGS): ...to this.
13344 (grubof_LDFLAGS): Renamed from this...
13345 (kernel_elf_LDFLAGS): ...to this.
13347 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13349 (kernel_elf_HEADERS): ...to this. Updated all users.
13350 (grubof_symlist.c): Renamed from this...
13351 (kernel_elf_symlist.c): ...to this. Updated all users.
13352 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13353 (grubof_SOURCES): Renamed from this...
13354 (kernel_elf_SOURCES): ...to this.
13355 (grubof_HEADERS): Renamed from this...
13356 (kernel_elf_HEADERS): ...to this.
13357 (grubof_CFLAGS): Renamed from this...
13358 (kernel_elf_CFLAGS): ...to this.
13359 (grubof_ASFLAGS): Renamed from this...
13360 (kernel_elf_ASFLAGS): ...to this.
13361 (grubof_LDFLAGS): Renamed from this...
13362 (kernel_elf_LDFLAGS): ...to this.
13364 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13365 `kernel.elf' instead of `grubof'.
13367 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
13369 Add --with-platform to configure. Use pkglibdir instead of
13370 pkgdatadir. This is reported by Roger Leigh.
13372 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13373 (host_vendor): Likewise.
13374 (host_os): Likewise.
13375 (pkgdatadir): Likewise.
13376 (platform): New variable.
13377 (pkglibdir): Likewise.
13378 Use PKGLIBDIR instead of PKGDATADIR.
13380 * util/i386/pc/grub-install.in (datadir): Removed.
13381 (host_vendor): Likewise.
13382 (host_os): Likewise.
13383 (pkgdatadir): Likewise.
13384 (platform): New variable.
13385 (pkglibdir): Likewise.
13386 Use PKGLIBDIR instead of PKGDATADIR.
13388 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13389 instead of GRUB_DATADIR.
13391 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13393 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13396 * configure.ac (--with-platform): New option.
13397 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13399 * Makefile.in: Include a makefile based on PLATFORM instead of
13401 (pkgdatadir): Not appended by the machine type.
13402 (pkglibdir): Appended by the machine type.
13403 (host_vendor): Removed.
13404 (platform): New variable.
13405 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13406 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13407 (uninstall): Likewise.
13409 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13411 Use the environment context in the menu. Remove the commands
13412 "default" and "timeout", and use variables instead.
13414 * normal/menu.c: Include grub/env.h.
13415 (print_entry): Cast TITLE to silence gcc.
13416 (get_timeout): New function.
13417 (set_timeout): Likewise.
13418 (get_entry_number): Likewise.
13419 (run_menu): Use a default entry, a fallback entry and a timeout
13420 in the environment variables "default", "fallback" and
13421 "timeout". Also, tweak the default entry if it is not within the
13422 current menu entries.
13423 (grub_menu_run): Use a fallback entry in the environment variable
13426 * normal/main.c (read_config_file): Do not initialize
13427 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13429 (grub_normal_execute): Use a data slot to store the menu.
13431 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13432 fallback_entry and timeout.
13433 (struct grub_menu_list): Removed.
13434 (grub_menu_list_t): Likewise.
13435 (struct grub_context): Likewise.
13436 (grub_context_t): Likewise.
13437 (grub_context_get): Likewise.
13438 (grub_context_get_current_menu): Likewise.
13439 (grub_context_push_menu): Likewise.
13440 (grub_context_pop_menu): Likewise.
13441 (grub_default_init): Likewise.
13442 (grub_default_fini): Likewise.
13443 (grub_timeout_init): Likewise.
13444 (grub_timeout_fini): Likewise.
13446 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13448 (normal_mod_SOURCES): Removed normal/context.c.
13450 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13451 commands/default.c, commands/timeout.c and normal/context.c.
13452 (normal_mod_SOURCES): Removed normal/context.c.
13454 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13455 commands/timeout.c and normal/context.c.
13456 (normal_mod_SOURCES): Removed normal/context.c.
13458 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13459 commands/default.c, commands/timeout.c and normal/context.c.
13460 (normal_mod_SOURCES): Removed normal/context.c.
13462 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13464 (default_mod_SOURCES): Removed.
13465 (default_mod_CFLAGS): Likewise.
13466 (default_mod_LDFLAGS): Likewise.
13467 (timeout_mod_SOURCES): Removed.
13468 (timeout_mod_CFLAGS): Likewise.
13469 (timeout_mod_LDFLAGS): Likewise.
13471 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13474 * commands/default.c: Removed.
13475 * commands/timeout.c: Likewise.
13476 * normal/context.c: Likewise.
13478 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13480 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13482 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13484 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13485 "next" to "prev" for readability.
13486 (struct grub_env_sorted_var): New struct.
13487 (grub_env_context): Renamed to ...
13488 (initial_context): ... this.
13489 (grub_env_var_context): Renamed to ...
13490 (current_context): ... this.
13491 (grub_env_find): Look only at CURRENT_CONTEXT.
13492 (grub_env_context_open): Rewritten to copy exported variables from
13494 (grub_env_context_close): Rewritten according to the new
13495 scheme. Also, add an assertion to prevent the initial context from
13497 (grub_env_insert): Removed the code for the sorted list.
13498 (grub_env_remove): Likewise.
13499 (grub_env_export): Simply mark the variable with
13500 GRUB_ENV_VAR_GLOBAL.
13501 (grub_env_set): A cosmetic change for naming consistency.
13502 (grub_env_get): Likewise.
13503 (grub_env_unset): Likewise.
13504 (grub_env_iterate): Rewritten to sort variables within this
13506 (grub_register_variable_hook): Fixed for naming consistency. Call
13507 grub_env_find again, only if NAME is not found at the first time.
13508 (mangle_data_slot_name): New function.
13509 (grub_env_set_data_slot): Likewise.
13510 (grub_env_get_data_slot): Likewise.
13511 (grub_env_unset_data_slot): Likewise.
13513 * include/grub/env.h (grub_env_var_type): New enum.
13514 (GRUB_ENV_VAR_LOCAL): New constant.
13515 (GRUB_ENV_VAR_GLOBAL): Likewise.
13516 (GRUB_ENV_VAR_DATA): Likewise.
13517 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13519 (grub_env_set): Replace VAR with NAME for consistency.
13520 (grub_register_variable_hook): Likewise.
13521 (grub_env_export): Specify the name of the argument.
13522 (grub_env_set_data_slot): New prototype.
13523 (grub_env_get_data_slot): Likewise.
13524 (grub_env_unset_data_slot): Likewise.
13526 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13528 Extend the loader so that GRUB can accept a loader which comes
13529 back to GRUB when a loaded image exits. Also, this change adds
13530 support for a chainloader on EFI.
13532 * term/efi/console.c: Include grub/misc.h.
13533 (grub_console_checkkey): Display a scan code on the top for
13534 debugging. This will be removed once the EFI port gets stable.
13535 Correct the scan code mapping.
13537 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13538 allocate memory from larger regions, in order to reduce the number
13539 of allocated regions. Otherwise, the MacOSX loader panics.
13540 (filter_memory_map): Avoid less than 1MB for compatibility with
13542 (add_memory_regions): Allocate from the tail of a region, if
13543 possible, to avoid allocating a region near to 1MB, for the MacOSX
13546 * kern/efi/init.c (grub_efi_set_prefix): Specify
13547 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13549 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13550 argument IMAGE_HANDLE and specify it to get a loaded image.
13551 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13552 grub_efi_get_loaded_image.
13553 (grub_efi_get_filename): Divide the length by the size of
13555 (grub_efi_get_device_path): New function.
13556 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13557 the length by the size of grub_efi_char16_t for a file path device
13560 * kern/loader.c (grub_loader_noreturn): New variable.
13561 (grub_loader_set): Accept a new argument NORETURN. Set
13562 GRUB_LOADER_NORETURN to NORETURN.
13563 All callers changed.
13564 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13567 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13569 (grub_efi_get_loaded_image): Take an argument to specify an image
13572 * include/grub/loader.h (grub_loader_set): Added one more argument
13575 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13576 instead of grub_efi_open_protocol.
13577 (grub_efidisk_get_device_name): Likewise.
13578 (grub_efidisk_close): Print a newline.
13579 (grub_efidisk_get_device_handle): Fixed to use
13580 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13581 GRUB_EFI_DEVICE_PATH_TYPE.
13583 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13584 * kern/efi/efi.c (device_path_guid): ... here.
13586 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13588 (kernel_mod_HEADERS): Added efi/disk.h.
13589 (_chain_mod_SOURCES): New variable.
13590 (_chain_mod_CFLAGS): Likewise.
13591 (_chain_mod_LDFLAGS): Likewise.
13592 (chain_mod_SOURCES): Likewise.
13593 (chain_mod_CFLAGS): Likewise.
13594 (chain_mod_LDFLAGS): Likewise.
13596 * DISTLIST: Added include/grub/efi/chainloader.h,
13597 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13599 * include/grub/efi/chainloader.h: New file.
13600 * loader/efi/chainloader.c: Likewise.
13601 * loader/efi/chainloader_normal.c: Likewise.
13603 2006-04-30 Marco Gerards <marco@gnu.org>
13605 * commands/configfile.c (grub_cmd_source): New function.
13606 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13607 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13609 2006-04-30 Marco Gerards <marco@gnu.org>
13611 * normal/execute.c (grub_script_execute_cmd): Change the return
13612 type to `grub_err_t'. Correctly return the error.
13613 (grub_script_execute_cmdline): In case a command line is not a
13614 command or a function, try to interpret it as an assignment.
13616 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13618 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13619 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13620 skip a node whose name is obviously invalid as UTF-16,
13621 i.e. contains a NUL character. Stop the iteration when the last
13622 directory entry is found. Instead of using the return value of
13623 grub_hfsplus_btree_iterate_node, store the value in RET and use
13624 it, because the iterator can be stopped by the last directory
13627 2006-04-30 Marco Gerards <marco@gnu.org>
13629 * include/grub/env.h (grub_env_export): New prototype. Reported
13630 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13632 2006-04-30 Marco Gerards <marco@gnu.org>
13634 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13635 size of the extents in a catalog file record.
13637 2006-04-29 Marco Gerards <marco@gnu.org>
13639 * commands/configfile.c (grub_cmd_configfile): Execute the
13640 configfile within its own context.
13642 * include/grub/env.h (grub_env_context_open): New prototype.
13643 (grub_env_context_close): Likewise.
13645 * kern/env.c (grub_env): Removed.
13646 (grub_env_sorted): Likewise.
13647 (grub_env_context): New variable.
13648 (grub_env_var_context): Likewise.
13649 (grub_env_find): Search both the active context and the global
13651 (grub_env_context_open): New function.
13652 (grub_env_context_close): Likewise.
13653 (grub_env_insert): Likewise.
13654 (grub_env_remove): Likewise.
13655 (grub_env_export): Likewise.
13656 (grub_env_set): Changed to use helper functions to avoid code
13658 (grub_env_iterate): Rewritten so both the current context and the
13659 global context are being used.
13661 * normal/command.c (export_command): New function.
13662 (grub_command_init): Register the `export' function.
13664 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13666 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13667 explicitly to suppress gcc's warnings.
13668 * fs/fat.c (grub_fat_find_dir): Likewise.
13669 (grub_fat_label): Likewise.
13670 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13671 (grub_xfs_mount): Likewise.
13672 (grub_xfs_label): Likewise.
13673 * fs/affs.c (grub_affs_mount): Likewise.
13674 (grub_affs_label): Likewise.
13675 (grub_affs_iterate_dir): Likewise.
13676 * fs/sfs.c (grub_sfs_mount): Likewise.
13677 (grub_sfs_iterate_dir): Likewise.
13678 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13679 * fs/hfs.c (grub_hfs_mount): Likewise.
13680 (grub_hfs_cmp_catkeys): Likewise.
13681 (grub_hfs_find_dir): Likewise.
13682 (grub_hfs_dir): Likewise.
13683 (grub_hfs_label): Likewise.
13684 * fs/jfs.c (grub_jfs_mount): Likewise.
13685 (grub_jfs_opendir): Likewise.
13686 (grub_jfs_getent): Likewise.
13687 (grub_jfs_lookup_symlink): Likewise.
13688 (grub_jfs_label): Likewise.
13689 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13690 (grub_hfsplus_iterate_dir): Likewise.
13691 (grub_hfsplus_btree_iterate_node): Made static.
13693 * util/grub-emu.c (prefix): New variable.
13694 (grub_machine_set_prefix): New function.
13695 (main): Do not set the environment variable "prefix" here. Only
13696 set PREFIX, which is used later by grub_machine_set_prefix.
13698 * include/grub/video.h: Do not include grub/symbol.h.
13699 (grub_video_register): Not exported. This symbol is not defined in
13701 (grub_video_unregister): Likewise.
13702 (grub_video_iterate): Likewise.
13703 (grub_video_setup): Likewise.
13704 (grub_video_restore): Likewise.
13705 (grub_video_get_info): Likewise.
13706 (grub_video_get_blit_format): Likewise.
13707 (grub_video_set_palette): Likewise.
13708 (grub_video_get_palette): Likewise.
13709 (grub_video_set_viewport): Likewise.
13710 (grub_video_get_viewport): Likewise.
13711 (grub_video_map_color): Likewise.
13712 (grub_video_map_rgb): Likewise.
13713 (grub_video_map_rgba): Likewise.
13714 (grub_video_fill_rect): Likewise.
13715 (grub_video_blit_glyph): Likewise.
13716 (grub_video_blit_bitmap): Likewise.
13717 (grub_video_blit_render_target): Likewise.
13718 (grub_video_scroll): Likewise.
13719 (grub_video_swap_buffers): Likewise.
13720 (grub_video_create_render_target): Likewise.
13721 (grub_video_delete_render_target): Likewise.
13722 (grub_video_set_active_render_target): Likewise.
13724 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13726 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13728 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13729 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13730 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13731 instead of $(srcdir)/genkernsyms.sh.
13733 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13734 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13735 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13736 instead of $(srcdir)/genkernsyms.sh.
13738 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13739 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13740 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13741 instead of $(srcdir)/genkernsyms.sh.
13743 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13744 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13745 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13746 instead of $(srcdir)/genkernsyms.sh.
13748 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13751 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13753 (gensymlist.sh): New target.
13754 (genkernsyms.sh): Likewise.
13756 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13757 genkernsyms.sh.in and gensymlist.sh.in.
13759 * genkernsyms.sh: Removed.
13760 * gensymlist.sh: Likewise.
13762 * genkernsyms.sh.in: New file.
13763 * gensymlist.sh.in: Likewise.
13765 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13767 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13768 clobber "prefix", since we may have already set it manually.
13770 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13772 * kern/misc.c (abort): New alias for grub_abort.
13774 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13776 A new machine-specific function "grub_machine_set_prefix" is
13777 defined. This is called after loading modules, so that a prefix
13778 initialization can use modules. Also, this change adds an
13779 intensive debugging feature for the memory manager via the
13780 configure option "--enable-mm-debug".
13782 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13785 * kern/sparc64/ieee1275/init.c (abort): Removed.
13786 (grub_stop): Likewise.
13787 (grub_exit): New function.
13788 (grub_set_prefix): Renamed to ...
13789 (grub_machine_set_prefix): ... this.
13790 (grub_machine_init): Do not call grub_set_prefix.
13792 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13793 (grub_machine_set_prefix): ... this.
13794 (grub_machine_init): Do not call grub_set_prefix.
13796 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13797 (grub_machine_init): Do not set the prefix here.
13799 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13801 * kern/efi/init.c: Include grub/mm.h.
13802 (grub_efi_set_prefix): New function.
13804 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13805 (grub_efi_get_filename): New function.
13806 (grub_print_device_path): Renamed to ...
13807 (grub_efi_print_device_path): ... this.
13809 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13810 [MM_DEBUG] (grub_realloc): Likewise.
13811 [MM_DEBUG] (grub_free): Likewise.
13812 [MM_DEBUG] (grub_memalign): Likewise.
13813 [MM_DEBUG] (grub_mm_debug): New variable.
13814 [MM_DEBUG] (grub_debug_malloc): New function.
13815 [MM_DEBUG] (grub_debug_free): New function.
13816 [MM_DEBUG] (grub_debug_realloc): New function.
13817 [MM_DEBUG] (grub_debug_memalign): New function.
13819 * kern/misc.c (grub_abort): Print a newline to distinguish
13822 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13823 grub_set_root_dev after loading modules. This is necessary when
13824 setting a prefix depends on modules.
13826 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13827 (grub_efi_print_device_path): ... this.
13828 (grub_efi_get_filename): New prototype.
13829 (grub_efi_set_prefix): Likewise.
13831 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13833 (grub_efidisk_get_device_handle): New prototype.
13834 (grub_efidisk_get_device_name): Likewise.
13836 * include/grub/mm.h: Include config.h.
13837 (MM_DEBUG): Removed.
13838 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13839 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13840 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13841 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13842 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13843 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13844 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13845 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13846 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13848 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13850 * disk/efi/efidisk.c: Include grub/partition.h.
13851 (iterate_child_devices): New function.
13852 (add_device): First, compare only last device path nodes, so that
13853 devices are sorted by the types.
13854 (grub_efidisk_get_device_handle): New function.
13855 (grub_efidisk_get_device_name): Likewise.
13857 * configure.ac (--enable-mm-debug): New option to enable the
13858 memory manager debugging feature. This makes the binary much
13859 bigger, so is disabled by default.
13861 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13863 Use grub_abort instead of grub_stop, and grub_exit must be
13864 define in each architecture now. Also, this change adds support
13867 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13868 (grub_getkey): New function.
13869 (grub_term_get_current): Likewise.
13871 * util/i386/pc/grub-setup.c: Include grub/term.h.
13872 (grub_getkey): New function.
13873 (grub_term_get_current): Likewise.
13875 * util/misc.c (grub_stop): Renamed to ...
13876 (grub_exit): ... this.
13878 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13879 (grub_exit): ... this.
13880 (grub_machine_init): Use grub_abort instead of abort.
13881 (grub_stop): Removed.
13883 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13886 * kern/i386/pc/startup.S (grub_exit): New function.
13887 (cold_reboot): New label.
13889 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13890 (grub_efi_init): Call grub_efidisk_init.
13891 (grub_efi_fini): Call grub_efidisk_fini.
13893 * kern/efi/efi.c: Include grub/mm.h.
13894 (grub_efi_console_control_guid): Renamed to ...
13895 (console_control_guid): ... this.
13896 (grub_efi_loaded_image_guid): Renamed to ...
13897 (loaded_image_guid): ... this.
13898 (grub_efi_locate_handle): New function.
13899 (grub_efi_open_protocol): Likewise.
13900 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13901 GRUB_EFI_CONSOLE_CONTROL_GUID.
13902 (grub_efi_exit): Removed.
13903 (grub_stop): Likewise.
13904 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13905 (grub_exit): New function.
13906 (grub_print_device_path): Likewise.
13908 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13909 (grub_enter_rescue_mode): Register "exit".
13911 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13912 (grub_abort): New function.
13914 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13916 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13918 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13920 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13921 (grub_print_device_path): New prototype.
13922 (grub_efi_locate_handle): Likewise.
13923 (grub_efi_open_protocol): Likewise.
13925 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13926 * disk/efi/efidisk.c: Likewise.
13928 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13930 * include/grub/efi/console_control.h
13931 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13933 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13934 last 8 bytes as an array.
13935 (GRUB_EFI_DISK_IO_GUID): New macro.
13936 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13937 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13938 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13940 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13941 (struct grub_efi_device_path): Rename the member "sub_type" to
13943 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13944 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13945 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13946 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13947 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13948 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13949 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13950 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13951 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13952 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13953 (struct grub_efi_pci_device_path): New structure.
13954 (grub_efi_pci_device_path_t): New type.
13955 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13956 (struct grub_efi_pccard_device_path): New structure.
13957 (grub_efi_pccard_device_path_t): New type.
13958 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13959 (struct grub_efi_memory_mapped_device_path): New structure.
13960 (grub_efi_memory_mapped_device_path_t): New type.
13961 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13962 (struct grub_efi_vendor_device_path): New structure.
13963 (grub_efi_vendor_device_path_t): New type.
13964 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13965 (struct grub_efi_controller_device_path): New structure.
13966 (grub_efi_controller_device_path_t): New type.
13967 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13968 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13969 (struct grub_efi_acpi_device_path): New structure.
13970 (grub_efi_acpi_device_path_t): New type.
13971 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13972 (struct grub_efi_expanded_acpi_device_path): New structure.
13973 (grub_efi_expanded_acpi_device_path_t): New type.
13974 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13975 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13976 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13977 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13978 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13979 (struct grub_efi_atapi_device_path): New structure.
13980 (grub_efi_atapi_device_path_t): New type.
13981 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13982 (struct grub_efi_fibre_channel_device_path): New structure.
13983 (grub_efi_fibre_channel_device_path_t): New type.
13984 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13985 (struct grub_efi_1394_device_path): New structure.
13986 (grub_efi_1394_device_path_t): New type.
13987 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13988 (struct grub_efi_usb_device_path): New structure.
13989 (grub_efi_usb_device_path_t): New type.
13990 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13991 (struct grub_efi_usb_class_device_path): New structure.
13992 (grub_efi_usb_class_device_path_t): New type.
13993 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13994 (struct grub_efi_i2o_device_path): New structure.
13995 (grub_efi_i2o_device_path_t): New type.
13996 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13997 (struct grub_efi_mac_address_device_path): New structure.
13998 (grub_efi_mac_address_device_path_t): New type.
13999 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14000 (struct grub_efi_ipv4_device_path): New structure.
14001 (grub_efi_ipv4_device_path_t): New type.
14002 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14003 (struct grub_efi_ipv6_device_path): New structure.
14004 (grub_efi_ipv6_device_path_t): New type.
14005 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14006 (struct grub_efi_infiniband_device_path): New structure.
14007 (grub_efi_infiniband_device_path_t): New type.
14008 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14009 (struct grub_efi_uart_device_path): New structure.
14010 (grub_efi_uart_device_path_t): New type.
14011 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14012 (struct grub_efi_vendor_messaging_device_path): New structure.
14013 (grub_efi_vendor_messaging_device_path_t): New type.
14014 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14015 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14016 (struct grub_efi_hard_drive_device_path): New structure.
14017 (grub_efi_hard_drive_device_path_t): New type.
14018 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14019 (struct grub_efi_cdrom_device_path): New structure.
14020 (grub_efi_cdrom_device_path_t): New type.
14021 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14022 (struct grub_efi_vendor_media_device_path): New structure.
14023 (grub_efi_vendor_media_device_path_t): New type.
14024 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14025 (struct grub_efi_file_path_device_path): New structure.
14026 (grub_efi_file_path_device_path_t): New type.
14027 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14028 (struct grub_efi_protocol_device_path): New structure.
14029 (grub_efi_protocol_device_path_t): New type.
14030 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14031 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14032 (struct grub_efi_bios_device_path): New structure.
14033 (grub_efi_bios_device_path_t): New type.
14034 (struct grub_efi_disk_io): New structure.
14035 (grub_efi_disk_io_t): New type.
14036 (struct grub_efi_block_io_media): New structure.
14037 (grub_efi_block_io_media_t): New type.
14038 (struct grub_efi_block_io): New structure.
14039 (grub_efi_block_io_t): New type.
14041 * include/grub/misc.h (grub_stop): Removed.
14042 (grub_exit): New prototype.
14043 (grub_abort): Likewise.
14045 * include/grub/disk.h (enum grub_disk_dev_id): Added
14046 GRUB_DISK_DEVICE_EFIDISK_ID.
14048 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14049 disk/efi/efidisk.c.
14050 (kernel_syms.lst): Remove the target if an error occurs.
14052 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
14054 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14055 as it was simply too buggy.
14057 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
14059 * kern/misc.c (grub_lltoa): New function.
14060 (grub_vsprintf): Added support for the long long suffix,
14063 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
14065 * Makefile.in (LDFLAGS): Add variable.
14066 (LD): Remove variable.
14067 * configure.ac: Add -m32 to LDFLAGS.
14068 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
14069 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
14070 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
14071 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
14072 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
14074 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
14075 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
14076 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
14078 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
14080 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
14081 length for unknown glyph.
14083 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14085 Add support for pre-loaded modules into the EFI port.
14087 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
14088 completely. Accept one more argument DIR. The caller has changed.
14090 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
14092 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
14093 (grub_efi_loaded_image_guid): New variable.
14094 (grub_efi_get_loaded_image): New function.
14095 (grub_arch_modules_addr): Likewise.
14097 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
14100 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
14101 (struct grub_efi_loaded_image): New structure.
14102 (grub_efi_loaded_image_t): New type.
14104 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14106 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
14107 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
14108 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
14110 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
14112 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
14114 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
14116 * DISTLIST: Added include/grub/efi/console.h,
14117 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
14118 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14120 * include/grub/efi/console.h: New file.
14121 * include/grub/efi/time.h: Likewise.
14122 * include/grub/i386/efi/kernel.h: Likewise.
14123 * kern/efi/init.c: Likewise.
14124 * kern/efi/mm.c: Likewise.
14125 * term/efi/console.c: Likewise.
14127 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
14128 (grub_stop): Removed.
14129 (grub_get_rtc): Likewise.
14130 (grub_machine_init): Simply call grub_efi_init.
14131 (grub_machine_fini): Call grub_efi_fini.
14133 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
14134 (grub_efi_output_string): Removed.
14135 (grub_efi_stall): New function.
14136 (grub_stop): Likewise.
14137 (grub_get_rtc): Likewise.
14139 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
14140 (grub_efi_stall): New prototype.
14141 (grub_efi_allocate_pages): Likewise.
14142 (grub_efi_free_pages): Likewise.
14143 (grub_efi_get_memory_map): Likewise.
14144 (grub_efi_mm_init): Likewise.
14145 (grub_efi_mm_fini): Likewise.
14146 (grub_efi_init): Likewise.
14147 (grub_efi_fini): Likewise.
14149 * include/grub/i386/efi/time.h: Do not include
14150 grub/symbol.h. Include grub/efi/time.h.
14151 (GRUB_TICKS_PER_SECOND): Removed.
14152 (grub_get_rtc): Likewise.
14154 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
14155 Added padding. The EFI spec is buggy.
14156 (GRUB_EFI_BLACK): New macro.
14157 (GRUB_EFI_BLUE): Likewise.
14158 (GRUB_EFI_GREEN): Likewise.
14159 (GRUB_EFI_CYAN): Likewise.
14160 (GRUB_EFI_RED): Likewise.
14161 (GRUB_EFI_MAGENTA): Likewise.
14162 (GRUB_EFI_BROWN): Likewise.
14163 (GRUB_EFI_LIGHTGRAY): Likewise.
14164 (GRUB_EFI_BRIGHT): Likewise.
14165 (GRUB_EFI_DARKGRAY): Likewise.
14166 (GRUB_EFI_LIGHTBLUE): Likewise.
14167 (GRUB_EFI_LIGHTGREEN): Likewise.
14168 (GRUB_EFI_LIGHTCYAN): Likewise.
14169 (GRUB_EFI_LIGHTRED): Likewise.
14170 (GRUB_EFI_LIGHTMAGENTA): Likewise.
14171 (GRUB_EFI_YELLOW): Likewise.
14172 (GRUB_EFI_WHITE): Likewise.
14173 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
14174 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
14175 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
14176 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
14177 (GRUB_EFI_BACKGROUND_RED): Likewise.
14178 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
14179 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
14180 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
14181 (GRUB_EFI_TEXT_ATTR): Likewise.
14183 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
14184 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14185 (kernel_mod_HEADERS): Added efi/time.h.
14187 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
14189 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
14190 include/grub/efi/api.h, include/grub/efi/console_control.h,
14191 include/grub/efi/efi.h, include/grub/efi/pe32.h,
14192 include/grub/i386/efi/time.h, kern/efi/efi.c,
14193 kern/i386/efi/init.c, kern/i386/efi/startup.S,
14194 and util/i386/efi/grub-mkimage.c.
14196 * Makefile.in (RMKFILES): Added i386-efi.rmk.
14198 * genmk.rb (PModule#rule): Do not export symbols if
14199 #{prefix}_EXPORTS is set to "no".
14201 * conf/i386-efi.mk: New file.
14202 * conf/i386-efi.rmk: Likewise.
14203 * include/grub/efi/api.h: Likewise.
14204 * include/grub/efi/console_control.h: Likewise.
14205 * include/grub/efi/efi.h: Likewise.
14206 * include/grub/efi/pe32.h: Likewise.
14207 * include/grub/i386/efi/time.h: Likewise.
14208 * kern/efi/efi.c: Likewise.
14209 * kern/i386/efi/init.c: Likewise.
14210 * kern/i386/efi/startup.S: Likewise.
14211 * util/i386/efi/grub-mkimage.c: Likewise.
14213 2006-04-17 Marco Gerards <marco@gnu.org>
14215 * include/grub/script.h: Include <grub/parser.h> and
14216 "grub_script.tab.h".
14217 (struct grub_lexer_param): New struct.
14218 (struct grub_parser_param): Likewise.
14219 (grub_script_create_arglist): Pass the state in an argument.
14220 (grub_script_add_arglist): Likewise.
14221 (grub_script_create_cmdline): Likewise.
14222 (grub_script_create_cmdblock): Likewise.
14223 (grub_script_create_cmdif): Likewise.
14224 (grub_script_create_cmdmenu): Likewise.
14225 (grub_script_add_cmd): Likewise.
14226 (grub_script_arg_add): Likewise.
14227 (grub_script_lexer_ref): Likewise.
14228 (grub_script_lexer_deref): Likewise.
14229 (grub_script_lexer_record_start): Likewise.
14230 (grub_script_lexer_record_stop): Likewise.
14231 (grub_script_mem_record): Likewise.
14232 (grub_script_mem_record_stop): Likewise.
14233 (grub_script_malloc): Likewise.
14234 (grub_script_yylex): Likewise.
14235 (grub_script_yyparse): Likewise.
14236 (grub_script_yyerror): Likewise.
14237 (grub_script_yylex): Likewise.
14238 (grub_script_lexer_init): Return the state.
14240 * normal/lexer.c (grub_script_lexer_state): Removed variable.
14241 (grub_script_lexer_done): Likewise.
14242 (grub_script_lexer_getline): Likewise.
14243 (grub_script_lexer_refs): Likewise.
14244 (script): Likewise.
14245 (newscript): Likewise.
14246 (record): Likewise.
14247 (recording): Likewise.
14248 (recordpos): Likewise.
14249 (recordlen): Likewise.
14250 (grub_script_lexer_init): Return the state instead of setting
14252 (grub_script_lexer_ref): Use the newly added argument for state
14253 instead of globals.
14254 (grub_script_lexer_deref): Likewise.
14255 (grub_script_lexer_record_start): Likewise.
14256 (grub_script_lexer_record_stop): Likewise.
14257 (recordchar): Likewise.
14258 (nextchar): Likewise.
14259 (grub_script_yylex2): Likewise.
14260 (grub_script_yylex): Likewise.
14261 (grub_script_yyerror): Likewise.
14263 * normal/parser.y (func_mem): Removed variable.
14264 (menu_entry): Likewise.
14266 (%lex-param): New parser option.
14267 (%parse-param): Likewise.
14268 (script): Always return the AST.
14269 (argument): Pass the state around.
14270 (arguments): Likewise.
14271 (grubcmd): Likewise.
14272 (commands): Likewise.
14273 (function): Likewise.
14274 (menuentry): Likewise.
14275 (if_statement): Likewise.
14278 * normal/script.c (grub_script_memused): Removed variable.
14279 (grub_script_parsed): Likewise.
14280 (grub_script_malloc): Added a state argument. Use that instead of
14282 (grub_script_mem_record): Likewise.
14283 (grub_script_mem_record_stop): Likewise.
14284 (grub_script_arg_add): Likewise.
14285 (grub_script_add_arglist): Likewise.
14286 (grub_script_create_cmdline): Likewise.
14287 (grub_script_create_cmdif): Likewise.
14288 (grub_script_create_cmdmenu): Likewise.
14289 (grub_script_add_cmd): Likewise.
14290 (grub_script_parse): Setup the state before calling the parser.
14292 2006-04-16 Marco Gerards <marco@gnu.org>
14294 * normal/command.c (grub_command_init): Remove the title command.
14296 * normal/lexer.c (grub_script_yylex): Renamed from this...
14297 (grub_script_yylex2): ... to this.
14298 (grub_script_yylex): New function. Temporary
14299 introduced to filter some tokens.
14300 (grub_script_yyerror): Print a newline.
14302 * normal/main.c (read_config_file): Output information about the
14303 lines that contain errors. Wait for a key after all lines have
14304 been processed. Don't return an empty menu.
14306 * normal/parser.y (func_mem): Don't initialize.
14307 (menu_entry): Likewise.
14308 (err): New variable.
14309 (script): Don't return anything when an error was encountered.
14310 (ws, returns): Removed rules.
14311 (argument): Disabled concatenated variable support.
14312 (arguments): Remove explicit separators.
14313 (grubcmd): Likewise.
14314 (function): Likewise.
14315 (menuentry): Likewise.
14317 (commands): Likewise. Add error handling.
14319 * normal/script.c (grub_script_create_cmdline): If
14320 `grub_script_parsed' is 0, assume the parser encountered an error.
14322 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
14324 * configure.ac: Add support for EFI. Fix the typo
14325 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
14327 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14329 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
14330 foreign multibyte characters should be shown correctly.
14332 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14334 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
14336 (read_config_file): Made it to close file before returning.
14338 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
14340 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14341 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14342 video/i386/pc/vbefill.c.
14344 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14345 video/i386/pc/vbefill.c.
14347 * include/grub/video.h (grub_video_blit_format): New enum.
14348 (grub_video_mode_info): Added new member blit_format.
14349 (grub_video_get_blit_format): New function prototype.
14351 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14352 function prototype.
14353 (grub_video_vbe_map_rgb): Likewise.
14354 (grub_video_vbe_unmap_color): Likewise.
14356 * include/grub/i386/pc/vbeblit.h: New file.
14358 * include/grub/i386/pc/vbefill.h: New file.
14360 * video/video.c (grub_video_get_blit_format): New function.
14361 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14362 (grub_video_vbe_map_rgb): Likewise.
14363 (grub_video_vbe_unmap_color): Likewise.
14365 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14367 (grub_video_vbe_blit_render_target): Changed to use more optimized
14369 (grub_video_vbe_setup): Added detection for optimized settings.
14370 (grub_video_vbe_create_render_target): Likewise.
14372 * video/i386/pc/vbeblit.c: New file.
14374 * video/i386/pc/vbefill.c: New file.
14376 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
14378 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14381 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14382 parsing to support both hex and dec ranges. If filename was missing
14383 show usage information.
14385 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14387 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14388 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14390 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14391 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14392 (video_mod_SOURCES): Added.
14393 (video_mod_CFLAGS): Likewise.
14394 (video_mod_LDFLAGS): Likewise.
14395 (gfxterm_mod_SOURCES): Likewise.
14396 (gfxterm_mod_CFLAGS): Likewise.
14397 (gfxterm_mod_LDFLAGS): Likewise.
14398 (videotest_mod_SOURCES): Likewise.
14399 (videotest_mod_CFLAGS): Likewise.
14400 (videotest_mod_LDFLAGS): Likewise.
14401 (vesafb_mod_SOURCES): Removed.
14402 (vesafb_mod_CFLAGS): Likewise.
14403 (vesafb_mod_LDFLAGS): Likewise.
14404 (vga_mod_SOURCES): Likewise.
14405 (vga_mod_CFLAGS): Likewise.
14406 (vga_mod_LDFLAGS): Likewise.
14408 * commands/videotest.c: New file.
14410 * font/manager.c (fill_with_default_glyph): Modified to use
14412 (grub_font_get_glyph): Likewise.
14413 (fontmanager): Renamed from this...
14414 (font_manager): ... to this.
14416 * include/grub/font.h (grub_font_glyph): Added new structure.
14417 (grub_font_get_glyph): Modified to use grub_font_glyph.
14419 * include/grub/misc.h (grub_abs): Added as inline function.
14421 * include/grub/video.h: New file.
14423 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14424 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14425 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14426 (grub_vbe_get_controller_info): Renamed from this...
14427 (grub_vbe_bios_get_controller_info): ... to this.
14428 (grub_vbe_get_mode_info): Renamed from this...
14429 (grub_vbe_bios_get_mode_info): ... to this.
14430 (grub_vbe_set_mode): Renamed from this...
14431 (grub_vbe_bios_set_mode): ... to this.
14432 (grub_vbe_get_mode): Renamed from this...
14433 (grub_vbe_bios_get_mode): ... to this.
14434 (grub_vbe_set_memory_window): Renamed from this...
14435 (grub_vbe_bios_set_memory_window): ... to this.
14436 (grub_vbe_get_memory_window): Renamed from this...
14437 (grub_vbe_bios_get_memory_window): ... to this.
14438 (grub_vbe_set_scanline_length): Renamed from this...
14439 (grub_vbe_set_scanline_length): ... to this.
14440 (grub_vbe_get_scanline_length): Renamed from this...
14441 (grub_vbe_bios_get_scanline_length): ... to this.
14442 (grub_vbe_set_display_start): Renamed from this...
14443 (grub_vbe_bios_set_display_start): ... to this.
14444 (grub_vbe_get_display_start): Renamed from this...
14445 (grub_vbe_bios_get_display_start): ... to this.
14446 (grub_vbe_set_palette_data): Renamed from this...
14447 (grub_vbe_bios_set_palette_data): ... to this.
14448 (grub_vbe_set_pixel_rgb): Removed.
14449 (grub_vbe_set_pixel_index): Likewise.
14451 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14453 (grub_vbe_bios_get_controller_info): ... to this.
14454 (grub_vbe_get_mode_info): Renamed from this...
14455 (grub_vbe_bios_get_mode_info): ... to this.
14456 (grub_vbe_set_mode): Renamed from this...
14457 (grub_vbe_bios_set_mode): ... to this.
14458 (grub_vbe_get_mode): Renamed from this...
14459 (grub_vbe_bios_get_mode): ... to this.
14460 (grub_vbe_set_memory_window): Renamed from this...
14461 (grub_vbe_bios_set_memory_window): ... to this.
14462 (grub_vbe_get_memory_window): Renamed from this...
14463 (grub_vbe_bios_get_memory_window): ... to this.
14464 (grub_vbe_set_scanline_length): Renamed from this...
14465 (grub_vbe_set_scanline_length): ... to this.
14466 (grub_vbe_get_scanline_length): Renamed from this...
14467 (grub_vbe_bios_get_scanline_length): ... to this.
14468 (grub_vbe_set_display_start): Renamed from this...
14469 (grub_vbe_bios_set_display_start): ... to this.
14470 (grub_vbe_get_display_start): Renamed from this...
14471 (grub_vbe_bios_get_display_start): ... to this.
14472 (grub_vbe_set_palette_data): Renamed from this...
14473 (grub_vbe_bios_set_palette_data): ... to this.
14474 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14475 getting corrupted after calling it. Added more pushes and pops.
14476 (grub_vbe_bios_set_mode): Likewise.
14477 (grub_vbe_bios_get_mode): Likewise.
14478 (grub_vbe_bios_get_memory_window): Likewise.
14479 (grub_vbe_bios_set_scanline_length): Likewise.
14480 (grub_vbe_bios_get_scanline_length): Likewise.
14481 (grub_vbe_bios_get_display_start): Likewise.
14482 (grub_vbe_bios_set_palette_data): Likewise.
14484 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14485 (cl_insert): Likewise.
14486 (cl_delete): Likewise.
14488 * term/gfxterm.c: New file.
14490 * term/i386/pc/vesafb.c: Removed file.
14492 * video/video.c: New file.
14494 * video/i386/pc/vbe.c (real2pm): Added new function.
14495 (grub_video_vbe_draw_pixel): Likewise.
14496 (grub_video_vbe_get_video_ptr): Likewise.
14497 (grub_video_vbe_get_pixel): Likewise
14498 (grub_video_vbe_init): Likewise.
14499 (grub_video_vbe_fini): Likewise.
14500 (grub_video_vbe_setup): Likewise.
14501 (grub_video_vbe_get_info): Likewise.
14502 (grub_video_vbe_set_palette): Likewise.
14503 (grub_video_vbe_get_palette): Likewise.
14504 (grub_video_vbe_set_viewport): Likewise.
14505 (grub_video_vbe_get_viewport): Likewise.
14506 (grub_video_vbe_map_color): Likewise.
14507 (grub_video_vbe_map_rgb): Likewise.
14508 (grub_video_vbe_map_rgba): Likewise.
14509 (grub_video_vbe_unmap_color): Likewise.
14510 (grub_video_vbe_fill_rect): Likewise.
14511 (grub_video_vbe_blit_glyph): Likewise.
14512 (grub_video_vbe_blit_bitmap): Likewise.
14513 (grub_video_vbe_blit_render_target): Likewise.
14514 (grub_video_vbe_scroll): Likewise.
14515 (grub_video_vbe_swap_buffers): Likewise.
14516 (grub_video_vbe_create_render_target): Likewise.
14517 (grub_video_vbe_delete_render_target): Likewise.
14518 (grub_video_vbe_set_active_render_target): Likewise.
14519 (grub_vbe_set_pixel_rgb): Remove function.
14520 (grub_vbe_set_pixel_index): Likewise.
14521 (index_color_mode): Remove static variable.
14522 (active_mode): Likewise.
14523 (framebuffer): Likewise.
14524 (bytes_per_scan_line): Likewise.
14525 (grub_video_vbe_adapter): Added new static variable.
14526 (framebuffer): Likewise.
14527 (render_target): Likewise.
14528 (initial_mode): Likewise.
14529 (mode_in_use): Likewise.
14530 (mode_list): Likewise.
14532 2006-03-10 Marco Gerards <marco@gnu.org>
14534 * configure.ac (AC_INIT): Bumped to 1.93.
14536 * DISTLIST: Added `include/grub/hfs.h'.
14538 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14540 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14541 18H, which might help the BIOS falling back to next boot media.
14543 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14545 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14546 Poe Chen <poe.poechen@gmail.com>.
14548 2006-01-17 Marco Gerards <marco@gnu.org>
14550 * include/grub/normal.h: Include <grub/script.h>.
14551 (grub_command_list): Removed struct.
14552 (grub_command_list_t): Removed type.
14553 (grub_menu_entry): Remove members `num' and `command_list'. Add
14554 members `commands' and `sourcecode'.
14555 * include/grub/script.h: Add inclusion guards.
14556 (grub_script_cmd_menuentry): New struct.
14557 (grub_script_execute_menuentry): New prototype.
14558 (grub_script_lexer_record_start): Likewise.
14559 (grub_script_lexer_record_stop): Likewise.
14560 * normal/execute.c (grub_script_execute_menuentry): New function.
14561 * normal/lexer.c (record, recording, recordpos, recordlen): New
14563 (grub_script_lexer_record_start): New function.
14564 (grub_script_lexer_record_stop): Likewise.
14565 (recordchar): Likewise.
14566 (nextchar): Likewise.
14567 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14568 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14569 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14570 (current_menu): New variable.
14571 (free_menu): Mainly rewritten.
14572 (grub_normal_menu_addentry): New function.
14573 (read_config_file): Rewritten.
14574 * normal/menu.c (run_menu_entry): Mainly rewritten.
14575 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14577 (run): Mainly rewritten.
14578 * normal/parser.y (menu_entry): New variable.
14579 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14580 (menuentry): New rule.
14581 (command): Add `menuentry'.
14582 (if_statement): Allow additional returns before `fi'.
14583 * normal/script.c (grub_script_create_cmdmenu): New function.
14585 2006-01-03 Marco Gerards <marco@gnu.org>
14587 * INSTALL: GNU Bison is required.
14588 * configure.ac: Rewritten the test to detect Bison.
14589 * Makefile.in (YACC): New variable. Reported by Xun Sun
14590 <xun.sun.cn@gmail.com>.
14592 2006-01-03 Marco Gerards <marco@gnu.org>
14594 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14595 the HFS+ filesystem to filesystem blocks.
14596 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14597 GCC warning is silenced.
14599 2006-01-03 Marco Gerards <marco@gnu.org>
14601 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14602 read from disk from big endian to host byte order.
14604 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14606 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14608 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14609 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14610 embedded HFS+ filesystem.
14611 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14612 (grub_hfs_sblock): Move from here...
14613 * include/grub/hfs.h: To here... New file.
14614 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14616 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14618 (grub_hfsplus_volheader): Change type of member `magic' to
14620 (grub_hfsplus_data): Add new member `embedded_offset'.
14621 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14623 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14624 Calculate the offset.
14626 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14628 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14630 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14632 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14634 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14635 ENV->NAME is NULL after allocating ENV->VALUE.
14637 2005-12-25 Marco Gerards <marco@gnu.org>
14639 * kern/env.c (grub_env_set): Rewritten the error handling code.
14641 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14643 * geninit.sh: Made more robust, and more portable.
14645 2005-12-25 Marco Gerards <marco@gnu.org>
14647 Add support for Apple HFS+ filesystems.
14649 * fs/hfsplus.c: New file.
14651 * DISTLIST: Added `fs/hfsplus.c'.
14653 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14654 (hfsplus_mod_SOURCES): New variable.
14655 (hfsplus_mod_CFLAGS): Likewise.
14656 (hfsplus_mod_LDFLAGS): Likewise.
14657 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14658 (grub_setup_SOURCES): Likewise.
14659 (grub_mkdevicemap_SOURCES): Likewise.
14660 (grub_emu_SOURCES): Likewise.
14661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14663 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14665 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14667 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14669 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14670 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14671 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14672 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14673 normal/lexer.c, normal/parser.y, normal/script.c, and
14675 Removed kern/sparc64/cache.c.
14677 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14678 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14681 * configure.ac (AC_INIT): Bumped to 1.92.
14683 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14685 * kern/err.c (grub_error_push): Added new function to support error
14687 (grub_error_pop): Likewise.
14688 (grub_error_stack_items): New local variable to support error stacks.
14689 (grub_error_stack_pos): Likewise.
14690 (grub_error_stack_assert): Likewise.
14691 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14693 (grub_print_error): Added support to print errors from error stack.
14695 * include/grub/err.h (grub_error_push): Added function prototype.
14696 (grub_error_pop): Likewise.
14698 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14700 * configure.ac: Accept `powerpc64' as host_cpu.
14701 (amd64): Rename to `biarch32'.
14703 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14704 non-cacheline-aligned addresses.
14706 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14707 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14708 if `size' is non-zero.
14710 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14712 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14713 and `cd' to make sure the filename is not prefixed with a
14715 (pkgdata_MODULES): Add `gpt.mod'.
14716 (gpt_mod_SOURCES): New variable.
14717 (gpt_mod_CFLAGS): Likewise.
14718 (gpt_mod_LDFLAGS): Likewise.
14720 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14722 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14725 * partmap/gpt.c: New file.
14727 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14728 GPT partition map is detected.
14730 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14732 * commands/i386/pc/play.c: New file.
14733 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14734 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14737 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14739 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14740 ((unused))' to silence gcc warning.
14742 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14744 * configure.ac: Correct `AC_PROG_YACC' test.
14746 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14748 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14749 check before installing files.
14751 2005-11-22 Mike Small <smallm@panix.com>
14753 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14754 number regex so multidigit numbers are recognized correctly.
14756 2005-11-22 Mike Small <smallm@panix.com>
14758 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14759 debugging message before attempting to claim memory.
14760 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14761 multiple addresses in case of failure.
14763 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14765 * term/tparm.c (get_space): Remove empty `if' statement.
14767 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14769 * kern/parser.c (check_varstate): Rename `state' to 's'.
14771 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14773 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14774 variable definitions to the beginning of each function. Sort stack
14776 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14777 `buf' argument to `char *'.
14779 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14781 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14782 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14783 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14784 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14785 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14786 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14787 configfile.mod, search.mod, gzio.mod and test.mod.
14788 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14789 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14790 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14791 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14792 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14793 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14794 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14795 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14796 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14797 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14798 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14799 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14800 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14801 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14802 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14803 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14804 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14805 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14806 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14807 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14808 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14809 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14810 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14812 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14814 (pkgdata_MODULES): Add test.mod.
14816 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14818 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14819 appending to variables with "+=".
14820 (PModule): Use full pathname to generate *.lst filenames.
14822 * Makefile.in: Fixed list rules moved from genmk.rb.
14823 (.DELETE_ON_ERROR): New special target.
14824 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14826 * conf/i386-pc.rmk: Include conf/common.mk.
14827 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14828 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14829 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14830 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14831 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14832 configfile.mod, search.mod, gzio.mod and test.mod.
14833 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14834 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14835 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14836 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14837 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14838 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14839 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14840 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14841 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14842 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14843 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14844 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14845 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14846 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14847 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14848 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14849 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14850 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14851 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14852 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14853 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14854 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14855 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14857 * conf/common.rmk: ... to here. New file.
14859 * conf/common.mk: New file.
14861 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14863 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14864 (grub_script.tab.c): ... here.
14866 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14867 (grub_script.tab.c): ... here.
14869 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14870 (grub_script.tab.c): ... here.
14872 * normal/command.c (grub_command_find): Fixed a memory leak of
14873 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14875 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14877 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14878 "@" which marks the start of a comment on ARM.
14879 (VARIABLE): Likewise.
14881 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14883 Add support for Linux/ADFS partition tables.
14885 * partmap/acorn.c: New file.
14887 * include/grub/acorn_filecore.h: Likewise.
14889 * DISTLIST: Added `partmap/acorn.c' and
14890 `include/grub/acorn_filecore.h'.
14892 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14894 (pkgdata_MODULES): Add `acorn.mod'.
14895 (acorn_mod_SOURCES): New variable.
14896 (acorn_mod_CFLAGS): Likewise.
14898 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14900 (pkgdata_MODULES): Add `acorn.mod'.
14901 (acorn_mod_SOURCES): New variable.
14902 (acorn_mod_CFLAGS): Likewise.
14904 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14905 (pkgdata_MODULES): Add `acorn.mod'.
14906 (acorn_mod_SOURCES): New variable.
14907 (acorn_mod_CFLAGS): Likewise.
14908 (acorn_mod_LDFLAGS): Likewise.
14910 * include/types.h (grub_disk_addr_t): New typedef.
14912 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14914 * geninit.sh: New file.
14916 * geninitheader.sh: Likewise.
14918 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14919 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14920 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14921 * commands/configfile.c (grub_configfile_init)
14922 (grub_configfile_fini): Likewise.
14923 * commands/default.c (grub_default_init, grub_default_fini):
14925 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14926 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14927 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14928 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14930 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14931 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14933 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14934 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14936 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14938 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14940 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14941 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14942 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14943 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14944 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14945 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14946 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14947 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14948 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14949 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14950 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14951 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14952 * partmap/amiga.c (grub_amiga_partition_map_init)
14953 (grub_amiga_partition_map_fini): Likewise.
14954 * partmap/apple.c (grub_apple_partition_map_init)
14955 (grub_apple_partition_map_fini): Likewise.
14956 * partmap/pc.c (grub_pc_partition_map_init)
14957 (grub_pc_partition_map_fini): Likewise.
14958 * partmap/sun.c (grub_sun_partition_map_init,
14959 grub_sun_partition_map_fini): Likewise.
14960 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14963 * util/grub-emu.c: Include <grub_modules_init.h>.
14964 (main): Don't initialize and de-initialize any modules directly,
14965 use `grub_init_all' and `grub_fini_all' instead.
14967 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14968 `grub_vesafb_mod_init'.
14969 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14971 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14972 `grub_vga_mod_init'. Updated all users.
14973 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14975 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14976 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14979 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14980 Generate a function to initialize the module in utilities.
14981 Updated all callers.
14982 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14983 initialize the module in utilities. Updated all callers.
14985 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14987 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14988 escape sequence and a literal ^L to clear the screen.
14990 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14991 when returning from Open Firmware.
14993 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14995 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14996 (grub_ofconsole_height): Likewise.
14997 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14998 manually insert a '\n'.
14999 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15000 `grub_ofconsole_height'. Return early if these are already set.
15002 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
15004 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15005 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15006 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15007 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15008 and `normal/script.c'.
15009 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15010 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15011 (test_mod_SOURCES): New variable.
15012 (test_mod_CFLAGS): Likewise.
15013 (test_mod_LDFLAGS): Likewise.
15014 (pkgdata_MODULES): Add `test.mod'.
15015 (grub_script.tab.c): New rule.
15016 (grub_script.tab.h): Likewise.
15018 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
15020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15021 `commands/test.c', `normal/execute.c', `normal/lexer.c',
15022 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15023 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15024 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15025 (test_mod_SOURCES): New variable.
15026 (test_mod_CFLAGS): Likewise.
15027 (pkgdata_MODULES): Add `test.mod'.
15028 (grub_script.tab.c): New rule.
15029 (grub_script.tab.h): Likewise.
15031 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
15033 Add initial scripting support.
15035 * commands/test.c: New file.
15036 * include/grub/script.h: Likewise.
15037 * normal/execute.c: Likewise.
15038 * normal/function.c: Likewise.
15039 * normal/lexer.c: Likewise.
15040 * normal/parser.y: Likewise.
15041 * normal/script.c: Likewise.
15043 * configure.ac: Add `AC_PROG_YACC' test.
15045 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15046 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15047 `normal/function.c' and `normal/script.c'.
15048 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15049 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15050 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15052 (pkgdata_MODULES): Add `test.mod'.
15053 (grub_script.tab.c): New rule.
15054 (grub_script.tab.h): Likewise.
15056 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15058 * include/grub/normal.h (grub_test_init): New prototype.
15059 (grub_test_fini): Likewise.
15061 * normal/command.c: Include <grub/script.h>.
15062 (grub_command_execute): Rewritten.
15064 * util/grub-emu.c (main): Call `grub_test_init' and
15067 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15069 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
15071 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
15072 there are no pending characters.
15074 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15076 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
15077 `grub_strndup' to drop device arguments. Replace unnecessary
15078 `grub_strndup' with `grub_strdup'.
15080 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15082 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
15083 `debug' environment variable has been set.
15085 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
15087 * Makefile.in (install-local): Use $(DATA).
15088 (uninstall): Likewise.
15089 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
15090 (sbin_UTILITIES): ... to here.
15091 (sbin_SCRIPTS): New variable.
15092 (grub_install_SOURCES): New variable.
15093 * util/powerpc/ieee1275/grub-install.in: New file.
15094 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
15096 (add_segments): Call `grub_util_get_path'.
15098 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
15100 From Timothy Baldwin:
15101 * commands/ls.c (grub_ls_list_files): Close FILE with
15103 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
15105 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
15107 * include/grub/parser.h: New file.
15109 * kern/parser.c: Likewise.
15111 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
15112 (grub_setup_SOURCES): Likewise.
15113 (grub_probefs_SOURCES): Likewise.
15114 (grub_emu_SOURCES): Likewise.
15115 (kernel_img_HEADERS): Add `parser.h'.
15117 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15118 (grub_emu_SOURCES): Add `kern/parser.c'.
15119 (grubof_SOURCES): Likewise.
15121 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15122 (grubof_SOURCES): Add `kern/parser.c'.
15124 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
15126 * kern/misc.c (grub_split_cmdline): Removed function.
15128 * kern/rescue.c: Include <grub/parser.h>.
15129 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
15130 of `grub_split_cmdline'.
15132 * normal/command.c: Include <grub/parser.h>.
15133 (grub_command_execute): Use `grub_parser_split_cmdline' instead
15134 of `grub_split_cmdline'.
15136 * normal/completion.c: Include <grub/parser.h>.
15137 (cmdline_state): New variable.
15138 (iterate_dir): End the filename with a quote depending on the
15139 command line state.
15140 (get_state): new function.
15141 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
15142 split the arguments and determine the current argument. When the
15143 argument string is not quoted, escape all spaces.
15145 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15147 * normal/sparc64/setjmp.S: New file.
15149 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15151 * include/grub/sparc64/libgcc.h: New file.
15152 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
15153 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
15154 normal/sparc64/setjmp.c.
15156 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15158 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
15159 * kern/sparc64/cache.S: New file.
15160 * kern/sparc64/cache.c: Removed.
15161 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
15162 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
15164 (COMMON_LDFLAGS): Add -melf64_sparc.
15165 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
15166 (grubof_SOURCES): Use cache.S instead of cache.c.
15167 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
15168 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
15169 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
15171 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
15172 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
15173 (linux_mod_CFLAGS): Commented out.
15174 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
15175 out because module isn't built.
15176 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
15177 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
15178 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
15179 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
15180 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
15181 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15182 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15183 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
15184 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
15185 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
15186 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15187 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15188 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
15189 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
15191 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
15193 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
15194 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
15195 longer, because HFS should not be used on PC.
15197 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15199 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
15200 consistently within the loop.
15202 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
15204 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
15205 directory can not be read.
15207 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15209 * configure.ac (AC_INIT): Increase the version number to 1.91.
15211 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
15212 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
15213 term/i386/pc/serial.c.
15215 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15217 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
15218 file size must be permitted.
15220 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
15221 between %ah and %al.
15223 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15225 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
15227 Call the hook with a NUL-terminated filename.
15228 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
15231 * kern/term.c (cursor_state): New variable.
15232 (grub_term_set_current): Reset the cursor state on a new
15234 (grub_setcursor): Rewritten to use CURSOR_STATE.
15235 (grub_getcursor): New function.
15237 * include/grub/term.h (grub_getcursor): New prototype.
15239 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
15240 integers on ARM. Reported by Timothy Baldwin
15241 <T.E.Baldwin99@members.leeds.ac.uk>.
15243 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
15245 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
15247 (grub_sfs_dir): Likewise.
15249 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
15251 Add support for the SFS filesystem.
15253 * fs/sfs.c: New file.
15255 * DISTLIST: Added `fs/sfs.c'.
15257 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
15258 (grub_probefs_SOURCES): Likewise.
15259 (grub_emu_SOURCES): Likewise.
15260 (pkgdata_MODULES): Add `sfs.mod'.
15261 (sfs_mod_SOURCES): New variable.
15262 (sfs_mod_CFLAGS): Likewise.
15263 (sfs_mod_LDFLAGS): Likewise.
15265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
15266 (pkgdata_MODULES): Add `sfs.mod'.
15267 (sfs_mod_SOURCES): New variable.
15268 (sfs_mod_CFLAGS): Likewise.
15270 * util/grub-emu.c (main): Call `grub_sfs_init' and
15273 * include/grub/fs.h (grub_sfs_init): New prototype.
15274 (grub_sfs_fini): Likewise.
15276 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
15278 Add support for the AFFS filesystem.
15280 * fs/affs.c: New file.
15282 * DISTLIST: Added `fs/affs.c'.
15284 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
15285 (grub_probefs_SOURCES): Likewise.
15286 (grub_emu_SOURCES): Likewise.
15287 (pkgdata_MODULES): Add `affs.mod'.
15288 (affs_mod_SOURCES): New variable.
15289 (affs_mod_CFLAGS): Likewise.
15290 (affs_mod_LDFLAGS): Likewise.
15292 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
15293 (pkgdata_MODULES): Add `affs.mod'.
15294 (affs_mod_SOURCES): New variable.
15295 (affs_mod_CFLAGS): Likewise.
15297 * util/grub-emu.c (main): Call `grub_affs_init' and
15300 * include/grub/fs.h (grub_affs_init): New prototype.
15301 (grub_affs_fini): Likewise.
15303 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15305 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
15307 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15309 * configure.ac: Accept `x86_64' as host_cpu. In that case add
15312 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
15315 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
15316 (COMMON_LDFLAGS): New variable.
15317 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
15318 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
15319 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
15320 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15321 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
15322 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
15323 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
15324 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
15325 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
15326 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
15327 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15328 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15329 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
15330 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
15331 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
15333 (normal_mod_ASFLAGS): Add `-m32'.
15335 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
15336 (grub_host_size_t, grub_host_ssize_t): New types.
15337 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
15338 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
15339 `GRUB_HOST_SIZEOF_VOID_P'.
15341 * include/grub/kernel.h (struct grub_module_header): Type of
15342 member offset changed to `grub_host_off_t'. Type of member size
15343 changed to `grub_host_size_t'.
15344 (struct grub_module_info): Type of member offset changed to
15345 `grub_host_off_t'. Type of member size changed to
15346 `grub_host_size_t'.
15348 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
15350 Make GRUB's kernel compliant to Multiboot Specification.
15352 * kern/i386/pc/startup.S (multiboot_header): New label.
15353 (multiboot_entry): Likewise.
15354 (multiboot_trampoline): Likewise.
15356 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15357 Increased to 0x4A0.
15359 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15360 put parentheses after a question mark.
15361 [!GRUB_UTIL] (my_mod): New variable.
15363 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15365 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
15367 Adds support for the XFS filesystem. Btrees are not supported
15370 * fs/xfs.c: New file.
15372 * DISTLIST: Added `fs/xfs.c'.
15374 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15375 (grub_probefs_SOURCES): Likewise.
15376 (grub_emu_SOURCES): Likewise.
15377 (pkgdata_MODULES): Add `xfs.mod'.
15378 (xfs_mod_SOURCES): New variable.
15379 (xfs_mod_CFLAGS): Likewise.
15381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15382 (pkgdata_MODULES): Add `xfs.mod'.
15383 (xfs_mod_SOURCES): New variable.
15384 (xfs_mod_CFLAGS): Likewise.
15386 * util/grub-emu.c (main): Call `grub_xfs_init' and
15389 * include/grub/fs.h (grub_xfs_init): New prototype.
15390 (grub_xfs_fini): Likewise.
15393 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15395 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15396 color modes, allow greater than 16 colors to be configured as
15399 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15401 * normal/completion.c (complete_arguments): Add the qualifier
15402 const into OPTIONS.
15404 From Omniflux <omniflux+lists@omniflux.com>:
15405 * include/grub/terminfo.h: New file.
15406 * include/grub/tparm.h: Likewise.
15407 * include/grub/i386/pc/serial.h: Likewise.
15408 * term/terminfo.c: Likewise.
15409 * term/tparm.c: Likewise.
15410 * term/i386/pc/serial.c: Likewise.
15411 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15413 (terminfo_mod_SOURCES): New variable.
15414 (terminfo_mod_CFLAGS): Likewise.
15415 (serial_mod_SOURCES): Likewise.
15416 (serial_mod_CFLAGS): Likewise.
15418 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15420 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15421 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15422 and kern/powerpc/ieee1275/cmain.c, respectively.
15424 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15425 * kern/powerpc/ieee1275/crt0.S: ... here.
15427 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15428 * kern/powerpc/ieee1275/cmain.c: ... here.
15430 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15431 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15432 instead of boot/powerpc/ieee1275/crt0.S and
15433 boot/powerpc/ieee1275/cmain.c, respectively.
15435 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15436 sectors. It was not used anyway.
15438 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15440 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15441 `unused parameter' warning.
15443 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15445 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15447 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15450 2005-08-28 Marco Gerards <metgerards@student.han.nl>
15452 * include/grub/normal.h (enum grub_completion_type): Added
15453 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15455 * normal/cmdline.c (print_completion): Handle
15456 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15457 * normal/menu_entry.c (store_completion): Likewise.
15459 * normal/completion.c (complete_arguments): New function.
15460 (grub_normal_do_completion): Call `complete_arguments' when the
15461 current words start with a dash.
15463 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15465 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15466 `gzio.mod' instead of `io.mod').
15468 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15470 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15471 (DISTDIRS): Added io and video.
15472 Rewrite the search routine to make an output consistently.
15474 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15475 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15476 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15477 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15478 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15479 util/powerpc/ieee1275/misc.c.
15481 * include/grub/gzio.h: New file.
15482 * io/gzio.c: Likewise.
15484 * kern/file.c (grub_file_close): Call grub_device_close only if
15485 FILE->DEVICE is not NULL.
15487 * include/grub/mm.h [!NULL] (NULL): New macro.
15489 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15491 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15492 (pkgdata_MODULES): Added gzio.mod.
15493 (gzio_mod_SOURCES): New variable.
15494 (gzio_mod_CFLAGS): Likewise.
15496 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15497 (pkgdata_MODULES): Added gzio.mod.
15498 (gzio_mod_SOURCES): New variable.
15499 (gzio_mod_CFLAGS): Likewise.
15501 * commands/cat.c: Include grub/gzio.h.
15502 (grub_cmd_cat): Use grub_gzfile_open instead of
15505 * commands/cmp.c: Include grub/gzio.h.
15506 (grub_cmd_cmp): Use grub_gzfile_open instead of
15509 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15510 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15512 (grub_rescue_cmd_module): Likewise.
15514 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15516 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15517 kern/sparc64/ieee1275/init.c because it contains _start.
15518 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15520 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15522 * configure.ac: Add support for sparc64 host with ieee1275
15524 * configure: Generated from configure.ac.
15525 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15527 (grub_ofdisk_read): Likewise.
15528 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15529 pointers as (void *) to remove a warning.
15530 (grub_ofdisk_close): Likewise.
15531 (grub_ofdisk_read): Likewise.
15532 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15533 returns, so make it return void to remove a warning.
15534 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15535 Corresponding prototype change.
15536 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15537 values, and cast the pointers as (void *) to remove a warning.
15538 (grub_mm_dump): Likewise.
15539 * conf/sparc64-ieee1275.mk: New file.
15540 * conf/sparc64-ieee1275.rmk: Likewise.
15541 * include/grub/sparc64/setjmp.h: Likewise.
15542 * include/grub/sparc64/types.h: Likewise.
15543 * include/grub/sparc64/ieee1275/console.h: Likewise.
15544 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15545 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15546 * include/grub/sparc64/ieee1275/time.h: Likewise.
15547 * kern/sparc64/cache.c: Likewise.
15548 * kern/sparc64/dl.c: Likewise.
15549 * kern/sparc64/ieee1275/init.c: Likewise.
15550 * kern/sparc64/ieee1275/openfw.c: Likewise.
15552 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15554 * util/console.c (grub_ncurses_putchar): If C is greater than
15555 0x7f, set C to a question mark.
15556 (grub_ncurses_getcharwidth): New function.
15557 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15560 * normal/menu.c (print_entry): Made aware of Unicode. First,
15561 convert TITLE to UCS-4, and predict the cursor position by
15564 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15566 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15568 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15570 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15571 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15574 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15575 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15576 grub_strcpy and grub_strlen. Take it into account that a space
15577 character is inserted as a delimiter.
15579 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15581 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15582 invalid magic in the error.
15584 * commands/search.c: New file.
15586 * util/grub-emu.c (main): Call grub_search_init and
15589 * kern/rescue.c (grub_rescue_print_disks): Removed.
15590 (grub_rescue_print_devices): New function.
15591 (grub_rescue_cmd_ls): Use grub_device_iterate with
15592 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15593 grub_rescue_print_disks.
15595 * kern/partition.c (grub_partition_iterate): Return the result of
15596 PARTMAP->ITERATE instead of GRUB_ERRNO.
15598 * kern/device.c: Include grub/partition.h.
15599 (grub_device_iterate): New function.
15601 * include/grub/partition.h (grub_partition_iterate): Return int
15602 instead of grub_err_t.
15604 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15606 [GRUB_UTIL] (grub_search_fini): Likewise.
15608 * include/grub/device.h (grub_device_iterate): New prototype.
15610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15612 (pkgdata_MODULES): Added search.mod.
15613 (search_mod_SOURCES): New variable.
15614 (search_mod_CFLAGS): Likewise.
15616 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15617 (pkgdata_MODULES): Added search.mod.
15618 (search_mod_SOURCES): New variable.
15619 (search_mod_CFLAGS): Likewise.
15621 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15622 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15623 All callers changed.
15625 * DISTLIST: Added commands/search.c.
15627 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15629 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15631 (grub_getcharwidth): New function.
15633 * kern/misc.c (grub_utf8_to_ucs4): New function.
15635 * include/grub/term.h (struct grub_term): Added a new member
15637 (grub_getcharwidth): New prototype.
15639 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15641 * term/i386/pc/console.c (map_char): New function. Segregated from
15642 grub_console_putchar.
15643 (grub_console_putchar): Use map_char.
15644 (grub_console_getcharwidth): New function.
15645 (grub_console_term): Specified grub_console_getcharwidth as
15648 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15649 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15651 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15653 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15654 on grub_strtoul completely.
15655 (write_char): Declare local variables in the beginning of the
15657 (grub_vesafb_getcharwidth): New function.
15658 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15661 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15663 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15664 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15665 commands/i386/pc/vbetest.c.
15667 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15668 call grub_vbe_get_controller_info again, because the returned
15669 information is volatile.
15670 (grub_vbe_set_video_mode): Mostly rewritten.
15671 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15672 grub_vbe_status_t correctly.
15673 (grub_vbe_get_video_mode_info): Likewise.
15674 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15675 several if statements.
15677 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15678 * commands/i386/pc/vbeinfo.c: ... this.
15680 * commands/i386/pc/vbe_test.c: Renamed to ...
15681 * commands/i386/pc/vbetest.c: ... this.
15683 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15685 (grub_cmd_vbeinfo): ... this. Save video modes before
15686 iterating. Skip a video mode, if it is not available, not enough
15687 information is given or it is monochrome. Show the memory
15688 model. Leave the interpretation of MODEVAR to grub_strtoul
15690 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15691 (GRUB_MOD_FINI): Likewise.
15693 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15694 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15695 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15696 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15697 grub_strtoul completely.
15698 (real2pm): Removed.
15699 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15700 (GRUB_MOD_FINI): Likewise.
15702 * normal/misc.c: Include grub/mm.h.
15704 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15705 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15706 (vbe_list_modes_mod_SOURCES): Removed.
15707 (vbe_list_modes_mod_CFLAGS): Likewise.
15708 (vbe_test_mod_SOURCES): Likewise.
15709 (vbe_test_mod_CFLAGS): Likewise.
15710 (vbeinfo_mod_SOURCES): New variable.
15711 (vbeinfo_mod_CFLAGS): Likewise.
15712 (vbetest_mod_SOURCES): Likewise.
15713 (vbetest_mod_CFLAGS): Likewise.
15715 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15717 * normal/misc.c: New file.
15719 * DISTLIST: Added normal/misc.c.
15721 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15722 DISK to HOOK. Call HOOK with DISK.
15723 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15724 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15725 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15727 * normal/menu_entry.c (struct screen): Added a new member
15728 "completion_shown".
15729 (completion_buffer): New global variable.
15730 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15731 (store_completion): New function.
15732 (complete): Likewise.
15733 (clear_completions): Likewise.
15734 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15735 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15736 a tab, call complete.
15738 * normal/completion.c (disk_dev): Removed.
15739 (print_simple_completion): Likewise.
15740 (print_partition_completion): Likewise.
15741 (print_func): New global variable.
15742 (add_completion): Do not take the arguments WHAT or PRINT any
15743 longer. Added a new argument TYPE. Instead of printing directly,
15744 call PRINT_FUNC if not NULL.
15745 All callers changed.
15746 (complete_device): Use a local variable DEV instead of
15747 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15748 (grub_normal_do_completion): Take a new argument HOOK. Do not
15749 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15750 empty string, return NULL instead.
15751 All callers changed.
15753 * normal/cmdline.c (print_completion): New function.
15755 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15757 All callers changed.
15759 * kern/disk.c (grub_print_partinfo): Removed.
15761 * include/grub/partition.h (struct grub_partition_map): Add a new
15762 argument DISK into HOOK of ITERATE.
15763 (grub_partition_iterate): Add a new argument DISK to HOOK.
15765 * include/grub/normal.h (enum grub_completion_type): New enum.
15766 (grub_completion_type_t): New type.
15767 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15768 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15769 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15770 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15771 (grub_normal_do_completion): Added a new argument HOOK.
15772 (grub_normal_print_device_info): New prototype.
15774 * include/grub/disk.h (grub_print_partinfo): Removed.
15776 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15777 (normal_mod_SOURCES): Likewise.
15778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15779 (normal_mod_SOURCES): Likewise.
15781 * commands/ls.c (grub_ls_list_disks): Use
15782 grub_normal_print_device_info instead of grub_print_partinfo. Free
15784 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15785 duplicating the code.
15787 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15789 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15790 follow GCS more precisely.
15791 * commands/i386/pc/vbe_test.c: Likewise.
15792 * include/grub/i386/pc/vbe.h: Likewise.
15793 * term/i386/pc/vesafb.c: Likewise.
15794 * video/i386/pc/vbe.c: Likewise.
15796 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15798 * DISTLIST: Added term/i386/pc/vesafb.c
15799 DISTLIST: Added video/i386/pc/vbe.c
15800 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15801 DISTLIST: Added commands/i386/pc/vbe_test.c.
15802 * commands/i386/pc/vbe_list_modes.c: New file.
15803 * commands/i386/pc/vbe_test.c: Likewise.
15804 * term/i386/pc/vesafb.c: Likewise.
15805 * video/i386/pc/vbe.c: Likewise.
15806 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15807 (grub_vbe_probe) Added prototype.
15808 (grub_vbe_set_video_mode) Likewise.
15809 (grub_vbe_get_video_mode) Likewise.
15810 (grub_vbe_get_video_mode_info) Likewise.
15811 (grub_vbe_set_pixel_rgb) Likewise.
15812 (grub_vbe_set_pixel_index) Likewise.
15813 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15814 (pkgdata_MODULES): Added vesafb.mod.
15815 (pkgdata_MODULES): Added vbe_list_modes.mod.
15816 (pkgdata_MODULES): Added vbe_test.mod.
15817 (vbe_mod_SOURCES): Added.
15818 (vbe_mod_CFLAGS): Likewise.
15819 (vesafb_mod_SOURCES): Likewise.
15820 (vesafb_mod_CFLAGS): Likewise.
15821 (vbe_list_modes_mod_SOURCES): Likewise.
15822 (vbe_list_modes_mod_CFLAGS): Likewise.
15823 (vbe_test_mod_SOURCES): Likewise.
15824 (vbe_test_mod_CFLAGS): Likewise.
15826 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15828 * normal/command.c (grub_command_execute): If INTERACTIVE is
15829 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15830 CMDLINE. Disable the pager if INTERACTIVE is true.
15831 All callers are changed.
15833 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15834 before reading a config file.
15835 * normal/main.c (read_config_file): Even if a command is not
15836 found, register it if it is within an entry.
15838 * util/grub-emu.c: Include sys/types.h and unistd.h.
15839 (options): Added --hold.
15840 (struct arguments): Added a new member "hold".
15841 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15843 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15844 cleared by a debugger, if it is not zero.
15846 * include/grub/normal.h (grub_command_execute): Add an argument
15849 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15851 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15853 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15855 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15856 program with another one, because the old one didn't detect a bug
15857 in gcc-3.4. Always use regparm 2, because the new test is still
15858 not enough for gcc-4.0. Someone must investigate a simple test
15859 case which detects a bug in gcc-4.0.
15861 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15863 * DISTLIST: Added normal/completion.c.
15865 * normal/completion.c: New file.
15867 * term/i386/pc/console.c (grub_console_getwh): New function.
15868 (grub_console_term): Assign grub_console_getwh to getwh.
15870 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15871 function is defined in normal/completion.c as
15872 grub_normal_do_completion.
15873 (grub_cmdline_get): Use grub_normal_do_completion instead of
15876 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15877 returns non-zero, otherwise return 0.
15878 (grub_partition_iterate): First, probe the partition map. Then,
15879 call ITERATE only for this partition map.
15881 * kern/misc.c (grub_strncmp): Rewritten.
15883 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15884 returns non-zero. Otherwise return 0.
15886 * include/grub/partition.h (grub_partition_map_iterate): Return
15887 int instead of void.
15889 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15891 * include/grub/misc.h (grub_strncmp): Change the type of N to
15894 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15897 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15898 unsigned explicitly before comparing it with I.
15900 * kern/main.c (grub_env_write_root): Add the attribute unused into
15903 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15904 normal/completion.c.
15905 (normal_mod_SOURCES): Likewise.
15906 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15907 (normal_mod_SOURCES): Likewise.
15909 * normal/command.c (grub_iterate_commands): If ITERATE returns
15910 non-zero, return one immediately.
15912 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15914 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15915 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15917 (grub_vbe_get_controller_info): New function.
15918 (grub_vbe_get_mode_info): Likewise.
15919 (grub_vbe_set_mode): Likewise.
15920 (grub_vbe_get_mode): Likewise.
15921 (grub_vbe_set_memory_window): Likewise.
15922 (grub_vbe_get_memory_window): Likewise.
15923 (grub_vbe_set_scanline_length): Likewise.
15924 (grub_vbe_get_scanline_length): Likewise.
15925 (grub_vbe_set_display_start): Likewise.
15926 (grub_vbe_get_display_start): Likewise.
15927 (grub_vbe_set_palette_data): Likewise.
15928 * include/grub/i386/pc/vbe.h: New file.
15930 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15932 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15933 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15934 * DISTLIST: Likewise.
15935 * kern/ieee1275/of.c: Moved to ...
15936 * kern/ieee1275/ieee1275.c: ... here.
15938 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15940 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15941 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15942 Pass 0 as `end' parameter to grub_strtoul().
15944 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15946 * include/grub/powerpc/ieee1275/console.h: Do not include
15947 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15949 (grub_console_cur_color): Remove i386-specific prototype.
15950 (grub_console_real_putchar): Likewise.
15951 (grub_console_checkkey): Likewise.
15952 (grub_console_getkey): Likewise.
15953 (grub_console_getxy): Likewise.
15954 (grub_console_gotoxy): Likewise.
15955 (grub_console_cls): Likewise.
15956 (grub_console_setcursor): Likewise.
15957 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15958 Include <grub/machine/console.h>.
15959 * term/ieee1275/ofconsole.c: Likewise.
15961 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15963 * Makefile.in (LIBLZO): New variable.
15965 * configure.ac: Check for LZO version 2.
15967 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15968 lzo/lzo1x.h instead of lzo1x.h.
15970 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15973 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15974 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15976 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15977 copying the data from PARTITION to P.
15979 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15981 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15982 negative, unload the module.
15984 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15985 map is "pc_partition_map" but not "pc".
15986 (usage): Fix the description. The options are --boot-image and
15987 --core-image but not --boot-file or --core-file.
15988 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15989 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15992 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15993 --core-file. Specify INSTALL_DEVICE as an argument.
15995 * util/console.c: Include config.h.
15996 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15997 [HAVE_NCURSES_H]: Include ncurses.h.
15998 [HAVE_CURSES_H]: Include curses.h.
15999 [!A_NORMAL] (A_NORMAL): Defined as zero.
16000 [!A_STANDOUT] (A_STANDOUT): Likewise.
16002 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16004 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16006 * configure.ac: Check for curses libraries and headers.
16008 * Makefile.in (LIBCURSES): New variable.
16010 * genmk.rb (Script::rule): Set the executable bits.
16012 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16013 name of the PC partition map is "pc_partition_map" but not "pc".
16015 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16017 * util/i386/pc/grub-install.in (grub_probefs): New variable.
16018 (modules): Likewise.
16019 (usage): Added descriptions for --modules and --grub-probefs.
16020 Handle --modules and --grub-probefs. Save the arguments in MODULES
16021 and GRUB_PROBEFS, respectively.
16022 Auto-detect a filesystem module against GRUBDIR. If the result is
16023 empty and modules are not specified explicitly, abort the
16024 installation. Add the result to MODULES.
16026 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16027 disk/powerpc/ieee1275/ofdisk.c,
16028 include/grub/powerpc/ieee1275/init.h and
16029 term/powerpc/ieee1275/ofconsole.c.
16030 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16031 term/ieee1275/ofconsole.c.
16033 * include/grub/powerpc/ieee1275/console.h: Resurrected.
16035 * COPYING: Upgraded to the latest version. Only the address of the
16036 FSF office has changed.
16038 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16040 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16041 kern/ieee1275.c with kern/ieee1275/of.c.
16043 * kern/ieee1275.c: Moved to ...
16044 * kern/ieee1275/of.c: ... here.
16046 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
16048 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16051 * config.guess: Updated to the latest version from gnulib.
16052 * config.sub: Likewise.
16053 * install.sh: Likewise.
16054 * mkinstalldirs: Likewise.
16056 * include/grub/console.h: Removed. This file is arch-specific. Do
16057 not put this in include/grub.
16059 * include/grub/i386/pc/console.h: Resurrected.
16061 * util/console.c: Include grub/machine/console.h instead of
16063 * util/grub-emu.c: Likewise.
16065 2005-08-04 Marco Gerards <metgerards@student.han.nl>
16067 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
16070 From Vincent Pelletier <subdino2004@yahoo.fr>
16071 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
16072 Redefined to use grub_getwh.
16073 (grub_term): New member named getwh.
16074 (grub_getwh): New prototype.
16075 * kern/term.c (grub_getwh): New function.
16076 * term/i386/pc/console.c (grub_console_getwh): New function.
16077 (grub_console_term): New member `getwh'.
16078 * term/i386/pc/vga.c (grub_vga_getwh): New function.
16079 (grub_vga_term): New member `getwh'.
16080 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
16082 (grub_ofconsole_getw): New function.
16083 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
16084 (grub_ofconsole_term): New field named getwh and new initial
16087 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
16089 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
16090 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
16091 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
16092 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
16093 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
16094 of <grub/machine/ieee1275.h>.
16095 * commands/ieee1275/reboot.c: Likewise.
16096 * boot/powerpc/ieee1275/ieee1275.c: Move ...
16097 * kern/ieee1275.c: ... to here. All users updated. Change all
16098 parameter structs to use new type `grub_ieee1275_cell_t'.
16099 * term/powerpc/ieee1275/ofconsole.c: Move ...
16100 * term/ieee1275/ofconsole.c: ... to here. All users updated.
16101 * disk/powerpc/ieee1275/ofdisk.c: Move ...
16102 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
16103 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
16105 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
16106 Remove unused prototypes. All users updated.
16107 * include/grub/powerpc/ieee1275/console.h: Removed.
16108 * include/grub/powerpc/ieee1275/ieee1275.h: Define
16109 `grub_ieee1275_cell_t'.
16110 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
16111 Cast comparisons with -1 to the correct type.
16112 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
16113 type to match `grub_ieee1275_entry_fn'.
16115 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
16117 * DISTLIST: Added util/i386/pc/grub-probefs.c.
16119 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
16120 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
16122 (grub_probefs_SOURCES): New variable.
16124 * util/i386/pc/grub-probefs.c: New file.
16126 * util/i386/pc/grub-setup.c (main): Call
16127 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
16128 grub_hfs_init and grub_jfs_init to initialize the system. Call
16129 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
16130 grub_pc_partition_map_fini to finish the system.
16132 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
16134 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
16136 (grub_multiboot_load_elf32): Likewise.
16137 (grub_multiboot_is_elf64): Likewise.
16138 (grub_multiboot_load_elf64): Likewise.
16139 (grub_multiboot_load_elf): Likewise.
16140 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
16141 an ELF32 or ELF64 file.
16142 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
16144 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
16145 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
16146 NULL before calling FS->LABEL.
16147 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
16148 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
16149 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
16150 before calling FS->LABEL.
16152 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
16154 * util/i386/pc/grub-install.in (datadir): New variable.
16156 (pkgdatadir): New variable.
16157 (pkglibdir): Removed.
16159 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
16161 * DISTLIST: Added util/i386/pc/grub-install.in.
16163 * util/i386/pc/grub-install.in: New file.
16165 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
16166 (grub_install_SOURCES): Likewise.
16168 * genmk.rb: Added support for scripts.
16169 (Script): New class.
16170 (scripts): New variable.
16172 * Makefile.in (install-local): Install sbin_SCRIPTS by
16174 (uninstall): Remove sbin_SCRIPTS.
16176 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
16177 device, try to get a GRUB device by
16178 grub_util_biosdisk_get_grub_dev.
16181 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
16182 description for --device-map.
16184 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16186 Change the semantics of variable hooks. They now return strings
16187 instead of error values.
16189 * util/i386/pc/grub-setup.c: Include grub/env.h.
16190 (setup): Use grub_device_set_root instead of grub_env_set.
16192 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
16193 grub_env_get instead of grub_device_set_root and
16194 grub_device_get_root, respectively.
16196 * kern/main.c (grub_env_write_root): New function.
16197 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
16198 grub_env_set instead of grub_device_set_root.
16200 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
16202 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
16203 rather than calling ENV->WRITE_HOOK afterwards.
16204 (grub_env_get): Return the result of ENV->READ_HOOK rather than
16205 passing a pointer of a pointer.
16206 (grub_register_variable_hook): Change the types of "read_hook" and
16207 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
16209 Allocate the default empty string on the heap, because this string
16210 may be freed later.
16212 * kern/device.c: Include grub/env.h.
16213 (grub_device_set_root): Removed.
16214 (grub_device_get_root): Likewise.
16215 (grub_device_open): Use grub_env_get instead of
16216 grub_device_get_root.
16218 * include/grub/env.h (grub_env_read_hook_t): New type.
16219 (grub_env_write_hook_t): Likewise.
16220 (grub_env_var): Change the types of "read_hook" and "write_hook"
16221 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
16222 (grub_register_variable_hook): Likewise.
16224 * include/grub/device.h (grub_device_set_root): Removed.
16225 (grub_device_set_root): Likewise.
16227 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
16228 make sure that DIRNAME terminates with '/', so that
16229 grub_fat_find_dir will fail if PATH is not a directory.
16231 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
16233 Use the qualifier auto for print_files and print_files_long.
16234 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
16236 Put a newline only if there is no error.
16237 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
16240 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16242 * kern/partition.c (grub_partition_probe): Initialize PART to
16243 NULL. Otherwise, when no partition map is registered, this returns
16246 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
16248 * partmap/apple.c (apple_partition_map_iterate): Check if POS
16249 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
16252 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
16254 * commands/ls.c (grub_ls_list_disks): Print the filesystem
16255 information on each device, if it does not have partitions. Print
16256 "Device" instead of "Disk", because this function is not specific
16259 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
16260 static to ensure that it is put on the memory rather than a
16263 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16265 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
16266 (grub_cat_init): Likewise.
16267 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
16268 (options): Likewise.
16269 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
16270 (grub_configfile_init): Likewise.
16271 * font/manager.c (GRUB_MOD_INIT): Likewise.
16272 * commands/help.c (GRUB_MOD_INIT): Likewise.
16273 (grub_help_init): Likewise.
16274 * normal/command.c (grub_command_init): Likewise.
16275 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
16276 * disk/loopback.c (grub_loop_init): Likewise.
16277 (GRUB_MOD_INIT): Likewise.
16278 * commands/ls.c (grub_ls_init): Likewise.
16279 (GRUB_MOD_INIT): Likewise.
16280 (options): Likewise.
16281 * commands/boot.c (grub_boot_init): Likewise.
16282 (GRUB_MOD_INIT): Likewise.
16283 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
16284 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
16285 (GRUB_MOD_INIT): Likewise.
16286 * commands/cmp.c (grub_cmp_init): Likewise.
16287 (GRUB_MOD_INIT): Likewise.
16289 * normal/arg.c: Use <> instead of "" to include header files.
16290 (SHORT_ARG_HELP): New macro.
16291 (SHORT_ARG_USAGE): Likewise.
16292 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
16293 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
16295 (find_short): Check if C is 'h' or 'u' explicitly.
16296 (grub_arg_show_help): Use space characters instead of tabs. Treat
16297 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
16298 are shown with --help and --usage only if they are not used for
16299 the command itself.
16300 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
16303 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
16304 const into "longarg". Change the type of "shortarg" to int.
16306 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16308 * boot/i386/pc/boot.S (boot_drive_check): New label.
16310 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
16313 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
16314 which do not pass a boot drive correctly. Copied from GRUB Legacy.
16316 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16318 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
16319 When turning off Gate A20, skip the check and return immediately,
16320 because this is not fatal usually.
16322 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16324 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
16325 be 0x7C00 instead of 0x8000.
16327 * boot/i386/pc/pxeboot.S: Rewritten.
16329 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
16331 (gate_a20_check_state): Read a byte from 0x108000. Invert the
16334 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
16336 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
16337 robustness. This routine now supports a BIOS call and System
16338 Control Port A to modify the gate A20.
16340 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16341 Increased to 0x440.
16343 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
16345 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16346 device path and resulting ihandle.
16347 (grub_ofdisk_close): dprintf the ihandle being closed.
16348 (grub_ofdisk_read): dprintf function parameters.
16349 * kern/mm.c (grub_mm_init_region): Likewise.
16350 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16351 (grub_linux_boot): dprintf the Linux entry point, initrd address and
16352 size, and boot arguments.
16353 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16354 before loading into memory.
16355 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16356 before loading into memory.
16358 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
16360 * kern/mm.c: Added much documentation.
16361 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16362 8, set to 5 instead of 8.
16364 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16366 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16368 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16369 (grub_mkdevicemap_SOURCES): New variable.
16371 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16372 lib/device.c of GRUB Legacy.
16374 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16376 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16377 instead of PATH is NULL.
16379 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16381 * commands/cmp.c (BUFFER_SIZE): New macro.
16382 (grub_cmd_cmp): Close the right file at the right time. Compare
16383 only data just read. Don't report files of different size as
16384 identical. Dynamically allocate buffers. Move variable
16385 declarations at the beginning of function.
16387 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
16389 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16392 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16394 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16395 when backspace is pressed at beginning of line.
16397 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
16399 * DISTLIST: Added genfslist.sh.
16401 * normal/main.c (fs_module_list): New variable.
16402 (autoload_fs_module): New function.
16403 (read_fs_list): Likewise.
16404 (grub_normal_execute): Call read_fs_list.
16406 * kern/fs.c (grub_fs_autoload_hook): New variable.
16407 (grub_fs_probe): Added support for auto-loading.
16409 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16410 (grub_fs_module_list_t): New type.
16412 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16413 (grub_fs_autoload_hook): New prototype.
16415 * genfslist.sh: New file.
16417 * genmk.rb: Added a rule to generate a filesystem list.
16419 2005-06-30 Marco Gerards <metgerards@student.han.nl>
16421 * configure.ac: Fix the test for cross-compiling.
16423 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16424 define GRUB_UTIL anymore.
16426 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16427 so this function works on other systems than just big endian.
16428 (load_modules): Likewise.
16429 (add_segments): Likewise.
16431 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16433 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16434 contains `l' modifier, get a long from va_arg().
16436 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16438 * kern/mm.c (grub_free): If the next free block which is being
16439 merged is the first free block, set the first block to the block
16441 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16443 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16445 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16446 `grub_ieee1275_chosen'.
16448 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16450 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16451 (grub_ieee1275_chosen): New variable.
16452 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16454 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16455 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16456 Rename first argument to `phandle' for consistency.
16457 (grub_ieee1275_get_property_length): Likewise.
16458 (grub_ieee1275_next_property): Likewise. Change type of first argument
16459 to grub_ieee1275_phandle_t.
16460 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16461 Move export next to declaration.
16462 (grub_ieee1275_chosen): New variable.
16463 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16464 Correct cosmetic typo.
16465 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16466 `grub_ieee1275_chosen'.
16467 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16468 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16469 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16470 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16471 `grub_ieee1275_chosen'.
16473 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16475 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16477 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16478 /chosen/bootargs as "variable=value" pairs.
16480 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16482 * include/grub/misc.h (grub_dprintf): New macro.
16483 (grub_real_dprintf): New prototype.
16484 (grub_strword): Likewise.
16485 (grub_iswordseparator): Likewise.
16486 * kern/misc.c (grub_real_dprintf): New function.
16487 (grub_strword): Likewise.
16488 (grub_iswordseparator): Likewise.
16490 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16492 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16493 (roundup): Remove macro.
16494 (grub_ieee1275_flags): Make static.
16495 (grub_ieee1275_realmode): Remove.
16496 (grub_ieee1275_test_flag): New function.
16497 (grub_ieee1275_set_flag): Likewise.
16498 (find_options): Rename to `grub_ieee1275_find_options'; update
16499 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16500 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16501 (cmain): New prototype.
16502 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16503 `grub_ieee1275_flags' directly.
16504 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16505 machine/biosdisk.h.
16506 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16507 Don't include grub/machine/init.h.
16508 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16509 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16511 (grub_ieee1275_realmode): Likewise.
16512 (grub_ieee1275_flag): New enum.
16513 (grub_ieee1275_test_flag): New prototype.
16514 (grub_ieee1275_set_flag): New prototype.
16515 * include/grub/powerpc/ieee1275/init.h: Remove file.
16516 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16517 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16518 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16519 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16521 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16522 `grub_ieee1275_test_flag'.
16523 (grub_ieee1275_encode_devname): Likewise.
16525 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16527 * include/grub/powerpc/ieee1275/ieee1275.h
16528 (grub_ieee1275_encode_devname): New prototype.
16529 (grub_ieee1275_get_filename): Likewise.
16530 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16532 (grub_set_prefix): Likewise.
16533 (grub_machine_init): Call grub_set_prefix.
16534 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16535 (grub_parse_type): New enum.
16536 (grub_ieee1275_get_devargs): New function.
16537 (grub_ieee1275_get_devname): Likewise.
16538 (grub_ieee1275_parse_args): Likewise.
16539 (grub_ieee1275_get_filename): Likewise.
16540 (grub_ieee1275_encode_devname): Likewise.
16542 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16544 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16545 `grub_loader_unset'.
16547 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16549 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16550 instead of grub_ieee1275_interpret.
16551 (grub_halt_init): New function.
16552 (grub_halt_fini): Likewise.
16553 (GRUB_MOD_INIT): Correct message grammar.
16554 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16555 instead of grub_ieee1275_interpret.
16556 (grub_reboot_init): New function.
16557 (grub_reboot_fini): Likewise.
16558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16559 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16560 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16561 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16562 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16564 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16566 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16568 (grub_halt): Likewise.
16569 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16570 (cmain): Remove __attribute__((unused)).
16571 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16572 (grub_heap_len): Likewise.
16573 (grub_machine_fini): New function.
16574 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16575 (grub_halt): Likewise.
16576 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16578 * util/powerpc/ieee1275/misc.c: New file.
16580 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16582 * DISTLIST: New file.
16583 * gendistlist.sh: Likewise.
16585 * Makefile.in (COMMON_DISTFILES): Removed.
16586 (BOOT_DISTFILES): Likewise.
16587 (CONF_DISTFILES): Likewise.
16588 (DISK_DISTFILES): Likewise.
16589 (FS_DISTFILES): Likewise.
16590 (INCLUDE_DISTFILES): Likewise.
16591 (KERN_DISTFILES): Likewise.
16592 (LOADER_DISTFILES): Likewise.
16593 (TERM_DISTFILES): Likewise.
16594 (UTIL_DISTFILES): Likewise.
16595 (DISTFILES): Likewise.
16596 (uninstall): Uninstall files in $(pkgdata_DATA).
16597 (DISTLIST): New target.
16598 (distdir): Use the contents of the file DISTLIST to get a list of
16601 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16603 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16604 descriptor. This is ported from GRUB Legacy.
16606 * gencmdlist.sh: Added an extra semicolon to make it work with
16607 old sed versions. Reported by Robert Bihlmeyer
16608 <robbe@orcus.priv.at>.
16610 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16612 Automatic loading of commands is supported.
16614 * normal/main.c (read_command_list): New function.
16615 (grub_normal_execute): Call read_command_list.
16617 * normal/command.c (grub_register_command): Return zero or CMD.
16618 Allocate CMD->NAME from the heap.
16619 Initialize CMD->MODULE_NAME to zero.
16620 Find the same name as well. If the same command is found and it is
16621 a dummy command, overwrite members. If it is not a dummy command,
16623 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16624 (grub_command_find): If a dummy command is found, load a module
16625 and retry to find a command only once.
16627 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16628 make sure that each command is loaded.
16630 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16632 (struct grub_command): Remove const from the member `name'.
16633 Add a new member `module_name'.
16634 (grub_register_command): Return grub_command_t.
16636 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16637 sure that each command is loaded.
16639 * genmk.rb (PModule::rule): Specify a module name without the
16640 suffix ".mod" to gencmdlist.sh.
16642 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16644 * gencmdlist.sh: New file.
16646 * genmk.rb (PModule::rule): Generate a rule for a command list.
16648 Generate command.lst from $(COMMANDFILES).
16650 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16651 (DATA): Added $(pkgdata_DATA).
16652 (install-local): Install files in $(pkgdata_DATA).
16654 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16656 * term/i386/pc/vga.c (debug_command): Removed.
16657 (GRUB_MOD_INIT): Do not register the command "debug".
16659 From Hollis Blanchard:
16660 * commands/configfile.c: New file.
16661 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16662 commands/configfile.c.
16663 (pkgdata_MODULES): Added configfile.mod.
16664 (configfile_mod_SOURCES): New variable.
16665 (configfile_mod_CFLAGS): Likewise.
16666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16667 commands/configfile.c.
16668 (pkgdata_MODULES): Added configfile.mod.
16669 (configfile_mod_SOURCES): New variable.
16670 (configfile_mod_CFLAGS): Likewise.
16671 * util/grub-emu.c (main): Call grub_configfile_init and
16672 grub_configfile_fini.
16673 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16675 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16677 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16679 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16682 * commands/help.c (grub_cmd_help): Do not print newlines after
16683 the last command in print_command_help.
16685 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16687 * commands/default.h: New file.
16688 * commands/timeout.h: Likewise.
16689 * normal/context.c: Likewise.
16691 * util/misc.c: Do not include sys/times.h.
16692 Include sys/time.h and grub/machine/time.h.
16693 (grub_get_rtc): Rewritten with gettimeofday.
16695 * util/grub-emu.c (main): Call grub_default_init and
16696 grub_timeout_init before grub_normal_init, and call
16697 grub_timeout_fini and grub_default_fini after grub_main.
16699 * util/console.c (grub_ncurses_checkkey): Return the read
16702 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16705 * normal/main.c (read_config_file): Push MENU. If this fails,
16706 print an error and wait for a user input.
16707 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16708 If a menu is empty or an error occurs, pop MENU.
16709 (grub_normal_execute): Pop and free MENU after grub_menu_run
16712 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16714 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16716 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16718 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16720 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16723 * include/grub/normal.h (struct grub_menu_list): New struct.
16724 (grub_menu_list_t): New type.
16725 (struct grub_context): New struct.
16726 (grub_context_t): New type.
16727 (grub_register_command): Got rid of EXPORT_FUNC.
16728 (grub_unregister_command): Likewise.
16729 (grub_context_get): New prototype.
16730 (grub_context_get_current_menu): Likewise.
16731 (grub_context_push_menu): Likewise.
16732 (grub_context_pop_menu): Likewise.
16733 [GRUB_UTIL] (grub_default_init): Likewise.
16734 [GRUB_UTIL] (grub_default_fini): Likewise.
16735 [GRUB_UTIL] (grub_timeout_init): Likewise.
16736 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16738 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16739 commands/timeout.c and normal/context.c.
16740 (pkgdata_MODULES): Added default.mod and timeout.mod.
16741 (normal_mod_SOURCES): Added normal/context.c.
16742 (default_mod_SOURCES): New variable.
16743 (default_mod_CFLAGS): Likewise.
16744 (timeout_mod_SOURCES): Likewise.
16745 (timeout_mod_CFLAGS): Likewise.
16746 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16748 (pkgdata_MODULES): Added default.mod and timeout.mod.
16749 (normal_mod_SOURCES): Added normal/context.c.
16750 (default_mod_SOURCES): New variable.
16751 (default_mod_CFLAGS): Likewise.
16752 (timeout_mod_SOURCES): Likewise.
16753 (timeout_mod_CFLAGS): Likewise.
16755 * Makefile.in (all-local): Added $(MKFILES).
16757 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16759 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16760 (grub_emu_SOURCES): Likewise.
16761 (pkgdata_MODULES): Add `sun.mod'.
16762 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16763 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16765 (pkgdata_MODULES): Add `sun.mod'.
16766 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16767 * include/grub/partition.h (grub_sun_partition_map_init): New
16769 (grub_sun_partition_map_fini): Likewise.
16770 * partmap/sun.c: New file.
16771 * util/grub-emu.c (main): Initialize and de-initialize the sun
16772 partitionmap support.
16774 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16776 This implements an Emacs-like menu entry editor.
16778 * normal/menu_entry.c: New file.
16780 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16781 characters to ASCII.
16782 (saved_char): New variable.
16783 (grub_ncurses_checkkey): Rewritten completely.
16784 (grub_ncurses_getkey): Likewise.
16785 (grub_ncurses_init): Call raw instead of cbreak.
16787 * normal/menu.c (print_entry): Do not put a space.
16788 (init_page): Renamed to ...
16789 (grub_menu_init_page): ... this. All callers changed.
16790 (edit_menu_entry): Removed.
16791 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16793 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16795 * kern/misc.c (grub_vprintf): Call grub_refresh.
16797 * normal/menu.c (DISP_LEFT): Renamed to ...
16798 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16799 * normal/menu.c (DISP_UP): Renamed to ...
16800 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16801 * normal/menu.c (DISP_RIGHT): Renamed to ...
16802 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16803 * normal/menu.c (DISP_DOWN): Renamed to ...
16804 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16805 * normal/menu.c (DISP_HLINE): Renamed to ...
16806 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16807 * normal/menu.c (DISP_VLINE): Renamed to ...
16808 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16809 * normal/menu.c (DISP_UL): Renamed to ...
16810 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16811 * normal/menu.c (DISP_UR): Renamed to ...
16812 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16813 * normal/menu.c (DISP_LL): Renamed to ...
16814 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16815 * normal/menu.c (DISP_LR): Renamed to ...
16816 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16817 * normal/menu.c (TERM_WIDTH): Renamed to ...
16818 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16819 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16820 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16821 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16822 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16823 * normal/menu.c (TERM_MARGIN): Renamed to ...
16824 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16825 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16826 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16827 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16828 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16829 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16830 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16831 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16832 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16833 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16834 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16835 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16836 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16837 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16838 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16839 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16840 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16841 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16842 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16843 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16844 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16845 All callers changed.
16847 * include/grub/normal.h: New prototype.
16849 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16850 normal/menu_entry.c.
16851 (normal_mod_SOURCES): Likewise.
16852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16853 (normal_mod_SOURCES): Likewise.
16855 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16857 * include/grub/normal.h (grub_halt_init): New prototype.
16858 (grub_halt_fini): Likewise.
16859 (grub_reboot_init): Likewise.
16860 (grub_reboot_fini): Likewise.
16862 * util/grub-emu.c: Include signal.h.
16863 (main_env): New global variable.
16864 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16866 (grub_machine_fini): New function.
16867 (main): Call grub_halt_init and grub_reboot_init before
16868 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16869 Call setjmp with MAIN_ENV to go back afterwards.
16870 Call grub_machine_fini right before return.
16872 * include/grub/util/misc.h: Include setjmp.h.
16873 (main_env): New prototype.
16875 * include/grub/kernel.h (grub_machine_fini): New prototype.
16876 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16877 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16879 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16880 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16881 * term/i386/pc/console.c (grub_console_fini): Likewise.
16883 * util/i386/pc/misc.c: New file.
16885 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16886 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16887 commands/i386/pc/reboot.c.
16889 2005-02-14 Guillem Jover <guillem@hadrons.org>
16891 * include/grub/dl.h (grub_dl_check_header): New prototype.
16892 (grub_arch_dl_check_header): Change return type to grub_err_t,
16893 remove size parameter and export function. Update all callers.
16894 * kern/dl.c (grub_dl_check_header): New function.
16895 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16896 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16897 are inside the core.
16898 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16899 independent ELF header checks.
16900 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16901 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16902 `grub_dl_check_header' instead of explicit checks. Check for the
16904 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16905 `grub_dl_check_header' instead of explicit checks. Remove arch
16906 specific ELF header checks.
16908 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16911 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16913 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16914 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16916 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16918 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16919 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16920 (part_map_iterate): Clear `grub_errno' and return 0 if
16921 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16922 * partmap/amiga.c (amiga_partition_map_iterate): Return
16923 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16924 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16926 2005-02-01 Guillem Jover <guillem@hadrons.org>
16928 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16931 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16933 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16935 (grub_rescue_cmd_linux): New prototype.
16936 (grub_rescue_cmd_initrd): Likewise.
16937 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16939 (grub_linux_release_mem): Release the memory for the initrd.
16940 (grub_load_linux): Renamed from this...
16941 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16942 Changed `entry' not to be static. Loop over memory regions to
16943 find another one when the default fails.
16944 (grub_rescue_cmd_initrd): New function.
16945 (grub_linux_init): Remove function.
16946 (grub_linux_fini): Likewise.
16947 (GRUB_MOD_INIT): Register `initrd'.
16948 (GRUB_MOD_FINI): Unregister `initrd'.
16949 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16951 (grub_linux_normal_fini): Likewise.
16952 (GRUB_MOD_INIT): Register `initrd'.
16953 (GRUB_MOD_FINI): Unregister `initrd'.
16955 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16957 * commands/help.c: New file.
16958 * normal/arg.c (show_help): Renamed to...
16959 (grub_arg_show_help): ... this.
16960 * commands/i386/pc/halt.c: New file.
16961 * commands/i386/pc/reboot.c: Likewise.
16962 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16963 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16964 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16965 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16969 (pkgdata_MODULES): Add `help.mod'.
16970 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16971 * grub/i386/pc/init.h (grub_reboot): New prototype.
16972 (grub_halt): Likewise.
16973 * include/grub/normal.h (grub_arg_show_help): New prototype.
16974 (grub_help_init): Likewise.
16975 (grub_help_fini): Likewise.
16976 * util/grub-emu.c (main): Initialize and deinitialize the help
16979 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16981 * normal/command.c (grub_command_init): Fixed the description of
16982 the `set' and `unset' commands.
16984 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16986 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16988 * commands/ieee1275/halt.c: New file.
16989 * commands/ieee1275/reboot.c: Likewise.
16990 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16991 `__attribute__ ((unused))'. Some GCS related fixed.
16992 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16993 (grub_suspend_fini): Likewise.
16994 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16996 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16997 (halt_mod_CFLAGS): New variables.
16998 * include/grub/powerpc/ieee1275/ieee1275.h
16999 (grub_ieee1275_interpret): New prototype.
17001 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
17003 * include/grub/misc.h (memmove): New prototype.
17004 (memcpy): Likewise.
17006 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
17008 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17009 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
17011 2005-01-22 Marco Gerards <metgerards@student.han.nl>
17013 * kern/misc.c (grub_strndup): Function rewritten.
17015 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
17017 * normal/menu.c (TERM_WIDTH): Macro redefined.
17018 (TERM_TOP_BORDER_Y): Likewise.
17019 (draw_border): Replaced while-loop by a for-loop. Make the number
17020 of lines consistent with the number of lines displayed in
17021 print_entries. Added a margin below the rectangle.
17022 (print_entry): Make the entry fit in the rectangle.
17023 (print_entries): Display the scroll arrows next to the right
17026 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17028 * fs/minix.c (grub_minix_find_file): Reserve more space for
17029 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
17030 `grub_strncpy' to copy `path' into it.
17032 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17034 Add the loopback device, a device via which files can be accessed
17037 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17038 (pkgdata_MODULES): Add loopback.mod.
17039 (loopback_mod_SOURCES): New variable.
17040 (loopback_mod_CFLAGS): Likewise.
17041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17043 (pkgdata_MODULES): Add loopback.mod.
17044 (loopback_mod_SOURCES): New variable.
17045 (loopback_mod_CFLAGS): Likewise.
17046 * disk/loopback.c: new file.
17047 * include/grub/normal.h (grub_loop_init): New prototype.
17048 (grub_loop_fini): New prototype.
17049 * util/grub-emu.c (main): Initialize and de-initialize loopback
17051 * include/grub/disk.h (grub_disk_dev_id): Add
17052 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17054 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
17056 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17058 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17059 (suspend_mod_SOURCES): New variable.
17060 (suspend_mod_CFLAGS): Likewise.
17061 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17063 * commands/ieee1275/suspend.c: New file.
17065 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17067 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
17068 ((unused))' to `__attribute__ ((used))'.
17069 (GRUB_MOD_FINI): Likewise.
17070 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
17071 * genmk.rb (PModule): Assign space to common symbols when linking
17074 2005-01-20 Marco Gerards <metgerards@student.han.nl>
17076 * include/grub/mm.h (grub_mm_init_region): Change the type of the
17077 `unsigned' arguments to `grub_size_t'.
17078 (grub_malloc): Likewise.
17079 (grub_realloc): Likewise.
17080 (grub_memalign): Likewise.
17081 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
17082 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17083 * util/misc.c (grub_malloc): Likewise.
17084 (grub_realloc): Likewise.
17085 * kern/mm.c (get_header_from_pointer): Change the casts to
17086 `unsigned' into a cast to `grub_size_t'.
17088 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
17089 point to `currnode' when `currnode' is changed.
17091 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
17092 Schottelius <nico-linux@schottelius.org>.
17094 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
17096 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
17097 (note_path): Remove variable.
17098 (GRUB_IEEE1275_NOTE_NAME): New macro.
17099 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
17100 (grub_ieee1275_note_hdr): New structure.
17101 (grub_ieee1275_note_desc): Likewise.
17102 (grub_ieee1275_note): Likewise.
17103 (load_note): Remove `dir' argument. All callers updated. Remove
17104 `note_img' and `path'. Do not load a file from `note_path'.
17105 Initialize a struct grub_ieee1275_note and write that to `out'.
17106 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
17108 2005-01-05 Marco Gerards <metgerards@student.han.nl>
17110 * util/misc.c (grub_util_read_image): Revert last change. It
17111 called `grub_util_read_at', which seeks from the beginning of the
17114 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
17116 * TODO: Add note about endianness in grub-mkimage.
17117 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
17119 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
17120 (grub_mkimage_SOURCES): New target.
17121 * include/grub/kernel.h (grub_start_addr): Remove variable.
17122 (grub_end_addr): Likewise.
17123 (grub_total_module_size): Likewise.
17124 (grub_kernel_image_size): Likewise.
17125 (GRUB_MODULE_MAGIC): New constant.
17126 (grub_module_info): New structure.
17127 (grub_arch_modules_addr): New prototype.
17128 (grub_get_end_addr): Remove prototype.
17129 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
17130 * include/grub/powerpc/ieee1275/kernel.h: New file.
17131 * include/grub/util/misc.h (grub_util_get_fp_size): New
17133 (grub_util_read_at): Likewise.
17134 (grub_util_write_image_at): Likewise.
17135 * kern/main.c (grub_get_end_addr): Remove function.
17136 (grub_load_modules): Call grub_arch_modules_addr instead of using
17137 grub_end_addr. Look for a grub_module_info struct in memory. Use
17138 the grub_module_info fields instead of calling grub_get_end_addr
17139 as loop conditions. Move grub_add_unused_region code here.
17140 (grub_add_unused_region): Remove function.
17141 * kern/i386/pc/init.c: Include grub/cache.h.
17142 (grub_machine_init): Remove call to grub_get_end_addr. Remove
17143 one call to add_mem_region.
17144 (grub_arch_modules_addr): New function.
17145 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
17146 (grub_total_module_size): Likewise.
17147 Include grub/machine/kernel.h.
17148 (grub_arch_modules_addr): New function.
17149 * util/grub-emu.c (grub_end_addr): Remove variable.
17150 (grub_total_module_size): Likewise.
17151 (grub_arch_modules_addr): New function.
17152 * util/misc.c: Include unistd.h.
17153 (grub_util_get_fp_size): New function.
17154 (grub_util_read_at): Likewise.
17155 (grub_util_write_image_at): Likewise.
17156 (grub_util_read_image): Call grub_util_read_at.
17157 (grub_util_write_image): Call grub_util_write_image_at.
17158 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
17159 additional memory in kernel_img for a struct grub_module_info.
17160 Fill in that grub_module_info.
17161 * util/powerpc/ieee1275/grub-mkimage.c: New file.
17163 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17165 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
17167 * include/grub/powerpc/ieee1275/ieee1275.h
17168 (grub_ieee1275_milliseconds): New prototype.
17169 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
17171 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
17172 grub_ieee1275_milliseconds.
17174 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17176 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
17178 (find_options): New function.
17179 (cmain): Call find_options.
17180 * include/grub/powerpc/ieee1275/ieee1275.h
17181 (grub_ieee1275_realmode): New extern variable.
17182 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
17183 grub_map if grub_ieee1275_realmode is false.
17185 2004-12-29 Marco Gerards <metgerards@student.han.nl>
17187 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
17188 lines are inserted and make it work like readline. Reported by
17189 Vincent Pelletier <subdino2004@yahoo.fr>.
17191 2004-12-28 Marco Gerards <metgerards@student.han.nl>
17193 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
17195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
17196 `kern/powerpc/cache.S'.
17198 2004-12-27 Marco Gerards <metgerards@student.han.nl>
17200 * genmk.rb: Handle the `Program' class in the main loop. Written
17201 by Johan Rydberg <jrydberg@gnu.org>.
17202 (Program): New class.
17203 (programs): New variable.
17204 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
17205 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
17206 instead of "grub/kernel.h". Include <grub/machine/init.h>.
17207 (help_arch): Function removed.
17208 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
17209 `powerpc/libgcc.h' and `loader.h'.
17210 (pkgdata_PROGRAMS): New variable.
17211 (sbin_UTILITIES): Variable removed.
17212 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
17213 (grubof_SOURCES): Variable re-defined so it only includes the
17214 core functionality.
17215 (grubof_CFLAGS): Remove `-DGRUBOF'.
17216 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
17217 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
17218 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
17219 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
17220 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
17221 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
17222 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
17223 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
17224 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
17225 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
17226 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17227 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
17228 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
17229 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
17230 (pc_mod_CFLAGS): New variables.
17231 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
17232 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
17233 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
17234 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
17236 * include/grub/i386/pc/init.h (grub_os_area_addr)
17237 (rub_os_area_size): ... to here.
17238 * include/grub/powerpc/ieee1275/ieee1275.h
17239 (grub_ieee1275_entry_fn): Export symbol.
17240 * include/grub/powerpc/ieee1275/init.h: New file.
17241 * include/grub/powerpc/libgcc.h: Likewise.
17242 * include/grub/cache.h: Likewise.
17243 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
17244 <hollis@penguinppc.org>.
17245 * kern/dl.c: Include <grub/cache.h>.
17246 (grub_dl_flush_cache): New function.
17247 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
17249 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
17250 (grub_console_init): Removed prototypes.
17251 (grub_machine_init): Don't initialize the modules anymore.
17252 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
17254 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
17255 Macro undef removed.
17256 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
17257 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
17258 relocation `R_PPC_REL32'. Return an error when the relocation is
17260 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
17261 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
17262 * util/misc.c (grub_arch_sync_caches): Likewise.
17264 2004-12-19 Marco Gerards <metgerards@student.han.nl>
17266 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
17267 `symlist.c', add `grubof_symlist.c'.
17268 (symlist.c): Variable removed.
17269 (grubof_HEADERS): Variable added.
17270 (grubof_symlist.c): New target.
17271 (kernel_syms.lst): Use `grubof_HEADERS' instead of
17272 `kernel_img_HEADERS'.
17273 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
17274 * kern/powerpc/dl.c: New file.
17275 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
17277 (grub_arch_dl_relocate_symbols): Likewise.
17278 (grub_register_exported_symbols): Likewise.
17280 2004-12-13 Marco Gerards <metgerards@student.han.nl>
17282 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
17283 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
17284 to fail instead. Reported by Vincent Pelletier
17285 <subdino2004@yahoo.fr>.
17287 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
17288 it is not allocated. Reported by Vincent Pelletier
17289 <subdino2004@yahoo.fr>.
17291 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
17292 output so the output looks better.
17294 2004-12-04 Marco Gerards <metgerards@student.han.nl>
17296 Modulize the partition map support and add support for the amiga
17299 * commands/ls.c: Include <grub/partition.h> instead of
17300 <grub/machine/partition.h>.
17301 * kern/disk.c: Likewise.
17302 * kern/rescue.c: Likewise.
17303 * loader/i386/pc/chainloader.c: Likewise.
17304 * normal/cmdline.c: Likewise.
17305 * kern/powerpc/ieee1275/init.c: Likewise.
17306 (grub_machine_init): Call `grub_pc_partition_map_init',
17307 `grub_amiga_partition_map_init' and
17308 `grub_apple_partition_map_init'.
17309 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
17310 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
17311 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
17312 `partition.h' and `pc_partition.h'.
17313 (grub_setup_SOURCES): Remove
17314 `disk/i386/pc/partition.c'. Add `kern/partition.c',
17315 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17316 (grub_emu_SOURCES): Likewise.
17317 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
17318 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
17319 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
17320 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17321 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
17322 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17323 (grubof_SOURCES): Likewise.
17324 * disk/i386/pc/partition.c: File removed.
17325 * disk/powerpc/ieee1275/partition.c: Likewise.
17326 * include/grub/powerpc/ieee1275/partition.h: Likewise.
17327 * include/grub/i386/pc/partition.h: Likewise.
17328 * kern/partition.c: New file.
17329 * partmap/amiga.c: Likewise.
17330 * partmap/apple.c: Likewise.
17331 * partmap/pc.c: Likewise.
17332 * include/grub/partition.h: Likewise..
17333 * include/grub/pc_partition.h: Likewise.
17334 * util/grub-emu.c: Include <grub/partition.h> instead of
17335 <grub/machine/partition.h>.
17336 (main): Call `grub_pc_partition_map_init',
17337 `grub_amiga_partition_map_init' and
17338 `grub_apple_partition_map_init' and deinitialize afterwards.
17339 * util/i386/pc/biosdisk.c: Include `#include
17340 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17341 `<grub/machine/partition.h>'.
17342 * util/i386/pc/grub-setup.c: Likewise.
17343 * util/i386/pc/biosdisk.c: Likewise.
17344 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17345 partition information in case of a PC partition.
17346 * util/i386/pc/grub-setup.c: Include `#include
17347 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17348 `<grub/machine/partition.h>'.
17349 (setup): Only access the PC specific partition information in case
17352 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
17354 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17355 (grub_longjmp): Likewise.
17356 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17358 * normal/powerpc/setjmp.S: New file.
17359 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17360 `normal/powerpc/setjmp.S'.
17361 (grubof_CFLAGS): Add `-DGRUBOF'.
17362 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17363 [GRUB_UTIL && !GRUBOF].
17365 2004-11-16 Marco Gerards <metgerards@student.han.nl>
17367 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17368 property named `name'. Correctly handle the error returned by
17369 `grub_ieee1275_finddevice' if a device can not be opened.
17371 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
17373 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17374 `actual' for negativity.
17375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17378 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17380 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17381 (PAGE_OFFSET): New macro.
17382 (CRTC_ADDR_PORT): Likewise.
17383 (CRTC_DATA_PORT): Likewise.
17384 (START_ADDR_HIGH_REGISTER): Likewise.
17385 (START_ADDR_LOW_REGISTER): Likewise.
17386 (GRAPHICS_ADDR_PORT): Likewise.
17387 (GRAPHICS_DATA_PORT): Likewise.
17388 (READ_MAP_REGISTER): Likewise.
17389 (INPUT_STATUS1_REGISTER): Likewise.
17390 (INPUT_STATUS1_VERTR_BIT): Likewise.
17391 (page): New variable.
17392 (wait_vretrace): New function.
17393 (set_read_map): Likewise.
17394 (set_start_address): Likewise.
17395 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17397 (check_vga_mem): Take the page into account.
17398 (write_char): Likewise.
17399 (write_cursor): Likewise.
17400 (scroll_up): Likewise. Copy the page to the page that is not
17401 shown and switch between both pages.
17402 (grub_vga_putchar): Fix off by one error.
17403 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17406 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17408 Add support for iso9660 (including rockridge).
17410 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17411 (iso9660_mod_SOURCES): New variable.
17412 (iso9660_mod_CFLAGS): Likewise.
17413 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17414 * include/grub/fs.h (grub_iso9660_init): New prototype.
17415 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17416 * fs/iso9660.c: New file.
17418 * include/grub/misc.h (grub_strncat): New prototype.
17419 * kern/misc.c (grub_strncat): New function.
17421 * fs/hfs.c (grub_hfs_mount): Translate the error
17422 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17423 * fs/jfs.c (grub_jfs_mount): Likewise.
17424 * fs/ufs.c (grub_ufs_mount): Likewise.
17426 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17428 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17429 which initialized BAT registers.
17430 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17431 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17433 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17434 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17436 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17437 (grub_mapclaim): Likewise.
17438 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17439 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17442 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17444 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17445 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17446 -ffreestanding and -msoft-float.
17448 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17450 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17451 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17452 set in grub_ieee1275_flags.
17454 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17456 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17458 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17459 grub_console_init first.
17460 Change the memory range used for grub_ieee1275_claim and
17461 grub_mm_init_region.
17462 Print an error message if the claim fails.
17463 Include <grub/misc.h>.
17465 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17467 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17468 Call grub_children_iterate for device nodes of type `scsi',
17470 (grub_ofdisk_open): Remove manual device alias resolution.
17471 Fix memory leak when device cannot be opened.
17472 * include/grub/powerpc/ieee1275/ieee1275.h
17473 (grub_children_iterate): New prototype.
17474 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17476 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17477 Return -1 if args.size was -1.
17479 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17481 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17482 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17483 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17484 Open Firmware's memory for it; claim memory from _start to _end.
17485 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17486 (_end): New extern.
17487 (_start): Zero BSS from __bss_start to _end.
17488 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17490 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17492 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17494 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17495 -1 if args.base was -1.
17497 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17499 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17500 escape sequence instead of a literal ^L. Also call
17501 grub_ofconsole_gotoxy.
17503 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17505 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17506 void * arguments to grub_addr_t. All callers updated. Also make
17507 the `result' argument optional.
17508 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17509 All callers updated.
17511 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17513 * commands/ls.c (grub_ls_list_files): Use the string following the
17514 initial ')', if present, as the filesystem path.
17515 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17517 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17519 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17521 Make the source code of the menu interface more readable.
17523 * normal/menu.c: Include grub/mm.h.
17524 (TERM_WIDTH): New macro.
17525 (TERM_HEIGHT): Likewise.
17526 (TERM_INFO_HEIGHT): Likewise.
17527 (TERM_MARGIN): Likewise.
17528 (TERM_SCROLL_WIDTH): Likewise.
17529 (TERM_TOP_BORDER_Y): Likewise.
17530 (TERM_LEFT_BORDER_X): Likewise.
17531 (TERM_BORDER_WIDTH): Likewise.
17532 (TERM_MESSAGE_HEIGHT): Likewise.
17533 (TERM_BORDER_HEIGHT): Likewise.
17534 (TERM_NUM_ENTRIES): Likewise.
17535 (TERM_FIRST_ENTRY_Y): Likewise.
17536 (TERM_ENTRY_WIDTH): Likewise.
17537 (TERM_CURSOR_X): Likewise.
17538 (draw_border): Use macros instead of magic numbers.
17539 (print_entry): Likewise.
17540 (print_entries): Likewise.
17541 (run_menu): Likewise. Also, handle the key 'e'.
17542 (run_menu_entry): Ignore empty command lines.
17543 (print_message): Added a new argument EDIT. If EDIT is true,
17544 print a different message.
17545 (init_page): Likewise.
17546 (edit_menu_entry): New function. Not implemented yet.
17548 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17550 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17551 can be loaded from normal mode.
17553 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17555 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17556 (multiboot_mod_CFLAGS): New variables.
17557 * loader/i386/pc/linux_normal.c: New file.
17558 * loader/i386/pc/multiboot_normal.c: Likewise.
17560 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17561 attribute `unused'.
17563 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17564 `fdiro' to read the mode information from instead of `diro'.
17566 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17567 looking up a symlink.
17569 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17571 * normal/command.c (grub_command_execute): Don't parse the
17572 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17573 flags of the command.
17575 * normal/menu.c (grub_menu_run): Fix typo.
17577 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17579 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17581 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17582 `y + 1' instead of `y - 1'.
17584 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17586 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17588 From Hollis Blanchard <hollis@penguinppc.org>:
17589 * kern/misc.c (memmove): New alias for grub_memmove.
17590 (memcmp): New alias for grub_memcmp.
17591 (memset): New alias for grub_memset.
17592 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17593 Change "int handle" to "grub_ieee1275_phandle_t handle".
17594 * include/grub/powerpc/ieee1275/ieee1275.h
17595 (grub_ieee1275_get_property): Likewise.
17597 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17599 Added normal mode command `chainloader' as module chain.mod, which
17600 depends on normal.mod and _chain.mod.
17602 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17603 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17604 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17606 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17607 but arguments parsing moved to ...
17608 (grub_chainloader_cmd): ... here. New function.
17609 * include/grub/i386/pc/chainloader.h: New file.
17610 * loader/i386/pc/chainloader_normal.c: Likewise.
17612 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17614 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17615 (grub_mkimage_LDFLAGS): Likewise.
17616 (grub_emu_SOURCES): Likewise.
17617 (kernel_img_HEADERS): Added fshelp.h.
17618 * fs/ext2.c: Include <grub/fshelp.h>.
17619 (FILETYPE_REG): New macro.
17620 (FILETYPE_INO_REG): Likewise.
17621 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17623 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17625 (grub_fshelp_node): New struct.
17626 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17628 (grub_ext2_get_file_block): Removed function.
17629 (grub_ext2_read_block): New function.
17630 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17631 This function was written.
17632 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17633 (grub_ext2_find_file): Removed function.
17634 (grub_ext2_read_symlink): New function.
17635 (grub_ext2_iterate_dir): Likewise.
17636 (grub_ext2_open): Rewritten.
17637 (grub_ext2_dir): Rewritten.
17638 * include/grub/fshelp.h: New file.
17639 * fs/fshelp.c: Likewise.
17641 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17643 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17644 (print_message): Add a missing newline.
17645 (run_menu): Added timeout support.
17646 (run_menu_entry): New local function.
17647 (grub_menu_run): Added support for booting.
17649 * kern/loader.c (grub_loader_is_loaded): New function.
17651 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17652 (grub_get_rtc): Exported.
17654 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17655 (grub_get_rtc): Exported.
17657 * include/grub/normal.h (struct grub_command_list): Remove
17658 constant from the member `command'.
17660 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17662 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17664 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17666 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17668 Add support for the JFS filesystem.
17670 * fs/jfs.c: New file.
17671 * include/grub/fs.h (grub_jfs_init): New prototype.
17672 (grub_jfs_fini): New prototype.
17673 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17674 (grub_emu_SOURCES): Likewise.
17675 (pkgdata_MODULES): Add jfs.mod.
17676 (jfs_mod_SOURCES): New variable.
17677 (jfs_mod_CFLAGS): Likewise.
17678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17679 (grubof_SOURCES): Likewise.
17680 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17682 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17683 endian to the host endian.
17684 (grub_fat_utf16_to_utf8): Move function from there...
17685 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17686 the endianness of the source string anymore.
17687 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17689 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17691 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17692 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17693 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17694 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17696 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17697 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17698 for `node_found' and `it_dir'.
17699 (grub_hfs_dir): Add prototype for `dir_hook'.
17701 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17702 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17703 and `indir32' to silence a gcc warning.
17705 * include/grub/fs.h (grub_hfs_init): New prototype.
17706 (grub_hfs_fini): Likewise.
17709 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17711 Each disk device has its own id now. This is useful to make use
17712 of multiple disk devices.
17714 * include/grub/disk.h (grub_disk_dev_id): New enum.
17715 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17716 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17718 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17719 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17721 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17722 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17724 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17725 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17727 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17728 "id" which is used by the cache manager.
17730 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17733 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17735 * fs/hfs.c: New file.
17736 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17737 (grub_emu_SOURCES): Likewise.
17738 (pkgdata_MODULES): Add hfs.mod.
17739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17740 (grubof_SOURCES): Likewise.
17741 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17743 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17744 * kern/misc.c (grub_strncasecmp): Add function.
17746 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17748 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17751 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17752 (grub_ext2_dir): In case the directory entry type is unknown, read
17755 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17757 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17758 grub_load_linux instead of grub_rescue_cmd_linux as second
17759 argument of grub_rescue_register_command.
17761 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17763 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17765 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17767 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17768 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17769 `loader/powerpc/ieee1275/linux.c',
17770 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17771 * include/grub/powerpc/ieee1275/ieee1275.h
17772 (grub_ieee1275_release): New prototype.
17773 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17774 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17775 normal, boot, linux and linux_normal.
17776 * loader/powerpc/ieee1275/linux.c: New file.
17777 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17779 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17781 * normal/arg.c (grub_arg_parse): Correct error handling after
17782 reallocating the argumentlist (check if `argl' is not null instead
17783 of checking if `args' is not null).
17784 * kern/mm.c (grub_realloc): Return the same pointer when using the
17785 same region, instead of returning the header address.
17787 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17789 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17790 one block instead of two when looking for the initial partition.
17791 (grub_partition_probe): Initialize the local variable `p' with 0.
17792 Use base 10 for the grub_strtoul call.
17793 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17794 need for one local variable.
17795 (grub_strtoul): Don't add the new value to `num', instead of that
17798 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17800 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17801 (pxeboot_img_SOURCES): New variable.
17802 (pxeboot_img_ASFLAGS): Likewise.
17803 (pxeboot_img_LDFLAGS): Likewise.
17804 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17805 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17806 <lode_leroy@hotmail.com>.
17808 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17810 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17811 there was no input.
17813 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17815 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17816 the history buffer logic.
17818 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17820 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17821 (FILETYPE_INO_SYMLINK): New macros.
17822 (grub_ext2_find_file): Check if the node is a directory using the
17823 inode stat information instead of using the filetype in the
17824 dirent. Exclude the first character of an absolute symlink.
17825 (grub_ext2_dir): Mask out the filetype part of the mode member of
17828 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17830 Add support for UFS version 1 and 2. Add support for the minix
17831 filesystem version 1 and 2, both the variants with 14 and 30 long
17834 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17836 (grub_emu_SOURCES): Likewise.
17837 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17838 (ufs_mod_SOURCES): New variable.
17839 (ufs_mod_CFLAGS): Likewise.
17840 (minix_mod_SOURCES): Likewise.
17841 (minix_mod_CFLAGS): Likewise.
17842 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17844 (grubof_SOURCES): Likewise.
17845 * fs/ufs.c: New file.
17846 * fs/minix.c: New file.
17847 * include/grub/fs.h (grub_ufs_init): New prototype.
17848 (grub_ufs_fini): Likewise.
17849 (grub_minix_init): Likewise.
17850 (grub_minix_fini): Likewise.
17851 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17854 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17856 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17857 commands/ls.c, commands/terminal.c, commands/boot.c,
17858 commands/cmp.c and commands/cat.c.
17859 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17861 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17864 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17866 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17867 and grub_, respectively. Because the conversion is trivial and
17868 mechanical, I omit the details here. Please refer to the CVS
17869 if you need more information.
17871 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17873 * include/pupa: Renamed to ...
17874 * include/grub: ... this.
17875 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17876 * util/i386/pc/grub-mkimage.c: ... this.
17877 * util/i386/pc/pupa-setup.c: Renamed to ...
17878 * util/i386/pc/grub-setup.c: ... this.
17879 * util/pupa-emu.c: Renamed to ...
17880 * util/grub-emu.c: ... this.
17882 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17884 Add support for the newworld apple macintosh (PPC). This has been
17885 tested on the powerbook 2000 only. It only adds support for
17886 generic ieee1275 functions, console and disk support. This should
17887 be easy to port to other architectures with support for Open
17890 * configure.ac: Accept the powerpc as host_cpu. In the case of
17891 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17892 specific tests are only executed while building for the i386.
17893 Inverse test for crosscompile.
17894 * genmk.rb (Utility): Allow assembler files.
17895 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17896 * conf/powerpc-ieee1275.rmk: New file.
17897 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17898 * disk/powerpc/ieee1275/partition.c: Likewise.
17899 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17900 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17901 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17902 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17903 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17904 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17905 * include/pupa/powerpc/ieee1275/loader.h
17906 * include/pupa/powerpc/setjmp.h: Likewise.
17907 * include/pupa/powerpc/types.h: Likewise.
17908 * kern/powerpc/ieee1275/init.c: Likewise.
17909 * kern/powerpc/ieee1275/openfw.c: Likewise.
17910 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17912 These files were written by Johan Rydberg
17913 (jrydberg@night.trouble.net) and I only modified them slightly.
17915 * boot/powerpc/ieee1275/cmain.c: New file.
17916 * boot/powerpc/ieee1275/crt0.S: Likewise.
17917 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17918 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17920 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17922 * Makefile.in: Update copyright.
17923 * genmodsrc.sh: Likewise.
17924 * gensymlist.sh: Likewise.
17925 * term/i386/pc/vga.c: Indent correctly.
17927 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17928 bugreporting address.
17929 * util/i386/pc/pupa-setup.c (usage): Likewise,
17930 (main): Call pupa_ext2_init and pupa_ext2_fini.
17932 * fs/fat.c (log2): Renamed to ...
17933 (fat_log2): ... this.
17934 All callers changed.
17935 * kern/misc.c (memcpy): Alias to pupa_memmove.
17936 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17938 * util/console.c (pupa_ncurses_fini): Return 0.
17940 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17941 Move fail label here.
17942 [__GNU__]: Don't warn when using stat.
17943 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17944 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17945 long int. Use strtol instead of strtoul.
17947 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17949 * commands/boot.c: New file.
17950 * commands/cat.c: Likewise.
17951 * commands/cmp.c: Likewise.
17952 * commands/ls.c: Likewise.
17953 * commands/terminal.c: Likewise.
17954 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17955 (pupa_register_command): Changed interface to match the new
17957 (pupa_command_execute): Changed (almost rewritten) so it uses
17958 pupa_split_command. Added support for setting variables using the
17960 (rescue_command): Changed to work with the new argument parser.
17961 (terminal_command): Moved from here to commands/terminal.c.
17962 (set_command): New function.
17963 (unset_command): New function.
17964 (insmod_command): New function.
17965 (rmmod_command): New function.
17966 (lsmod_command): New function.
17967 (pupa_command_init): Don't initialize the command terminal
17968 anymore. Initialize the commands set, unset, insmod, rmmod and
17970 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17971 (kernel_img_HEADERS): Add arg.h and env.h.
17972 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17973 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17974 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17976 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17978 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17979 (boot_mod_SOURCES): New variable.
17980 (terminal_mod_SOURCES): Likewise.
17981 (ls_mod_SOURCES): Likewise.
17982 (cmp_mod_SOURCES): Likewise.
17983 (cat_mod_SOURCES): Likewise.
17985 * normal/arg.c: New file.
17986 * kern/env.c: Likewise.
17987 * include/pupa/arg.h: Likewise.
17988 * include/pupa/env.h: Likewise.
17989 * font/manager.c (font_command): Changed to match argument parsing
17991 (PUPA_MOD_INIT): Likewise.
17992 * hello/hello.c (pupa_cmd_hello): Likewise.
17993 (PUPA_MOD_INIT): Likewise.
17994 * include/pupa/disk.h: Include <pupa/device.h>.
17995 (pupa_print_partinfo): New prototype.
17996 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17997 (pupa_dl_get_prefix): Likewise.
17998 * include/pupa/misc.h: Include <pupa/err.h>.
17999 (pupa_isgraph): New prototype.
18000 (pupa_isdigit): Likewise.
18001 (pupa_split_cmdline): Likewise.
18002 * include/pupa/normal.h: Include <pupa/arg.h>.
18003 (pupa_command): Changed the prototype of the member `func' to
18004 match the argument parsing interface. Added member `options'.
18005 (pupa_register_command): Updated to match function.
18006 (pupa_arg_parse): New prototype.
18007 (pupa_hello_init) [PUPA_UTIL]: New prototype.
18008 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18009 (pupa_ls_init) [PUPA_UTIL]: Likewise.
18010 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18011 (pupa_cat_init) [PUPA_UTIL]: Likewise.
18012 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18013 (pupa_boot_init) [PUPA_UTIL]: Likewise.
18014 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18015 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18016 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18017 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18018 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18019 * kern/disk.c: Include <pupa/file.h>.
18020 (pupa_print_partinfo): New function.
18021 * kern/dl.c: Include <pupa/env.h>.
18022 (pupa_dl_dir): Variable removed.
18023 (pupa_dl_load): Use the environment variable `prefix' instead of
18024 the variable pupa_dl_dir.
18025 (pupa_dl_set_prefix): Function removed.
18026 (pupa_dl_get_prefix): Likewise.
18027 * kern/i386/pc/init.c: Include <pupa/env.h>.
18028 (pupa_machine_init): Use the environment variable `prefix' instead of
18029 using pupa_dl_set_prefix to set the prefix.
18030 * kern/main.c: Include <pupa/env.h>.
18031 (pupa_set_root_dev): Use the environment variable `prefix' instead of
18032 using pupa_dl_get_prefix to get the prefix.
18033 * kern/misc.c: Include <pupa/env.h>.
18034 (pupa_isdigit): New function.
18035 (pupa_isgraph): Likewise.
18036 (pupa_ftoa): Likewise.
18037 (pupa_vsprintf): Added support for printing values of the type
18038 `double'. Make it possible to format variable output when using
18039 formatting like `%1.2%f'.
18040 (pupa_split_cmdline): New function.
18041 * kern/rescue.c: Include <pupa/env.h>.
18042 (next_word): Removed function.
18043 (pupa_rescue_cmd_prefix): Likewise.
18044 (pupa_rescue_cmd_set): New function.
18045 (pupa_rescue_cmd_unset): New function.
18046 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18047 split the command line instead of splitting it here. Added
18048 support for setting variables using the syntax `foo=bar'. Don't
18049 initialize the prefix command anymore. Initialized the set and
18051 * normal/cmdline.c: Include <pupa/env.h>.
18052 (pupa_tab_complete): Added prototypes for print_simple_completion,
18053 print_partition_completion, add_completion, iterate_commands,
18054 iterate_dev, iterate_part and iterate_dir. Moved code to print
18055 partition information from here to kern/disk.c.
18056 (pupa_cmdline_run): Don't check if the function exists anymore.
18057 * normal/main.c: Include <pupa/env.h>.
18058 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18059 instead of using pupa_dl_get_prefix to get the prefix.
18060 * term/i386/pc/vga.c: Include <pupa/arg.h>.
18061 (check_vga_mem): Cast pointers to `void *' to silence a gcc
18063 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18064 (pupa_vga_setcolor): Declare unused variables with `__attribute__
18065 ((unused))' to silence a gcc warning.
18066 (pupa_vga_setcolor): Likewise.
18067 (debug_command): Changed to match argument parsing
18069 * util/pupa-emu.c: Include <pupa/env.h>.
18070 (options): Added 0's for unused fields to silence a gcc warning.
18072 (main): Use the environment variable `prefix' instead of using
18073 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
18074 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
18077 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
18078 * util/misc.c: Include <malloc.h>.
18079 (pupa_malloc): Rewritten so errors are correctly reported.
18080 (pupa_realloc): Likewise.
18081 (pupa_memalign): Likewise.
18082 (pupa_mm_init_region): Declare unused variables with
18083 `__attribute__ ((unused))' to silence a gcc warning.
18084 * normal/i386/setjmp.S: Remove tab at the end of the file to
18085 silence a gcc warning.
18086 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
18087 variables with `__attribute__ ((unused))' to silence a gcc
18089 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
18090 local variable i unsigned to silence a gcc warning.
18092 * kern/term.c: Include <pupa/misc.h>.
18093 (pupa_more_lines): New variable.
18094 (pupa_more): Likewise.
18095 (pupa_putcode): When the pager is active pause at the end of every
18097 (pupa_set_more): New function.
18098 * include/pupa/term.h (pupa_set_more): New prototype.
18101 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
18103 Now this project is GRUB 2 rather than PUPA. The location of
18104 the CVS repository was moved to GRUB's.
18106 * configure.ac: Use bug-grub as the reporting address.
18107 Use GRUB instead of PUPA.
18108 Change the version number to 1.90.
18110 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
18112 * genkernsyms.sh: Updated copyright information.
18113 * genmk.rb: Likewise.
18114 * genmodsrc.sh: Likewise.
18115 * gensymlist.sh: Likewise.
18116 * boot/i386/pc/boot.S: Likewise.
18117 * boot/i386/pc/diskboot.S: Likewise.
18118 * disk/i386/pc/biosdisk.c: Likewise.
18119 * disk/i386/pc/partition.c: Likewise.
18120 * font/manager.c: Likewise.
18121 * fs/ext2.c: Likewise.
18122 * fs/fat.c: Likewise.
18123 * include/pupa/boot.h: Likewise.
18124 * include/pupa/device.h: Likewise.
18125 * include/pupa/disk.h: Likewise.
18126 * include/pupa/dl.h: Likewise.
18127 * include/pupa/elf.h: Likewise.
18128 * include/pupa/err.h: Likewise.
18129 * include/pupa/file.h: Likewise.
18130 * include/pupa/font.h: Likewise.
18131 * include/pupa/fs.h: Likewise.
18132 * include/pupa/kernel.h: Likewise.
18133 * include/pupa/loader.h: Likewise.
18134 * include/pupa/misc.h: Likewise.
18135 * include/pupa/mm.h: Likewise.
18136 * include/pupa/net.h: Likewise.
18137 * include/pupa/normal.h: Likewise.
18138 * include/pupa/rescue.h: Likewise.
18139 * include/pupa/setjmp.h: Likewise.
18140 * include/pupa/symbol.h: Likewise.
18141 * include/pupa/term.h: Likewise.
18142 * include/pupa/types.h: Likewise.
18143 * include/pupa/i386/setjmp.h: Likewise.
18144 * include/pupa/i386/types.h: Likewise.
18145 * include/pupa/i386/pc/biosdisk.h: Likewise.
18146 * include/pupa/i386/pc/boot.h: Likewise.
18147 * include/pupa/i386/pc/console.h: Likewise.
18148 * include/pupa/i386/pc/init.h: Likewise.
18149 * include/pupa/i386/pc/kernel.h: Likewise.
18150 * include/pupa/i386/pc/linux.h: Likewise.
18151 * include/pupa/i386/pc/loader.h: Likewise.
18152 * include/pupa/i386/pc/memory.h: Likewise.
18153 * include/pupa/i386/pc/multiboot.h: Likewise.
18154 * include/pupa/i386/pc/partition.h: Likewise.
18155 * include/pupa/i386/pc/time.h: Likewise.
18156 * include/pupa/i386/pc/vga.h: Likewise.
18157 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
18158 * include/pupa/util/getroot.h: Likewise.
18159 * include/pupa/util/misc.h: Likewise.
18160 * include/pupa/util/resolve.h: Likewise.
18161 * kern/device.c: Likewise.
18162 * kern/disk.c: Likewise.
18163 * kern/dl.c: Likewise.
18164 * kern/err.c: Likewise.
18165 * kern/file.c: Likewise.
18166 * kern/fs.c: Likewise.
18167 * kern/loader.c: Likewise.
18168 * kern/main.c: Likewise.
18169 * kern/misc.c: Likewise.
18170 * kern/mm.c: Likewise.
18171 * kern/rescue.c: Likewise.
18172 * kern/term.c: Likewise.
18173 * kern/i386/dl.c: Likewise.
18174 * kern/i386/pc/init.c: Likewise.
18175 * kern/i386/pc/lzo1x.S: Likewise.
18176 * kern/i386/pc/startup.S: Likewise.
18177 * loader/i386/pc/chainloader.c: Likewise.
18178 * loader/i386/pc/linux.c: Likewise.
18179 * loader/i386/pc/multiboot.c: Likewise.
18180 * normal/cmdline.c: Likewise.
18181 * normal/command.c: Likewise.
18182 * normal/main.c: Likewise.
18183 * normal/menu.c: Likewise.
18184 * normal/i386/setjmp.S: Likewise.
18185 * term/i386/pc/console.c: Likewise.
18186 * term/i386/pc/vga.c: Likewise.
18187 * util/console.c: Likewise.
18188 * util/genmoddep.c: Likewise.
18189 * util/misc.c: Likewise.
18190 * util/pupa-emu.c: Likewise.
18191 * util/resolve.c: Likewise.
18192 * util/unifont2pff.rb: Likewise.
18193 * util/i386/pc/biosdisk.c: Likewise.
18194 * util/i386/pc/getroot.c: Likewise.
18195 * util/i386/pc/pupa-mkimage.c: Likewise.
18196 * util/i386/pc/pupa-setup.c: Likewise.
18198 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
18200 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
18201 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
18202 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
18203 reading and reset it after reading.
18204 (pupa_ext2_close): Return PUPA_ERR_NONE.
18206 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
18208 (struct linux_kernel_header): Add kernel_version and
18210 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
18211 pupa_file_read succeeds.
18212 (pupa_rescue_cmd_initrd): Implement.
18214 2003-12-03 Marco Gerards <metgerards@student.han.nl>
18216 * fs/ext2.c (pupa_ext2_label): New function.
18217 (pupa_ext2_fs): Added label.
18218 * fs/fat.c (pupa_fat_label): New function.
18219 (pupa_fat_fs): Added label.
18220 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
18222 * kern/misc.c (pupa_strndup): New function.
18223 * include/pupa/misc.h (pupa_strndup): New prototype.
18225 * include/pupa/normal.h: Include <pupa/err.h>.
18226 (pupa_set_history): New prototype.
18227 (pupa_iterate_commands): New prototype.
18228 * normal/cmdline.c: Include <pupa/machine/partition.h>,
18229 <pupa/disk.h>, <pupa/file.h>.
18230 (hist_size): New variable.
18231 (hist_lines): Likewise.
18232 (hist_end): Likewise.
18233 (hist_used): Likewise.
18234 (pupa_set_history): New function.
18235 (pupa_history_get): Likewise.
18236 (pupa_history_add): Likewise.
18237 (pupa_history_replace): Likewise.
18238 (pupa_tab_complete): Likewise.
18239 (pupa_cmdline_run): Added tab completion and history buffer. Tab
18240 completion shows partitionnames while completing partitions, this
18241 feature was suggested by Jeff Bailey.
18242 * normal/command.c (pupa_iterate_commands): New function.
18243 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
18244 (pupa_normal_init): Initialize history buffer.
18245 (PUPA_MOD_INIT): Likewise.
18246 (pupa_normal_fini): Free the history buffer.
18247 (PUPA_MOD_FINI): Likewise.
18249 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
18252 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
18253 * configure.ac [i386]: Check for regparam bug.
18254 (NESTED_FUNC_ATTR) [! i386]: Defined.
18256 2003-11-17 Marco Gerards <metgerards@student.han.nl>
18258 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
18259 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
18260 (pupa_emu_SOURCES): New variable.
18261 (pupa_emu_LDFLAGS): Likewise.
18262 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
18263 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
18264 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
18265 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18266 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
18267 (pupa_jmp_buf): New typedef.
18268 (pupa_setjmp) [PUPA_UTIL]: New macro.
18269 (pupa_longjmp) [PUPA_UTIL]: Likewise.
18270 * include/pupa/term.h (struct pupa_term): New member `refresh'.
18271 (pupa_refresh): New prototype.
18272 * include/pupa/util/getroot.h: New file.
18273 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
18275 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
18276 (pupa_rescue_cmd_cat): Likewise.
18277 (pupa_rescue_cmd_ls): Likewise.
18278 (pupa_rescue_cmd_testload): Likewise.
18279 (pupa_rescue_cmd_lsmod): Likewise.
18280 * normal/cmdline.c (pupa_cmdline_get): Likewise.
18281 * normal/menu.c (run_menu): Likewise.
18282 * kern/term.c (pupa_cls): Likewise.
18283 (pupa_refresh): New function.
18284 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
18285 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18286 * util/console.c: New file.
18288 * util/i386/pc/getroot.c: New file.
18289 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
18290 (pupa_putchar): New function.
18291 (pupa_refresh): Likewise.
18292 (xgetcwd): Function moved to ...
18293 (strip_extra_slashes): Likewise.
18294 (get_prefix): Likewise.
18295 * util/i386/pc/getroot.c: ... here.
18296 (find_root_device): Function moved and renamed to...
18297 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
18298 Changed all callers.
18299 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
18301 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
18302 Changed all callers.
18303 * util/misc.c (pupa_memalign): New function.
18304 (pupa_mm_init_region): Likewise.
18305 (pupa_register_exported_symbols): Likewise.
18306 (pupa_putchar): Function removed.
18307 * util/pupa-emu.c: New file.
18309 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
18311 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
18312 (_multiboot_mod_SOURCES): New variable.
18313 (_multiboot_mod_CFLAGS): Likewise.
18314 * loader/i386/pc/multiboot.c: New file.
18315 * include/pupa/i386/pc/multiboot.h: Likewise.
18316 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
18317 (pupa_multiboot_real_boot): New function.
18318 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
18319 (pupa_multiboot_real_boot): New prototype.
18320 (pupa_rescue_cmd_multiboot): Likewise
18321 (pupa_rescue_cmd_module): Likewise.
18323 * kern/loader.c (pupa_loader_set): Continue when
18324 pupa_loader_unload_func() fails.
18325 (pupa_loader_unset): New function.
18326 * include/pupa/loader.h (pupa_loader_unset): New prototype.
18328 * kern/misc.c (pupa_stpcpy): New function.
18329 * include/pupa/misc.h (pupa_stpcpy): New prototype.
18331 2003-11-12 Marco Gerards <metgerards@student.han.nl>
18333 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
18334 for available extensions.
18336 * include/pupa/i386/pc/time.h: New file.
18337 * kern/disk.c: Include <pupa/machine/time.h>.
18338 (PUPA_CACHE_TIMEOUT): New macro.
18339 (pupa_last_time): New variable.
18340 (pupa_disk_open): Flush the cache when there was a timeout.
18341 (pupa_disk_close): Reset the timer.
18342 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18344 * util/misc.c: Include <sys/times.h>
18345 (pupa_get_rtc): New function.
18347 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
18349 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18351 (pupa_ext2_get_file_block): Use blocks member.
18353 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18354 first block. Return -1 instead of pupa_errno on error.
18356 2003-10-27 Marco Gerards <metgerards@student.han.nl>
18358 * README: In the pupa-mkimage example use _chain instead of chain
18359 and ext2 instead of fat.
18360 * TODO: Replace ext2fs with jfs as an example. Add an item for
18361 adding journal playback for ext2fs.
18362 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18363 (pkgdata_MODULES): Added ext2.mod.
18364 (ext2_mod_SOURCES): New variable.
18365 (ext2_mod_CFLAGS): Likewise.
18366 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18367 * include/pupa/misc.h (pupa_strncpy): New prototype.
18368 (pupa_strcat): Likewise.
18369 (pupa_strncmp): Likewise.
18370 * kern/misc.c (pupa_strcat): Enable function.
18371 (pupa_strncpy): New function.
18372 (pupa_strncmp): Likewise.
18373 * fs/ext2.c: New file.
18375 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18376 when the read failed before retrying.
18377 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18378 (_FILE_OFFSET_BITS): Likewise.
18379 * configure.ac: Added AC_SYS_LARGEFILE.
18381 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18383 * genmk.rb (PModule#rule): Make sure to get only symbol names
18384 from the output of nm.
18385 Reported by Robert Millan <zeratul2@wanadoo.es>.
18387 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18389 I forgot to check in these changes for a long time. This adds
18390 incomplete support for VGA console, and this is still very
18391 buggy. Also, a lot of consideration is required for I18N,
18392 UNICODE, and VGA font issues. Therefore, assume that this is
18393 such that "better than nothing".
18395 * font/manager.c: New file.
18396 * include/pupa/font.h: Likewise.
18397 * include/pupa/i386/pc/vga.h: Likewise.
18398 * term/i386/pc/vga.c: Likewise.
18399 * util/unifont2pff.rb: Likewise.
18401 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18402 (pkgdata_MODULES): Added vga.mod and font.mod.
18403 (vga_mod_SOURCES): New variables.
18404 (vga_mod_CFLAGS): Likewise.
18405 (font_mod_SOURCES): Likewise.
18406 (font_mod_CFLAGS): Likewise.
18408 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18410 * include/pupa/term.h: Include pupa/err.h.
18411 (struct pupa_term): Added init and fini.
18412 Changed the argument of putchar to pupa_uint32_t.
18414 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18415 (pupa_console_real_putchar): New prototype.
18416 (pupa_console_putchar): Removed.
18417 (pupa_console_checkkey): Exported.
18418 (pupa_console_getkey): Likewise.
18420 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18423 * kern/term.c (pupa_term_set_current): Rewritten.
18424 (pupa_putchar): Likewise.
18425 (pupa_putcode): New function.
18427 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18428 (pupa_console_real_putchar): ... this.
18429 (pupa_vga_set_mode): New function.
18430 (pupa_vga_get_font): Likewise.
18432 * normal/command.c: Include pupa/term.h.
18433 (terminal_command): New function.
18434 (pupa_command_init): Register the command "terminal".
18436 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18437 (DISP_UP): Likewise.
18438 (DISP_RIGHT): Likewise.
18439 (DISP_DOWN): Likewise.
18440 (DISP_HLINE): Likewise.
18441 (DISP_VLINE): Likewise.
18442 (DISP_UL): Likewise.
18443 (DISP_UR): Likewise.
18444 (DISP_LL): Likewise.
18445 (DISP_LR): Likewise.
18447 * term/i386/pc/console.c (pupa_console_putchar): New function.
18449 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18451 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18452 FIX. Reverse the path_list.
18454 * include/pupa/normal.h: Export pupa_register_command and
18455 pupa_unregister_command.
18457 * hello/hello.c (pupa_cmd_hello): New module.
18458 * conf/i386-pc.rmk: Added hello.mod.
18460 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18462 * kern/i386/pc/lzo1x.S: New file.
18464 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18465 (compress_kernel): New variable.
18466 (generate_image): Heavily modified to support compressing a
18467 large part of the core image.
18469 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18471 (pupa_util_load_image): New function.
18473 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18474 (pupa_compressed_size): New variable.
18475 (codestart): Enable Gate A20 here.
18476 Decompress the compressed part of the core image.
18477 Rearrange the code to put functions and variables which are
18478 required for initialization in the non-compressed part.
18481 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18484 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18486 * include/pupa/i386/pc/kernel.h
18487 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18488 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18489 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18490 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18491 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18493 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18495 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18496 (Utility#rule): Likewise.
18498 * configure.ac: Check if LZO is available.
18500 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18502 * include/pupa/normal.h: New file.
18503 * include/pupa/setjmp.h: Likewise.
18504 * include/pupa/i386/setjmp.h: Likewise.
18505 * normal/cmdline.c: Likewise.
18506 * normal/command.c: Likewise.
18507 * normal/main.c: Likewise.
18508 * normal/menu.c: Likewise.
18509 * normal/i386/setjmp.S: Likewise.
18511 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18512 (pupa_rescue_cmd_initrd): Likewise.
18514 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18517 * kern/i386/pc/startup.S (translation_table): New variable.
18518 (translate_keycode): New function.
18519 (pupa_console_getkey): Call translate_keycode.
18521 * kern/rescue.c (attempt_normal_mode): New function.
18522 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18523 it failed, print a message.
18525 * kern/mm.c (pupa_real_malloc): Print more information when a
18526 free magic is broken.
18527 (pupa_free): If the first free header is not free actually, set
18530 * kern/main.c (pupa_load_normal_mode): Just load the module
18532 (pupa_main): Don't print the message
18533 "Entering into rescue mode..." here.
18535 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18537 (pupa_rescue_cmd_initrd): Likewise.
18538 (pupa_rescue_cmd_initrd): Likewise.
18540 * include/pupa/symbol.h (FUNCTION): Specify the type.
18541 (VARIABLE): Likewise.
18543 * include/pupa/err.h (pupa_err_t): Added
18544 PUPA_ERR_UNKNOWN_COMMAND.
18546 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18547 (pupa_dl_get_prefix): Likewise.
18549 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18550 Added _chain.mod and _linux.mod instead of chain.mod and
18552 (chain_mod_SOURCES): Renamed to ...
18553 (_chain_mod_SOURCES): ... this.
18554 (chain_mod_CFLAGS): Renamed to ...
18555 (_chain_mod_CFLAGS): ... this.
18556 (linux_mod_SOURCES): Renamed to ...
18557 (_linux_mod_SOURCES): ... this.
18558 (linux_mod_CFLAGS): Renamed to ...
18559 (_linux_mod_CFLAGS): ... this.
18560 (normal_mod_SOURCES): New variable.
18561 (normal_mod_CFLAGS): Likewise.
18562 (normal_mod_ASFLAGS): Likewise.
18564 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18566 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18569 * kern/dl.c (pupa_dl_ref): Refer depending modules
18571 (pupa_dl_unref): Unrefer depending modules recursively.
18572 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18573 a module is unloaded before one depending on that module is
18575 (pupa_dl_unload): Unload depending modules explicitly,
18578 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18580 * include/pupa/i386/pc/linux.h: New file.
18581 * loader/i386/pc/linux.c: Likewise.
18583 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18585 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18586 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18587 of PUPA_CHAINLOADER_BOOT_SECTOR.
18589 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18590 (pupa_linux_prot_size): New variable.
18591 (pupa_linux_tmp_addr): Likewise.
18592 (pupa_linux_real_addr): Likewise.
18593 (pupa_linux_boot_zimage): New function.
18594 (pupa_linux_boot_bzimage): Likewise.
18596 * kern/i386/pc/init.c (struct mem_region): New structure.
18597 (MAX_REGIONS): New macro.
18598 (mem_regions): New variable.
18599 (num_regions): Likewise.
18600 (pupa_os_area_addr): Likewise.
18601 (pupa_os_area_size): Likewise.
18602 (pupa_lower_mem): Likewise.
18603 (pupa_upper_mem): Likewise.
18604 (add_mem_region): New function.
18605 (compact_mem_regions): Likewise.
18606 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18607 the size of the conventional memory and that of so-called upper
18608 memory (before the first memory hole).
18609 Instead of adding each found region to free memory, use
18610 add_mem_region and add them after removing overlaps.
18611 Also, add only 1/4 of the upper memory to free memory. The rest
18612 is used for loading OS images. Maybe this is ad hoc, but this
18613 makes it much easier to relocate OS images when booting.
18615 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18616 (pupa_enter_rescue_mode): Don't register initrd and module.
18618 * kern/mm.c: Include pupa/dl.h.
18620 * kern/main.c: Include pupa/file.h and pupa/device.h.
18622 * kern/loader.c (pupa_loader_load_module_func): Removed.
18623 (pupa_loader_load_module): Likewise.
18625 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18628 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18629 (pupa_linux_tmp_addr): Likewise.
18630 (pupa_linux_real_addr): Likewise.
18631 (pupa_linux_boot_zimage): Likewise.
18632 (pupa_linux_boot_bzimage): Likewise.
18634 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18635 (pupa_upper_mem): Likewise.
18636 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18637 module is too dangerous.
18639 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18640 (pupa_os_area_size): Likewise.
18641 (pupa_loader_set): Remove the first argument. Loader doesn't
18642 manage modules or initrd any longer.
18643 (pupa_loader_load_module): Removed.
18645 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18646 (linux_mod_SOURCES): New variable.
18647 (linux_mod_CFLAGS): Likewise.
18649 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18651 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18652 the length of a blocklist correctly.
18654 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18655 Use ioctl only if the OS file is a block device.
18656 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18657 not very useful for normal files.
18659 * kern/main.c (pupa_set_root_dev): New function.
18660 (pupa_load_normal_mode): Likewise.
18661 (pupa_main): Call those above.
18663 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18666 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18668 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18670 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18671 (setup): Configure the installed partition information and the
18674 * loader/i386/pc/chainloader.c (my_mod): New variable.
18675 (pupa_chainloader_unload): New function.
18676 (pupa_rescue_cmd_chainloader): Refer itself.
18677 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18679 * kern/i386/pc/startup.S (install_partition): Removed.
18680 (version_string): Likewise.
18681 (config_file): Likewise.
18682 (pupa_install_dos_part): New variable.
18683 (pupa_install_bsd_part): Likewise.
18684 (pupa_prefix): Likewise.
18685 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18687 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18689 (make_install_device): New function.
18690 (pupa_machine_init): Set the dl prefix.
18692 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18693 (buf): Renamed to ...
18694 (linebuf): ... this.
18695 (pupa_rescue_cmd_prefix): New function.
18696 (pupa_rescue_cmd_insmod): Likewise.
18697 (pupa_rescue_cmd_rmmod): Likewise.
18698 (pupa_rescue_cmd_lsmod): Likewise.
18699 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18702 * kern/mm.c (pupa_memalign): If failed even after invalidating
18703 disk caches, unload unneeded modules and retry.
18705 * kern/misc.c (pupa_memmove): New function.
18706 (pupa_memcpy): Removed.
18707 (pupa_strcpy): New function.
18708 (pupa_itoa): Made static.
18710 * kern/dl.c (pupa_dl_iterate): New function.
18711 (pupa_dl_ref): Likewise.
18712 (pupa_dl_unref): Likewise.
18713 (pupa_dl_unload): Return if succeeded or not.
18714 (pupa_dl_unload_unneeded): New function.
18715 (pupa_dl_unload_all): Likewise.
18716 (pupa_dl_init): Renamed to ...
18717 (pupa_dl_set_prefix): ... this.
18718 (pupa_dl_get_prefix): New function.
18720 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18721 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18722 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18723 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18724 (pupa_install_dos_part): Declared.
18725 (pupa_install_bsd_part): Likewise.
18726 (pupa_prefix): Likewise.
18727 (pupa_boot_drive): Likewise.
18729 * include/pupa/types.h: Fix a typo.
18731 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18733 (pupa_memmove): Declared.
18734 (pupa_strcpy): Likewise.
18736 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18737 pupa_mod_init takes one argument, its own module.
18738 (pupa_dl_unload_unneeded): Declared.
18739 (pupa_dl_unload_all): Likewise.
18740 (pupa_dl_ref): Likewise.
18741 (pupa_dl_unref): Likewise.
18742 (pupa_dl_iterate): Likewise.
18743 (pupa_dl_init): Renamed to ...
18744 (pupa_dl_set_prefix): ... this.
18745 (pupa_dl_get_prefix): Declared.
18747 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18748 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18750 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18751 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18753 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18754 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18756 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18758 * util/i386/pc/pupa-setup.c (setup): Define the internal
18759 function find_first_partition_start at the top level, because GCC
18760 3.0.x cannot compile internal functions in deeper scopes
18762 (find_root_device): Use lstat instead of stat.
18763 Don't follow symbolic links.
18764 Fix the path-constructing code.
18766 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18767 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18768 by a BLKGETSIZE ioctl first, because block devices don't fill
18769 the member st_mode of the structure stat on Linux.
18770 [__linux__] (linux_find_partition): Use a temporary buffer
18771 REAL_DEV for the working space. Copy it to DEV before returning.
18772 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18773 buffer cache consistent.
18774 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18775 strncmp. The previous value was merely wrong.
18776 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18778 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18779 FAT size is 12. The previous value was merely wrong.
18781 * kern/main.c (pupa_main): Don't split the starting message from
18784 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18785 LF, because BIOS goes crazy about character attributes in this
18788 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18790 * include/i386/pc/util/biosdisk.h: New file.
18791 * util/i386/pc/biosdisk.c: Likewise.
18792 * util/i386/pc/pupa-setup.c: Likewise.
18794 * Makefile.in (INCLUDE_DISTFILES): Added
18795 include/pupa/i386/pc/util/biosdisk.h.
18796 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18797 directory util/i386/pc.
18798 (install-local): Added a rule for sbin_UTILITIES.
18799 (uninstall): Likewise.
18801 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18803 * util/misc.c (xrealloc): New function.
18804 (pupa_malloc): Likewise.
18805 (pupa_free): Likewise.
18806 (pupa_realloc): Likewise.
18807 (pupa_stop): Likewise.
18808 (pupa_putchar): Likewise.
18810 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18812 * include/pupa/util/misc.h (xrealloc): Declared.
18814 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18816 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18817 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18819 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18820 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18822 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18823 way should be implemented.
18824 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18826 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18827 the size of NAME for safety.
18828 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18831 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18832 (pupa_setup_SOURCES): Likewise.
18834 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18836 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18838 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18839 bunch of pushl's from pusha, because this destroys the return
18842 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18844 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18845 This means that any missing prototypes could be fatal. Also, you
18846 must take care when writing assembly code. See the comments at
18847 the beginning of startup.S, for more details.
18849 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18850 compilation mechanism.
18851 (pupa_chainloader_real_boot): Likewise.
18852 (pupa_biosdisk_rw_int13_extensions): Likewise.
18853 (pupa_biosdisk_rw_standard): Likewise.
18854 (pupa_biosdisk_check_int13_extensions): Likewise.
18855 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18856 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18857 (pupa_get_memsize): Likewise.
18858 (pupa_get_mmap_entry): Likewise.
18859 (pupa_console_putchar): Likewise.
18860 (pupa_console_setcursor): Likewise.
18861 (pupa_getrtsecs): Use pushl instead of push.
18863 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18864 memory instead of the stack for a mmap entry, because some
18865 BIOSes may ignore the maximum size and overflow.
18867 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18869 * genmk.rb (PModule#rule): Compile automatically generated
18870 sources with module-specific CFLAGS as well as other sources.
18872 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18874 * configure.ac: Check ld.
18875 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18876 respectively, before checking endianness and sizes.
18878 * Makefile.in (LD): New variable.
18880 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18882 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18884 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18886 * Changelog: New file.