1 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
3 * util/grub-mkconfig.in: Remove a wrong `fi'.
5 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
7 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
8 (grub_jfs_uuid): New function.
9 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
11 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
13 * util/grub-mkconfig_lib.in (font_path): Move the functionality
15 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
16 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
18 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
20 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
21 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
24 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
25 not just "vmlinu[zx]".
27 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
30 * util/grub.d/10_linux.in (find_latest): Moved from here ...
31 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
34 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
36 * util/grub.d/10_freebsd.in: Use an absolute device path for
37 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
39 2009-08-06 Felix Zielcke <fzielcke@z-51.de>
41 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
42 handling of multiple abstraction modules.
44 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
46 Fix a bug resulting in black screen when loading Linux using a
49 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
52 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
53 (grub_vbe_bios_getset_dac_palette_width): New function.
54 (grub_vbe_bios_get_dac_palette_width)
55 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
56 grub_vbe_bios_getset_dac_palette_width()).
58 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
59 check for return status.
60 (grub_vbe_get_video_mode_info): When getting information for a packed
61 mode (<= 8 bpp), obtain DAC palette width using
62 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
63 {red,green,blue}_mark_size.
65 2009-08-04 Felix Zielcke <fzielcke@z-51.de>
67 * commands/search.c (options): Fix help output to match actual code.
69 2009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
71 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
74 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
76 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
79 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
81 Support Apple partition map with sector size different from 512 bytes.
83 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
84 (apple_partition_map_iterate): Respect 'aheader.blocksize'
85 and 'apart.partmap_size'.
87 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
88 2009-08-01 Robert Millan <rmh.grub@aybabtu.com>
92 * commands/i386/cpuid.c (options): New variable.
93 (grub_cmd_cpuid): Return real error.
94 (GRUB_MOD_INIT(cpuid)): Declare options.
96 2009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
98 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
101 2009-07-31 Bean <bean123ch@gmail.com>
103 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
105 (grub_fshelp_node): Move inode field to the end.
106 (grub_xfs_data): Remove inode field.
107 (grub_xfs_inode_block): Calculate inode size using sblock.
108 (grub_xfs_inode_offset): Likewise.
109 (grub_xfs_read_inode): Calculate inode size using sblock.
110 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
111 (grub_xfs_iterate_dir): Calculate inode size using sblock.
112 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
114 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
115 not accessible when data is null.
116 (grub_xfs_open): Likewise.
118 2009-07-31 Bean <bean123ch@gmail.com>
120 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
121 Don't change pv->disk if it's already set.
123 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
124 (grub_raid_register): ... here.
125 (grub_raid_rescan): Removed.
127 * include/grub/raid.h (grub_raid_rescan): Removed.
129 * util/grub-fstest.c: Remove include file <grub/raid.h>.
130 (fstest): Replace grub_raid_rescan with module fini function followed
133 * util/grub-probe.c: Add include file <grub/raid.h>.
134 (probe_raid_level): New function.
135 (probe): Detect abstraction by walking the disk device, support two
136 level of abstraction (LVM on RAID) when detecting partition map.
138 2009-07-31 Pavel Roskin <proski@gnu.org>
140 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
141 to grub_zalloc(), it was erroneous.
142 Reported by Bean <bean123ch@gmail.com>
144 2009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
146 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
147 embeding zone, not only the first one.
149 2009-07-29 Joe Auricchio <jauricchio@gmail.com>
151 * term/gfxterm.c (clear_char): New function.
152 (grub_virtual_screen_setup): Use clear_char.
153 (scroll_up): Likewise.
154 (grub_virtual_screen_cls): Likewise.
156 2009-07-29 Felix Zielcke <fzielcke@z-51.de>
158 * util/deviceiter.c (get_acceleraid_disk_name): New static
160 (grub_util_iterate_devices): Handle Accelraid devices.
161 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
163 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
165 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
166 separator for the suggested gfxpayload string (';' collides with the
167 parser and needs escaping).
169 2009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
171 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
172 Clear direction flag before jumping to OS.
173 (grub_multiboot2_real_boot): Likewise.
175 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
177 * util/i386/pc/grub-install: Fix parsing of --disk-module
180 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
182 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
185 2009-07-26 Felix Zielcke <fzielcke@z-51.de>
187 * util/grub-mkconfig.in (package_version): New variable.
188 Use it do display the version.
190 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
192 * kern/file.c (grub_file_open): Revert to previous check with
195 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
197 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
198 from help line. It's out of sync with code.
200 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
202 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
203 entries on failed boot.
205 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
207 * kern/file.c (grub_file_open): Fix an error check.
209 2009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
211 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
212 partition map couldn't be identified.
214 2009-07-23 Pavel Roskin <proski@gnu.org>
216 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
217 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
218 case of little endian words becomes just an optimization.
219 Respect const modifier.
220 (md5_final): Use code that doesn't depend on endianess.
222 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
223 to avoid loss of upper bits if align is unsigned and shorter
226 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
230 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
231 (grub_ufs_uuid): New function.
232 (grub_ufs_fs): add .uuid
234 2009-07-21 Pavel Roskin <proski@gnu.org>
236 * kern/dl.c (grub_dl_check_header): Make static.
238 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
240 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
241 add drivemap for Vista. It breaks Windows 7.
243 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
245 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
248 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
252 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
253 (grub_fstest_SOURCES): Likewise.
254 (pkglib_MODULES): Add befs.mod.
255 (befs_mod_SOURCES): New variable.
256 (befs_mod_CFLAGS): Likewise.
257 (befs_mod_LDFLAGS): Likewise.
258 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
259 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
260 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
261 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
262 (grub_setup_SOURCES): Likewise.
263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
264 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
265 (grub_setup_SOURCES): Likewise.
266 * fs/befs.c: New file.
267 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
268 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
269 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
270 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
271 (B_KEY_INDEX_ALIGN): New declaration.
272 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
273 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
274 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
275 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
276 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
277 (grub_afs_mount) [MODE_BFS]: Likewise.
278 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
279 (grub_afs_fs): Use GRUB_AFS_FSNAME
280 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
281 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
282 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
283 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
285 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
287 * util/getroot.c (find_root_device): Add support for MacOSX.
288 * util/hostdisk.c: Likewise.
290 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
292 * font/font.c (find_glyph): Check whether a font is present to avoid
295 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
297 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
299 2009-07-20 Pavel Roskin <proski@gnu.org>
301 * configure.ac: Trim excessively wordy excuses.
303 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
305 Add symlink, mtime and label support to AtheFS.
307 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
308 (grub_afs_iterate_dir): Handle symlinks.
309 (grub_afs_open): Use grub_afs_read_symlink.
310 (grub_afs_dir): Likewise.
312 (grub_afs_label): New function.
313 (grub_afs_fs): Add grub_afs_label.
314 (grub_afs_read_symlink): New function.
316 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
320 * fs/afs.c: Fix comments style.
321 (grub_afs_blockrun): Declare as packed.
322 (grub_afs_datastream): Likewise.
323 (grub_afs_bnode): Likewise.
324 (grub_afs_btree): Likewise.
325 (grub_afs_sblock): Likewise.
326 Declare `name' as char.
327 (grub_afs_inode): Declare as packed.
328 Change void *vnode to grub_uint32_t unused.
329 (grub_afs_iterate_dir): Check that key_size is positive.
330 (grub_afs_mount): Don't read superblock twice.
331 (grub_afs_dir): Don't free node in case of error,
332 grub_fshelp_find_file already handles this.
333 (grub_afs_open): Likewise.
335 2009-07-19 Pavel Roskin <proski@gnu.org>
337 * Makefile.in: Remove LIBLZO and enable_lzo.
338 * conf/i386-pc.rmk: Remove lzo support.
339 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
340 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
342 * kern/i386/pc/lzo1x.S: Remove.
343 * kern/i386/pc/startup.S: Remove lzo support.
344 * util/i386/pc/grub-mkimage.c: Likewise.
346 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
348 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
349 * fs/xfs.c (grub_xfs_dir): Likewise.
350 * fs/afs.c (grub_afs_dir): Likewise.
351 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
352 (grub_iso9660_open): Likewise.
353 * fs/jfs.c (grub_jfs_open): Likewise.
354 * fs/ext2.c (grub_ext2_dir): Likewise.
355 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
356 * script/sh/lexer.c (grub_script_yylex): Likewise.
358 2009-07-16 Pavel Roskin <proski@gnu.org>
360 * configure.ac: Never add "-c" to CFLAGS.
362 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
364 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
365 grub_cv_cc_efiemu should be used.
367 * configure.ac: Typo fixes.
369 * kern/mm.c (grub_zalloc): New function.
370 (grub_debug_zalloc): Likewise.
371 * include/grub/mm.h: Declare grub_zalloc() and
373 * util/misc.c (grub_zalloc): New function.
374 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
375 instead of grub_malloc(), remove unneeded initializations.
376 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
377 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
378 * commands/parttool.c (grub_cmd_parttool): Likewise.
379 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
380 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
381 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
382 * disk/usbms.c (grub_usbms_finddevs): Likewise.
383 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
384 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
385 (grub_cmd_efiemu_pnvram): Likewise.
386 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
387 * fs/iso9660.c (grub_iso9660_mount): Likewise.
388 (grub_iso9660_iterate_dir): Likewise.
389 * fs/jfs.c (grub_jfs_opendir): Likewise.
390 * fs/ntfs.c (list_file): Likewise.
391 (grub_ntfs_mount): Likewise.
392 * kern/disk.c (grub_disk_open): Likewise.
393 * kern/dl.c (grub_dl_load_core): Likewise.
394 * kern/elf.c (grub_elf_file): Likewise.
395 * kern/env.c (grub_env_context_open): Likewise.
396 (grub_env_set): Likewise.
397 (grub_env_set_data_slot): Likewise.
398 * kern/file.c (grub_file_open): Likewise.
399 * kern/fs.c (grub_fs_blocklist_open): Likewise.
400 * loader/i386/multiboot.c (grub_module): Likewise.
401 * loader/xnu.c (grub_xnu_create_key): Likewise.
402 (grub_xnu_create_value): Likewise.
403 * normal/main.c (grub_normal_add_menu_entry): Likewise.
404 (read_config_file): Likewise.
405 * normal/menu_entry.c (make_screen): Likewise.
406 * partmap/sun.c (sun_partition_map_iterate): Likewise.
407 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
408 * script/sh/script.c (grub_script_parse): Likewise.
409 * video/bitmap.c (grub_video_bitmap_create): Likewise.
410 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
411 * video/readers/png.c (grub_png_output_byte): Likewise.
412 (grub_video_reader_png): Likewise.
414 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
416 Enable all targets that can be built by default
418 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
419 grub-mkfont and grub-fstest if they can be built
421 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
423 Fix hang and segmentation fault in grub-emu-usb
425 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
426 * util/usb.c (grub_libusb_devices): likewise
427 (grub_libusb_init): rename to ...
428 (GRUB_MOD_INIT (libusb)):...this
429 (grub_libusb_fini): rename to ..
430 (GRUB_MOD_FINI (libusb)):...this
431 * disk/usbms.c (grub_usbms_transfer): fix retry logic
432 * include/grub/disk.h (grub_raid_init): removed, it's useless
433 (grub_raid_fini): likewise
434 (grub_lvm_init): likewise
435 (grub_lvm_fini): likewise
436 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
439 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
443 * Makefile.in (LIBUSB): new macro
444 * genmk.rb (Utility/print_tail): new method
445 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
446 (top level): call util.print_tail at the end.
448 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
450 Make FreeBSD accept zpool.cache
452 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
453 type is /boot/zfs/zpool.cache
455 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
459 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
460 correct wrong typedef
461 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
463 2009-07-15 Pavel Roskin <proski@gnu.org>
465 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
466 * kern/disk.c (struct grub_disk_cache): Likewise.
468 * commands/probe.c (options): Typo fix.
470 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
471 Increase to 0x5a to accommodate FAT32. Adjust other offsets
473 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
475 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
476 the end of "Error" to make the message more readable.
478 * boot/i386/pc/boot.S (kernel_segment): Remove.
479 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
482 * boot/i386/pc/boot.S (boot_version): Remove.
483 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
486 * include/grub/i386/pc/boot.h: Sort all offsets.
487 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
488 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
489 * boot/i386/pc/boot.S: Assert location of every offset listed in
490 include/grub/i386/pc/boot.h.
492 2009-07-13 Pavel Roskin <proski@gnu.org>
494 * include/grub/i386/coreboot/machine.h: Rename
495 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
496 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
497 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
499 * kern/dl.c: Force native word size to suppress warnings when
502 * kern/device.c (grub_device_iterate): Change struct part_ent to
503 hold the name, not a pointer to it. Use one grub_malloc() per
504 partition, not two. Free partition_name if grub_malloc() fails.
505 Set ents to NULL only before grub_partition_iterate() is called.
507 2009-07-11 Bean <bean123ch@gmail.com>
509 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
512 2009-07-10 Bean <bean123ch@gmail.com>
513 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
515 * kern/ieee1275/openfw.c (grub_children_iterate)
516 (grub_devalias_iterate): Fix size evaluation for property or path
517 strings, which was broken since r2132.
519 2009-07-07 Pavel Roskin <proski@gnu.org>
521 * commands/search.c (search_file): Merge into ...
522 (search_fs): ... this. Accept search type as argument.
523 (grub_cmd_search): Pass search type to search_fs().
525 * include/grub/util/console.h: New file.
526 * util/console.c: Use it instead of grub/machine/console.h.
527 * util/grub-emu.c: Likewise.
529 * lib/arg.c (find_long_option): Remove.
530 (find_long): Add `len' argument, make `s' const char *.
531 (grub_arg_parse): Parse long options in place, not in a
534 2009-07-06 Pavel Roskin <proski@gnu.org>
536 * commands/search.c (search_fs): Fix potential NULL pointer
539 * commands/search.c (search_fs): Replace QUID macro with quid_fn
542 2009-07-06 Daniel Mierswa <impulze@impulze.org>
544 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
547 2009-07-05 Pavel Roskin <proski@gnu.org>
549 * include/grub/i386/linux.h (struct linux_kernel_params):
550 Restore padding3, it's still needed.
552 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
554 * util/osdetect.lua: Likewise.
556 2009-07-05 Bean <bean123ch@gmail.com>
558 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
560 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
561 (grub_lua_getenv): Likewise.
562 (grub_lua_setenv): Likewise.
563 (save_errno): New function.
564 (push_result): Likewise.
565 (grub_lua_enum_device): Likewise.
566 (grub_lua_enum_file): Likewise.
567 (grub_lua_file_open): Likewise.
568 (grub_lua_file_close): Likewise.
569 (grub_lua_file_seek): Likewise.
570 (grub_lua_file_read): Likewise.
571 (grub_lua_file_getline): Likewise.
572 (grub_lua_file_getsize): Likewise.
573 (grub_lua_file_getpos): Likewise.
574 (grub_lua_file_eof): Likewise.
575 (grub_lua_file_exist): Likewise.
576 (grub_lua_add_menu): Likewise.
578 * script/lua/grub_lua.h (isupper): New inline function.
581 (isxdigit): Likewise.
582 (strcspn): Change to normal function.
583 (strpbkr): New function declaration.
586 * script/lua/grub_main.c (scan_str): New function.
591 * script/lua/linit.c (lualibs): Enable the string library.
593 * util/osdetect.lua: New file.
595 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
597 * include/grub/i386/linux.h (struct linux_kernel_params): Add
598 `capabilities' member.
600 2009-07-02 Pavel Roskin <proski@gnu.org>
602 * genparttoollist.sh: Add missing newline at the end.
604 2009-07-01 Pavel Roskin <proski@gnu.org>
606 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
608 * util/hostdisk.c (open_device): Remove `const' from
609 `sysctl_size', as sysctlbyname() can change it (in this case it
610 doesn't actually happen).
612 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
613 using signed long int constants.
615 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
616 constant to avoid a warning on FreeBSD.
618 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
621 * Makefile.in: Install include/grub/machine symlink.
623 * Makefile.in: When installing symlinks, use "cp -fR", which
624 works on FreeBSD and MacOSX.
625 From Yves Blusseau <cl7m42e02@sneakemail.com>
627 * kern/dl.c (grub_dl_resolve_symbol): Make static.
628 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
630 * util/misc.c: Move grub_reboot() and grub_halt() ...
631 * util/grub-emu.c: ... here. Make main_env static.
632 * include/grub/util/misc.h: Remove main_env.
634 * kern/mm.c: Use correct format to print size_t.
636 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
637 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
638 * kern/powerpc/dl.c: Likewise.
639 * kern/sparc64/dl.c: Likewise.
640 * kern/x86_64/dl.c: Likewise.
642 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
644 Fix grub-emu build on sparc64-ieee1275.
646 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
647 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
649 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
651 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
652 (grub_reboot, grub_halt): New functions.
654 * util/i386/pc/misc.c: Delete. Update all users.
655 * util/sparc64/ieee1275/misc.c: Likewise.
656 * util/powerpc/ieee1275/misc.c: Likewise.
658 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
660 * conf/i386.rmk (setjmp_mod_SOURCES)
661 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
662 * conf/common.rmk (setjmp_mod_SOURCES)
663 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
664 to use $(target_cpu).
665 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
666 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
667 * conf/powerpc-ieee1275.rmk: Likewise.
668 * conf/sparc64-ieee1275.rmk: Likewise.
670 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
671 $(target_cpu) for kern/$(target_cpu)/dl.c.
672 * conf/i386-efi.rmk: Likewise.
673 * conf/i386-ieee1275.rmk: Likewise.
674 * conf/x86_64-efi.rmk: Likewise.
675 * conf/i386-coreboot.rmk: Likewise.
676 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
677 $(target_cpu) for kern/$(target_cpu)/dl.c and for
678 kern/$(target_cpu)/cache.S.
679 * conf/sparc64-ieee1275.rmk: Likewise.
681 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
683 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
684 type to `grub_uint8_t', and adjust `padding9' accordingly.
686 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
688 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
690 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
691 assembly in final jump, using register constraints.
693 (grub_linux_boot): For text mode, initialize `have_vga' using
694 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
696 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
697 right before the final jump.
699 Set `video_mode' to 0x3.
701 Document initialization of `video_page', `video_mode' and
704 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
706 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
707 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
708 and set GRUB_LINUX_FLAG_QUIET appropriately.
710 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
712 Fix build on Debian / sparc.
714 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
716 2009-06-28 Pavel Roskin <proski@gnu.org>
718 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
721 * util/grub.d/10_linux.in: Match SUSE style initrd names.
723 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
725 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
728 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
732 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
733 file can't be opened. grub_file_open() is already supposed to set
734 grub_errno / grub_errmsg appropriately.
735 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
737 2009-06-27 Pavel Roskin <proski@gnu.org>
738 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
740 * include/grub/dl.h: Include grub/elf.h.
741 (struct grub_dl): Add symtab field.
742 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
743 GRUB_MODULES_MACHINE_READONLY.
744 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
745 of the header for read-only modules.
746 (grub_dl_unload): Free mod->symtab for read-only modules.
747 * kern/i386/dl.c: Use mod->symtab.
748 * kern/powerpc/dl.c: Likewise.
749 * kern/sparc64/dl.c: Likewise.
750 * kern/x86_64/dl.c: Likewise.
752 * conf/i386-qemu.rmk: New file.
753 * kern/i386/qemu/startup.S: Likewise.
754 * kern/i386/qemu/mmap.c: Likewise.
755 * boot/i386/qemu/boot.S: Likewise.
756 * include/grub/i386/qemu/time.h: Likewise.
757 * include/grub/i386/qemu/serial.h: Likewise.
758 * include/grub/i386/qemu/kernel.h: Likewise.
759 * include/grub/i386/qemu/console.h: Likewise.
760 * include/grub/i386/qemu/boot.h: Likewise.
761 * include/grub/i386/qemu/init.h: Likewise.
762 * include/grub/i386/qemu/machine.h: Likewise.
763 * include/grub/i386/qemu/loader.h: Likewise.
764 * include/grub/i386/qemu/memory.h: Likewise.
766 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
767 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
768 [qemu] (pkglib_IMAGES): Add `boot.img'.
769 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
770 [qemu] (boot_img_FORMAT): New variables.
771 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
772 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
773 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
774 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
775 [qemu] (kernel_img_FORMAT): New variables.
777 * configure.ac: Recognise `i386-qemu'.
779 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
780 (for no compression).
781 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
782 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
783 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
784 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
787 2009-06-27 Pavel Roskin <proski@gnu.org>
789 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
791 * efiemu/prepare32.c: Likewise.
792 * efiemu/prepare64.c: Likewise.
794 2009-06-26 Pavel Roskin <proski@gnu.org>
796 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
797 * include/grub/elf.h: Define symbols without "32" or "64" based
798 on GRUB_TARGET_WORDSIZE.
799 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
800 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
802 * efiemu/loadcore64.c: Likewise.
803 * loader/i386/bsd32.c: Likewise.
804 * loader/i386/bsd64.c: Likewise.
805 * kern/dl.c: Remove own ELF definitions.
806 * util/i386/efi/grub-mkimage.c: Likewise.
808 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
810 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
811 segment 0x0 unconditionally, because the reference generated by
812 GAS is an absolute address.
814 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
816 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
817 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
819 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
821 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
822 indexes. Check for -f explicitly.
823 (search_file): Improve error message.
824 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
826 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
828 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
829 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
831 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
833 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
834 * conf/i386-ieee1275.rmk: Likewise.
835 * conf/i386-coreboot.rmk: Likewise.
837 * kern/i386/pc/startup.S (grub_stop): Remove function.
838 * kern/i386/ieee1275/startup.S: Likewise.
839 * kern/i386/coreboot/startup.S: Likewise.
840 * kern/i386/misc.S (grub_stop): New function.
842 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
844 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
845 * kern/i386/realmode.S (real_to_prot): ... to here.
847 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
849 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
851 (kernel_elf_SOURCES): Rename to ...
852 (kernel_img_SOURCES): ... this.
853 (kernel_elf_HEADERS): Rename to ...
854 (kernel_img_HEADERS): ... this. Update all users.
855 (kernel_elf_ASFLAGS): Rename to ...
856 (kernel_img_ASFLAGS): ... this.
857 (kernel_elf_CFLAGS): Rename to ...
858 (kernel_img_CFLAGS): ... this.
859 (kernel_elf_LDFLAGS): Rename to ...
860 (kernel_img_LDFLAGS): ... this.
861 * conf/i386-coreboot.rmk: Likewise.
862 * conf/powerpc-ieee1275.rmk: Likewise.
864 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
867 2009-06-21 Pavel Roskin <proski@gnu.org>
869 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
870 to match nested functions.
871 * loader/sparc64/ieee1275/linux.c: Likewise.
873 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
875 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
877 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
880 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
882 Fix asm file handling on ELF, and remove workarounds.
884 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
885 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
886 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
887 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
889 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
893 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
894 and loader/i386/bsd64.c
895 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
896 (FREEBSD_MODTYPE_ELF_MODULE): New definition
897 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
898 (grub_freebsd_load_elfmodule32): New declaration
899 (grub_freebsd_load_elfmoduleobj64): Likewise
900 (grub_freebsd_load_elf_meta32): Likewise
901 (grub_freebsd_load_elf_meta64): Likewise
902 (grub_freebsd_add_meta): Likewise
903 (grub_freebsd_add_meta_module): Likewise
904 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
905 (grub_freebsd_add_meta_module): Likewise and move module-specific
906 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
907 (grub_cmd_freebsd): Add elf-kernel specific parts
908 based on grub_freebsd_add_meta_module
909 (grub_cmd_freebsd_module): Add type parsing moved from
910 grub_freebsd_add_meta_module
911 (grub_cmd_freebsd_module_elf): New function
912 (cmd_freebsd_module_elf): New variable
913 (GRUB_MOD_INIT): Register freebsd_module_elf
914 * loader/i386/bsd32.c: New file
915 * loader/i386/bsd64.c: Likewise
916 * loader/i386/bsdXX.c: Likewise
917 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
918 (grub_elf64_load): Likewise
919 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
921 (grub_elf64_load_hook_t): Likewise
923 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
925 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
927 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
928 don't write a menu entry for recovery mode.
930 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
932 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
933 after it's no longer needed.
935 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
937 * include/grub/i386/loader.h (grub_linux_prot_size)
938 (grub_linux_tmp_addr, grub_linux_real_addr)
939 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
941 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
942 common grub_util_info() call to ...
943 (generate_image): ... here.
944 Fix use of uninitialized memory, comparison of signed with
945 unsigned integers and memory leak.
946 Remove bogus module address message.
948 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
950 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
952 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
954 2009-06-19 Pavel Roskin <proski@gnu.org>
956 * configure.ac: Remove stray AC_MSG_CHECKING.
958 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
960 * disk/scsi.c (grub_scsi_open): use continue instead of big if
962 2009-06-18 Pavel Roskin <proski@gnu.org>
964 * conf/common.rmk: Add fs_file.mod.
965 * disk/fs_file.c: New file.
966 * include/grub/disk.h (enum grub_disk_dev_id): Add
967 GRUB_DISK_DEVICE_FILE_ID.
969 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
971 Fix build with Apple's toolchain. Part 2
973 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
976 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
978 Fix build with Apple's toolchain. Part 1
980 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
982 * configure.ac: remove a leftover AC_MSG_RESULT
983 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
986 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
990 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
991 (decomp_block): initialize ch
992 use grub_memcpy instead of memcpy
994 2009-06-17 Pavel Roskin <proski@gnu.org>
996 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
997 version, use declarations needed to use vga_text as the startup
1000 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1001 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1003 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1004 and grub_at_keyboard_fini(), it's done on module load and
1007 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
1009 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1010 file can't be found.
1011 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1013 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1015 Fix newline handling
1017 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1018 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1019 (grub_script_yylex): don't segfault on unterminated script
1020 newline terminates command and variable
1022 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1024 avoid double grub_adjust_range call. Bug reported by David Simner
1026 * kern/disk.c (grub_disk_write): change to raw disk access before
1029 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
1031 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1032 spaces, for the benefit of help2man.
1033 * util/i386/efi/grub-mkimage.c (usage): Likewise.
1035 2009-06-16 Pavel Roskin <proski@gnu.org>
1037 * kern/i386/halt.c: Include grub/machine/init.h.
1038 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1040 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
1042 * util/grub.d/30_os-prober.in: Use ${root} in the generated
1045 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
1047 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1050 2009-06-16 Pavel Roskin <proski@gnu.org>
1052 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
1053 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
1054 save %dx, we only need %dl and we never change it.
1055 * boot/i386/pc/cdboot.S: Don't set the root drive.
1056 * boot/i386/pc/pxeboot.S: Likewise.
1057 * include/grub/i386/pc/boot.h: Remove
1058 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1059 GRUB_BOOT_MACHINE_DRIVE_CHECK.
1060 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1061 * kern/i386/pc/init.c (make_install_device): Remove references
1063 * kern/i386/pc/startup.S: Likewise.
1064 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1066 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1070 * commands/xnu_uuid.c: new file
1071 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
1072 (xnu_uuid_mod_SOURCES): new variable
1073 (xnu_uuid_mod_CFLAGS): likewise
1074 (xnu_uuid_mod_LDFLAGS): likewise
1075 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1076 * conf/i386-ieee1275.rmk: likewise
1077 * conf/i386-pc.rmk: likewise
1078 * conf/powerpc-ieee1275.rmk: likewise
1079 * conf/sparc64-ieee1275.rmk: likewise
1080 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1082 2009-06-16 Pavel Roskin <proski@gnu.org>
1084 * configure.ac: Avoid '==' in test command, it's not portable.
1086 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1090 * commands/probe.c: new file
1091 * conf/common.rmk (pkglib_MODULES): add probe.mod
1092 (probe_mod_SOURCES): new variable
1093 (probe_mod_CFLAGS): likewise
1094 (probe_mod_LDFLAGS): likewise
1095 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1096 * conf/i386-ieee1275.rmk: likewise
1097 * conf/i386-pc.rmk: likewise
1098 * conf/powerpc-ieee1275.rmk: likewise
1099 * conf/sparc64-ieee1275.rmk: likewise
1101 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
1103 Fix handling of string like \"hello\" and "a
1106 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1107 (grub_script_yylex): fix parsing of quoting, escaping and newline
1109 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
1111 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
1114 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
1116 * util/grub-mkconfig.in: Fix parsing of --output option.
1118 2009-06-12 Pavel Roskin <proski@gnu.org>
1120 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
1121 genmk.rb don't need to be generated or installed.
1123 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
1125 * commands/i386/pc/drivemap_int13h.S: add more comments
1127 2009-06-11 Pavel Roskin <proski@gnu.org>
1129 * Makefile.in (uninstall): Uninstall manuals.
1131 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1132 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
1133 and update-grub_lib in two places.
1134 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1136 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1139 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1140 `entry_lo' to fix variable shadowing.
1142 2009-06-11 Christian Franke <franke@computer.org>
1144 * kern/misc.c (__enable_execute_stack): Add missing return type
1145 to prevent gcc warning.
1147 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1149 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1151 2009-06-11 Pavel Roskin <proski@gnu.org>
1153 * Makefile.in: Don't rely on any scripts being executable.
1154 Always use $(SHELL) to run shell scripts.
1156 * configure.ac: Always define ___main if using -nostdlib. This
1157 fixes tests on Cygwin.
1159 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1163 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
1164 is in bytes and not in blocks
1166 2009-06-11 Pavel Roskin <proski@gnu.org>
1168 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1171 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1173 * util/grub.d/30_os-prober.in: Fix a comment. Source
1174 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1175 to set the root device. Place drivemap command in the generated
1178 2009-06-11 Pavel Roskin <proski@gnu.org>
1180 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1181 have long been resolved.
1183 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
1185 * util/grub.d/10_linux.in: Capitalise "Linux".
1187 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1189 2009-06-11 Pavel Roskin <proski@gnu.org>
1191 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1192 fix a gcc warning and ensure that the function won't ever exit.
1194 * kern/i386/ieee1275/init.c: Add missing prototype for
1197 * loader/ieee1275/multiboot2.c [__i386__]: Include
1198 grub/cpu/multiboot.h.
1200 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1201 casts to short - they are not portable and cause warnings. Fix
1202 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1204 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1208 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1210 (grub_get_root_biosnumber_saved): new variable
1211 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1212 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
1213 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
1214 %dx after the call if necessary
1215 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1216 (boot_mod_SOURCES): remove
1217 (boot_mod_CFLAGS): remove
1218 (boot_mod_LDFLAGS): remove
1219 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1220 (boot_mod_SOURCES): new variable
1221 (boot_mod_CFLAGS): likewise
1222 (boot_mod_LDFLAGS): likewise
1223 * conf/i386-efi.rmk: likewise
1224 * conf/i386-ieee1275.rmk: likewise
1225 * conf/i386-pc.rmk: likewise
1226 * conf/powerpc-ieee1275.rmk: likewise
1227 * conf/sparc64-ieee1275.rmk: likewise
1228 * conf/x86_64-efi.rmk: likewise
1229 * include/grub/i386/pc/biosnum.h: new file
1230 * lib/i386/pc/biosnum.c: likewise
1231 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1232 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1233 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1235 2009-06-10 Pavel Roskin <proski@gnu.org>
1237 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1238 Use separate variables. Read only the file size at the end, but
1239 not the checksum that we don't use.
1241 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1244 * kern/ieee1275/openfw.c: Remove libc includes.
1245 * kern/ieee1275/cmain.c: Likewise.
1246 * include/grub/ieee1275/ieee1275.h: Likewise.
1248 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1251 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1253 * Makefile.in: Remove all trailing whitespace.
1254 * conf/i386-pc.rmk: Likewise.
1255 * conf/powerpc-ieee1275.rmk: Likewise.
1256 * conf/sparc64-ieee1275.rmk: Likewise.
1257 * docs/grub.texi: Likewise.
1258 * docs/texinfo.tex: Likewise.
1259 * disk/fs_uuid.c: Likewise.
1260 * disk/lvm.c: Likewise.
1261 * disk/scsi.c: Likewise.
1262 * disk/ata.c: Likewise.
1263 * disk/ieee1275/ofdisk.c: Likewise.
1264 * disk/i386/pc/biosdisk.c: Likewise.
1265 * disk/host.c: Likewise.
1266 * disk/raid.c: Likewise.
1267 * disk/efi/efidisk.c: Likewise.
1268 * disk/usbms.c: Likewise.
1269 * disk/memdisk.c: Likewise.
1270 * disk/loopback.c: Likewise.
1271 * kern/powerpc/dl.c: Likewise.
1272 * kern/device.c: Likewise.
1273 * kern/dl.c: Likewise.
1274 * kern/sparc64/dl.c: Likewise.
1275 * kern/ieee1275/ieee1275.c: Likewise.
1276 * kern/term.c: Likewise.
1277 * kern/fs.c: Likewise.
1278 * kern/i386/dl.c: Likewise.
1279 * kern/i386/pc/startup.S: Likewise.
1280 * kern/i386/pc/init.c: Likewise.
1281 * kern/i386/pc/mmap.c: Likewise.
1282 * kern/i386/pc/lzo1x.S: Likewise.
1283 * kern/i386/ieee1275/init.c: Likewise.
1284 * kern/i386/realmode.S: Likewise.
1285 * kern/i386/tsc.c: Likewise.
1286 * kern/partition.c: Likewise.
1287 * kern/corecmd.c: Likewise.
1288 * kern/file.c: Likewise.
1289 * kern/efi/efi.c: Likewise.
1290 * kern/efi/init.c: Likewise.
1291 * kern/efi/mm.c: Likewise.
1292 * kern/main.c: Likewise.
1293 * kern/err.c: Likewise.
1294 * kern/env.c: Likewise.
1295 * kern/disk.c: Likewise.
1296 * kern/generic/millisleep.c: Likewise.
1297 * kern/generic/rtc_get_time_ms.c: Likewise.
1298 * kern/misc.c: Likewise.
1299 * kern/parser.c: Likewise.
1300 * genmk.rb: Likewise.
1301 * configure.ac: Likewise.
1302 * boot/i386/pc/diskboot.S: Likewise.
1303 * boot/i386/pc/pxeboot.S: Likewise.
1304 * boot/i386/pc/boot.S: Likewise.
1305 * boot/i386/pc/lnxboot.S: Likewise.
1306 * boot/i386/pc/cdboot.S: Likewise.
1307 * parttool/pcpart.c: Likewise.
1308 * video/readers/tga.c: Likewise.
1309 * video/video.c: Likewise.
1310 * video/bitmap.c: Likewise.
1311 * lib/envblk.c: Likewise.
1312 * lib/i386/setjmp.S: Likewise.
1313 * fs/xfs.c: Likewise.
1314 * fs/afs.c: Likewise.
1315 * fs/fat.c: Likewise.
1316 * fs/ntfs.c: Likewise.
1317 * fs/udf.c: Likewise.
1318 * fs/affs.c: Likewise.
1319 * fs/iso9660.c: Likewise.
1320 * fs/hfs.c: Likewise.
1321 * fs/fshelp.c: Likewise.
1322 * fs/ext2.c: Likewise.
1323 * fs/jfs.c: Likewise.
1324 * fs/reiserfs.c: Likewise.
1325 * fs/hfsplus.c: Likewise.
1326 * fs/minix.c: Likewise.
1327 * fs/cpio.c: Likewise.
1328 * fs/sfs.c: Likewise.
1329 * fs/ufs.c: Likewise.
1330 * efiemu/prepare.c: Likewise.
1331 * efiemu/loadcore_common.c: Likewise.
1332 * efiemu/runtime/efiemu.sh: Likewise.
1333 * efiemu/runtime/efiemu.S: Likewise.
1334 * efiemu/runtime/efiemu.c: Likewise.
1335 * efiemu/pnvram.c: Likewise.
1336 * efiemu/main.c: Likewise.
1337 * efiemu/i386/pc/cfgtables.c: Likewise.
1338 * efiemu/i386/loadcore64.c: Likewise.
1339 * efiemu/i386/loadcore32.c: Likewise.
1340 * efiemu/loadcore.c: Likewise.
1341 * efiemu/symbols.c: Likewise.
1342 * efiemu/mm.c: Likewise.
1343 * include/grub/autoefi.h: Likewise.
1344 * include/grub/datetime.h: Likewise.
1345 * include/grub/term.h: Likewise.
1346 * include/grub/hfs.h: Likewise.
1347 * include/grub/lvm.h: Likewise.
1348 * include/grub/i386/tsc.h: Likewise.
1349 * include/grub/i386/linux.h: Likewise.
1350 * include/grub/i386/xnu.h: Likewise.
1351 * include/grub/i386/efiemu.h: Likewise.
1352 * include/grub/i386/pc/biosdisk.h: Likewise.
1353 * include/grub/i386/pc/memory.h: Likewise.
1354 * include/grub/i386/pc/vbe.h: Likewise.
1355 * include/grub/parttool.h: Likewise.
1356 * include/grub/video.h: Likewise.
1357 * include/grub/memory.h: Likewise.
1358 * include/grub/fs.h: Likewise.
1359 * include/grub/partition.h: Likewise.
1360 * include/grub/xnu.h: Likewise.
1361 * include/grub/efi/api.h: Likewise.
1362 * include/grub/efi/pe32.h: Likewise.
1363 * include/grub/efi/memory.h: Likewise.
1364 * include/grub/multiboot.h: Likewise.
1365 * include/grub/usbdesc.h: Likewise.
1366 * include/grub/multiboot2.h: Likewise.
1367 * include/grub/acpi.h: Likewise.
1368 * include/grub/efiemu/efiemu.h: Likewise.
1369 * include/grub/disk.h: Likewise.
1370 * include/grub/ieee1275/ieee1275.h: Likewise.
1371 * include/grub/net.h: Likewise.
1372 * include/grub/machoload.h: Likewise.
1373 * include/grub/macho.h: Likewise.
1374 * include/multiboot.h: Likewise.
1375 * genmoddep.awk: Likewise.
1376 * normal/main.c: Likewise.
1377 * normal/menu_entry.c: Likewise.
1378 * normal/menu_viewer.c: Likewise.
1379 * normal/completion.c: Likewise.
1380 * normal/cmdline.c: Likewise.
1381 * normal/misc.c: Likewise.
1382 * normal/datetime.c: Likewise.
1383 * bus/usb/usbtrans.c: Likewise.
1384 * bus/usb/ohci.c: Likewise.
1385 * bus/usb/uhci.c: Likewise.
1386 * bus/usb/usb.c: Likewise.
1387 * mmap/efi/mmap.c: Likewise.
1388 * mmap/i386/pc/mmap_helper.S: Likewise.
1389 * mmap/i386/pc/mmap.c: Likewise.
1390 * mmap/i386/mmap.c: Likewise.
1391 * mmap/i386/uppermem.c: Likewise.
1392 * mmap/mmap.c: Likewise.
1393 * commands/acpi.c: Likewise.
1394 * commands/echo.c: Likewise.
1395 * commands/blocklist.c: Likewise.
1396 * commands/loadenv.c: Likewise.
1397 * commands/usbtest.c: Likewise.
1398 * commands/boot.c: Likewise.
1399 * commands/parttool.c: Likewise.
1400 * commands/search.c: Likewise.
1401 * commands/cat.c: Likewise.
1402 * commands/i386/pc/play.c: Likewise.
1403 * commands/i386/pc/drivemap.c: Likewise.
1404 * commands/i386/pc/vbeinfo.c: Likewise.
1405 * commands/i386/pc/acpi.c: Likewise.
1406 * commands/i386/pc/vbetest.c: Likewise.
1407 * commands/ls.c: Likewise.
1408 * commands/cmp.c: Likewise.
1409 * commands/test.c: Likewise.
1410 * commands/efi/acpi.c: Likewise.
1411 * commands/gptsync.c: Likewise.
1412 * commands/help.c: Likewise.
1413 * partmap/amiga.c: Likewise.
1414 * partmap/apple.c: Likewise.
1415 * partmap/acorn.c: Likewise.
1416 * partmap/pc.c: Likewise.
1417 * partmap/sun.c: Likewise.
1418 * partmap/gpt.c: Likewise.
1419 * script/sh/lexer.c: Likewise.
1420 * script/sh/function.c: Likewise.
1421 * font/font.c: Likewise.
1422 * font/font_cmd.c: Likewise.
1423 * loader/powerpc/ieee1275/linux.c: Likewise.
1424 * loader/efi/chainloader.c: Likewise.
1425 * loader/multiboot_loader.c: Likewise.
1426 * loader/macho.c: Likewise.
1427 * loader/i386/multiboot.c: Likewise.
1428 * loader/i386/linux.c: Likewise.
1429 * loader/i386/pc/linux.c: Likewise.
1430 * loader/i386/pc/multiboot2.c: Likewise.
1431 * loader/i386/pc/chainloader.c: Likewise.
1432 * loader/i386/pc/xnu.c: Likewise.
1433 * loader/i386/bsd_trampoline.S: Likewise.
1434 * loader/i386/efi/linux.c: Likewise.
1435 * loader/i386/multiboot_elfxx.c: Likewise.
1436 * loader/i386/bsd_helper.S: Likewise.
1437 * loader/i386/bsd.c: Likewise.
1438 * loader/i386/linux_trampoline.S: Likewise.
1439 * loader/i386/xnu_helper.S: Likewise.
1440 * loader/i386/xnu.c: Likewise.
1441 * loader/i386/bsd_pagetable.c: Likewise.
1442 * loader/i386/multiboot_helper.S: Likewise.
1443 * loader/xnu.c: Likewise.
1444 * loader/xnu_resume.c: Likewise.
1445 * io/gzio.c: Likewise.
1446 * term/efi/console.c: Likewise.
1447 * term/terminfo.c: Likewise.
1448 * term/ieee1275/ofconsole.c: Likewise.
1449 * term/i386/pc/serial.c: Likewise.
1450 * term/i386/pc/vesafb.c: Likewise.
1451 * term/i386/pc/vga.c: Likewise.
1452 * term/usb_keyboard.c: Likewise.
1453 * term/gfxterm.c: Likewise.
1454 * aclocal.m4: Likewise.
1455 * util/lvm.c: Likewise.
1456 * util/grub.d/30_os-prober.in: Likewise.
1457 * util/grub.d/10_hurd.in: Likewise.
1458 * util/console.c: Likewise.
1459 * util/grub-macho2img.c: Likewise.
1460 * util/grub-probe.c: Likewise.
1461 * util/hostfs.c: Likewise.
1462 * util/i386/pc/grub-mkimage.c: Likewise.
1463 * util/i386/pc/grub-setup.c: Likewise.
1464 * util/i386/efi/grub-mkimage.c: Likewise.
1465 * util/grub-mkconfig.in: Likewise.
1466 * util/raid.c: Likewise.
1467 * util/resolve.c: Likewise.
1468 * util/grub-mkdevicemap.c: Likewise.
1469 * util/grub-emu.c: Likewise.
1470 * util/getroot.c: Likewise.
1471 * util/hostdisk.c: Likewise.
1472 * util/usb.c: Likewise.
1473 * util/grub-editenv.c: Likewise.
1474 * util/misc.c: Likewise.
1476 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1478 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1479 `genparttoollist.sh'.
1480 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1481 Add `*.sh' to the list find searches for and change `mdate.sh'
1484 2009-06-10 Pavel Roskin <proski@gnu.org>
1486 * include/grub/multiboot2.h: Provide compatibility defines for
1488 * include/multiboot2.h: Include stdint.h only if needed, using
1490 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1492 * loader/ieee1275/multiboot2.c: Likewise.
1493 * loader/multiboot2.c: Likewise.
1494 * loader/multiboot_loader.c: Likewise.
1496 * configure.ac: Use -nostdlib when probing for the target. It
1497 should not be required to have libc for the target.
1499 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1500 they fail without libc headers for the target.
1501 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1503 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1504 preprocessor conditionals.
1506 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1507 build system doesn't need to be aware of the tar.c internals.
1509 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1511 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1513 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1515 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1516 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1518 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1520 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1521 aren't available if ata.mod gets used.
1523 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1525 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1526 initialising controller.
1527 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1529 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1531 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1532 to choose between ata and biosdisk module on i386-pc.
1534 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1536 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1537 Subclass and Programming Interface fields in terms of the 3 byte
1538 Class Code register.
1539 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1541 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1542 interface is OHCI. Add grub_dprintf for symmetry with
1544 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1545 interface is UHCI. Add interf variable for programming
1546 interface. Print interface with class/subclass.
1548 * bus/usb/ohci.c: Set interf with correct field.
1550 * bus/usb/uhci.c: Remove unneeded doubled lines.
1551 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1552 Remove whitespace inside comment.
1554 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1556 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1557 as fallback an equivalent option without depth.
1559 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1561 Not fail if unable to retrieve C/H/S on LBA disks
1563 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1564 if unable to retrieve C/H/S on LBA disks
1566 2009-06-08 Pavel Roskin <proski@gnu.org>
1568 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1571 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1573 * Makefile.in (uninstall): Remove all $lib_DATA files.
1575 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1577 Bugfix: install on partitionless device
1579 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1582 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1584 * Makefile.in (uninstall): Remove all $include_DATA files.
1586 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1588 * commands/true.c: New file. Implement the true and false commands.
1589 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1590 (true_mod_SOURCES): New variable.
1591 (true_mod_CFLAGS): Likewise.
1592 (true_mod_LDFLAGS): Likewise.
1594 2009-06-05 Colin D Bennett <colin@gibibit.com>
1596 Optimized font character lookup using binary search instead of linear
1597 search. Fonts now are required to have the character index ordered by
1600 * font/font.c (load_font_index): Verify that fonts have ordered
1602 (find_glyph): Use binary search instead of linear search to find a
1603 character in a font.
1605 2009-06-05 Michael Scherer <misc@mandriva.org>
1607 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1608 uses case sensitive btree.
1609 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1610 only for case insensitive filesystems.
1612 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1614 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1615 * conf/common.rmk (search_mod_CFLAGS): likewise
1617 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1619 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1620 compensate a compiler bug
1622 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1624 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1627 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1629 Definitions for creating asm symbols with Apple's CC
1631 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1632 [APPLE_CC] (VARIABLE): likewise
1634 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1636 Disable lnxboot.img when compiled
1639 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1640 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1641 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1642 [! APPLE_CC] (CODE_LENG): skip
1643 [! APPLE_CC] (setup_sects): likewise
1644 [! APPLE_CC]: skip filling
1646 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1648 Address in trampolines based on 32-bit registers when compiled
1651 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1653 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1655 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1657 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1659 * kern/misc.c [APPLE_CC] (memcpy): new function
1660 [APPLE_CC] (memmove): likewise
1661 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1662 (memcpy): define alias conditionally on !APPLE_CC
1665 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1666 APPLE_CC are defined
1667 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1668 (grub_assert_fail): make prototype conditional
1670 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1672 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1674 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1676 (CLEANFILES): add grub-macho2img
1677 (grub_macho2img_SOURCES): new variable
1678 * kern/i386/pc/startup.S (bss_start): new variable
1680 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1681 * util/grub-macho2img.c: new file
1683 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1685 Use objconv when compiling with Apple's CC
1687 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1688 (efiemu64.o): likewise
1689 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1690 when compiling with Apple's CC
1691 (efiemu64_s.o): likewise
1692 * configure.ac: check for objconv when compiling with Apple's CC
1693 * genmk.rb: use objconv for modules when compiled with Apple's CC
1695 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1697 Define segment as well as section when compiling with
1700 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1701 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1702 (efiemu_convert_pointer): likewise
1703 (efiemu_set_virtual_address_map): likewise
1704 (efiemu_convert_pointer): likewise
1705 (efiemu_getcrc32): likewise
1706 (init_crc32_table): likewise
1708 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1709 (GRUB_MOD_DEP): likewise
1711 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1713 Allow a compilation without -mcmodel=large
1715 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1716 when compiled without -mcmodel=large
1717 (filter_memory_map): remove memory post 4 GiB when compiled
1718 without -mcmodel=large
1719 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1720 TARGET_CFLAGS when -mcmodel=large isn't supported
1722 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1724 Remove nested functions in efiemu core
1726 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1728 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1730 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1732 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1734 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1736 (grub_cpu_is_tsc_supported): likewise
1737 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1739 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1741 Absolute addressing through constant with Apple's cc
1743 * kern/i386/pc/startup.S: Define necessary constants
1744 and address through it when using ABS with Apple's CC
1745 * boot/i386/pc/diskboot.S: likewise
1746 * boot/i386/pc/boot.S: likewise
1747 * boot/i386/pc/lnxboot.S: likewise
1748 * boot/i386/pc/cdboot.S: likewise
1749 * mmap/i386/pc/mmap_helper.S: likewise
1750 * commands/i386/pc/drivemap_int13h.S: likewise
1752 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1754 Check if compiler is apple cc
1756 * Makefile.in (ASFLAGS): new variable
1757 (TARGET_ASFLAGS): likewise
1758 (TARGET_MODULE_FORMAT): likewise
1759 (TARGET_APPLE_CC): likewise
1761 (TARGET_IMG_CFLAGS): likewise
1762 (TARGET_CPPFLAGS): add includedir
1763 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1764 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1765 Check for linker script only if compiler isn't Apple's CC
1766 (TARGET_MODULE_FORMAT): set
1767 (TARGET_APPLE_CC): likewise
1768 (TARGET_ASFLAGS): likewise
1770 Check for objcopy only if compiler isn't Apple's CC
1771 Check for BSS symbol only if compiler isn't Apple's CC
1772 * genmk.rb: adapt nm options if we use Apple's utils
1773 * aclocal.m4 (grub_apple_cc): new test
1774 (grub_apple_target_cc): likewise
1776 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1778 Simplify sed expressions and improve awk
1780 * Makefile.in (install-local): simplify sed expression
1781 * gencmdlist.sh: likewise
1782 * genmoddep.awk: avoid adding module as a dependency of itself
1784 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1786 Add missing start symbols
1788 * boot/i386/pc/boot.S: add start
1789 * boot/i386/pc/pxeboot.S: likewise
1791 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1793 Fix wrong assumptions with grub-mkimage on EFI
1795 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1796 (relocate_addresses): consider both r_addend and value at offset
1797 (make_mods_section): zerofill modinfo and header
1798 (convert_elf): write prefix here
1800 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1802 Use .asciz instead of .string
1804 * i386/pc/diskboot.S: use .asciz instead of .string
1805 * i386/pc/boot.S: likewise
1806 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1807 (GRUB_MOD_NAME): likewise
1809 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1813 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1814 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1815 (grub_video_setup): remove
1816 (grub_video_set_mode): new prototype
1817 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1819 (linux_vesafb_res): compile only on PCBIOS
1820 (grub_linux_boot): support gfxpayload
1821 * loader/i386/pc/xnu.c (video_hook): new function
1822 (grub_xnu_set_video): support gfxpayload
1823 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1824 (DEFAULT_VIDEO_HEIGHT): likewise
1825 (DEFAULT_VIDEO_FLAGS): likewise
1826 (DEFAULT_VIDEO_MODE): new definition
1827 (video_hook): new function
1828 (grub_gfxterm_init): use grub_video_set_mode
1829 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1831 * video/video.c (grub_video_setup): removed
1832 (grub_video_set_mode): new function based on grub_gfxterm_init and
1835 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1837 Avoid calling biosdisk in drivemap
1839 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1840 (revparse_biosdisk): likewise
1841 (list_mappings): derive name from id directly
1842 (grub_cmd_drivemap): use tryparse_diskstring
1844 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1848 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1849 (grub_lexer_param): add tokenonhold
1850 (grub_script_create_cmdline): remove cmdline. All callers updated
1851 (grub_script_function_create): make functionname
1852 grub_script_arg. All callers updated
1853 (grub_script_execute_argument_to_string): new prototype
1854 * kern/parser.c (state_transitions): reorder
1855 (grub_parser_cmdline_state): fix a bug and make more compact
1856 * script/sh/execute.c (grub_script_execute_argument_to_string):
1858 (grub_script_execute_cmdline): use new format
1859 * script/sh/function.c (grub_script_function_create): make functionname
1860 grub_script_arg. All callers updated
1861 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1862 (grub_script_yylex): remove
1863 (grub_script_yylex2): renamed to ...
1864 (grub_script_yylex): ...renamed
1865 parse the expressions like a${b}c
1866 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1867 (GRUB_PARSER_TOKEN_VAR): remove
1868 (GRUB_PARSER_TOKEN_NAME): likewise
1869 ("if"): declare as typeless
1871 ("function"): likewise
1876 (argument): likewise
1877 (script): accept empty scripts and make exit on error
1878 (arguments): use GRUB_PARSER_TOKEN_ARG
1879 (function): likewise
1880 (command): move error handling to script
1881 (menuentry): move grub_script_lexer_ref before
1882 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1883 argument. All callers updated
1885 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1887 Prevent GRUB from probing floppies during boot.
1889 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1890 * commands/search.c (options): Add --no-floppy.
1891 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1892 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1893 --no-floppy when searching for UUIDs.
1895 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1897 Simplify the code duplication in commands/search.c.
1899 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1900 (search_fs): ... this. Update all users.
1902 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1904 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1906 2009-05-28 Pavel Roskin <proski@gnu.org>
1908 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1909 Remove the original symlink explicitly.
1911 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1912 just one slash. That's how grub_fshelp_find_file() does it.
1914 2009-05-26 Pavel Roskin <proski@gnu.org>
1916 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1919 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1922 2009-05-25 Christian Franke <franke@computer.org>
1924 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1926 (grub_atapi_identify): Add wait after drive select.
1927 (grub_ata_identify): Do more strict status register check before
1928 calling grub_atapi_identify (). Suppress error message if status
1929 register is 0x00 after command failure. Add status register
1930 check after PIO read to avoid bogus identify due to stuck DRQ.
1931 Thanks to Pavel Roskin for testing.
1932 (grub_device_initialize): Remove unsafe status register check.
1933 Thanks to 'phcoder' for problem report and patch.
1934 Prevent sign extension in debug message.
1936 2009-05-23 Colin D Bennett <colin@gibibit.com>
1938 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1939 definition file, and functions defined in `normal/menu.c' have had
1940 their prototypes moved to `include/grub/menu.h' for consistency.
1942 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1944 (grub_menu_get_entry): Likewise.
1945 (grub_menu_get_timeout): Likewise.
1946 (grub_menu_set_timeout): Likewise.
1947 (grub_menu_execute_entry): Likewise.
1948 (grub_menu_execute_with_fallback): Likewise.
1949 (grub_menu_entry_run): Likewise.
1951 * include/grub/normal.h: Re-ordered and grouped function
1952 prototypes by file that the function is defined in.
1953 (grub_menu_execute_callback): Removed; moved to menu.h.
1954 (grub_menu_get_entry): Likewise.
1955 (grub_menu_get_timeout): Likewise.
1956 (grub_menu_set_timeout): Likewise.
1957 (grub_menu_execute_entry): Likewise.
1958 (grub_menu_execute_with_fallback): Likewise.
1959 (grub_menu_entry_run): Likewise.
1960 (grub_menu_addentry): Renamed from this ...
1961 (grub_normal_add_menu_entry): ... to this.
1963 * normal/main.c (grub_menu_addentry): Renamed from this ...
1964 (grub_normal_add_menu_entry): ... to this.
1966 * script/sh/execute.c (grub_script_execute_menuentry): Update
1967 reference to renamed grub_menu_addentry function.
1969 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1971 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1973 2009-05-22 Pavel Roskin <proski@gnu.org>
1975 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1976 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1977 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1978 compiling for the i386 targets, but not for the utilities.
1980 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1982 (grub_root_drive): Likewise.
1983 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1985 (grub_root_drive): Change size to byte.
1986 (grub_start_addr): Remove.
1987 (grub_end_addr): Likewise.
1988 (grub_apm_bios_info): Likewise.
1990 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1992 * normal/i386: Remove.
1993 * normal/powerpc: Likewise.
1994 * normal/sparc64: Likewise.
1995 * normal/x86_64: Likewise.
1997 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1999 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2000 * loader/i386/linux_trampoline.S: Fix indentation
2001 * loader/i386/xnu_helper.S: Likewise
2003 2009-05-18 Colin D Bennett <colin@gibibit.com>
2005 Display error messages when parsing a Lua statement fails.
2006 Previously, executing a syntactically invalid statement like
2007 ")foo" or "bar;" would silently fail.
2009 * script/lua/grub_main.c (handle_lua_error): New function.
2010 (grub_lua_parse_line): Improved reporting of Lua parser and
2013 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2015 Remove -Werror which causes build to fail on some systems
2017 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2018 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2019 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2021 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2023 trampoline for linux on 64-bit platform
2025 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2026 loader/i386/efi/linux_trampoline.S
2027 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2029 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2031 * loader/i386/linux_trampoline.S: moved here
2032 * loader/i386/efi/linux.c (allocate_pages): reserve space for
2034 (jumpvector): removed
2035 (grub_linux_trampoline_start): new declaration
2036 (grub_linux_trampoline_end): likewise
2037 (grub_linux_boot): use trampoline when on 64-bit platform
2038 * loader/i386/linux.c: likewise
2040 2009-05-16 Pavel Roskin <proski@gnu.org>
2042 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2043 const to avoid a warning.
2044 (grub_lua_setenv): Likewise.
2045 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2046 lmsg to fix a warning.
2048 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2050 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2051 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2052 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2053 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2054 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2055 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2056 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2057 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2059 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2061 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2063 2009-05-16 Bean <bean123ch@gmail.com>
2065 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2066 (lua_mod_SOURCES): New variable.
2067 (lua_mod_CFLAGS): Likewise.
2068 (lua_mod_LDFLAGS): Likewise.
2070 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
2071 (setjmp_mod_SOURCES): New variable.
2072 (setjmp_mod_CFLAGS): Likewise.
2073 (setjmp_LDFLAGS): Likewise.
2075 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
2076 (setjmp_mod_SOURCES): New variable.
2077 (setjmp_mod_CFLAGS): Likewise.
2078 (setjmp_LDFLAGS): Likewise.
2080 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2081 (setjmp_mod_SOURCES): New variable.
2082 (setjmp_mod_CFLAGS): Likewise.
2083 (setjmp_LDFLAGS): Likewise.
2085 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2086 (setjmp_mod_SOURCES): New variable.
2087 (setjmp_mod_CFLAGS): Likewise.
2088 (setjmp_LDFLAGS): Likewise.
2090 * normal/i386/setjmp.S: Moved from here ...
2091 * lib/i386/setjmp.S: ... Moved here
2092 * normal/x86_64/setjmp.S: Moved from here ...
2093 * lib/x86_64/setjmp.S: ... Moved here
2094 * normal/powerpc/setjmp.S: Moved from here ...
2095 * lib/powerpc/setjmp.S: ... Moved here
2096 * normal/sparc64/setjmp.S: Moved from here ...
2097 * lib/sparc64/setjmp.S: ... Moved here
2099 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
2100 returns_twice in mingw.
2102 * script/lua/grub_lib.c: New file.
2103 * script/lua/grub_lib.h: Likewise.
2104 * script/lua/grub_lua.h: Likewise.
2105 * script/lua/grub_main.c: Likewise.
2106 * script/lua/lapi.c: Likewise.
2107 * script/lua/lapi.h: Likewise.
2108 * script/lua/lauxlib.c: Likewise.
2109 * script/lua/lauxlib.h: Likewise.
2110 * script/lua/lbaselib.c: Likewise.
2111 * script/lua/lcode.c: Likewise.
2112 * script/lua/lcode.h: Likewise.
2113 * script/lua/ldblib.c: Likewise.
2114 * script/lua/ldebug.c: Likewise.
2115 * script/lua/ldebug.h: Likewise.
2116 * script/lua/ldo.c: Likewise.
2117 * script/lua/ldo.h: Likewise.
2118 * script/lua/ldump.c: Likewise.
2119 * script/lua/lfunc.c: Likewise.
2120 * script/lua/lfunc.h: Likewise.
2121 * script/lua/lgc.c: Likewise.
2122 * script/lua/lgc.h: Likewise.
2123 * script/lua/linit.c: Likewise.
2124 * script/lua/liolib.c: Likewise.
2125 * script/lua/llex.c: Likewise.
2126 * script/lua/llex.h: Likewise.
2127 * script/lua/llimits.h: Likewise.
2128 * script/lua/lmathlib.c: Likewise.
2129 * script/lua/lmem.c: Likewise.
2130 * script/lua/lmem.h: Likewise.
2131 * script/lua/loadlib.c: Likewise.
2132 * script/lua/lobject.c: Likewise.
2133 * script/lua/lobject.h: Likewise.
2134 * script/lua/lopcodes.c: Likewise.
2135 * script/lua/lopcodes.h: Likewise.
2136 * script/lua/loslib.c: Likewise.
2137 * script/lua/lparser.c: Likewise.
2138 * script/lua/lparser.h: Likewise.
2139 * script/lua/lstate.c: Likewise.
2140 * script/lua/lstate.h: Likewise.
2141 * script/lua/lstring.c: Likewise.
2142 * script/lua/lstring.h: Likewise.
2143 * script/lua/lstrlib.c: Likewise.
2144 * script/lua/ltable.c: Likewise.
2145 * script/lua/ltable.h: Likewise.
2146 * script/lua/ltablib.c: Likewise.
2147 * script/lua/ltm.c: Likewise.
2148 * script/lua/ltm.h: Likewise.
2149 * script/lua/lua.h: Likewise.
2150 * script/lua/luaconf.h: Likewise.
2151 * script/lua/lualib.h: Likewise.
2152 * script/lua/lundump.c: Likewise.
2153 * script/lua/lundump.h: Likewise.
2154 * script/lua/lvm.c: Likewise.
2155 * script/lua/lvm.h: Likewise.
2156 * script/lua/lzio.c: Likewise.
2157 * script/lua/lzio.h: Likewise.
2159 2009-05-16 Bean <bean123ch@gmail.com>
2161 * include/grub/kernel.h (grub_module_header_types): Add type
2164 * kern/main.c (grub_load_config): New function.
2165 (grub_main): Call grub_load_config to read boot config.
2167 * grub-mkimage (generate_image): New parameter config_path.
2168 (options): New option --config.
2169 (main): Parse --config option, and pass it to generate_image.
2171 2009-05-14 Christian Franke <franke@computer.org>
2173 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
2174 This fixes build on Cygwin.
2176 2009-05-14 Pavel Roskin <proski@gnu.org>
2178 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
2179 jump. This saves two bytes, so the typical case of 2 swapped
2180 drives would fit 32 bytes.
2182 2009-05-13 Pavel Roskin <proski@gnu.org>
2184 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
2185 grub_uint32_t to avoid a warning.
2187 * loader/i386/linux.c (allocate_pages): When assigning
2188 real_mode_mem, cast through grub_size_t to fix a warning. The
2189 code already makes sure that the value would fit a pointer.
2190 (grub_linux_setup_video): Cast render_target->data to
2191 grub_size_t to fix a warning.
2193 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
2195 * commands/i386/pc/drivemap.c: New file - implement drivemap
2197 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
2198 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
2200 2009-05-13 Pavel Roskin <proski@gnu.org>
2202 * util/i386/pc/grub-setup.c (setup): Remove unused variable
2203 embedding_area_exists.
2205 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
2207 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
2208 it easier to understand / work with.
2209 Improve warning messages for cases where there's no embedding area,
2210 or when it is too small (or core.img too large).
2212 2009-05-13 Pavel Roskin <proski@gnu.org>
2214 * loader/i386/pc/multiboot2.c: Add necessary includes for
2215 grub_multiboot2_real_boot().
2217 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
2218 PX record is always little-endian. We only need the lower 2
2221 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
2222 facilitate code reuse.
2223 (grub_cpio_mount): Use "struct head", not a char buffer. This
2224 fixes a warning reported by gcc 4.4.
2226 * kernel/disk.c (grub_disk_read): Use void pointer for the
2228 (grub_disk_write): Use const void pointer for the buffer.
2229 Adjust all callers. Remove unnecessary casts.
2231 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
2233 * util/i386/pc/grub-install.in: Update copyright year.
2235 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2239 * commands/gptsync.c: new file
2240 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
2241 (gptsync_mod_SOURCES): new variable
2242 (gptsync_mod_CFLAGS): likewise
2243 (gptsync_mod_LDFLAGS): likewise
2244 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2246 (GRUB_PC_PARTITION_TYPE_HFS): likewise
2247 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
2248 * conf/i386-ieee1275.rmk: likewise
2249 * conf/i386-pc.rmk: likewise
2250 * conf/powerpc-ieee1275.rmk: likewise
2252 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2256 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
2257 (grub_dl_ref): likewise
2259 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
2261 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
2262 split in two functions (one for msdos and one for gpt).
2264 2009-05-08 Pavel Roskin <proski@gnu.org>
2266 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
2269 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
2270 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
2271 Initialize them with -1. Add sanity check for bad1. Eliminate
2274 2009-05-08 David S. Miller <davem@davemloft.net>
2276 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
2278 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
2280 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
2283 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
2285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2286 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
2288 2009-05-05 David S. Miller <davem@davemloft.net>
2290 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
2292 2009-05-05 Pavel Roskin <proski@gnu.org>
2294 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
2295 of grub_dl_ref() and grub_dl_unref().
2296 * commands/parttool.c: Remove preprocessor conditionals around
2297 grub_dl_ref() and grub_dl_unref().
2298 * fs/affs.c: Likewise.
2299 * fs/afs.c: Likewise.
2300 * fs/cpio.c: Likewise.
2301 * fs/ext2.c: Likewise.
2302 * fs/fat.c: Likewise.
2303 * fs/hfs.c: Likewise.
2304 * fs/hfsplus.c: Likewise.
2305 * fs/iso9660.c: Likewise.
2306 * fs/jfs.c: Likewise.
2307 * fs/minix.c: Likewise.
2308 * fs/ntfs.c: Likewise.
2309 * fs/reiserfs.c: Likewise.
2310 * fs/sfs.c: Likewise.
2311 * fs/udf.c: Likewise.
2312 * fs/ufs.c: Likewise.
2313 * fs/xfs.c: Likewise.
2314 * include/grub/dl.h: Likewise.
2315 * loader/xnu.c: Likewise.
2317 2009-05-04 Pavel Roskin <proski@gnu.org>
2319 * commands/acpi.c: Remove unused variable my_mod.
2320 * partmap/amiga.c: Likewise.
2321 * partmap/apple.c: Likewise.
2322 * partmap/gpt.c: Likewise.
2323 * partmap/pc.c: Likewise.
2324 * partmap/sun.c: Likewise.
2325 * term/gfxterm.c: Likewise.
2326 * term/i386/pc/vesafb.c: Likewise.
2327 * term/i386/pc/vga.c: Likewise.
2329 2009-05-04 David S. Miller <davem@davemloft.net>
2331 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
2332 pointer args to grub_ieee1275_get_property().
2334 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
2336 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
2337 devices, and do not traverse down under controller nodes.
2339 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
2340 (grub_ofdisk_open): Use it to un-escape "," characters.
2341 * kern/disk.c (find_part_sep): New.
2342 (grub_disk_open): Use it to find the first non-escaped ','
2343 character in the disk name.
2344 * util/ieee1275/devicemap.c (escape_of_path): New.
2345 (grub_util_emit_devicemap_entry): Use it.
2346 * util/sparc64/ieee1275/grub-install.in: Update script to
2347 strip partition specifiers properly by not triggering on
2348 '\' escaped ',' characters.
2350 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2352 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2354 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2356 (linux_vesafb_modes): Add a lot of additional modes to the list (based
2357 on documentation from Wikipedia).
2359 2009-05-04 Pavel Roskin <proski@gnu.org>
2361 * disk/ata.c: Spelling fixes.
2362 * disk/raid.c: Likewise.
2363 * disk/usbms.c: Likewise.
2364 * disk/dmraid_nvidia.c: Likewise.
2365 * kern/ieee1275/openfw.c: Likewise.
2366 * kern/ieee1275/init.c: Likewise.
2367 * kern/ieee1275/cmain.c: Likewise.
2368 * boot/i386/pc/cdboot.S: Likewise.
2369 * video/readers/png.c: Likewise.
2370 * video/i386/pc/vbe.c: Likewise.
2371 * fs/udf.c: Likewise.
2372 * fs/hfs.c: Likewise.
2373 * fs/reiserfs.c: Likewise.
2374 * efiemu/runtime/efiemu.c: Likewise.
2375 * efiemu/main.c: Likewise.
2376 * efiemu/mm.c: Likewise.
2377 * include/grub/elf.h: Likewise.
2378 * include/grub/xnu.h: Likewise.
2379 * include/grub/usbdesc.h: Likewise.
2380 * include/grub/usb.h: Likewise.
2381 * include/grub/script_sh.h: Likewise.
2382 * include/grub/lib/LzmaEnc.h: Likewise.
2383 * include/grub/efiemu/efiemu.h: Likewise.
2384 * include/grub/command.h: Likewise.
2385 * normal/menu.c: Likewise.
2386 * normal/main.c: Likewise.
2387 * normal/datetime.c: Likewise.
2388 * bus/usb/uhci.c: Likewise.
2389 * mmap/i386/uppermem.c: Likewise.
2390 * mmap/mmap.c: Likewise.
2391 * commands/acpi.c: Likewise.
2392 * commands/test.c: Likewise.
2393 * partmap/apple.c: Likewise.
2394 * font/font.c: Likewise.
2395 * loader/sparc64/ieee1275/linux.c: Likewise.
2396 * loader/macho.c: Likewise.
2397 * loader/i386/bsd_trampoline.S: Likewise.
2398 * loader/i386/bsd.c: Likewise.
2399 * loader/xnu.c: Likewise.
2400 * term/i386/pc/vesafb.c: Likewise.
2401 * term/usb_keyboard.c: Likewise.
2402 * util/resolve.c: Likewise.
2403 * util/getroot.c: Likewise.
2405 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2407 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2409 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2411 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2414 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2416 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2417 parameter only available on BIOS.
2419 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2421 Removed wrong semicolon in declaration
2423 * grub/misc.h (grub_dprintf): remove semicolon
2425 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2427 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2428 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2429 is done by grub_cmd_linux() now).
2430 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2431 restore video to text mode.
2432 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2433 indicates lack of "vga=" parameter. "vga=0" is mapped to
2434 `GRUB_LINUX_VID_MODE_NORMAL'.
2436 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2438 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2439 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2440 and `normal/script.c'. Add `kern/rescue_reader.c',
2441 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
2442 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2443 `grub_script.tab.c'.
2445 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2446 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2447 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2448 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2449 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2451 * Makefile.in: Remove duplicated 2008 in Copyright line.
2453 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2455 * util/misc.c (grub_util_warn): New function. Emits a warning
2457 * include/grub/util/misc.h (grub_util_warn): New declaration.
2459 * util/i386/pc/grub-install.in: Understand --force and pass it down
2462 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2464 (setup): Improve error messages and add warnings when requested to
2465 install in odd layouts. Refuse to install using blocklists unless
2468 2009-05-04 martin f. krafft <madduck@madduck.net>
2470 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2472 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2474 Updated copyright year
2476 * fs/hfsplus.c: updated copyright year
2478 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2482 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2483 in the space previously used by unused3
2484 (grub_hfsplus_uuid): new function
2485 (grub_hfsplus_fs): added uuid field
2487 2009-05-03 Pavel Roskin <proski@gnu.org>
2489 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2490 suppress warnings. It's no longer needed.
2491 * disk/host.c: Likewise.
2492 * disk/ata_pthru.c: Likewise.
2493 * disk/loopback.c: Likewise.
2494 * hook/datehook.c: Likewise.
2495 * parttool/pcpart.c: Likewise.
2496 * fs/i386/pc/pxe.c: Likewise.
2497 * fs/ntfscomp.c: Likewise.
2498 * efiemu/main.c: Likewise.
2499 * mmap/mmap.c: Likewise.
2500 * commands/crc.c: Likewise.
2501 * commands/hexdump.c: Likewise.
2502 * commands/hdparm.c: Likewise.
2503 * commands/acpi.c: Likewise.
2504 * commands/echo.c: Likewise.
2505 * commands/minicmd.c: Likewise.
2506 * commands/blocklist.c: Likewise.
2507 * commands/memrw.c: Likewise.
2508 * commands/loadenv.c: Likewise.
2509 * commands/usbtest.c: Likewise.
2510 * commands/lsmmap.c: Likewise.
2511 * commands/boot.c: Likewise.
2512 * commands/parttool.c: Likewise.
2513 * commands/configfile.c: Likewise.
2514 * commands/search.c: Likewise.
2515 * commands/ieee1275/suspend.c: Likewise.
2516 * commands/cat.c: Likewise.
2517 * commands/i386/pc/pxecmd.c: Likewise.
2518 * commands/i386/pc/play.c: Likewise.
2519 * commands/i386/pc/halt.c: Likewise.
2520 * commands/i386/pc/vbeinfo.c: Likewise.
2521 * commands/i386/pc/vbetest.c: Likewise.
2522 * commands/lspci.c: Likewise.
2523 * commands/date.c: Likewise.
2524 * commands/handler.c: Likewise.
2525 * commands/ls.c: Likewise.
2526 * commands/test.c: Likewise.
2527 * commands/cmp.c: Likewise.
2528 * commands/efi/loadbios.c: Likewise.
2529 * commands/efi/fixvideo.c: Likewise.
2530 * commands/halt.c: Likewise.
2531 * commands/help.c: Likewise.
2532 * commands/reboot.c: Likewise.
2533 * hello/hello.c: Likewise.
2534 * script/sh/main.c: Likewise.
2535 * loader/xnu.c: Likewise.
2536 * term/terminfo.c: Likewise.
2537 * term/i386/pc/serial.c: Likewise.
2538 * term/usb_keyboard.c: Likewise.
2540 2009-05-03 David S. Miller <davem@davemloft.net>
2542 * normal/menu.c: Include grub/parser.h
2544 2009-05-03 Pavel Roskin <proski@gnu.org>
2546 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2548 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2549 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2551 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2552 efiemu??.o doesn't exist.
2553 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2556 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2558 FreeBSD 64-bit support
2560 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2561 and loader/i386/bsd_trampoline.S
2562 (bsd_mod_ASFLAGS): new variable
2563 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2564 (FREEBSD_MODTYPE_KERNEL64): likewise
2565 (grub_bsd64_trampoline_start): likewise
2566 (grub_bsd64_trampoline_end): likewise
2567 (grub_bsd64_trampoline_selfjump): likewise
2568 (grub_bsd64_trampoline_gdt): likewise
2569 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2570 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2571 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2572 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2573 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2575 * loader/i386/bsd_pagetable.c: new file
2576 * loader/i386/bsd_trampoline.S: likewise
2577 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2578 (ALIGN_VAR): likewise
2579 (entry_hi): new variable
2580 (kern_end_mdofs): likewise
2581 (is_64bit): likewise
2582 (grub_freebsd_add_meta): use ALIGN_VAR
2583 (grub_e820_mmap): new declaration
2584 (grub_freebsd_add_mmap): new function
2585 (grub_freebsd_add_meta_module): support 64 bit kernels
2586 (grub_freebsd_list_modules): use ALIGN_VAR
2587 (gdt_descriptor): new declaration
2588 (grub_freebsd_boot): support 64 bit kernels
2589 (grub_bsd_elf64_hook): new function
2590 (grub_bsd_load_elf): support elf64
2592 2009-05-03 Bean <bean123ch@gmail.com>
2594 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2595 after we get the result of if statement.
2597 2009-05-03 Bean <bean123ch@gmail.com>
2599 * Makefile.in (enable_efiemu): New variable.
2601 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2603 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2605 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2606 path, add -mno-red-zone option.
2607 (efiemu64_s.o): Likewise.
2608 (efiemu64.o): Use macro $^ for source file.
2610 * configure.ac (--enable-efiemu): New option.
2612 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2616 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2617 (pkglib_MODULES): add xnu.mod
2618 (xnu_mod_SOURCES): new variable
2619 (xnu_mod_CFLAGS): likewise
2620 (xnu_mod_LDFLAGS): likewise
2621 (xnu_mod_ASFLAGS): likewise
2622 * conf/i386-pc.rmk: likewise
2623 * conf/x86_64-efi.rmk: likewise
2624 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2626 * include/grub/i386/macho.h: new file
2627 * include/grub/i386/xnu.h: likewise
2628 * include/grub/macho.h: likewise
2629 * include/grub/machoload.h: likewise
2630 * include/grub/x86_64/macho.h: likewise
2631 * include/grub/x86_64/xnu.h: likewise
2632 * include/grub/xnu.h: likewise
2633 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2634 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2635 * loader/i386/efi/xnu.c: new file
2636 * loader/i386/pc/xnu.c: likewise
2637 * loader/i386/xnu.c: likewise
2638 * loader/i386/xnu_helper.S: likewise
2639 * loader/macho.c: likewise
2640 * loader/xnu.c: likewise
2641 * loader/xnu_resume.c: likewise
2642 * util/grub-dumpdevtree: likewise
2643 * include/grub/i386/pit.h: include grub/err.h
2644 (grub_pit_wait): export
2645 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2647 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2651 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2652 _linux_efi, linux_efi.
2653 new files in grub-emu
2654 new targets efiemu32.o and efiemu64.o
2655 * loader/linux_normal_efiemu.c: likewise
2656 * loader/i386/efi/linux.c: added preliminary efiemu support
2657 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2659 * include/grub/autoefi.h: new file
2660 * include/grub/i386/efiemu.h: likewise
2661 * include/grub/i386/pc/efiemu.h: likewise
2662 * include/grub/efi/api.h: add LL suffix when necessary
2663 new definitions relating to tables
2664 * include/grub/efiemu/efiemu.h: new file
2665 * include/grub/efiemu/runtime.h: likewise
2666 * efiemu/prepare.c: likewise
2667 * efiemu/loadcore_common.c: likewise
2668 * efiemu/loadcore64.c: likewise
2669 * efiemu/runtime/efiemu.sh: likewise
2670 * efiemu/runtime/efiemu.S: likewise
2671 * efiemu/runtime/efiemu.c: likewise
2672 * efiemu/runtime/config.h: likewise
2673 * efiemu/prepare32.c: likewise
2674 * efiemu/main.c: likewise
2675 * efiemu/modules/pnvram.c: likewise
2676 * efiemu/modules/i386: likewise
2677 * efiemu/modules/i386/pc: likewise
2678 * efiemu/modules/acpi.c: likewise
2679 * efiemu/i386/pc/cfgtables.c: likewise
2680 * efiemu/i386/loadcore64.c: likewise
2681 * efiemu/i386/loadcore32.c: likewise
2682 * efiemu/prepare64.c: likewise
2683 * efiemu/loadcore.c: likewise
2684 * efiemu/symbols.c: likewise
2685 * efiemu/mm.c: likewise
2686 * efiemu/loadcore32.c: likewise
2688 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2692 * commands/acpi.c: new file
2693 * commands/i386/pc/acpi.c: likewise
2694 * commands/efi/acpi.c: likewise
2695 * include/grub/acpi.h: likewise
2696 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2697 (acpi_mod_SOURCES): new variable
2698 (acpi_mod_CFLAGS): likewise
2699 (acpi_mod_LDFLAGS): likewise
2700 * conf/i386-efi.rmk: likewise
2701 * conf/x86_64-efi.rmk: likewise
2703 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2705 Missing part from mmap patch
2707 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2708 (grub_mmap_unregister)
2709 (grub_mmap_free_and_unregister): use grub_mmap_register
2711 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2715 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2716 * loader/i386/linux.c (find_mmap_size): likewise
2717 (allocate_pages): likewise
2718 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2719 (grub_fill_multiboot_mmap): likewise
2720 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2721 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2722 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2723 (OPENBSD_MMAP_RESERVED): likewise
2724 * include/grub/i386/pc/memory.h: include grub/memory.h
2725 (grub_lower_mem): removed
2726 (grub_upper_mem): likewise
2727 (GRUB_MACHINE_MEMORY_ACPI): new definition
2728 (GRUB_MACHINE_MEMORY_NVS): likewise
2729 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2730 (GRUB_MACHINE_MEMORY_HOLE): likewise
2731 (grub_machine_mmap_register): likewise
2732 (grub_machine_mmap_unregister): likewise
2733 (grub_machine_get_upper): likewise
2734 (grub_machine_get_lower): likewise
2735 (grub_machine_get_post64): likewise
2736 * include/grub/i386/efi/memory.h: new file
2737 * include/grub/x86_64/efi/memory.h: likewise
2738 * include/grub/efi/memory.h: likewise
2739 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2740 (mmap_mod_SOURCES): new variable
2741 (mmap_mod_LDFLAGS): likewise
2742 (mmap_mod_ASFLAGS): likewise
2743 * conf/i386-coreboot.rmk: likewise
2744 * conf/i386-ieee1275.rmk: likewise
2745 * conf/i386-efi.rmk: likewise
2746 * conf/x86_64-efi.rmk: likewise
2747 * include/grub/types.h (UINT_TO_PTR): new macro
2748 (PTR_TO_UINT32): likewise
2749 (PTR_TO_UINT64): likewise
2750 * include/grub/memory.h: new file
2751 * mmap/i386/pc/mmap.c: likewise
2752 * mmap/i386/pc/mmap_helper.S: likewise
2753 * mmap/i386/uppermem.c: likewise
2754 * mmap/mmap.c: likewise
2755 * mmap/efi/mmap.c: likewise
2756 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2758 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2759 (grub_upper_mem): likewise
2760 (grub_machine_init): don't use grub_upper_mem,
2761 make grub_lower_mem local
2762 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2763 grub_mmap_iterate and grub_mmap_get_upper
2764 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2766 2009-05-02 Bean <bean123ch@gmail.com>
2768 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2770 (pkglib_MODULES): Add normal.mod and sh.mod.
2771 (normal_SOURCES): New variable.
2772 (normal_mod_CFLAGS): Likewise.
2773 (normal_mod_LDFLAGS): Likewise.
2774 (sh_mod_SOURCES): Likewise.
2775 (sh_mod_CFLAGS): Likewise.
2776 (sh_mod_LDFLAGS): Likewise.
2778 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2779 script/sh/lexer.c_DEPENDENCIES.
2780 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2781 kern/rescue_reader.c and kern/rescue_parser.c.
2782 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2783 (grub_emu_SOURCES): Change source files.
2784 (pkglib_MODULES): Remove normal.mod.
2785 (normal_SOURCES): Removed.
2786 (normal_mod_CFLAGS): Likewise.
2787 (normal_mod_LDFLAGS): Likewise.
2788 * conf/i386-coreboot.rmk: Likewise.
2789 * conf/i386-efi.rmk: Likewise.
2790 * conf/i386-ieee1276.rmk: Likewise.
2791 * conf/powerpc-ieee1275.rmk: Likewise.
2792 * conf/sparc64-ieee1275.rmk: Likewise.
2793 * conf/x86_64-efi.rmk: Likewise.
2795 * include/grub/command.h (grub_command_execute): New inline function.
2797 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2799 * include/grub/normal.h: Remove <grub/setjmp.h>.
2800 (grub_fs_module_list): Moved to normal/autofs.c.
2801 (grub_exit_env): Removed.
2802 (grub_command_execute): Likewise.
2803 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2805 (read_command_list): New function declaration.
2806 (read_fs_list): Likewise.
2808 * include/parser.h: Include <grub/reader.h>.
2809 (grub_parser_split_cmdline): Change type of getline parameter.
2810 (grub_parser): New structure.
2811 (grub_parser_class): New variable.
2812 (grub_parser_execute): New function declaration.
2813 (grub_register_rescue_parser): Likewise.
2814 (grub_parser_register): New inline function.
2815 (grub_parser_unregister): Likewise.
2816 (grub_parser_get_current): Likewise.
2817 (grub_parser_set_current): Likewise.
2819 * include/grub/reader.h: New file.
2820 * kern/reader.c: Likewise.
2821 * kern/rescue_parser.c: Likewise.
2822 * kern/rescue_reader.c: Likewise.
2823 * normal/autofs.c: Likewise.
2824 * normal/dyncmd.c: Likewise.
2826 * include/grub/rescue.h: Removed.
2827 * normal/command.h: Likewise.
2829 * include/grub/script.h: Moved to ...
2830 * include/grub/script_sh.h: ... Moved here.
2831 * normal/execute.c: Moved to ...
2832 * script/sh/execute.c: ... Moved here.
2833 * normal/function.c: Moved to ...
2834 * script/sh/function.c: ... Moved here.
2835 * normal/lexer.c: Moved to ...
2836 * script/sh/lexer.c: ... Moved here.
2837 * normal/parser.y: Moved to ...
2838 * script/sh/parser.y: ... Moved here.
2839 * normal/script.c: Moved to ...
2840 * script/sh/script.c: ... Moved here.
2842 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2844 (grub_exit_env): Removed.
2845 (fs_module_list): Moved to normal/autofs.c.
2846 (grub_file_getline): Don't handle comment here.
2847 (free_menu): Skip removed field entry->commands.
2848 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2850 (read_config_file): Removed nested parameter, change getline function.
2851 (grub_enter_normal_mode): Removed.
2852 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2853 (read_command_list): Likewise.
2854 (autoload_fs_module): Moved to normal/autofs.c.
2855 (read_fs_list): Likewise.
2856 (reader_nested): New variable.
2857 (grub_normal_execute): Run parser.sh to switch to sh parser.
2858 (grub_cmd_rescue): Removed.
2859 (cmd_normal): Removed.
2860 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2862 (grub_cmdline_run): New function.
2863 (grub_normal_reader_init): Likewise.
2864 (grub_normal_read_line): Likewise.
2865 (grub_env_write_pager): Likewise.
2866 (cmdline): New variable.
2867 (grub_normal_reader): Likewise.
2868 (GRUB_MOD_INIT): Register normal reader and set as current, register
2869 pager hook, register normal command with grub_register_command_prio,
2870 so that it won't show up in command.lst.
2871 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2872 grub_fs_autoload_hook.
2874 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2875 (grub_menu_execute_entry): Replace grub_script_execute with
2876 grub_parser_execute, change parameter to grub_command_execute.
2878 * normal/menu_text.c: Remove <grub/script.h>.
2880 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2881 and <grub/parser.h>.
2882 (run): Change editor_getline to use new parser interface. Change
2883 parameter to grub_command_execute.
2885 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2886 <grub/reader.h> and <grub/parser.h>.
2887 (grub_load_normal_mode): Execute normal command.
2888 (grub_main): Call grub_register_core_commands,
2889 grub_register_rescue_parser and grub_register_rescue_reader, use
2890 grub_reader_loop to enter input loop.
2892 * kern/parser.c (grub_parser_split_cmdline): Change type of
2894 (grub_parser_class): New variable.
2895 (grub_parser_execute): New function.
2897 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2898 * loader/multiboot2.c: Likewise.
2899 * loader/sparc64/ieee1275/linux.c: Likewise.
2901 * util/grub-emu.c (read_command_list): New dummy function.
2903 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2905 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2906 count to 16 for CCISS and IDA.
2908 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2910 * normal/menu_text.c (grub_wait_after_message): Print a newline
2911 after waiting for user input.
2913 * loader/i386/linux.c: Include `<grub/normal.h>'.
2914 (grub_cmd_linux): Improve the error message about `ask' mode, by
2915 waiting for user input so it's not missed (we can do this, since
2916 user requested interaction).
2918 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2920 Added missing lst to grub-mkrescue
2922 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2923 and ${input_dir}/parttool.lst
2925 2009-04-30 David S. Miller <davem@davemloft.net>
2927 * util/hostdisk.c (device_is_wholedisk): New function.
2928 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2929 zero only if device_is_wholedisk() returns true.
2931 * util/hostdisk.c (convert_system_partition_to_system_disk):
2932 Handle virtual disk devices named /dev/vdiskX as found on sparc
2935 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2936 lettered partition specifier is found, convert to numbered.
2938 2009-04-29 David S. Miller <davem@davemloft.net>
2940 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2941 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2943 * normal/command.c: Add missing newline at end of file.
2945 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2947 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2948 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2949 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2950 ihandles have a 32-bit type but need to be stored in a "void *".
2952 2009-04-28 Pavel Roskin <proski@gnu.org>
2954 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2955 not disk. Adjust all dependencies.
2956 (grub_fs_uuid_close): Use grub_device_close(), not
2959 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2960 parent's partition, don't copy it by reference, as it gets freed
2963 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2965 Preboot hooks support
2967 * commands/boot.c (struct grub_preboot_t): new declaration
2968 (preboots_head): new variable
2969 (preboots_tail): likewise
2970 (grub_loader_register_preboot_hook): new function
2971 (grub_loader_unregister_preboot_hook): likewise
2972 (grub_loader_set): launch preboot hooks
2973 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2974 (grub_loader_register_preboot_hook): new declaration
2975 (grub_loader_unregister_preboot_hook): likewise
2977 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2981 * disk/scsi.c (grub_scsi_open): added missing cast when
2982 calling grub_dprintf
2984 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2986 Bug and warning fixes
2988 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2990 * commands/test.c (test_parse): fixed bug with file tests and corrected
2991 declaration of find_file
2993 2009-04-26 Pavel Roskin <proski@gnu.org>
2995 * Makefile.in: Don't install empty manual pages if help2man is
2996 missing. Use help2man option for output, not shell redirection.
2998 2009-04-26 David S. Miller <davem@davemloft.net>
3000 * util/grub-mkdevicemap.c (make_device_map): Add missing
3001 NESTED_FUNC_ATTR to process_device().
3003 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3007 * commands/test.c: rewritten to use bash-like test
3009 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3011 Parttool autoloading and improvements
3013 * Makefile.in (pkglib_DATA): add parttool.lst
3014 (parttool.lst): new target
3015 * genmk.rb: generate parttool-*
3016 (CLEANFILES): add #{parttool}
3017 (PARTTOOLFILES): new variable
3018 * genparttoollist.sh: new file
3019 * parttool/pcpart.c (grub_pcpart_boot): more feedback
3020 (grub_pcpart_type): likewise
3021 * commands/parttool.c (helpmsg): new variable
3022 (grub_cmd_parttool): output help if not enough arguments are supplied
3024 (GRUB_MOD_INIT(parttool)): use helpmsg
3026 2009-04-24 David S. Miller <davem@davemloft.net>
3028 Avoiding opening same device multiple times in device iterator.
3030 * kern/device.c: (grub_device_iterate): Define struct part_ent,
3031 and use it to build a list of partitions in iterate_disk() and
3032 iterate_partition().
3034 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3037 * disk/ieee1275/nand.c (grub_nand_iterate): Return
3038 grub_devalias_iterate() result instead of unconditional 0.
3039 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3040 Also, capture hook return value, either directly or via
3041 grub_children_iterate(), and propagate to caller.
3042 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3043 grub_children_iterate): Return value is now 'int' instead of
3045 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3046 like a proper iterator, stopping when hooks return non-zero.
3047 (grub_devalias_iterate): Likewise.
3049 2009-04-23 David S. Miller <davem@davemloft.net>
3051 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3053 2009-04-22 David S. Miller <davem@davemloft.net>
3055 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3056 is larger than address_cells, use that value for address_cells too.
3058 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3059 IEEE1275_MAX_PATH_LEN): Define.
3060 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3061 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3062 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3063 'devtype'. Explicitly NULL terminate devalias expansion.
3065 * util/sparc64/ieee1275/misc.c: New file.
3066 * util/sparc64/ieee1275/grub-setup.c: New file.
3067 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3068 * util/sparc64/ieee1275/grub-mkimage.c: New file.
3069 * util/sparc64/ieee1275/grub-install.in: New file.
3070 * util/ieee1275/ofpath.c: New file.
3071 * util/ieee1275/devicemap.c: New file.
3072 * util/devicemap.c: New file.
3073 * util/deviceiter.c: New file.
3074 * kern/sparc64/ieee1275/init.c: New file.
3075 * include/grub/util/ofpath.h: New file.
3076 * include/grub/util/deviceiter.h: New file.
3077 * util/grub-mkdevicemap.c: Include deviceiter.h.
3078 Implement using grub_util_emit_devicemap_entry and
3079 grub_util_iterate_devices.
3080 * conf/i386-corebook.rmk: Build util/deviceiter.c and
3081 util/devicemap.c into grub-mkdevicemap
3082 * conf/i386-efi.rmk: Likewise.
3083 * conf/i386-ieee1275.rmk: Likewise.
3084 * conf/i386-pc.rmk: Likewise.
3085 * conf/powerpc-ieee1275.rmk: Likewise.
3086 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
3087 images and installation utilities. Build kernel as image
3088 instead of as elf binary. Use common rules as much as possible.
3090 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
3092 Correct GPT definition
3094 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3097 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
3099 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
3101 2009-04-19 David S. Miller <davem@davemloft.net>
3103 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
3104 (grub_rescue_cmd_linux): Rename to...
3105 (grub_cmd_linux): and fix prototype.
3106 (grub_rescue_cmd_initrd): Rename to...
3107 (grub_cmd_initrd): and fix prototype.
3108 (cmd_linux, cmd_initrd): New.
3109 (GRUB_MOD_INIT(linux)): Use grub_register_command().
3110 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
3112 2009-04-17 Pavel Roskin <proski@gnu.org>
3114 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
3116 (grub_ohci_transfer): Likewise.
3118 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
3120 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
3121 return without a value. Fix inconsistent indentation.
3123 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
3124 match struct grub_fs.
3126 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
3127 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
3128 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3129 * commands/lspci.c (grub_lspci_iter): Likewise.
3131 2009-04-16 Bean <bean123ch@gmail.com>
3133 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
3136 2009-04-15 Pavel Roskin <proski@gnu.org>
3138 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
3139 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
3140 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
3143 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3145 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
3146 that no multiple data or metadata areas are supported and `Unknown
3149 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3151 Move loader out of the kernel
3153 * kern/loader.c: moved to ...
3154 * commands/boot.c: ... moved here
3155 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
3156 * commands/boot.c (grub_cmd_boot): moved here. All users updated
3157 * include/grub/kernel.h (grub_machine_fini): export
3158 * include/grub/loader.h (grub_loader_is_loaded): update declaration
3159 (grub_loader_set): likewise
3160 (grub_loader_unset): likewise
3161 (grub_loader_boot): likewise
3162 * conf/common.rmk: new module boot.mod
3163 (pkglib_MODULES): add boot.mod
3164 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
3165 (grub_emu_SOURCES): likewise
3166 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
3167 (grub_emu_SOURCES): likewise
3168 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
3169 (grub_emu_SOURCES): likewise
3170 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
3171 (grub_emu_SOURCES): likewise
3172 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
3173 (grub_emu_SOURCES): likewise
3174 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
3175 (grub_emu_SOURCES): likewise
3176 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
3177 (grub_emu_SOURCES): likewise
3179 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3181 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
3183 * kern/misc.c (grub_itoa): Removed function
3184 (grub_ltoa): likewise
3185 (grub_vsprintf): use grub_lltoa
3187 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3191 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
3192 * conf/i386-coreboot.rmk: likewise
3193 * conf/i386-ieee1275.rmk: likewise
3194 * conf/powerpc-ieee1275.rmk: likewise
3196 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3198 * INSTALL: Add that `./autogen.sh' needs to be run before
3201 2009-04-14 Bean <bean123ch@gmail.com>
3203 * Makefile.in (pkglib_DATA): Add handler.lst.
3204 (handler.lst): New rule.
3206 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
3207 * conf/i386-coreboot.rmk: Likewise.
3208 * conf/i386-ieee1275.rmk: Likewise.
3209 * conf/i386-efi.rmk: Likewise.
3210 * conf/x86_64-efi.rmk: Likewise.
3211 * conf/powerpc-ieee1275.rmk: Likewise.
3212 * conf/sparc64-ieee1275.rmk: Likewise.
3214 * genhandlerlist.sh: New file.
3216 * genmk.rb: Add rules to generate handler.lst.
3218 * include/grub/normal.h (grub_file_getline): New function definition.
3219 (read_handler_list): Likewise.
3220 (free_handler_list): Likewise.
3222 * include/grub/term.h (grub_term_register_input): Add name parameter
3223 for auto generation of handler.lst.
3224 (grub_term_register_output): Likewise.
3226 * normal/handler.c: New file.
3228 * normal/main.c (get_line): Renamed to grub_file_getline.
3229 (read_config_file): Use the newly renamed grub_file_getline.
3230 (read_command_list): Likewise.
3231 (read_fs_list): Likewise.
3232 (grub_normal_execute): Call read_handler_list to parse handler.lst.
3233 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
3235 * term/efi/console.c (grub_console_init): Add name parameter for auto
3236 generation of handler.lst.
3237 * term/gfxterm.c: Likewise.
3238 * term/i386/pc/at_keyboard.c: Likewise.
3239 * term/i386/pc/console.c: Likewise.
3240 * term/i386/pc/serial.c: Likewise.
3241 * term/i386/pc/vesafb.c: Likewise.
3242 * term/i386/pc/vga.c: Likewise.
3243 * term/i386/pc/vga_text.c: Likewise.
3244 * term/ieee1275/ofconsole.c: Likewise.
3245 * term/usb_keyboard.c: Likewise.
3247 2009-04-14 Bean <bean123ch@gmail.com>
3249 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
3250 properly with null character.
3252 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3254 * configure: Remove.
3255 * config.h.in: Likewise.
3256 * stamp-h.in: Likewise.
3257 * DISTLIST: Likewise.
3258 * conf/common.mk: Likewise.
3259 * conf/i386-coreboot.mk: Likewise.
3260 * conf/i386-efi.mk: Likewise.
3261 * conf/i386-ieee1275.mk: Likewise.
3262 * conf/i386.mk: Likewise.
3263 * conf/i386-pc.mk: Likewise.
3264 * conf/powerpc-ieee1275.mk: Likewise.
3265 * conf/sparc64-ieee1275.mk: Likewise.
3266 * conf/x86_64-efi.mk: Likewise.
3268 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
3271 2009-04-14 John Stanley <jpsinthemix@verizon.net>
3272 David S. Miller <davem@davemloft.net>
3274 * util/hostdisk.c (make_device_name): Fix buffer length
3277 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3279 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
3280 <sys/param.h> and <sys/sysctl.h>.
3281 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
3282 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
3283 opening the device and reset them afterwards.
3285 2009-04-13 Pavel Roskin <proski@gnu.org>
3287 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
3288 Reported by John Stanley <jpsinthemix@verizon.net>
3290 2009-04-13 Robert Millan <rmh@aybabtu.com>
3292 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
3293 that name for menuentries when appropriate.
3295 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3297 * util/grub.d/10_freebsd.in: Add a missing `fi'.
3299 2009-04-13 Robert Millan <rmh@aybabtu.com>
3301 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
3302 to Linux, simply abort telling the user it's no longer supported.
3304 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3306 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
3307 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
3308 `freebsd_loadenv' only when devices.hints exist.
3310 2009-04-13 Pavel Roskin <proski@gnu.org>
3312 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
3314 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3316 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
3318 (grub_drive): Likewise.
3320 2009-04-13 David S. Miller <davem@davemloft.net>
3322 * kern/sparc64/ieee1275/ieee1275.c: New file.
3323 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
3324 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
3325 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
3326 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
3327 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
3328 grub_ieee1275_alloc_physmem): Declare new exported functions.
3330 * include/grub/sparc64/ieee1275/loader.h: New file.
3331 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3332 * include/grub/sparc64/kernel.h: Likewise.
3333 * loader/sparc64/ieee1275/linux.c: Likewise.
3335 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
3336 (grub_fstest_SOURCES): Likewise.
3338 * util/hostdisk.c (make_device_name): Do not make any assumptions
3339 about the length of drive names.
3341 * kern/dl.c (grub_dl_load_file): Close file immediately when
3342 we are done using it.
3344 2009-04-12 David S. Miller <davem@davemloft.net>
3346 * kern/misc.c (grub_ltoa): Fix cast when handling negative
3347 values. Noticed by Pavel Roskin.
3349 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3352 * genmk.rb: Add more flexible image type specification, also
3353 pass --strip-unneeded to objcopy.
3354 * conf/i386-pc.rmk: Use *_FORMAT.
3355 * conf/i386-pc.mk: Rebuilt.
3357 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3358 (OFDISK_HASH_SZ): Define.
3359 (ofdisk_hash): New hash table.
3360 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3361 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3362 instead of device phandle which is not unique.
3364 * kern/sparc64/ieee1275/init.c: Delete, replace with...
3365 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3366 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3367 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3368 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3369 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3370 GRUB_KERNEL_MACHINE_DATA_END): Define.
3371 (grub_kernel_image_size, grub_total_module_size): Declare.
3373 2009-04-12 Pavel Roskin <proski@gnu.org>
3375 * configure.ac: Change the logic when we check for target tools.
3376 Do it when the target is specified and it's different from the
3377 specified value of the host.
3379 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
3381 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3382 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3383 GNU/kFreeBSD. Check if a device is a character device. Use
3384 DIOCGMEDIASIZE to get the size.
3385 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3386 support for GNU/kFreeBSD.
3387 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3388 is a character device instead of a block device. Add support for
3389 FreeBSD device names.
3391 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3392 is a character device instead of a block device.
3394 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3395 is a character device instead of a block device.
3397 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3399 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3400 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3401 FreeBSD. Check if a device is a character device. Use
3402 DIOCGMEDIASIZE to get the size.
3403 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3404 support for FreeBSD.
3405 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3406 is a character device instead of a block device. Add support for
3407 FreeBSD device names.
3409 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3410 a character device instead of a block device.
3411 (grub_util_check_char_device): New function.
3413 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3414 a character device instead of a block device.
3416 * include/grub/util/getroot.h (grub_util_check_char_device): New
3419 2009-04-11 David S. Miller <davem@davemloft.net>
3421 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3423 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3424 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3425 function, if present.
3426 (__bswapdi2): Likewise.
3428 * include/grub/sparc64/ieee1275/boot.h: New file.
3429 * boot/sparc64/ieee1275/boot.S: Likewise.
3430 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3432 * kern/misc.c (grub_ltoa): New function.
3433 (grub_vsprintf): Use it to format 'long' integers.
3435 2009-04-10 David S. Miller <davem@davemloft.net>
3437 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3438 slots are of type grub_ieee1275_cell_t.
3439 (grub_nand_read): Likewise.
3440 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3441 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3442 macros are used to compare values in arg/ret block of the call.
3443 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3444 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3445 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3446 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3447 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3448 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3449 grub_ieee1275_close, grub_ieee1275_set_property,
3450 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3451 grub_ieee1275_cell_t.
3452 * kern/ieee1275/openfw.c (grub_map): Likewise.
3453 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3454 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3456 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3457 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3458 (grub_devalias_iterate): Likewise.
3460 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3464 * fs/ufs.c (INODE_NBLOCKS): new definition
3465 (struct grub_ufs_dirent): added fields for non-BSD dirents
3466 (grub_ufs_get_file_block): fixed double indirect handling
3467 (grub_ufs_lookup_symlink): use more robust way to determine whether
3469 (grub_ufs_find_file): support for non-BSD dirents
3470 (grub_ufs_dir): support for non-BSD dirents
3472 2009-04-10 Bean <bean123ch@gnail.com>
3474 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3475 attribute, otherwise the size would be wrong for i386 platform.
3477 * include/grub/pci.h (grub_pci_read_word): New inline function.
3478 (grub_pci_read_byte): Likewise.
3479 (grub_pci_write): Likewise.
3480 (grub_pci_write_word): Likewise.
3481 (grub_pci_write_byte): Likewise.
3483 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3485 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3486 (find_framebuf): Scan pci to locate the frame buffer address.
3488 * commands/efi/fixvideo.c: New file.
3490 * commands/efi/loadbios.c: Likewise.
3492 * commands/memrw.c: Likewise.
3494 * util/grub-dumpbios.in: Likewise.
3496 * conf/common.rmk (grub-dumpbios): New utility.
3497 (pkglib_MODULES): New module memrw.mod.
3498 (memrw_mod_SOURCE): New macro.
3499 (memrw_mod_CFLAGS): Likewise.
3500 (memrw_mod_LDFLAGS): Likewise.
3502 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3504 (loadbios_mod_SOURCE): New macro.
3505 (loadbios_mod_CFLAGS): Likewise.
3506 (loadbios_mod_LDFLAGS): Likewise.
3507 (fixvideo_mod_SOURCE): Likewise.
3508 (fixvideo_mod_CFLAGS): Likewise.
3509 (fixvideo_mod_LDFLAGS): Likewise.
3511 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3513 (loadbios_mod_SOURCE): New macro.
3514 (loadbios_mod_CFLAGS): Likewise.
3515 (loadbios_mod_LDFLAGS): Likewise.
3516 (fixvideo_mod_SOURCE): Likewise.
3517 (fixvideo_mod_CFLAGS): Likewise.
3518 (fixvideo_mod_LDFLAGS): Likewise.
3520 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3522 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3524 2009-04-07 David S. Miller <davem@davemloft.net>
3526 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3527 support for R_SPARC_OLO10 relocations. Fix compile warning for
3528 R_SPARC_WDISP30 case.
3529 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3531 2009-04-06 Pavel Roskin <proski@gnu.org>
3533 * include/grub/misc.h (ARRAY_SIZE): New macro.
3534 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3536 * loader/i386/linux.c (allocate_pages): Use free_pages().
3537 (grub_linux_unload): Don't use free_pages().
3538 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3539 wrong index. Treat all other modes as text modes.
3540 (grub_cmd_linux): Initialize vid_mode unconditionally to
3541 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3543 * commands/help.c (print_command_help): Use cmd->prio, not
3544 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3546 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3550 * parttool/pcpart.c: new file
3551 * commands/parttool.c: likewise
3552 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3553 (parttool_mod_SOURCES): new variable
3554 (parttool_mod_CFLAGS): likewise
3555 (parttool_mod_LDFLAGS): likewise
3556 (pcpart_mod_SOURCES): likewise
3557 (pcpart_mod_CFLAGS): likewise
3558 (pcpart_mod_LDFLAGS): likewise
3559 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3560 and parttool/pcpart.c
3561 * conf/i386-efi.rmk: likewise
3562 * conf/i386-ieee1275.rmk: likewise
3563 * conf/i386-pc.rmk: likewise
3564 * conf/powerpc-ieee1275.rmk: likewise
3565 * conf/sparc64-ieee1275.rmk: likewise
3566 * conf/x86_64-ieee1275.rmk: likewise
3568 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3570 Support for mtime and further expandability of dir command
3572 * include/grub/lib/datetime.h: moved to ...
3573 * include/grub/datetime.h: ... moved here and added
3574 declaration of grub_unixtime2datetime. All users updated
3575 * include/grub/fs.h: new syntax for dir and mtime functions in
3577 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3578 and GRUB_FSHELP_FLAGS_MASK
3579 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3580 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3581 (grub_ext2_mtime): new function
3582 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3583 (grub_hfsplus_mtime): new function
3584 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3585 (GRUB_UFS_ATTR_FILE): likewise
3586 (GRUB_UFS_ATTR_LNK): likewise
3587 (struct grub_ufs_sblock): new fields mtime
3588 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3590 (grub_ufs_dir): mtime support
3591 (grub_ufs_mtime): new function
3592 * fs/affs.c (grub_affs_dir): use new dir syntax
3593 * fs/afs.c (grub_afs_dir): likewise
3594 * fs/cpio.c (grub_cpio_dir): likewise
3595 * fs/fat.c (grub_fat_find_dir): likewise
3596 * fs/hfs.c (grub_hfs_dir): likewise
3597 * fs/iso9660.c (grub_iso9660_dir): likewise
3598 * fs/jfs.c (grub_jfs_dir): likewise
3599 * fs/minix.c (grub_minix_dir): likewise
3600 * fs/ntfs.c (grub_ntfs_dir): likewise
3601 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3602 * fs/sfs.c (grub_sfs_dir): likewise
3603 * fs/xfs.c (grub_xfs_dir): likewise
3604 * util/hostfs.c (grub_hostfs_dir): likewise
3605 * lib/datetime.c: moved to ...
3606 * normal/datetime.c: ... moved here
3607 (grub_unixtime2datetime): new function
3608 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3609 * normal/completion.c (iterate_dir): use new dir syntax
3610 * normal/misc.c (grub_normal_print_device_info): tell the
3611 last modification time of a volume
3612 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3613 * conf/common.rmk: added lib/datetime.c to ls.mod
3614 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3615 (normal_mod_SOURCES): likewise
3616 (datetime_mod_SOURCES): Removed lib/datetime.c
3617 * conf/i386-efi.rmk: likewise
3618 * conf/i386-ieee1275.rmk: likewise
3619 * conf/i386-pc.rmk: likewise
3620 * conf/powerpc-ieee1275.rmk: likewise
3621 * conf/sparc64-ieee1275.rmk: likewise
3622 * conf/x86_64-efi.rmk: likewise
3624 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3626 Trim trailing spaces in FAT label and support mtools-like labels
3628 * fs/fat.c (grub_fat_iterate_dir): New function based
3629 on grub_fat_find_dir
3630 (grub_fat_find_dir): use grub_fat_iterate_dir
3631 (grub_fat_label): likewise
3633 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3635 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3637 remove extraneous kernel_elf_HEADERS
3639 2009-04-04 Bean <bean123ch@gnail.com>
3641 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3643 * util/misc.c: Likewise.
3645 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3647 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3648 instead of grub_printf.
3650 2009-04-03 Robert Millan <rmh@aybabtu.com>
3652 * loader/i386/linux.c (grub_linux_setup_video): Fill
3653 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3654 values from `mode info' structure instead of hardcoded
3657 2009-04-01 Pavel Roskin <proski@gnu.org>
3659 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3661 * genmk.rb: Likewise.
3662 * configure.ac: Likewise.
3664 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3666 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3667 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3669 2009-04-01 David S. Miller <davem@davemloft.net>
3671 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3672 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3673 (grub_setjmp): Mark with 'returns_twice' attribute.
3674 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3675 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3676 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3678 2009-04-01 Robert Millan <rmh@aybabtu.com>
3680 Reapply fix from 2008-07-28 which was accidentally reverted; also
3681 perform the same fix to a similar check in same function.
3683 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3684 with the same number are found, just use issue a warning with
3685 grub_dprintf(), as this error has been reported to be non-fatal.
3687 2009-03-31 Pavel Roskin <proski@gnu.org>
3689 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3690 for cross-compilation.
3692 2009-03-30 Robert Millan <rmh@aybabtu.com>
3694 Fix i386-ieee1275 build.
3696 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3699 2009-03-30 Pavel Roskin <proski@gnu.org>
3701 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3702 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3703 zero-terminated, rely only on the strlen value. Fix comparison
3704 of strings differing in length.
3706 2009-03-30 Robert Millan <rmh@aybabtu.com>
3708 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3709 checking for abi version. Improve error messages on BIOS to notify
3710 user about `linux16' command.
3712 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3716 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3717 in case of collision
3718 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3720 2009-03-29 Robert Millan <rmh@aybabtu.com>
3722 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3723 set `vid_mode' accordingly.
3724 (grub_linux_boot): Process `vid_mode' and set video mode.
3726 2009-03-29 Robert Millan <rmh@aybabtu.com>
3728 * util/grub.d/10_linux.in (linux_entry): New function.
3729 Factorize generation of Linux boot entries.
3731 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3733 Make the format of Environment Block plain text. The boot loader
3734 part is not tested well yet.
3736 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3739 (usage): Remove "info" and "clear". Add "unset". Update the
3740 description of "set", as this does not delete variables any
3742 (create_envblk_file): Complete rewrite.
3743 (open_envblk_file): Likewise.
3744 (cmd_info): Removed.
3745 (cmd_list): Likewise.
3746 (cmd_set): Likewise.
3747 (cmd_clear): Likewise.
3748 (list_variables): New function.
3749 (write_envblk): Likewise.
3750 (set_variables): Likewise.
3751 (unset_variables): Likewise.
3752 (main): Complete rewrite.
3754 * commands/loadenv.c (buffer): Removed.
3756 (open_envblk_file): New function.
3757 (read_envblk_file): Complete rewrite.
3758 (grub_cmd_load_env): Likewise.
3759 (grub_cmd_list_env): Likewise.
3760 (struct blocklist): New struct.
3761 (free_blocklists): New function.
3762 (check_blocklists): Likewise.
3763 (write_blocklists): Likewise.
3764 (grub_cmd_save_env): Complete rewrite.
3766 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3767 a plain text signature.
3768 (GRUB_ENVBLK_MAXLEN): Removed.
3769 (struct grub_envblk): Complete rewrite.
3770 (grub_envblk_find): Removed.
3771 (grub_envblk_insert): Likewise.
3772 (grub_envblk_open): New prototype.
3773 (grub_envblk_set): Likewise.
3774 (grub_envblk_delete): Put const to VALUE.
3775 (grub_envblk_iterate): Put const to NAME and VALUE.
3776 (grub_envblk_close): New prototype.
3777 (grub_envblk_buffer): New inline function.
3778 (grub_envblk_size): Likewise.
3780 * lib/envblk.c: Include grub/mm.h.
3781 (grub_env_find): Removed.
3782 (grub_envblk_open): New function.
3783 (grub_envblk_close): Likewise.
3784 (escaped_value_len): Likewise.
3785 (find_next_line): Likewise.
3786 (grub_envblk_insert): Removed.
3787 (grub_envblk_set): New function.
3788 (grub_envblk_delete): Complete rewrite.
3789 (grub_envblk_iterate): Likewise.
3791 2009-03-28 Robert Millan <rmh@aybabtu.com>
3793 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3794 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3795 variables. Use 16-bit loader.
3796 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3798 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3799 (grub_linux16_boot): ... this. Update all users.
3800 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3801 (grub_linux_boot): ... this. Update all users.
3803 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3804 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3805 commands to `linux16' and `initrd16'.
3806 (GRUB_MOD_FINI(linux)): Rename to ...
3807 (GRUB_MOD_FINI(linux16)): ... this.
3809 2009-03-24 Pavel Roskin <proski@gnu.org>
3811 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3812 not just for compilation.
3814 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3816 Move multiboot helper out of kernel
3818 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3819 `loader/i386/multiboot_helper.S'.
3820 * conf/i386-coreboot.rmk: Likewise
3821 * conf/i386-ieee1275.rmk: Likewise
3823 * kern/i386/loader.S: Move multiboot helpers from here...
3824 * loader/i386/multiboot_helper.S: ...moved here
3825 * include/grub/i386/loader.h: Move declarations of multiboot
3826 helpers from here...
3827 * include/grub/i386/multiboot.h: ...moved here
3828 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3830 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3832 * kern/env.c (grub_env_context_open): Added an argument to specify
3833 whether a new context inherits exported variables from current
3834 one. This is useful when making a sandbox to interpret a config
3836 All callers updated.
3838 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3840 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3842 * kern/env.c (grub_env_context_close): Fix memory leaks.
3844 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3846 * normal/main.c (grub_normal_execute): Added an argument
3847 BATCH to specify if an interactive interface should be provided
3848 after reading a config file.
3849 All callers updated.
3850 (read_command_list): Prevent being executed twice.
3851 (read_fs_list): Likewise.
3853 * include/grub/normal.h (grub_normal_execute): Updated the
3856 2009-03-22 Pavel Roskin <proski@gno.org>
3858 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3860 * kern/i386/pc/startup.S: Likewise.
3861 * kern/i386/efi/startup.S: Likewise.
3862 * kern/i386/ieee1275/startup.S: Likewise.
3863 * kern/i386/coreboot/startup.S: Likewise.
3864 * kern/x86_64/efi/startup.S: Likewise.
3866 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3867 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3868 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3870 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3872 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3874 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3876 Use vaddr of correct segment for entry_point.
3878 2009-03-21 Bean <bean123ch@gmail.com>
3880 * commands/blocklist.c: Add include file <grub/command.h>, remove
3881 <grub/normal.h> and <grub/arg.h>.
3882 (grub_cmd_blocklist): Use the new command interface.
3883 (GRUB_MOD_INIT): Likewise.
3884 (GRUB_MOD_FINI): Likewise.
3885 * commands/boot.c: Likewise.
3886 * commands/cat.c: Likewise.
3887 * commands/cmp.c: Likewise.
3888 * commands/configfile.c: Likewise.
3889 * commands/crc.c: Likewise.
3890 * commands/echo.c: Likewise.
3891 * commands/halt.c: Likewise.
3892 * commands/handler.c: Likewise.
3893 * commands/hdparm.c: Likewise.
3894 * commands/help.c: Likewise.
3895 * commands/hexdump.c: Likewise.
3896 * commands/loadenv.c: Likewise.
3897 * commands/ls.c: Likewise.
3898 * commands/lsmmap.c: Likewise.
3899 * commands/lspci.c: Likewise.
3900 * commands/loadenv.c: Likewise.
3901 * commands/read.c: Likewise.
3902 * commands/reboot.c: Likewise.
3903 * commands/search.c: Likewise.
3904 * commands/sleep.c: Likewise.
3905 * commands/test.c: Likewise.
3906 * commands/usbtest.c: Likewise.
3907 * commands/videotest.c: Likewise.
3908 * commands/i386/cpuid.c: Likewise.
3909 * commands/i386/pc/halt.c: Likewise.
3910 * commands/i386/pc/play.c: Likewise.
3911 * commands/i386/pc/pxecmd.c: Likewise.
3912 * commands/i386/pc/vbeinfo.c: Likewise.
3913 * commands/i386/pc/vbetest.c: Likewise.
3914 * commands/ieee1275/suspend.c: Likewise.
3915 * disk/loopback.c: Likewise.
3916 * font/font_cmd.c: Likewise.
3917 * hello/hello.c: Likewise.
3918 * loader/efi/appleloader.c: Likewise.
3919 * loader/efi/chainloader.c: Likewise.
3920 * loader/i386/bsd.c: Likewise.
3921 * loader/i386/efi/linux.c: Likewise.
3922 * loader/i386/ieee1275/linux.c: Likewise.
3923 * loader/i386/linux.c: Likewise.
3924 * loader/i386/pc/chainloader.c: Likewise.
3925 * loader/i386/pc/linux.c: Likewise.
3926 * loader/powerpc/ieee1275/linux.c: Likewise.
3927 * loader/multiboot_loader.c: Likewise.
3928 * term/gfxterm.c: Likewise.
3929 * term/i386/pc/serial.c: Likewise.
3930 * term/terminfo.c: Likewise.
3932 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3933 * term/i386/pc/vga.c: Likewise.
3934 * video/readers/jpeg.c: Likewise.
3935 * video/readers/png.c: Likewise.
3936 * video/readers/tga.c: Likewise.
3938 * util/grub-fstest (cmd_loopback): Removed.
3939 (cmd_blocklist): Likewise.
3941 (grub_register_command): Likewise.
3942 (grub_unregister_command): Likewise.
3943 (execute_command): Use grub_command_find to locate command and execute
3946 * include/grub/efi/chainloader.h: Removed.
3947 * loader/efi/chainloader_normal.c: Likewise.
3948 * loader/i386/bsd_normal.c: Likewise.
3949 * loader/i386/pc/chainloader_normal.c: Likewise.
3950 * loader/i386/pc/multiboot_normal.c: Likewise.
3951 * loader/linux_normal.c: Likewise.
3952 * loader/multiboot_loader_normal.c: Likewise.
3953 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3955 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3956 and grub_register_command_p1.
3958 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3959 kern/command.c, lib/arg.c and commands/extcmd.c.
3960 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3961 (minicmd_mod_SOURCES): New variable.
3962 (minicmd_mod_CFLAGS): Likewise.
3963 (minicmd_mod_LDFLAGS): Likewise.
3964 (extcmd_mod_SOURCES): Likewise.
3965 (extcmd_mod_CFLAGS): Likewise.
3966 (extcmd_mod_LDFLAGS): Likewise.
3967 (boot_mod_SOURCES): Removed.
3968 (boot_mod_CFLAGS): Likewise.
3969 (boot_mod_LDFLAGS): Likewise.
3971 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3973 (kernel_img_HEADERS): Add command.h.
3974 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3975 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3977 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3978 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3979 remove the corresponding normal mode command.
3980 (normal_mod_SOURCES): Remove normal/arg.c.
3981 * conf/i386-coreboot.rmk: Likewise.
3982 * conf/i386-efi.rmk: Likewise.
3983 * conf/i386-ieee1275.rmk: Likewise.
3984 * conf/powerpc-ieee1275.rmk: Likewise.
3985 * conf/x86_64-efi.rmk: Likewise.
3987 * include/grub/arg.h: Move from here ...
3988 * include/grub/lib/arg.h: ... to here.
3990 * normal/arg.c: Move from here ...
3991 * lib/arg.c: ... to here.
3993 * commands/extcmd.c: New file.
3994 * commands/minicmd.c: Likewise.
3995 * include/grub/command.h: Likewise.
3996 * include/grub/extcmd.h: Likewise.
3997 * kern/command.c: Likewise.
3998 * kern/corecmd.c: Likewise.
4000 * kern/list.c (grub_list_iterate): Return int instead of void.
4001 (grub_list_insert): New function.
4002 (grub_prio_list_insert): Likewise.
4004 * kern/rescue.c (grub_rescue_command): Removed.
4005 (grub_rescue_command_list): Likewise.
4006 (grub_rescue_register_command): Likewise.
4007 (grub_rescue_unregister_command): Likewise.
4008 (grub_rescue_cmd_boot): Move to minicmd.c
4009 (grub_rescue_cmd_help): Likewise.
4010 (grub_rescue_cmd_info): Likewise.
4011 (grub_rescue_cmd_boot): Likewise.
4012 (grub_rescue_cmd_testload): Likewise.
4013 (grub_rescue_cmd_dump): Likewise.
4014 (grub_rescue_cmd_rmmod): Likewise.
4015 (grub_rescue_cmd_lsmod): Likewise.
4016 (grub_rescue_cmd_exit): Likewise.
4017 (grub_rescue_print_devices): Moved to corecmd.c.
4018 (grub_rescue_print_files): Likewise.
4019 (grub_rescue_cmd_ls): Likewise.
4020 (grub_rescue_cmd_insmod): Likewise.
4021 (grub_rescue_cmd_set): Likewise.
4022 (grub_rescue_cmd_unset): Likewise.
4023 (attempt_normal_mode): Use grub_command_find to get normal module.
4024 (grub_enter_rescue_mode): Use grub_register_core_commands to register
4025 commands, remove grub_rescue_register_command calls.
4027 * normal/command.c (grub_register_command): Removed.
4028 (grub_unregister_command): Likewise.
4029 (grub_command_find): Likewise.
4030 (grub_iterate_commands): Likewise.
4031 (rescue_command): Likewise.
4032 (export_command): Moved to corecmd.c.
4033 (set_command): Removed.
4034 (unset_command): Likewise.
4035 (insmod_command): Likewise.
4036 (rmmod_command): Likewise.
4037 (lsmod_command): Likewise.
4038 (grub_command_init): Likewise.
4040 * normal/completion.c (iterate_command): Use cmd->prio to check for
4042 (complete_arguments): Use grub_extcmd_t structure to find options.
4043 (grub_normal_do_completion): Change function grub_iterate_commands to
4044 grub_command_iterate.
4046 * normal/execute.c (grub_script_execute_cmd): No need to parse
4049 * normal/main.c (grub_dyncmd_dispatcher): New function.
4050 (read_command_list): Register unload commands as dyncmd.
4051 (grub_cmd_normal): Use new command interface, register rescue,
4052 unregister normal at entry, register normal, unregister rescue at exit.
4054 * include/grub/list.h (grub_list_test_t): New type.
4055 (grub_list_iterate): Return int instead of void.
4056 (grub_list_insert): New function.
4057 (GRUB_AS_NAMED_LIST_P): New macro.
4058 (GRUB_AS_PRIO_LIST): Likewise.
4059 (GRUB_AS_PRIO_LIST_P): Likewise.
4060 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4061 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4062 (grub_prio_list): New structure.
4063 (grub_prio_list_insert): New function.
4064 (grub_prio_list_remove): New inline function.
4066 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4067 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4068 (GRUB_COMMAND_FLAG_MENU): Likewise.
4069 (GRUB_COMMAND_FLAG_BOTH): Likewise.
4070 (GRUB_COMMAND_FLAG_TITLE): Likewise.
4071 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
4072 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
4073 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
4074 (grub_command): Likewise.
4075 (grub_register_command): Likewise.
4076 (grub_command_find): Likewise.
4077 (grub_iterate_commands): Likewise.
4078 (grub_command_init): Likewise.
4079 (grub_arg_parse): Likewise.
4080 (grub_arg_show_help): Likewise.
4082 * include/grub/rescue.h (grub_rescue_register_command): Removed.
4083 (grub_rescue_unregister_command): Likewise.
4085 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
4086 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
4087 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
4089 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
4090 grub_rescue_cmd_initrd.
4091 * include/grub/i386/loader.h: Likewise.
4092 * include/grub/x86_64/loader.h: Likewise.
4094 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
4096 2009-03-21 Bean <bean123ch@gmail.com>
4098 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4099 instead of stat in mingw environment.
4101 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
4103 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
4105 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
4108 2009-03-21 Bean <bean123ch@gmail.com>
4110 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
4113 2009-03-18 Michel Dänzer <michel@daenzer.net>
4115 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
4116 checking inode flags for EXT4_EXTENTS_FLAG.
4118 2009-03-18 Robert Millan <rmh@aybabtu.com>
4120 * loader/i386/linux.c: Include `<grub/video.h>' and
4121 `<grub/i386/pc/vbe.h>'..
4122 (grub_linux_setup_video): New function. Loosely based on the EFI one.
4123 (grub_linux32_boot): Attempt to configure video settings with
4124 grub_linux_setup_video().
4125 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
4126 to avoid grub_console_fini() which would step out of graphical mode
4129 2009-03-14 Robert Millan <rmh@aybabtu.com>
4131 Fix build on powerpc.
4132 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
4134 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
4136 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
4137 background image command.
4139 2009-03-12 Colin D Bennett <colin@gibibit.com>
4141 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
4142 (grub_gfxterm_putchar): Extract pairs of identical calls to
4143 draw_cursor out of conditional blocks.
4145 2009-03-11 Pavel Roskin <proski@gnu.org>
4147 * fs/hfs.c (grub_hfs_strncasecmp): New function.
4148 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
4150 2009-03-11 Robert Millan <rmh@aybabtu.com>
4152 * loader/i386/multiboot_elfxx.c
4153 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
4155 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
4157 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
4160 2009-03-11 Robert Millan <rmh@aybabtu.com>
4162 * loader/i386/multiboot.c (code_size): New variable.
4163 (grub_multiboot): Define offsets by adding to `code_size' rather
4164 than subtracting from `grub_multiboot_payload_size'. Provide
4165 4-byte alignment to MBI and others by increasing
4166 `boot_loader_name_length' appropriately.
4168 * loader/i386/multiboot_elfxx.c
4169 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
4171 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
4173 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
4176 2009-03-08 Robert Millan <rmh@aybabtu.com>
4178 Make loader/i386/linux.c usable on i386-pc again.
4180 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
4182 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
4185 2009-03-07 Bean <bean123ch@gmail.com>
4187 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
4190 2009-03-06 Robert Millan <rmh@aybabtu.com>
4192 Fix display issue on terminals with screen size other than 80x25
4193 (e.g. gfxterm with resolution higher than 640x480).
4195 * normal/main.c (grub_normal_init_page): Display title text in a
4196 position relative to the center of the terminal instead of relying
4197 on a hardcoded offset.
4199 2009-03-04 Robert Millan <rmh@aybabtu.com>
4201 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
4204 * Makefile.in (host_kernel): New variable.
4205 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
4206 scripts instead of just the windows one.
4207 * configure.ac: Initialize and AC_SUBST `host_kernel'.
4209 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4211 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
4213 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4214 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4215 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4216 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4217 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4218 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4220 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4222 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
4223 or if there's no space for the disk label and print the partition number on a
4226 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4228 * util/misc.c: Include <time.h>.
4229 (grub_millisleep): New function.
4231 2009-03-04 Bean <bean123ch@gmail.com>
4233 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
4234 another option -mno-red-zone.
4236 * commands/handler.c: Change module description.
4238 * kern/handler.c: Add missing space at the end of description line.
4240 * kern/list.c: Likewise.
4242 2009-03-03 Robert Millan <rmh@aybabtu.com>
4244 Move more components to the relocation area, and fix mbi pointer
4245 handling to use the destination rather than the origin (thanks to
4246 Vladimir Serbinenko for spotting).
4248 * loader/i386/multiboot.c (mbi_dest): New variable.
4249 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
4250 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
4253 2009-03-01 Bean <bean123ch@gmail.com>
4255 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
4256 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
4257 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
4258 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
4260 * loader/i386/efi/linux.c (acpi_guid): New variable.
4261 (acpi_guid): Likewise.
4262 (EBDA_SEG_ADDR): New constant.
4263 (LOW_MEM_ADDR): Likewise.
4264 (FAKE_EBDA_SEG): Likewise.
4265 (fake_bios_data): New function.
4266 (grub_linux_boot): Call fake_bios_data.
4268 2009-03-01 Bean <bean123ch@gmail.com>
4270 * commands/terminal.c: Removed.
4272 * commands/handler.c: New file.
4274 * include/grub/list.h: Likewise.
4276 * include/grub/handler.h: Likewise.
4278 * kern/list.c: Likewise.
4280 * kern/handler.c: Likewise.
4282 * kern/term.h: Include header file <grub/handler.h>.
4283 (grub_term_input): Move next field to the beginning.
4284 (grub_term_output): Likewise.
4285 (grub_term_input_class): New variable.
4286 (grub_term_output_class): Likewise.
4287 (grub_term_register_input): Changed to inline function.
4288 (grub_term_register_output): Likewise.
4289 (grub_term_unregister_input): Likewise.
4290 (grub_term_unregister_output): Likewise.
4291 (grub_term_set_current_input): Likewise.
4292 (grub_term_set_current_output): Likewise.
4293 (grub_term_get_current_input): Likewise.
4294 (grub_term_get_current_output): Likewise.
4295 (grub_term_iterate_input): Removed.
4296 (grub_term_iterate_output): Likewise.
4298 * kern/term.c (grub_term_list_input): Removed.
4299 (grub_term_list_output): Likewise.
4300 (grub_term_input_class): New variable.
4301 (grub_term_output_class): Likewise.
4302 (grub_cur_term_input): Change variable as macro.
4303 (grub_cur_term_output): Likewise.
4304 (grub_term_register_input): Removed.
4305 (grub_term_register_output): Likewise.
4306 (grub_term_unregister_input): Likewise.
4307 (grub_term_unregister_output): Likewise.
4308 (grub_term_set_current_input): Likewise.
4309 (grub_term_set_current_output): Likewise.
4310 (grub_term_iterate_input): Likewise.
4311 (grub_term_iterate_output): Likewise.
4312 (grub_term_get_current_input): Likewise.
4313 (grub_term_get_current_output): Likewise.
4315 * util/grub-editenv.c: Include header file <grub/handler.h>.
4316 (grub_term_get_current_input): Removed.
4317 (grub_term_get_current_output): Likewise.
4318 (grub_term_input_class): New variable.
4319 (grub_term_output_class): Likewise.
4321 * util/grub-fstest.c (grub_term_get_current_input): Removed.
4322 (grub_term_get_current_output): Likewise.
4323 (grub_term_input_class): New variable.
4324 (grub_term_output_class): Likewise.
4326 * util/grub-probe.c (grub_term_get_current_input): Removed.
4327 (grub_term_get_current_output): Likewise.
4328 (grub_term_input_class): New variable.
4329 (grub_term_output_class): Likewise.
4331 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
4332 (grub_term_get_current_output): Likewise.
4333 (grub_term_input_class): New variable.
4334 (grub_term_output_class): Likewise.
4336 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
4337 (terminal_mod_SOURCES): Likewise.
4338 (terminal_mod_CFLAGS): Likewise.
4339 (terminal_mod_LDFLAGS): Likewise.
4341 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4343 (kernel_img_SOURCES): Add list.c and handler.c.
4344 (kernel_img_HEADERS): Add list.h and handler.h.
4346 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4348 (kernel_mod_SOURCES): Add list.c and handler.c.
4349 (kernel_mod_HEADERS): Add list.h and handler.h.
4351 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4353 (kernel_elf_SOURCES): Add list.c and handler.c.
4354 (kernel_elf_HEADERS): Add list.h and handler.h.
4356 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4358 (kernel_elf_SOURCES): Add list.c and handler.c.
4359 (kernel_elf_HEADERS): Add list.h and handler.h.
4361 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4363 (kernel_mod_SOURCES): Add list.c and handler.c.
4364 (kernel_mod_HEADERS): Add list.h and handler.h.
4366 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4368 (kernel_elf_SOURCES): Add list.c and handler.c.
4369 (kernel_elf_HEADERS): Add list.h and handler.h.
4371 2009-02-27 Robert Millan <rmh@aybabtu.com>
4373 Factorize elf32 / elf64 code in Multiboot loader. This will
4374 prevent it from getting out of sync again.
4376 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4377 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4378 grub_multiboot_load_elf64): Move from here ...
4379 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4380 grub_multiboot_load_elf): ... to here (new file).
4382 2009-02-27 Robert Millan <rmh@aybabtu.com>
4384 * util/grub.d/10_linux.in: Rename "single-user mode" to
4387 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4389 Don't leak in SCSI code.
4390 * disk/scsi.c (grub_scsi_close): free `scsi'.
4392 2009-02-27 Robert Millan <rmh@aybabtu.com>
4394 * loader/i386/pc/multiboot.c: Move from here ...
4395 * loader/i386/multiboot.c: ... to here. Update all users.
4397 2009-02-27 Robert Millan <rmh@aybabtu.com>
4399 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4400 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4402 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
4404 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4407 2009-02-27 Robert Millan <rmh@aybabtu.com>
4409 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4410 `0x' qualifier as 0 when base is specified as parameter).
4412 2009-02-24 Bean <bean123ch@gmail.com>
4414 * configure.ac: Check for -mcmodel=large in x86_64 target.
4416 * include/grub/efi/api.h (efi_call_10): New macro.
4417 (efi_wrap_10): New function.
4419 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4420 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4421 (GRUB_PE32_REL_BASED_LOW): Likewise.
4422 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4423 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4424 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4425 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4426 (GRUB_PE32_REL_BASED_REL): Likewise.
4427 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4428 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4429 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4431 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4434 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4435 (efi_wrap_10): New function.
4437 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4439 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4440 MB/MBP model (NV chipset).
4441 (devdata_devs): Add devpath_5 to the list.
4443 * load/i386/efi/linux.c (video_base): Remove variable.
4444 (RGB_MASK): New macro.
4445 (RGB_MAGIC): Likewise.
4446 (LINE_MIN): Likewise.
4447 (LINE_MAX): Likewise.
4448 (FBTEST_STEP): Likewise.
4449 (FBTEST_COUNT): Likewise.
4450 (fb_list): New variable.
4451 (grub_find_video_card): Remove function.
4452 (find_framebuf): New function.
4453 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4456 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4459 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4461 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4463 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4466 2009-02-22 Robert Millan <rmh@aybabtu.com>
4468 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4469 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4470 in our relocation, instead of using it directly from heap. Also
4471 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4473 2009-02-21 Robert Millan <rmh@aybabtu.com>
4475 Implement USB keyboard support (based on patch by Marco Gerards)
4477 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4478 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4479 (usb_keyboard_mod_LDFLAGS): New variables.
4481 * term/usb_keyboard.c: New file.
4483 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4485 Corrected wrong declaration
4487 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4489 2009-02-14 Christian Franke <franke@computer.org>
4491 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4492 (grub_lspci_iter): Print class code and programming interface byte.
4494 2009-02-14 Christian Franke <franke@computer.org>
4496 * gendistlist.sh: Ignore `.svn' directories.
4498 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4500 * fs/fat.c: Add 2009 to Copyright line.
4502 2009-02-14 Christian Franke <franke@computer.org>
4504 * commands/hdparm.c: New file. Provides `hdparm' command
4505 which sends ATA commands via grub_disk_ata_pass_through ().
4507 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4509 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4510 and <grub/cpu/io.h> to include/grub/ata.h.
4511 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4512 (GRUB_CDROM_SECTOR_SIZE): Remove.
4513 (GRUB_ATA_*): Move to include/grub/ata.h.
4514 (GRUB_ATAPI_*): Likewise.
4515 (enum grub_ata_commands): Likewise.
4516 (enum grub_ata_timeout_milliseconds): Likewise.
4517 (struct grub_ata_device): Likewise.
4518 (grub_ata_regset): Likewise.
4519 (grub_ata_regget): Likewise.
4520 (grub_ata_regset2): Likewise.
4521 (grub_ata_regget2): Likewise.
4522 (grub_ata_check_ready): Likewise.
4523 (grub_ata_wait_not_busy): Remove static, exported in
4525 (grub_ata_wait_drq): Likewise.
4526 (grub_ata_pio_read): Likewise.
4528 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4529 function for hdparm.mod.
4531 * include/grub/ata.h: New file, contains declarations from
4533 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4535 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4536 (grub_disk_ata_pass_through): New exported variable.
4538 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4540 2009-02-13 Colin D Bennett <colin@gibibit.com>
4542 Support multiple fallback entries, and provide an API to support
4543 executing default+fallback menu entries. Renamed the `terminal' menu
4546 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4547 variable declaration.
4548 (grub_menu_execute_callback): New structure declaration.
4549 (grub_menu_execute_callback_t): New typedef.
4550 (grub_menu_execute_with_fallback): New function declaration.
4551 (grub_menu_get_entry): Likewise.
4552 (grub_menu_get_timeout): Likewise.
4553 (grub_menu_set_timeout): Likewise.
4555 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4557 * normal/menu.c (grub_wait_after_message): Moved to
4558 `normal/menu_text.c'.
4559 (draw_border): Likewise.
4560 (print_message): Likewise.
4561 (print_entry): Likewise.
4562 (print_entries): Likewise.
4563 (grub_menu_init_page): Likewise.
4564 (get_entry_number): Likewise.
4565 (print_timeout): Likewise.
4566 (run_menu): Likewise.
4567 (grub_menu_execute_entry): Likewise.
4568 (show_text_menu): Likewise.
4569 (get_and_remove_first_entry_number): New function.
4570 (grub_menu_execute_with_fallback): Likewise.
4571 (get_entry): Renamed to ...
4572 (grub_menu_get_entry): .. this and made it global.
4573 (get_timeout): Renamed to ...
4574 (grub_menu_get_timeout): ... this and made it global.
4575 (set_timeout): Renamed to ...
4576 (grub_menu_set_timeout): ... this and made it global.
4577 (grub_normal_terminal_menu_viewer): Renamed to ...
4578 (grub_normal_text_menu_viewer): ... this.
4580 * normal/menu_text.c: New file. Extracted text-menu-specific code
4583 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4584 (normal_mod_SOURCES): Likewise.
4586 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4587 (normal_mod_SOURCES): Likewise.
4589 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4590 (normal_mod_SOURCES): Likewise.
4592 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4593 (normal_mod_SOURCES): Likewise.
4595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4596 (normal_mod_SOURCES): Likewise.
4598 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4599 (normal_mod_SOURCES): Likewise.
4601 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4602 (normal_mod_SOURCES): Likewise.
4604 2009-02-11 Robert Millan <rmh@aybabtu.com>
4606 * util/grub.d/00_header.in: Update old reference to `font' command.
4608 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4610 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4612 Based on patch from Javier MartÃn.
4614 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4616 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4617 to avoid false positives with FAT.
4618 (grub_fstest_SOURCES): Likewise.
4619 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4620 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4621 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4622 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4623 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4624 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4626 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4628 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4629 bpb.version_specific.fat12_or_fat16.fstype and
4630 bpb.version_specific.fat32.fstype.
4632 2009-02-08 Robert Millan <rmh@aybabtu.com>
4634 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4636 2009-02-08 Robert Millan <rmh@aybabtu.com>
4638 * Makefile.in (host_os, host_cpu): New variables.
4639 (target_os): Remove. Update all users.
4641 2009-02-08 Marco Gerards <marco@gnu.org>
4643 * Makefile.in (enable_grub_emu_usb): New variable.
4644 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4645 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4646 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4647 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4648 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4649 `usbtest.mod' and `usbms.mod'.
4650 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4651 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4652 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4653 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4654 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4657 * disk/usbms.c: New file.
4659 * include/grub/usb.h: Likewise.
4661 * include/grub/usbtrans.h: Likewise.
4663 * include/grub/usbdesc.h: Likewise.
4665 * bus/usb/usbtrans.c: Likewise.
4667 * bus/usb/ohci.c: Likewise.
4669 * bus/usb/uhci.c: Likewise.
4671 * bus/usb/usbhub.c: Likewise.
4673 * bus/usb/usb.c: Likewise.
4675 * commands/usbtest.c: Likewise.
4677 * util/usb.c: Likewise.
4679 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4681 * configure.ac: Test for libusb presence.
4683 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4685 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4687 * kern/mm.c: Add more comments.
4689 2009-02-08 Robert Millan <rmh@aybabtu.com>
4691 Patch from Javier MartÃn.
4692 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4693 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4695 2009-02-08 Robert Millan <rmh@aybabtu.com>
4697 * fs/cpio.c: Split tar functionality to ...
4698 * fs/tar.c: ... here (new file). Update all users.
4700 2009-02-07 Robert Millan <rmh@aybabtu.com>
4702 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4703 backward-incompatible features.
4705 Based on patch from Javier MartÃn, with some adjustments.
4707 2009-02-07 Michael Scherer <misc@mandriva.org>
4709 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4711 2009-02-07 Robert Millan <rmh@aybabtu.com>
4713 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4714 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4715 after the RAID stuff.
4717 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4719 Fixes problem when running vbetest command as reported by
4720 Vladimir Serbinenko <phcoder@gmail.com>.
4722 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4724 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4726 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4727 /dev/md/NpN style mdraid devices.
4729 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4731 * util/unifont2pff.rb: Remove.
4733 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4735 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4738 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4740 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4741 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4742 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4743 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4744 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4745 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4746 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4748 2009-02-02 Christian Franke <franke@computer.org>
4750 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4752 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4754 * INSTALL: Note that we now require at least autoconf 2.59 and
4755 that LZO is optional.
4757 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4759 Base on patch on bug #24154 created by Tomas Tintera
4762 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4764 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4766 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4767 <bero@arklinux.org>.
4769 * normal/parser.y (script_init): Add missing semicolon.
4771 2009-01-31 Colin D Bennett <colin@gibibit.com>
4773 * normal/main.c: Add include to grub/menu_viewer.h.
4774 (free_menu_entry_classes): Added.
4775 (grub_normal_menu_addentry): Added class property handling.
4776 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4777 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4779 * normal/menu_viewer.c: New file.
4781 * normal/menu.c (run_menu_entry): Renamed to ...
4782 (grub_menu_execute_entry): ... this and made it as global.
4783 (grub_menu_run): Renamed to ...
4784 (show_text_menu): ... this and made it local.
4785 (show_text_menu): Adapt to new function names.
4786 (grub_normal_terminal_menu_viewer): New global variable.
4788 * include/grub/menu.h: New file.
4790 * include/grub/menu_viewer.h: New file.
4792 * include/grub/normal.h: Added include to grub/menu.h.
4793 (grub_menu_entry): Moved to include/grub/menu.h.
4794 (grub_menu_entry_t): Likewise.
4795 (grub_menu): Likewise.
4796 (grub_menu_t): Likewise.
4797 (grub_normal_terminal_menu_viewer): Added.
4798 (grub_menu_execute_entry): Likewise.
4799 (grub_menu_run): Removed.
4801 * DISTLIST: Added include/grub/menu.h.
4802 Added include/grub/menu_viewer.h.
4803 Added normal/menu_viewer.c.
4805 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4807 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4808 arglist for menutitle arguments.
4810 * normal/main.c (grub_normal_menu_addentry): Likewise.
4812 * normal/parser.y (menuentry): Likewise.
4814 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4816 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4817 (grub_script_create_cmdmenu): Likewise.
4819 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4821 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4824 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4826 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4828 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4830 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4832 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4834 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4836 2009-01-30 Christian Franke <franke@computer.org>
4838 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4839 in option help text.
4841 2009-01-27 Pavel Roskin <proski@gnu.org>
4843 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4845 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4847 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4849 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4851 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4852 unregister function.
4854 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4856 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4858 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4860 * util/grub-mkfont.c (usage): Fix typo.
4862 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4864 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4866 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4868 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4870 * kern/misc.c (grub_strcasecmp): New function.
4871 (grub_strcasecmp): Use grub_size_t instead of int for length.
4873 * include/grub/misc.h: Update function prototypes.
4875 2009-01-26 Robert Millan <rmh@aybabtu.com>
4877 * configure.ac: Fix cross-compilation check.
4879 2009-01-22 Christian Franke <franke@computer.org>
4881 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4882 (precision) digit string. Allow `.format2' without `format1' (width).
4883 Limit input chars for `%s' output to `format2' if specified. This is
4884 compatible with standard printf ().
4886 2009-01-22 Christian Franke <franke@computer.org>
4888 * disk/ata.c (grub_ata_wait_status): Replace by ...
4889 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4890 other status bits may be invalid while BSY is asserted.
4891 (grub_ata_check_ready): New function.
4892 (grub_ata_cmd): Removed.
4893 (grub_ata_wait_drq): New function.
4894 (grub_ata_strncpy): Remove inline.
4895 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4896 and error check now done by grub_ata_wait_drq ().
4897 (grub_ata_pio_write): Likewise.
4898 (grub_atapi_identify): Set DEV before check for !BSY. Use
4899 grub_ata_wait_drq () to wait for data.
4900 (grub_ata_device_initialize): Add status register check to
4901 detect missing SATA slave devices. Add debug messages.
4902 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4903 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4904 transfer loop by grub_ata_pio_write ().
4905 (grub_ata_identify): Set DEV before check for !BSY. Use
4906 grub_ata_wait_drq () to wait for data.
4907 (grub_ata_setaddress): Set DEV before check for !BSY.
4908 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4909 read/write in one loop. Fix invalid command on write. Fix incomplete
4910 command on (size % batch) == 0. Add missing error check after write of
4911 last block. Add debug messages.
4912 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4914 2009-01-19 Christian Franke <franke@computer.org>
4916 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4917 (GRUB_ATAPI_IREASON_*): Likewise.
4918 (grub_ata_pio_write): Fix timeout error return.
4919 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4920 (grub_atapi_wait_drq): New function.
4921 (grub_atapi_packet): New parameter `size'.
4922 Use grub_atapi_wait_drq () and direct write instead of
4923 grub_ata_pio_write ().
4924 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4925 reads the number of bytes requested by the device for each DRQ
4927 (grub_atapi_write): Remove old implementation, return not
4928 implemented instead.
4930 2009-01-19 Christian Franke <franke@computer.org>
4932 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4933 of 512 to calculate data size.
4934 (grub_scsi_read12): Likewise.
4935 (grub_scsi_write10): Likewise.
4936 (grub_scsi_write12): Likewise.
4937 (grub_scsi_read): Adjust size according to blocksize.
4938 Add checks for invalid blocksize and unaligned transfer.
4940 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4942 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4944 * term/gfxterm.c (write_char): Fix background rendering for wide
4947 2009-01-19 Robert Millan <rmh@aybabtu.com>
4949 * config.guess: Update to latest version from config git.
4950 * config.sub: Likewise.
4952 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4954 * Makefile.in: Change font compilation to use new grub-mkfont instead
4957 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4958 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4959 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4960 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4961 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4962 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4963 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4964 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4965 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4967 2009-01-16 Christian Franke <franke@computer.org>
4969 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4970 (enum grub_ata_timeout_milliseconds): New enum.
4971 (grub_ata_wait_status): Add parameter milliseconds.
4972 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4973 recovery from timed-out commands.
4974 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4975 return grub_errno instead of REG_ERROR.
4976 (grub_ata_pio_write): Add parameter milliseconds.
4977 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4978 Pass milliseconds to grub_ata_wait_status () and
4979 grub_ata_pio_read ().
4980 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4981 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4982 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4983 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4984 It is not suitable for device detection, because DEV bit is ignored,
4985 the command may run too long, and not all devices set the signature
4987 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4988 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4989 Fix device selection, DEV bit must be set first to address the registers
4990 of the correct device.
4991 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4992 grub_ata_pio_read/write ().
4993 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4994 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4996 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4998 * util/grub-editenv.c (main): Use fseeko(), not fseek().
5000 2009-01-13 Bean <bean123ch@gmail.com>
5002 * util/grub-mkfont.c (write_font): forget to remove some debug code.
5004 2009-01-13 Bean <bean123ch@gmail.com>
5006 * Makefile.in: (enable_grub_mkfont): New variable.
5007 (freetype_cflags): Likewise.
5008 (freetype_libs): Likewise.
5010 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5011 (grub_mkfont_SOURCES): New variable.
5012 (grub_mkfont_CFLAGS): Likewise.
5013 (grub_mkfont_LDFLAGS): Likewise.
5015 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5016 library if `--enable-grub-mkfont' is requested.
5017 (enable_grub_mkfont): New variable.
5018 (freetype_cflags): Likewise.
5019 (freetype_libs): Likewise.
5021 * util/grub-mkfont.c: New file.
5023 2009-01-12 Christian Franke <franke@computer.org>
5025 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5026 mode check. Fix setting of compat_use[].
5028 2009-01-10 Robert Millan <rmh@aybabtu.com>
5030 Update a few copyright years which we forgot to do in 2008 (only for
5031 files whose changes made in 2008 were copyright-significant)
5033 * Makefile.in: Add 2008 to Copyright line.
5034 * disk/ieee1275/ofdisk.c: Likewise.
5035 * disk/efi/efidisk.c: Likewise.
5036 * kern/dl.c: Likewise.
5037 * kern/sparc64/ieee1275/init.c: Likewise.
5038 * kern/mm.c: Likewise.
5039 * kern/efi/mm.c: Likewise.
5040 * boot/i386/pc/boot.S: Likewise.
5041 * genfslist.sh: Likewise.
5042 * fs/iso9660.c: Likewise.
5043 * fs/hfs.c: Likewise.
5044 * fs/jfs.c: Likewise.
5045 * fs/minix.c: Likewise.
5046 * fs/ufs.c: Likewise.
5047 * gensymlist.sh.in: Likewise.
5048 * genkernsyms.sh.in: Likewise.
5049 * include/grub/misc.h: Likewise.
5050 * include/grub/types.h: Likewise.
5051 * include/grub/symbol.h: Likewise.
5052 * include/grub/elf.h: Likewise.
5053 * include/grub/kernel.h: Likewise.
5054 * include/grub/disk.h: Likewise.
5055 * include/grub/dl.h: Likewise.
5056 * include/grub/i386/linux.h: Likewise.
5057 * include/grub/i386/pc/biosdisk.h: Likewise.
5058 * include/grub/efi/api.h: Likewise.
5059 * include/grub/efi/pe32.h: Likewise.
5060 * include/grub/util/misc.h: Likewise.
5061 * normal/execute.c: Likewise.
5062 * normal/arg.c: Likewise.
5063 * normal/completion.c: Likewise.
5064 * normal/lexer.c: Likewise.
5065 * normal/parser.y: Likewise.
5066 * normal/misc.c: Likewise.
5067 * commands/i386/pc/vbeinfo.c: Likewise.
5068 * commands/hexdump.c: Likewise.
5069 * commands/terminal.c: Likewise.
5070 * commands/ls.c: Likewise.
5071 * commands/help.c: Likewise.
5072 * partmap/pc.c: Likewise.
5073 * loader/efi/chainloader.c: Likewise.
5074 * loader/multiboot_loader.c: Likewise.
5075 * loader/i386/pc/multiboot2.c: Likewise.
5076 * term/efi/console.c: Likewise.
5077 * term/i386/pc/serial.c: Likewise.
5078 * util/lvm.c: Likewise.
5079 * util/console.c: Likewise.
5080 * util/i386/efi/grub-mkimage.c: Likewise.
5081 * util/raid.c: Likewise.
5083 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
5085 * commands/videotest.c: Removed include to grub/machine/memory.h.
5087 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
5088 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
5089 (video_mod_SOURCES): Removed.
5090 (video_mod_CFLAGS): Likewise.
5091 (video_mod_LDFLAGS): Likewise.
5092 (gfxterm_mod_SOURCES): Likewise.
5093 (gfxterm_mod_CFLAGS): Likewise.
5094 (gfxterm_mod_LDFLAGS): Likewise.
5095 (videotest_mod_SOURCES): Likewise.
5096 (videotest_mod_CFLAGS): Likewise.
5097 (videotest_mod_LDFLAGS): Likewise.
5098 (bitmap_mod_SOURCES): Likewise.
5099 (bitmap_mod_CFLAGS): Likewise.
5100 (bitmap_mod_LDFLAGS): Likewise.
5101 (tga_mod_SOURCES): Likewise.
5102 (tga_mod_CFLAGS): Likewise.
5103 (tga_mod_LDFLAGS): Likewise.
5104 (jpeg_mod_SOURCES): Likewise.
5105 (jpeg_mod_CFLAGS): Likewise.
5106 (jpeg_mod_LDFLAGS): Likewise.
5107 (png_mod_SOURCES): Likewise.
5108 (png_mod_CFLAGS): Likewise.
5109 (png_mod_LDFLAGS): Likewise.
5111 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
5112 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
5113 (video_mod_SOURCES): Added.
5114 (video_mod_CFLAGS): Likewise.
5115 (video_mod_LDFLAGS): Likewise.
5116 (videotest_mod_SOURCES): Likewise.
5117 (videotest_mod_CFLAGS): Likewise.
5118 (videotest_mod_LDFLAGS): Likewise.
5119 (bitmap_mod_SOURCES): Likewise.
5120 (bitmap_mod_CFLAGS): Likewise.
5121 (bitmap_mod_LDFLAGS): Likewise.
5122 (tga_mod_SOURCES): Likewise.
5123 (tga_mod_CFLAGS): Likewise.
5124 (tga_mod_LDFLAGS): Likewise.
5125 (jpeg_mod_SOURCES): Likewise.
5126 (jpeg_mod_CFLAGS): Likewise.
5127 (jpeg_mod_LDFLAGS): Likewise.
5128 (png_mod_SOURCES): Likewise.
5129 (png_mod_CFLAGS): Likewise.
5130 (png_mod_LDFLAGS): Likewise.
5131 (gfxterm_mod_SOURCES): Likewise.
5132 (gfxterm_mod_CFLAGS): Likewise.
5133 (gfxterm_mod_LDFLAGS): Likewise.
5135 * term/gfxterm.c: Removed include to grub/machine/memory.h,
5136 grub/machine/console.h.
5138 2009-01-04 Jerone Young <jerone@gmail.com>
5140 Make on screen instructions clearer
5142 Based on patch created by Jidanni <jidanni@jidanni.org>
5144 * normal/menu.c: print clearer instructions on the screen
5146 2009-01-02 Colin D Bennett <colin@gibibit.com>
5150 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
5151 build system and fixed gfxterm.c to work with different sized fonts.
5153 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
5155 * configure: Re-generated.
5157 * DISTLIST: Removed font/manager.c.
5159 Added font/font_cmd.c.
5161 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
5164 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
5166 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
5168 * kern/term.c: Changed users of grub_utf8_to_ucs4.
5170 * normal/menu.c: Likewise.
5172 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
5173 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
5175 * include/grub/font.h: Replaced with new file.
5177 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
5178 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
5179 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
5180 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
5181 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
5182 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
5183 fg_red, fg_green, fg_blue, fg_alpha.
5184 (grub_video_adapter): Removed blit_glyph.
5185 (grub_video_blit_glyph): Removed.
5187 * font/manager.c: Removed file.
5189 * font/font.c: New file.
5191 * font/font_cmd.c: Likewise.
5193 * video/video.c (grub_video_blit_glyph): Removed.
5195 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
5196 (grub_video_vbe_map_rgba): Likewise.
5197 (grub_video_vbe_unmap_color_int): Likewise.
5198 (grub_video_vbe_blit_glyph): Removed.
5199 (grub_video_vbe_adapter): Removed blit_glyph.
5201 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
5202 (get_pixel): Likewise.
5203 (set_pixel): Likewise.
5205 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
5207 * term/gfxterm.c: Adapted to new font engine.
5209 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
5211 * term/i386/pc/vga.c: Likewise.
5213 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
5215 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5217 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5219 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5221 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5223 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5225 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5227 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5229 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5231 * util/grub.d/00_header.in: Changed to use new loadfont command.
5233 * util/grub-mkconfig_lib.in: Changed font extension.
5235 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
5237 * util/getroot.c (grub_util_get_grub_dev): Add support for
5238 /dev/md/dNNpNN style partitionable mdraid devices.
5240 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
5242 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
5243 at a time limit of the PXE TFTP API correctly.
5244 (grub_pxefs_close): Likewise.
5246 2008-11-29 Robert Millan <rmh@aybabtu.com>
5248 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
5249 grub_ata_device_initialize() calls.
5251 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
5253 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
5255 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
5257 2008-11-28 Robert Millan <rmh@aybabtu.com>
5259 Fix build on powerpc-ieee1275. Based on patch created by
5260 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
5261 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5262 `kern/ieee1275/mmap.c'.
5263 * include/grub/powerpc/ieee1275/memory.h: New file.
5265 Provide grub-install on coreboot.
5266 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
5267 (grub_install_SOURCES): New variable.
5268 * util/i386/pc/grub-install.in: Add a few condition checks to make it
5271 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
5273 * util/grub-fstest.c (grub_term_get_current_input): Change return type
5274 to `grub_term_input_t'.
5275 (grub_term_get_current_output): Change return type to
5276 `grub_term_output_t'.
5278 2008-11-22 Robert Millan <rmh@aybabtu.com>
5280 Fix breakage on coreboot due to declaration mismatch.
5281 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
5282 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
5283 grub_vga_text_cls().
5285 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
5286 comments. Avoid copying one more byte than necessary (just in case).
5288 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
5289 to 0x200000 (avoids trouble with some OFW implementations, and matches
5290 with the one in Yaboot).
5291 Reported by Manoel Abranches
5293 2008-11-20 Robert Millan <rmh@aybabtu.com>
5295 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
5296 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
5298 * util/grub-mkconfig_lib.in (grub_warn): New function.
5299 (convert_system_path_to_grub_path): Use grub_warn() when issuing
5300 warnings, to obtain consistent formatting.
5301 * util/grub.d/00_header.in: Likewise.
5302 * util/update-grub_lib.in: Likewise.
5304 * loader/i386/linux.c (allocate_pages): Fix a warning.
5305 Move comment text to `#error' stanza.
5307 Harmonize ieee1275's grub_available_iterate() with the generic
5308 grub_machine_mmap_iterate() interface (fixes a recently-introduced
5309 build problem on i386-ieee1275):
5310 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
5311 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
5312 parameter `type'. Update all users of this function.
5313 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5314 `kern/ieee1275/mmap.c'.
5315 * kern/ieee1275/init.c
5316 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
5318 (grub_machine_mmap_iterate): ... this.
5319 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
5320 return type to `grub_err_t'. Update all implementations of this
5322 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
5325 Add `lsmmap' command (lists firmware-provided memory map):
5326 * commands/lsmmap.c: New file.
5327 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
5328 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
5330 * conf/powerpc-ieee1275.rmk: Likewise.
5331 * conf/i386-coreboot.rmk: Likewise.
5332 * conf/i386-ieee1275.rmk: Likewise.
5334 2008-11-19 Robert Millan <rmh@aybabtu.com>
5336 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
5337 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5338 constraints to initrd allocation (based on code from
5339 loader/i386/pc/linux.c). Without them, initrd was allocated too high
5340 for Linux to find it.
5342 2008-11-14 Robert Millan <rmh@aybabtu.com>
5344 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5345 order to cope with duplicate slashes.
5347 2008-11-14 Robert Millan <rmh@aybabtu.com>
5349 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5350 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
5351 don't want to mess with lower memory, because it is used in the Linux
5354 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
5355 an appropriate place in lower memory, between 0x10000 and 0x90000,
5356 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
5357 is in our heap (probably as a result of it being corrupted during
5358 decompression). Add #error instance with comment to explain why this
5359 loader isn't currently usable on PC/BIOS.
5361 2008-11-14 Robert Millan <rmh@aybabtu.com>
5363 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
5364 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
5366 2008-11-12 Robert Millan <rmh@aybabtu.com>
5368 Make loader/i386/linux.c buildable on i386-pc (although disabled).
5370 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5371 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5373 * include/grub/i386/pc/memory.h: ... to here.
5375 2008-11-12 Robert Millan <rmh@aybabtu.com>
5377 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5380 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5381 (grub_console_cur_color, grub_console_real_putchar)
5382 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5383 (grub_console_setcolorstate, grub_console_setcolor)
5384 (grub_console_getcolor): Move from here ...
5385 * include/grub/i386/vga_common.h: ... to here (new file).
5387 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5388 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5390 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5391 `<grub/i386/vga_common.h>'.
5393 2008-11-12 Robert Millan <rmh@aybabtu.com>
5395 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5396 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5397 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5399 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5400 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5402 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5403 grub_console_init() with call to grub_vga_text_init().
5404 (grub_machine_fini): Replace call to
5405 grub_console_fini() with call to grub_vga_text_fini() and
5406 grub_at_keyboard_fini().
5408 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5409 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5410 (grub_console_setcolorstate, grub_console_setcolor)
5411 (grub_console_getcolor): New function prototypes.
5413 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5414 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5415 (grub_vga_text_setcursor): Static-ize.
5416 (grub_vga_text_term): New structure.
5417 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5419 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5420 (grub_console_cur_color, grub_console_standard_color)
5421 (grub_console_normal_color, grub_console_highlight_color)
5422 (map_char, grub_console_putchar, grub_console_getcharwidth)
5423 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5424 (grub_console_getcolor): Move from here ...
5425 * term/i386/vga_common.c: ... to here (same function names).
5427 2008-11-12 Robert Millan <rmh@aybabtu.com>
5429 Use newly-added Multiboot support in coreboot.
5431 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5432 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5434 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5435 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5436 (codestart): Store the MBI in `startup_multiboot_info' when we're
5437 being loaded using Multiboot.
5439 * kern/i386/coreboot/init.c (grub_machine_init): Move
5440 grub_at_keyboard_init() call to beginning of function (useful for
5441 debugging). Call grub_machine_mmap_init() before attempting to use
5442 grub_machine_mmap_iterate().
5443 (grub_lower_mem, grub_upper_mem): Move from here ...
5444 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5447 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5450 2008-11-12 Robert Millan <rmh@aybabtu.com>
5452 Fix a regression introduced by the at_keyboard.mod split. Because
5453 some terminals are default on some platforms and non-default on
5454 others, the first terminal being registered determines which is
5455 going to be default.
5457 * kern/term.c (grub_term_register_input): If this is the first
5458 terminal being registered, set it as the current one.
5459 (grub_term_register_output): Likewise.
5461 * term/efi/console.c (grub_console_init): Do not call
5462 grub_term_set_current_output() or grub_term_set_current_input().
5463 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5464 * term/i386/pc/console.c (grub_console_init): Likewise.
5465 (grub_console_fini): Do not call grub_term_set_current_input()
5466 (but leave grub_term_set_current_output() to restore text mode).
5468 2008-11-10 Robert Millan <rmh@aybabtu.com>
5470 * util/grub.d/00_header.in: Add backward compatibility check for
5471 versions of terminal.mod that don't understand `terminal_input' or
5474 2008-11-09 Robert Millan <rmh@aybabtu.com>
5476 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5477 `terminal_input' / `terminal_output', not `terminal'.
5479 2008-11-08 Robert Millan <rmh@aybabtu.com>
5481 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5482 (DISTCLEANFILES): Add `build_env.mk'.
5484 2008-11-08 Robert Millan <rmh@aybabtu.com>
5486 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5487 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5488 members. Update all users.
5489 * util/console.c (grub_ncurses_term): Split in ...
5490 (grub_ncurses_term_input): ... this, and ...
5491 (grub_ncurses_term_output): ... this. Update all users.
5492 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5494 2008-11-08 Robert Millan <rmh@aybabtu.com>
5496 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5497 (PKGDATA): Add $(pkgdata_SRCDIR).
5498 (pkglib_BUILDDIR): New variable.
5499 (pkgdata_SRCDIR): New variable.
5500 (build_env.mk): New target.
5501 (include_DATA): New variable.
5502 (install-local): Install $(include_DATA) files in $(includedir).
5504 2008-11-07 Pavel Roskin <proski@gnu.org>
5506 * gendistlist.sh: Use C locale for sorting to ensure consistent
5507 output on all systems.
5509 * util/grub.d/00_header.in: Remove incorrect space before
5512 2008-11-07 Robert Millan <rmh@aybabtu.com>
5514 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5516 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5517 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5518 (based on find_multi_boot1_header).
5519 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5520 using find_multi_boot2_header(), and abort if neither Multiboot or
5521 Multiboot headers were found.
5523 2008-11-07 Robert Millan <rmh@aybabtu.com>
5525 Modularize at_keyboard.mod:
5527 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5528 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5529 (at_keyboard_mod_LDFLAGS): New variables.
5531 Actual terminal split:
5533 * include/grub/term.h (struct grub_term): Split in ...
5534 (struct grub_term_input): ... this, and ...
5535 (struct grub_term_output): ... this. Update all users.
5536 (grub_term_set_current): Split in ...
5537 (grub_term_set_current_input): ... this, and ...
5538 (grub_term_set_current_output): ... this.
5539 (grub_term_get_current): Split in ...
5540 (grub_term_get_current_input): ... this, and ...
5541 (grub_term_get_current_output): ... this.
5542 (grub_term_register): Split in ...
5543 (grub_term_register_input): ... this, and ...
5544 (grub_term_register_output): ... this.
5545 (grub_term_unregister): Split in ...
5546 (grub_term_unregister_input): ... this, and ...
5547 (grub_term_unregister_output): ... this.
5548 (grub_term_iterate): Split in ...
5549 (grub_term_iterate_input): ... this, and ...
5550 (grub_term_iterate_output): ... this.
5552 * kern/term.c (grub_term_list): Split in ...
5553 (grub_term_list_input): ... this, and ...
5554 (grub_term_list_output): ... this. Update all users.
5555 (grub_cur_term): Split in ...
5556 (grub_cur_term_input): ... this, and ...
5557 (grub_cur_term_output): ... this. Update all users.
5558 (grub_term_set_current): Split in ...
5559 (grub_term_set_current_input): ... this, and ...
5560 (grub_term_set_current_output): ... this.
5561 (grub_term_get_current): Split in ...
5562 (grub_term_get_current_input): ... this, and ...
5563 (grub_term_get_current_output): ... this.
5564 (grub_term_register): Split in ...
5565 (grub_term_register_input): ... this, and ...
5566 (grub_term_register_output): ... this.
5567 (grub_term_unregister): Split in ...
5568 (grub_term_unregister_input): ... this, and ...
5569 (grub_term_unregister_output): ... this.
5570 (grub_term_iterate): Split in ...
5571 (grub_term_iterate_input): ... this, and ...
5572 (grub_term_iterate_output): ... this.
5574 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5575 a check for input and one for output (and only attempt to get keys
5576 from user when input works).
5578 * util/grub-probe.c (grub_term_get_current): Split in ...
5579 (grub_term_get_current_input): ... this, and ...
5580 (grub_term_get_current_output): ... this.
5581 * util/grub-fstest.c: Likewise.
5582 * util/i386/pc/grub-setup.c: Likewise.
5583 * util/grub-editenv.c: Likewise.
5585 Portability adjustments:
5587 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5588 `term/i386/pc/at_keyboard.c'.
5589 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5590 grub_keyboard_controller_init() (now handled by terminal .init).
5591 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5592 grub_at_keyboard_init().
5593 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5594 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5595 at_keyboard.mod via input terminal interface).
5596 * include/grub/i386/coreboot/console.h: Convert into a stub for
5597 `<grub/i386/pc/console.h>'.
5599 Migrate full terminals to new API:
5601 * term/efi/console.c (grub_console_term): Split into ...
5602 (grub_console_term_input): ... this, and ...
5603 (grub_console_term_output): ... this. Update all users.
5604 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5605 (grub_ofconsole_init): Split into ...
5606 (grub_ofconsole_init_input): ... this, and ...
5607 (grub_ofconsole_init_output): ... this.
5608 (grub_ofconsole_term): Split into ...
5609 (grub_ofconsole_term_input): ... this, and ...
5610 (grub_ofconsole_term_output): ... this. Update all users.
5611 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5612 (grub_serial_term_input): ... this, and ...
5613 (grub_serial_term_output): ... this. Update all users.
5614 * term/i386/pc/console.c (grub_console_term): Split into ...
5615 (grub_console_term_input): ... this, and ...
5616 (grub_console_term_output): ... this. Update all users.
5617 (grub_console_term_input): Only enable it on PC/BIOS platform.
5618 (grub_console_init): Remove grub_keyboard_controller_init() call.
5620 Migrate input terminals to new API:
5622 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5623 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5624 i386-specific anyway).
5625 (grub_console_checkkey): Rename to ...
5626 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5628 (grub_keyboard_controller_orig): New variable.
5629 (grub_console_getkey): Rename to ...
5630 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5632 (grub_keyboard_controller_init): Static-ize. Save original
5633 controller value so that it can be restored ...
5634 (grub_keyboard_controller_fini): ... here (new function).
5635 (grub_at_keyboard_term): New structure.
5636 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5639 Migrate output terminals to new API:
5641 * term/i386/pc/vga.c (grub_vga_term): Change type to
5642 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5643 members. Update all users.
5644 * term/gfxterm.c (grub_video_term): Change type to
5645 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5646 members. Update all users.
5647 * include/grub/i386/pc/console.h (grub_console_checkkey)
5648 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5651 Migrate `terminal' command and userland tools to new API:
5653 * commands/terminal.c (grub_cmd_terminal): Split into ...
5654 (grub_cmd_terminal_input): ... this, and ...
5655 (grub_cmd_terminal_output): ... this.
5656 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5657 `terminal_input' and `terminal_output'.
5658 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5659 `terminal_input' / `terminal_output' API.
5660 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5661 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5662 provided ${GRUB_TERMINAL}, convert it).
5664 2008-11-04 Robert Millan <rmh@aybabtu.com>
5666 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5668 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5670 2008-11-03 Bean <bean123ch@gmail.com>
5672 * kern/elf.c (grub_elf32_load): Revert to previous code.
5673 (grub_elf64_load): Likewise.
5675 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5677 2008-11-01 Robert Millan <rmh@aybabtu.com>
5679 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5680 (TARGET_CPPFLAGS): Likewise.
5681 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5683 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5685 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5687 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5689 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5690 addition of objects until the code is not going to be able to fail.
5692 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5694 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5695 (add a missing NULL check, and correct them by moving the pointer
5696 operations after the actual check).
5698 2008-10-29 Robert Millan <rmh@aybabtu.com>
5700 * util/i386/pc/grub-install.in: Handle empty string as output from
5701 make_system_path_relative_to_its_root().
5703 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5705 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5706 circular metadata worst case scenario. If the metadata is circular
5707 then copy the wrap in place.
5708 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5709 project lib/format_text/layout.h
5710 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5712 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5714 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5716 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5718 * util/update-grub_lib.in: Mention filename in warning message.
5720 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5722 * NEWS: Update for rename of update-grub to grub-mkconfig.
5724 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5726 * util/update-grub_lib.in: Copy to ...
5727 * util/grub-mkconfig_lib.in: ... this. Update all users.
5728 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5729 * util/update-grub.in: Rename to ...
5730 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5731 option. Add `--output' option to allow users to specify the generated
5732 configuration file. Default to stdout.
5733 (update_grub_dir): Rename to ...
5734 (grub_mkconfig_dir): ... this.
5735 (grub_cfg): Default to an empty string.
5736 * conf/common.rmk (update-grub): Rename to ...
5737 (grub-mkconfig): ... this.
5738 (update-grub_lib): Copy to ...
5739 (grub-mkconfig_lib): ... this.
5740 (update-grub_SCRIPTS): Copy to ...
5741 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5742 (update-grub_DATA): Rename to ...
5743 (grub-mkconfig_DATA): ... this.
5745 2008-09-28 Robert Millan <rmh@aybabtu.com>
5747 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5748 to `modified'. Add the real `created' field.
5749 (grub_iso9660_uuid): Use `modified' rather than `created' for
5750 constructing the UUID.
5752 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5754 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5755 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5757 2008-09-28 Bean <bean123ch@gmail.com>
5759 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5760 Thanks to Christian Franke for finding this bug.
5762 2008-09-25 Robert Millan <rmh@aybabtu.com>
5764 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5765 instances of grub_util_get_disk_name() (see previous commit).
5767 2008-09-25 Robert Millan <rmh@aybabtu.com>
5769 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5770 `util/i386/get_disk_name.c'.
5771 * conf/i386-efi.rmk: Likewise.
5772 * conf/x86_64-efi.rmk: Likewise.
5773 * conf/i386-coreboot.rmk: Likewise.
5774 * conf/i386-ieee1275.rmk: Likewise.
5775 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5776 `util/ieee1275/get_disk_name.c'.
5777 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5778 * util/ieee1275/get_disk_name.c: Remove file.
5779 * util/i386/get_disk_name.c: Remove file.
5780 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5781 "hd%d" for device.map entries, rather than using
5782 grub_util_get_disk_name().
5784 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5786 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5788 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5790 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5792 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5794 (GRUB_TERM_PPAGE): Changed to 0x4900.
5796 2008-09-24 Robert Millan <rmh@aybabtu.com>
5798 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5799 macros (they were i386-pc specific).
5800 * include/grub/sparc64/ieee1275/console.h: Likewise.
5801 * include/grub/efi/console.h: Likewise.
5803 2008-09-22 Bean <bean123ch@gmail.com>
5805 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5806 resident and in attribute list.
5808 * include/grub/ntfs.h (BMP_LEN): Removed.
5810 2008-09-22 Bean <bean123ch@gmail.com>
5812 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5813 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5815 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5816 error occurs, as grub_disk_open will call grub_disk_close, which will
5817 call p->close (scsi).
5819 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5821 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5822 (AC_PREREQ): Bumped to 2.59.
5823 (AC_TRY_COMPILE): Replace obsolete macro with ...
5824 (AC_COMPILE_IFELSE): ... this.
5825 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5826 (AC_LINK_IFELSE): ... this.
5828 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5830 * autogen.sh: Add a call to `gendistlist.sh'.
5832 2008-09-19 Christian Franke <franke@computer.org>
5834 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5835 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5836 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5837 Export __enable_execute_stack() to modules.
5838 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5841 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5843 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5846 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5848 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5849 #include <grub/util/hostdisk.h>.
5851 2008-09-08 Robert Millan <rmh@aybabtu.com>
5853 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5854 segments when their filesz is zero (grub_file_read() interprets
5855 zero-size as "read until EOF", which results in memory corruption).
5856 Use `lowest_segment' rather than 0 for calculating the current
5857 segment load address.
5859 2008-09-08 Robert Millan <rmh@aybabtu.com>
5861 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5862 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5863 clobbered useful information.
5865 2008-09-08 Robert Millan <rmh@aybabtu.com>
5867 * include/grub/util/biosdisk.h: Move to ...
5868 * include/grub/util/hostdisk.h: ... here. Update all users.
5869 * util/biosdisk.c: Move to ...
5870 * util/hostdisk.c: ... here. Update all users.
5872 2008-09-07 Robert Millan <rmh@aybabtu.com>
5874 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5876 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5877 and length can be stored directly in the `mbi->mmap_addr' and
5878 `mbi->mmap_length' struct fields.
5880 2008-09-07 Robert Millan <rmh@aybabtu.com>
5882 * conf/i386.rmk: New file. Provides declaration for building
5884 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5885 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5887 Include `conf/i386.mk'.
5888 * conf/i386-efi.rmk: Likewise.
5889 * conf/x86_64-efi.rmk: Likewise.
5890 * conf/i386-coreboot.rmk: Likewise.
5891 * conf/i386-ieee1275.rmk: Likewise.
5893 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5895 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5896 Adds optimization support for BGR based modes.
5898 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5899 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5900 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5901 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5902 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5903 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5904 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5905 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5906 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5907 (grub_video_i386_vbeblit_index_index): Likewise.
5908 (grub_video_i386_vbeblit_replace_directN): Added.
5909 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5910 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5911 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5912 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5913 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5914 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5915 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5916 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5917 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5918 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5919 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5920 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5921 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5923 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5924 (grub_video_i386_vbefill_R8G8B8): Likewise.
5925 (grub_video_i386_vbefill_index): Likewise.
5926 (grub_video_i386_vbefill_direct32): Added.
5927 (grub_video_i386_vbefill_direct24): Likewise.
5928 (grub_video_i386_vbefill_direct16): Likewise.
5929 (grub_video_i386_vbefill_direct8): Likewise.
5931 * include/grub/video.h (grub_video_blit_format): Removed
5932 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5933 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5934 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5935 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5936 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5938 * video/video.c (grub_video_get_blit_format): Updated to use new
5939 blit formats. Added handling for 16 bit color modes.
5941 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5943 (common_blitter): Updated to use new blitters.
5945 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5947 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5948 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5949 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5950 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5951 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5952 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5953 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5954 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5955 (grub_video_i386_vbeblit_index_index): Likewise.
5956 (grub_video_i386_vbeblit_replace_directN): Added.
5957 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5958 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5959 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5960 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5961 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5962 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5963 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5964 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5965 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5966 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5967 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5968 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5969 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5971 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5972 (grub_video_i386_vbefill_R8G8B8): Likewise.
5973 (grub_video_i386_vbefill_index): Likewise.
5974 (grub_video_i386_vbefill_direct32): Added.
5975 (grub_video_i386_vbefill_direct24): Likewise.
5976 (grub_video_i386_vbefill_direct16): Likewise.
5977 (grub_video_i386_vbefill_direct8): Likewise.
5979 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5982 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5985 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5988 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5991 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5993 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5996 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5998 * fs/iso9660.c (grub_iso9660_date): New structure.
5999 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6000 (grub_iso9660_uuid): New function.
6002 2008-09-05 Bean <bean123ch@gmail.com>
6004 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6006 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6007 insensitive bit for names in Win32 and Win32 & DOS namespace.
6009 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6011 * include/grub/types.h (LONG_MAX): Likewise.
6013 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6015 * util/getroot.c: Include <config.h>.
6016 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6017 add support for /dev/md/N devices and handle LVM double dash escaping.
6019 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6021 * config.guess: Update to latest version from config git.
6022 * config.sub: Likewise.
6024 2008-09-03 Robert Millan <rmh@aybabtu.com>
6026 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6027 `disk->total_sectors'.
6029 2008-09-01 Colin D Bennett <colin@gibibit.com>
6031 * include/grub/normal.h: Fixed incorrect comment for
6032 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6034 2008-09-01 Colin D Bennett <colin@gibibit.com>
6036 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6037 values with defines.
6039 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6040 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6041 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6042 (GRUB_VBE_MODEATTR_COLOR): Likewise.
6043 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6044 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6045 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6046 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6047 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6048 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6049 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6050 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6051 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6052 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6053 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6054 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6055 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6056 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6057 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6059 2008-08-31 Robert Millan <rmh@aybabtu.com>
6061 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6063 (grub_multiboot): Fix a few warnings.
6065 2008-08-31 Robert Millan <rmh@aybabtu.com>
6067 * loader/i386/pc/multiboot.c: Update comment not to say that
6068 boot_device support is unimplemented.
6070 2008-08-31 Robert Millan <rmh@aybabtu.com>
6072 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
6073 or memory map support are unimplemented.
6075 2008-08-31 Colin D Bennett <colin@gibibit.com>
6077 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
6079 2008-08-31 Colin D Bennett <colin@gibibit.com>
6081 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
6082 total video memory in 'vbeinfo' output; show color format details for
6085 2008-08-30 Pavel Roskin <proski@gnu.org>
6087 * util/genmoddep.c: Remove for real this time.
6088 * DISTLIST: Remove util/genmoddep.c.
6090 2008-08-30 Robert Millan <rmh@aybabtu.com>
6092 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
6093 as required by Multiboot spec (it was already 4-byte aligned, but
6096 2008-08-29 Pavel Roskin <proski@gnu.org>
6098 * kern/powerpc/ieee1275/crt0.S: Rename to ...
6099 * kern/powerpc/ieee1275/startup.S: ... this.
6100 * conf/powerpc-ieee1275.rmk: Adjust for the above.
6101 * DISTLIST: Likewise.
6103 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
6104 grub/cpu/kernel.h. Add start label for consistency with other
6105 platforms. Add grub_prefix immediately after start. Add jump
6106 to the code after grub_prefix.
6107 * include/grub/powerpc/kernel.h: Provide valid values for
6108 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
6110 2008-08-29 Bean <bean123ch@gmail.com>
6112 * configure.ac: Change host_os to cygwin for mingw.
6113 (asprintf): New check for function.
6115 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
6116 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
6118 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
6119 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6120 sync, sleep and grub_util_get_disk_size for mingw.
6122 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
6123 to get size in mingw.
6124 (open_device): Use flag O_BINARY if it's defined.
6125 (find_root_device): Add dummy code for mingw.
6127 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
6128 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
6129 (get_scsi_disk_name): Return 0 for mingw.
6131 * util/hostfs.c: #include <grub/util/misc.h>.
6132 (grub_hostfs_open): Use "rb" flag to open file, use
6133 grub_util_get_disk_size to get disk size for mingw.
6135 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
6136 (asprintf): New function if HAVE_ASPRINTF is not set.
6137 (sync): New function for mingw.
6139 (grub_util_get_disk_size): Likewise.
6141 2008-08-28 Pavel Roskin <proski@gnu.org>
6143 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6146 2008-08-28 Robert Millan <rmh@aybabtu.com>
6148 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
6150 2008-08-28 Robert Millan <rmh@aybabtu.com>
6152 Change find_grub_drive() syntax so it doesn't prevent it from
6153 detecting NULL names as errors.
6155 * util/biosdisk.c (find_grub_drive): Move free slot search code
6157 (find_free_slot): ... to here.
6158 (read_device_map): Use find_free_slot() to search for free slots.
6160 2008-08-27 Marco Gerards <marco@gnu.org>
6162 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
6163 (scsi_mod_SOURCES): New variable.
6164 (scsi_mod_CFLAGS): Likewise
6165 (scsi_mod_LDFLAGS): Likewise.
6167 * disk/scsi.c: New file.
6169 * include/grub/scsi.h: Likewise.
6171 * include/grub/scsicmd.h: Likewise.
6173 * disk/ata.c: Include <grub/scsi.h>.
6174 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
6176 (grub_ata_iterate): Skip ATAPI devices.
6177 (grub_ata_open): Only handle ATAPI devices.
6178 (struct grub_atapi_read): Removed.
6179 (grub_atapi_readsector): Likewise.
6180 (grub_ata_read): No longer handle ATAPI devices.
6181 (grub_ata_write): Likewise.
6182 (grub_atapi_iterate): New function.
6183 (grub_atapi_read): Likewise.
6184 (grub_atapi_write): Likewise.
6185 (grub_atapi_open): Likewise.
6186 (grub_atapi_close): Likewise.
6187 (grub_atapi_dev): New variable.
6188 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
6189 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
6191 * include/grub/disk.h (enum grub_disk_dev_id): Add
6192 `GRUB_DISK_DEVICE_SCSI_ID'.
6194 2008-08-26 Robert Millan <rmh@aybabtu.com>
6196 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
6197 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
6200 2008-08-23 Bean <bean123ch@gmail.com>
6202 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
6203 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6204 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
6205 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
6207 (raid5rec_mod_SOURCES): New macro.
6208 (raid5rec_mod_CFLAGS): Likewise.
6209 (raid5rec_mod_LDFLAGS): Likewise.
6210 (raid6rec_mod_SOURCES): Likewise.
6211 (raid6rec_mod_CFLAGS): Likewise.
6212 (raid6rec_mod_LDFLAGS): Likewise.
6213 (mdraid_mod_SOURCES): Likewise.
6214 (mdraid_mod_CFLAGS): Likewise.
6215 (mdraid_mod_LDFLAGS): Likewise.
6216 (dm_nv_mod_SOURCES): Likewise.
6217 (dm_nv_mod_CFLAGS): Likewise.
6218 (dm_nv_mod_LDFLAGS): Likewise.
6220 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
6221 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6222 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6224 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
6225 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6227 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6229 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6231 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6233 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6235 * disk/raid5_recover.c: New file.
6237 * disk/raid6_recover.c: Likewise.
6239 * disk/mdraid_linux.c: Likewise.
6241 * disk/dmraid_nvidia.c: Likewise.
6243 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
6246 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
6247 calculate the size of raid device.
6248 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
6249 different layout of raid5.
6250 (grub_raid_scan_device): Remove code specific to mdraid.
6251 (grub_raid_list): New variable.
6252 (free_array): New function.
6253 (grub_raid_register): Likewise.
6254 (grub_raid_unregister): Likewise.
6255 (grub_raid_rescan): Likewise.
6256 (GRUB_MOD_INIT): Don't iterate device here.
6257 (GRUB_MOD_FINI): Use free_array to release resource.
6259 * include/grub/raid.h: Remove macro and structure specific to mdraid.
6260 (grub_raid5_recover_func_t): New function variable type.
6261 (grub_raid6_recover_func_t): Likewise.
6262 (grub_raid5_recover_func): New variable.
6263 (grub_raid6_recover_func): Likewise.
6264 (grub_raid_register): New function.
6265 (grub_raid_unregister): Likewise.
6266 (grub_raid_rescan): Likewise.
6267 (grub_raid_block_xor): Likewise.
6269 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
6270 (CMD_CRC): New macro.
6272 (read_file): Handle device as well as file.
6273 (cmd_crc): New function.
6274 (fstest): Handle multiple disks.
6275 (options): Remove part, raw and long, add root and diskcount.
6276 (usage): Add crc, remove -p, -r, -l, add -r and -c.
6277 (main): Find the first non option entry and ignore subsequent options,
6278 add handling for the new options, support multiple disks.
6280 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
6282 2008-08-23 Bean <bean123ch@gmail.com>
6284 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
6286 * genfslist.sh: Ignore kernel.mod.
6288 * genpartmaplist.sh: Likewise.
6290 2008-08-23 Robert Millan <rmh@aybabtu.com>
6292 * util/getroot.c (find_root_device): Skip anything that starts with
6293 a dot, not just directories. This avoids things like /dev/.tmp.md0.
6295 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
6297 * util/update-grub.in (GRUB_GFXMODE): Export variable.
6298 * util/grub.d/00_header.in: Allow the administrator to change default
6299 gfxmode via ${GRUB_GFXMODE}.
6301 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
6303 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
6305 2008-08-21 Robert Millan <rmh@aybabtu.com>
6307 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
6309 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
6310 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
6312 2008-08-20 Carles Pina i Estany <carles@pina.cat>
6314 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
6315 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
6317 2008-08-19 Robert Millan <rmh@aybabtu.com>
6319 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
6320 (struct grub_virtual_screen): Remove `cursor_color'.
6321 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
6323 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
6325 2008-08-18 Robert Millan <rmh@aybabtu.com>
6327 Unify (identical) linux_normal.c files.
6328 * loader/i386/efi/linux_normal.c: Move from here ...
6329 * loader/linux_normal.c: ... to here. Update all users.
6330 * loader/i386/pc/linux_normal.c: Delete. Update all users.
6331 * loader/i386/ieee1275/linux_normal.c: Likewise.
6333 2008-08-18 Robert Millan <rmh@aybabtu.com>
6335 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
6336 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
6337 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
6338 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
6339 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
6341 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6342 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6343 (GRUB_LINUX_CL_END_OFFSET): ... to here.
6344 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6345 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
6346 (GRUB_EFI_CL_END_OFFSET): Rename to ...
6347 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
6348 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6349 Initialize `params->video_cursor_x' and `params->video_cursor_y'
6350 portably using grub_getxy().
6351 Replace `-EFI' with `-bzImage' in boot message.
6353 2008-08-17 Robert Millan <rmh@aybabtu.com>
6355 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6357 2008-08-17 Robert Millan <rmh@aybabtu.com>
6359 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6361 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6362 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6363 (grub_machine_mmap_iterate): New function declaration.
6364 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6366 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6369 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6370 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6371 Move e820 parsing from here ...
6372 * kern/i386/pc/mmap.c: New file.
6373 (grub_machine_mmap_iterate): ... to here.
6375 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6376 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6377 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
6378 (grub_available_iterate): Redeclare to return `void', and redeclare
6379 its hook to use grub_uint64_t as addr and size parameters, and rename
6381 (grub_machine_mmap_iterate): ... this. Update all users.
6383 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6384 to make it more readable. Rename to ...
6385 (grub_machine_mmap_iterate): ... this.
6387 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6388 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6389 (grub_multiboot): Allocate an extra region after the payload, and fill
6390 it with a Multiboot memory map. Adjust a.out loader to calculate size
6391 with the extra space.
6392 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6393 with the extra space.
6395 2008-08-17 Carles Pina i Estany <carles@pina.cat>
6397 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
6399 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
6401 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6402 mdate-sh to the list `find' searches for.
6403 * DISTLIST: Regenerated.
6405 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
6407 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6408 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
6409 genmoddep.awk, gensymlist.sh.in.
6410 (DISTDIRS): Add bus, docs, hook, lib.
6411 * DISTLIST: Regenerated.
6412 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
6414 2008-08-16 Robert Millan <rmh@aybabtu.com>
6416 * disk/raid.c (grub_raid_init): Handle/report errors set by
6417 grub_device_iterate().
6418 * disk/lvm.c (grub_lvm_init): Likewise.
6420 2008-08-15 Bean <bean123ch@gmail.com>
6422 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6424 (datetime_mod_SOURCES): New macro.
6425 (datetime_mod_CFLAGS): Likewise.
6426 (datetime_mod_LDFLAGS): Likewise.
6427 (date_mod_SOURCES): Likewise.
6428 (date_mod_CFLAGS): Likewise.
6429 (date_mod_LDFLAGS): Likewise.
6430 (datehook_mod_SOURCES): Likewise.
6431 (datehook_mod_CFLAGS): Likewise.
6432 (datehook_mod_LDFLAGS): Likewise.
6434 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6436 (datetime_mod_SOURCES): New macro.
6437 (datetime_mod_CFLAGS): Likewise.
6438 (datetime_mod_LDFLAGS): Likewise.
6439 (date_mod_SOURCES): Likewise.
6440 (date_mod_CFLAGS): Likewise.
6441 (date_mod_LDFLAGS): Likewise.
6442 (datehook_mod_SOURCES): Likewise.
6443 (datehook_mod_CFLAGS): Likewise.
6444 (datehook_mod_LDFLAGS): Likewise.
6446 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6448 (datetime_mod_SOURCES): New macro.
6449 (datetime_mod_CFLAGS): Likewise.
6450 (datetime_mod_LDFLAGS): Likewise.
6451 (date_mod_SOURCES): Likewise.
6452 (date_mod_CFLAGS): Likewise.
6453 (date_mod_LDFLAGS): Likewise.
6454 (datehook_mod_SOURCES): Likewise.
6455 (datehook_mod_CFLAGS): Likewise.
6456 (datehook_mod_LDFLAGS): Likewise.
6458 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6460 (datetime_mod_SOURCES): New macro.
6461 (datetime_mod_CFLAGS): Likewise.
6462 (datetime_mod_LDFLAGS): Likewise.
6463 (date_mod_SOURCES): Likewise.
6464 (date_mod_CFLAGS): Likewise.
6465 (date_mod_LDFLAGS): Likewise.
6466 (datehook_mod_SOURCES): Likewise.
6467 (datehook_mod_CFLAGS): Likewise.
6468 (datehook_mod_LDFLAGS): Likewise.
6470 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6472 (datetime_mod_SOURCES): New macro.
6473 (datetime_mod_CFLAGS): Likewise.
6474 (datetime_mod_LDFLAGS): Likewise.
6475 (date_mod_SOURCES): Likewise.
6476 (date_mod_CFLAGS): Likewise.
6477 (date_mod_LDFLAGS): Likewise.
6478 (datehook_mod_SOURCES): Likewise.
6479 (datehook_mod_CFLAGS): Likewise.
6480 (datehook_mod_LDFLAGS): Likewise.
6482 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6484 * commands/date.c: New file.
6486 * hook/datehook.c: Likewise.
6488 * include/grub/lib/datetime.h: Likewise.
6490 * include/grub/i386/cmos.h: Likewise.
6492 * lib/datetime.c: Likewise.
6494 * lib/i386/datetime.c: Likewise.
6496 * lib/efi/datetime.c: Likewise.
6498 2008-08-14 Robert Millan <rmh@aybabtu.com>
6500 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6501 (grub_mkelfimage_SOURCES): New variable.
6502 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6504 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6505 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6506 * conf/powerpc-ieee1275.rmk: Likewise.
6507 * conf/i386-ieee1275.rmk: Likewise.
6509 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6510 * kern/i386/coreboot/init.c: Likewise.
6512 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6513 with `<grub/cpu/kernel.h>'.
6514 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6516 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6517 * kern/i386/coreboot/startup.S: Likewise.
6519 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6520 (GRUB_MOD_GAP): Remove.
6521 * include/grub/powerpc/kernel.h: New file.
6522 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6523 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6524 * include/grub/i386/kernel.h: New file.
6525 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6526 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6527 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6529 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6531 Use --directory when invoking grub_mkimage.
6533 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6534 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6535 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6536 and GRUB_KERNEL_CPU_PREFIX.
6538 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6540 * include/grub/err.h (grub_err_printf): New function prototype.
6541 * util/misc.c (grub_err_printf): New function.
6542 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6544 * kern/err.c (grub_print_error): Use grub_err_printf.
6546 2008-08-13 Robert Millan <rmh@aybabtu.com>
6548 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6550 2008-08-13 Robert Millan <rmh@aybabtu.com>
6552 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6555 2008-08-12 Robert Millan <rmh@aybabtu.com>
6557 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6558 of the relocation code from here ...
6559 (grub_multiboot): ... to here.
6560 (forward_relocator, backward_relocator): Move from here ...
6561 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6562 (grub_multiboot_backward_relocator): ... to here.
6563 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6564 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6565 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6566 (grub_multiboot_forward_relocator_end)
6567 (grub_multiboot_backward_relocator)
6568 (grub_multiboot_backward_relocator_end): New variables.
6570 2008-08-12 Bean <bean123ch@gmail.com>
6572 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6574 2008-08-11 Robert Millan <rmh@aybabtu.com>
6576 * kern/i386/linuxbios/startup.S: Move from here ...
6577 * kern/i386/coreboot/startup.S: ... to here.
6579 * kern/i386/linuxbios/init.c: Move from here ...
6580 * kern/i386/coreboot/init.c: ... to here.
6582 * kern/i386/linuxbios/table.c: Move from here ...
6583 * kern/i386/coreboot/mmap.c: ... to here.
6585 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6587 2008-08-11 Robert Millan <rmh@aybabtu.com>
6589 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6590 errors. Leave it to the upper layer to handle them.
6592 2008-08-09 Christian Franke <franke@computer.org>
6594 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6595 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6596 Install `grub.d/10_windows' only on Cygwin.
6597 * configure.ac: Add subst of `target_os'.
6598 Check `target_os' also before setting TARGET_OBJ2ELF.
6599 Add `--enable-grub-pe2elf'.
6601 2008-08-08 Robert Millan <rmh@aybabtu.com>
6603 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6604 (grub_last_time): Change type to grub_uint64_t.
6605 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6606 (grub_disk_close): Likewise.
6608 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6609 (run_menu): Migrate code from to using grub_get_time_ms().
6611 * util/misc.c (grub_get_time_ms): New function.
6613 2008-08-08 Marco Gerards <marco@gnu.org>
6615 * disk/ata.c (grub_ata_regget): Change return type to
6617 (grub_ata_regget2): Likewise.
6618 (grub_ata_wait_status): New function.
6619 (grub_ata_wait_busy): Removed function, updated all users to use
6620 `grub_ata_wait_status'.
6621 (grub_ata_wait_drq): Likewise.
6622 (grub_ata_cmd): New function.
6623 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6625 (grub_ata_pio_write): Add error handling.
6626 (grub_atapi_identify): Likewise.
6627 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6629 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6630 handling. Actually use the detected registers. Reorder the
6631 detection logic such that it is easier to read.
6632 (grub_ata_pciinit): Do not assign the same ID to each controller.
6633 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6635 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6637 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6639 2008-08-08 Marco Gerards <marco@gnu.org>
6643 2008-08-07 Bean <bean123ch@gmail.com>
6645 * include/grub/x86_64/pci.h: New file.
6647 2008-08-07 Christian Franke <franke@computer.org>
6649 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6650 (TIMER2_GATE): Likewise.
6651 (grub_pit_wait): Add enable/disable of the timer2 gate
6652 bit of port 0x61. This fixes a possible infinite loop.
6654 2008-08-07 Bean <bean123ch@gmail.com>
6656 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6657 kern/i386/tsc.c and kern/i386/pit.c.
6659 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6662 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6665 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6667 2008-08-07 Bean <bean123ch@gmail.com>
6669 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6671 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6673 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6674 multiple inclusion. Add #include <grub/types.h>.
6676 2008-08-06 Christian Franke <franke@computer.org>
6678 * conf/common.rmk: Build and install `10_windows'.
6679 * util/grub.d/10_windows.in: New script.
6681 2008-08-06 Pavel Roskin <proski@gnu.org>
6683 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6685 2008-08-06 Robert Millan <rmh@aybabtu.com>
6687 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6688 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6690 2008-08-06 Bean <bean123ch@gmail.com>
6692 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6693 (grub_pxefs_fs_int): Remove dummy definition.
6694 (grub_pxefs_open): Use data->block_size to store the current block
6696 (grub_pxefs_read): Use block size stored in data->block_size. As the
6697 value of grub_pxe_blksize can be changed after the file is opened.
6699 2008-08-06 Bean <bean123ch@gmail.com>
6701 * fs/i386/pc/pxe.c (curr_file): new variable.
6702 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6703 require the dummy internal file system anymore.
6704 (grub_pxefs_read): Removed.
6705 (grub_pxefs_close): Likewise.
6706 (grub_pxefs_fs_int): Likewise.
6707 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6708 connection when we switch file.
6709 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6711 2008-08-06 Robert Millan <rmh@aybabtu.com>
6713 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6715 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6716 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6718 * kern/i386/halt.c: New file.
6719 * kern/i386/reboot.c: Likewise.
6720 * include/grub/i386/reboot.h: Likewise.
6721 * include/grub/i386/halt.h: Likewise.
6723 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6724 Include `<grub/cpu/halt.h>'.
6725 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6726 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6728 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6729 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6730 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6731 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6732 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6733 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6735 * include/grub/i386/at_keyboard.h: ... to here.
6737 2008-08-05 Robert Millan <rmh@aybabtu.com>
6739 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6740 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6741 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6742 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6743 `kern/generic/millisleep.c'.
6745 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6746 instead of grub_get_rtc().
6747 (grub_tsc_init): Initialize `tsc_boot_time'.
6749 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6750 (grub_machine_init): Use grub_tsc_init() rather than
6751 installing an RTC-based handler via grub_install_get_time_ms().
6753 * kern/i386/pit.c: New file.
6754 * include/grub/i386/pit.h: Likewise.
6756 2008-08-05 Bean <bean123ch@gmail.com>
6758 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6760 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6761 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6762 (pxe_mod_SOURCES): New macro.
6763 (pxe_mod_CFLAGS): Likewise.
6764 (pxe_mod_LDFLAGS): Likewise.
6765 (pxecmd_mod_SOURCES): Likewise.
6766 (pxecmd_mod_CFLAGS): Likewise.
6767 (pxecmd_mod_LDFLAGS): Likewise.
6769 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6770 (grub_pxe_call): Likewise.
6772 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6774 * commands/i386/pc/pxecmd.c: New file.
6776 * fs/i386/pc/pxe.c: Likewise.
6778 * include/grub/i386/pc/pxe.h: Likewise.
6780 2008-08-05 Bean <bean123ch@gmail.com>
6782 * util/console.c (grub_console_cur_color): New variable.
6783 (grub_console_standard_color): Likewise.
6784 (grub_console_normal_color): Likewise.
6785 (grub_console_highlight_color): Likewise.
6786 (color_map): Likewise.
6787 (use_color): Likewise.
6788 (NUM_COLORS): New macro.
6789 (grub_ncurses_setcolorstate): Handle color properly.
6790 (grub_ncurses_setcolor): Don't change color here, just remember the
6791 settings, color will be set in grub_ncurses_setcolorstate.
6792 (grub_ncurses_getcolor): New function.
6793 (grub_ncurses_init): Initialize color pairs.
6794 (grub_ncurses_term): New member grub_ncurses_getcolor.
6796 2008-08-05 Colin D Bennett <colin@gibibit.com>
6798 High resolution timer support. Implemented for x86 CPUs using TSC.
6799 Extracted generic grub_millisleep() so it's linked in only as needed.
6800 This requires a Pentium compatible CPU; if the RDTSC instruction is
6801 not supported, then it falls back on the generic grub_get_time_ms()
6802 implementation that uses the machine's RTC.
6804 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6805 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6806 `kern/generic/millisleep.c'.
6808 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6809 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6811 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6812 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6814 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6816 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6817 `kern/generic/millisleep.c'.
6819 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6821 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6823 * kern/generic/rtc_get_time_ms.c: New file.
6825 * kern/generic/millisleep.c: New file.
6827 * kern/misc.c: Don't include
6828 <kern/time.h> anymore.
6829 (grub_millisleep_generic): Removed.
6831 * commands/sleep.c (grub_interruptible_millisleep): Uses
6832 grub_get_time_ms() instead of grub_get_rtc().
6834 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6836 (grub_cpu_is_cpuid_supported): New inline function.
6837 (grub_cpu_is_tsc_supported): New inline function.
6838 (grub_tsc_init): New function prototype.
6839 (grub_tsc_get_time_ms): New function prototype.
6841 * kern/i386/tsc.c (grub_get_time_ms): New file.
6843 * include/grub/time.h: Include <grub/types.h.
6844 (grub_millisleep_generic): Removed.
6845 (grub_get_time_ms): New prototype.
6846 (grub_install_get_time_ms): New prototype.
6847 (grub_rtc_get_time_ms): New prototype.
6849 * kern/time.c (grub_get_time_ms): New function.
6850 (grub_install_get_time_ms): New function.
6852 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6853 <grub/time.h> anymore.
6854 (grub_millisleep): Removed.
6855 (grub_machine_init): Call grub_tsc_init.
6857 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6858 get_time_ms() implementation.
6860 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6861 (ieee1275_get_time_ms): New function.
6862 (grub_machine_init): Install get_time_ms() implementation.
6864 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6865 (grub_machine_init): Call grub_tsc_init().
6866 (grub_millisleep): Removed.
6868 * kern/ieee1275/init.c (grub_millisleep): Removed.
6869 (grub_machine_init): Install ieee1275_get_time_ms()
6871 (ieee1275_get_time_ms): New function.
6872 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6875 2008-08-05 Marco Gerards <marco@gnu.org>
6877 * disk/ata.c: Include <grub/pci.h>.
6878 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6879 (grub_ata_initialize): Rewritten.
6880 (grub_ata_device_initialize): New function.
6882 2008-08-04 Pavel Roskin <proski@gnu.org>
6884 * kern/main.c: Include grub/mm.h.
6886 2008-08-04 Robert Millan <rmh@aybabtu.com>
6888 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6889 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6890 corruption problem).
6892 2008-08-04 Robert Millan <rmh@aybabtu.com>
6894 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6895 warnings introduced in my last commit.
6897 2008-08-03 Robert Millan <rmh@aybabtu.com>
6899 Make PCI available on all i386 architectures.
6901 * include/grub/i386/pc/pci.h: Move from here ...
6902 * include/grub/i386/pci.h: ... to here.
6904 * include/grub/i386/pc/pci.h: Remove.
6905 * include/grub/i386/efi/pci.h: Remove.
6906 * include/grub/x86_64/efi/pci.h: Remove.
6908 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6911 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6912 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6913 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6915 * conf/i386-ieee1275.rmk: Likewise.
6917 2008-08-03 Robert Millan <rmh@aybabtu.com>
6919 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6920 (grub_console_setcursor): Make it possible to set cursor off.
6922 2008-08-03 Robert Millan <rmh@aybabtu.com>
6924 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6925 of modules instead of assuming which platform provides what.
6926 * util/update-grub.in: Likewise.
6928 2008-08-03 Robert Millan <rmh@aybabtu.com>
6930 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6931 instead of `grub_install_dos_part' to determine whether a drive needs
6932 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6933 because it can be overridden when loading GRUB via Multiboot).
6935 2008-08-02 Robert Millan <rmh@aybabtu.com>
6937 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6939 2008-08-02 Robert Millan <rmh@aybabtu.com>
6941 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6942 of informational grub_dprintf() calls.
6944 2008-08-02 Robert Millan <rmh@aybabtu.com>
6946 * disk/memdisk.c (memdisk_size): Don't initialize.
6947 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6949 * include/grub/i386/pc/kernel.h
6950 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6951 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6952 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6953 (grub_arch_memdisk_size): Remove.
6955 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6956 field (was only used to transfer a constant). Add `type' field to
6957 support multiple module types.
6958 (grub_module_iterate): New function.
6960 * kern/device.c (grub_device_open): Do not hide error messages
6961 when grub_disk_open() fails. Use grub_print_error() instead.
6963 * kern/i386/pc/init.c (grub_arch_modules_addr)
6964 (grub_arch_memdisk_size): Remove functions.
6965 (grub_arch_modules_addr): Return the module address in high memory
6966 (now that it isn't copied anymore).
6968 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6969 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6970 decompression routine (grub_total_module_size already includes that
6971 now). Don't copy modules back to low memory.
6973 * kern/main.c: Include `<grub/mm.h>'.
6974 (grub_load_modules): Split out (and use) ...
6975 (grub_module_iterate): ... this function, which iterates through
6976 module objects and runs a hook.
6977 Comment out grub_mm_init_region() call, as it would cause non-ELF
6978 modules to be overwritten.
6980 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6981 the memdisk image in its own region, make it part of the module list.
6982 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6983 (main): Parse --memdisk|-m option, and pass user-provided path as
6984 parameter to generate_image().
6985 (add_segments): Pass `memdisk_path' down to load_modules().
6986 (load_modules): Embed memdisk image in module section when requested.
6987 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6988 `header.type' instead of `header.offset'.
6990 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6991 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6992 (memdisk_mod_LDFLAGS): New variables.
6993 * conf/i386-coreboot.rmk: Likewise.
6994 * conf/i386-ieee1275.rmk: Likewise.
6996 2008-08-02 Robert Millan <rmh@aybabtu.com>
6998 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6999 (backward_relocator): New variables. Used to allocate and relocate
7000 the payload, respectively.
7001 (grub_multiboot_load_elf32): Load into heap instead of requested
7002 address, install the appropriate relocator code in each bound of
7003 the payload, and set the entry point such that
7004 grub_multiboot_real_boot() will jump to one of them.
7006 * kern/i386/loader.S (grub_multiboot_payload_size)
7007 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7008 (grub_multiboot_payload_entry_offset): New variables.
7009 (grub_multiboot_real_boot): Set cpu context to what the relocator
7010 expects, and jump to the relocator instead of the payload.
7012 * include/grub/i386/loader.h (grub_multiboot_payload_size)
7013 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7014 (grub_multiboot_payload_entry_offset): Export.
7016 2008-08-01 Bean <bean123ch@gmail.com>
7018 * normal/menu_entry.c (editor_getline): Don't return the original
7019 string as result, as it will be released by lexer once it has done
7022 2008-08-01 Robert Millan <rmh@aybabtu.com>
7024 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7025 within menuentries, not before them.
7026 util/grub.d/10_hurd.in: Likewise.
7028 2008-08-01 Bean <bean123ch@gmail.com>
7030 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7031 (bufio_mod_SOURCES): New macro.
7032 (bufio_mod_CFLAGS): Likewise.
7033 (bufio_mod_LDFLAGS): Likewise.
7035 * include/grub/bufio.h: New file.
7037 * io/bufio.c: Likewise.
7039 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7040 (grub_video_reader_png): Use grub_buffile_open to open file.
7042 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7043 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7045 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7046 (grub_video_reader_tga): Use grub_buffile_open to open file.
7048 * font/manager.c: Include <grub/bufio.h>.
7049 (add_font): Use grub_buffile_open to open file.
7051 2008-07-31 Robert Millan <rmh@aybabtu.com>
7053 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7054 ELF segments, use a macro for arbitrarily accessing any of them instead
7055 of preparing a pointer that allows access to one at a time.
7056 (grub_multiboot_load_elf64): Likewise.
7058 2008-07-31 Bean <bean123ch@gmail.com>
7060 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7061 GRUB_KERNEL_MACHINE_DATA_END.
7063 2008-07-30 Robert Millan <rmh@aybabtu.com>
7065 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7066 Increase from 0x50 to 0x60.
7067 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7068 use UUIDs to identify the root drive for them. If that's not
7070 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
7071 check, for cross-disk installs.
7073 2008-07-30 Robert Millan <rmh@aybabtu.com>
7075 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
7076 is non-empty, use it to set the `prefix' environment variable instead
7077 of the usual approach.
7078 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
7079 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
7080 environment variable instead of dummy make_install_device().
7082 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
7083 (start): Insert a data section, with `grub_prefix' variable.
7084 * kern/i386/linuxbios/startup.S: Likewise.
7086 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
7087 New variable reference.
7088 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
7089 New macro. Defines offset of `grub_prefix' within startup.S (relative
7091 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
7092 section within startup.S (relative to `start').
7093 * include/grub/i386/coreboot/kernel.h: Likewise.
7095 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
7096 Overwrite grub_prefix with its contents, at the beginning of the
7098 (main): Understand -p|--prefix.
7100 2008-07-30 Robert Millan <rmh@aybabtu.com>
7102 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
7104 2008-07-30 Robert Millan <rmh@aybabtu.com>
7106 * term/i386/pc/vga_text.c (grub_console_cls): Use
7107 grub_console_gotoxy() to go back to beginning of the screen.
7108 Found by Patrick Georgi <patrick.georgi@coresystems.de>
7110 2008-07-29 Christian Franke <franke@computer.org>
7112 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7113 Add conversion of emulated mount points on Cygwin.
7115 2008-07-29 Christian Franke <franke@computer.org>
7117 * util/update-grub.in: Add a check for admin
7119 Remove old `grub.cfg.new' before creation.
7120 Add `-f' to `mv' to handle the different filesystem
7121 semantics of Windows.
7123 2008-07-29 Bean <bean123ch@gmail.com>
7125 * normal/main.c (get_line): Fix buffer overflow bug.
7127 2008-07-28 Robert Millan <rmh@aybabtu.com>
7129 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
7130 (struct grub_apple_header): New struct. Describes the layout of
7132 (apple_partition_map_iterate): Check the header magic as well as the
7133 partition magic (which was already being checked).
7135 2008-07-28 Pavel Roskin <proski@gnu.org>
7137 * genmk.rb: Add a warning to the beginning of the output that
7138 it's a generated file and should not be edited.
7140 2008-07-28 Robert Millan <rmh@aybabtu.com>
7142 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
7143 with the same number are found, just use issue a warning with
7144 grub_dprintf(), as this error has been reported to be non-fatal.
7146 2008-07-27 Robert Millan <rmh@aybabtu.com>
7148 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
7151 2008-07-27 Bean <bean123ch@gmail.com>
7153 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
7154 (grub_fat_find_dir): Ignore case when comparing filename.
7156 2008-07-27 Bean <bean123ch@gmail.com>
7158 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
7159 smallino, as it's more descriptive, and i8count can be confused with
7160 the other field count.
7161 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
7164 2008-07-27 Bean <bean123ch@gmail.com>
7166 * commands/crc.c: New file.
7168 * lib/crc.c: Likewise.
7170 * include/grub/lib/crc.h: Likewise.
7172 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
7174 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
7175 (hexdump): Move this function to ...
7177 * lib/hexdump.c: ... here.
7179 * include/grub/hexdump.h: Renamed to ...
7181 * include/grub/lib/hexdump.h: ... this.
7183 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
7185 * util/grub-editenv.c: Likewise.
7187 * include/envblk.h: Renamed to ...
7189 * include/lib/envblk.h: ... this.
7191 * util/envblk.c: Renamed to ...
7193 * lib/envblk.c: ... this.
7195 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
7197 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
7198 (pkglib_MODULES): Add crc.mod.
7199 (hexdump_mod_SOURCES): Add lib/hexdump.c.
7200 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
7201 (crc_mod_SOURCES): New macro.
7202 (crc_mod_CFLAGS): Likewise.
7203 (crc_mod_LDFLAGS): Likewise.
7205 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
7207 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7209 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7213 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7215 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
7217 * commands/help.c: Include <grub/term.h>.
7218 (TERM_WIDTH): Removed. Updated all users.
7220 2008-07-27 Pavel Roskin <proski@gnu.org>
7222 * util/getroot.c (find_root_device): Rephrase a comment to avoid
7223 spurious warnings about a comment within a comment.
7225 2008-07-25 Robert Millan <rmh@aybabtu.com>
7227 * util/getroot.c (find_root_device): Skip devices that match
7228 /dev/dm-[0-9]. This lets the real device be found for any type of
7229 abstraction (LVM, EVMS, RAID..).
7230 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
7231 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
7232 device is found first, find_root_device() will now skip it.
7234 2008-07-24 Pavel Roskin <proski@gnu.org>
7236 * include/grub/types.h: Use __builtin_bswap32() and
7237 __builtin_bswap64() with gcc 4.3 and newer.
7239 2008-07-24 Christian Franke <franke@computer.org>
7241 * util/i386/pc/grub-install.in: If `--debug' is specified,
7242 pass `--verbose' to grub-setup.
7243 Abort script if make_system_path_relative_to_its_root() fails.
7245 2008-07-24 Bean <bean123ch@gmail.com>
7247 * configure.ac: Fixed a bug caused by the previous cygwin patch,
7248 variable `target_platform' should be `platform'.
7250 2008-07-24 Bean <bean123ch@gmail.com>
7252 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
7253 (grub_png_init_fixed_block): New function.
7254 (grub_png_decode_image_data): Handle fixed huffman code compression.
7256 2008-07-24 Bean <bean123ch@gmail.com>
7258 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
7259 (grub_pe2elf_SOURCES): New macro.
7260 (CLEANFILES): Add grub-pe2elf.
7262 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
7263 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
7264 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
7265 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
7266 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
7267 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
7268 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
7269 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
7270 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
7271 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
7272 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
7273 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
7274 (GRUB_PE32_DT_FUNCTION): Likewise.
7275 (GRUB_PE32_REL_I386_DIR32): Likewise.
7276 (GRUB_PE32_REL_I386_REL32): Likewise.
7277 (grub_pe32_symbol): New structure.
7278 (grub_pe32_reloc): Likewise.
7280 * util/grub-pe2elf.c: New file.
7282 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
7283 start symbol in non pc platform.
7285 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
7287 The following patches are from Christian Franke.
7289 * include/grub/dl.h: Remove .previous, gas supports this only
7292 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
7293 Remove .type, gas supports this only for ELF format.
7295 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
7296 nullbytes in symbol table. This fixes an infinite loop if table is
7299 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
7300 TARGET_IMG_LDFLAGS and EXEEXT.
7302 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
7303 TARGET_IMG_LDFLAGS_AC.
7304 (grub_CHECK_STACK_ARG_PROBE): New function.
7306 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
7308 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
7310 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
7311 to set TARGET_IMG_LD* accordingly.
7312 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
7313 Add call to grub_CHECK_STACK_ARG_PROBE.
7314 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
7316 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
7318 * genmk.rb: Add EXEEXT to CLEANFILES.
7320 2008-07-23 Robert Millan <rmh@aybabtu.com>
7322 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
7323 define the codes for arrows and lines used for the menu).
7324 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
7327 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
7328 fonts, because the latter are too slow.
7330 2008-07-21 Bean <bean123ch@gmail.com>
7332 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
7333 a20. Run keyboard test last, as it will cause macbook to halt.
7335 2008-07-18 Pavel Roskin <proski@gnu.org>
7337 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
7338 load foreign architecture modules correctly anyway. Keep
7339 support for loading host architecture modules, whether we
7340 compile them or not.
7342 2008-07-17 Pavel Roskin <proski@gnu.org>
7344 * configure.ac: Use -m32 or -m64 regardless of whether we had to
7345 change target_cpu. The compiler default can mismatch target_cpu
7348 * disk/efi/efidisk.c: Fix format warnings on x86_64.
7349 * kern/efi/efi.c: Likewise.
7351 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
7352 target compiler is functional.
7353 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7356 * configure.ac: Default to efi platform for x86_64-apple. Allow
7357 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
7358 adjustments from the rest, only do them if target is not
7359 explicitly given. Merge other adjustments with the final sanity
7360 check. Remove an extraneous check for supported CPU. Be
7361 specific which CPU and which platform is not supported.
7363 * configure.ac: Default to pc platform for x86_64.
7365 2008-07-17 Robert Millan <rmh@aybabtu.com>
7367 Partial LinuxBIOS -> Coreboot rename.
7369 * conf/i386-linuxbios.rmk: Renamed to ...
7370 * conf/i386-coreboot.rmk: ... this.
7371 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7372 * configure.ac: Accept "coreboot" as input platform (but maintain
7373 compatibility with "linuxbios").
7374 * include/grub/i386/linuxbios: Renamed to ...
7375 * include/grub/i386/coreboot: ... this.
7377 2008-07-17 Bean <bean123ch@gmail.com>
7379 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
7380 (appleldr_mod_SOURCE): New variable.
7381 (appleldr_mod_CFLAGS): Likewise.
7382 (appleldr_mod_LDFLAGS): Likewise.
7383 (pci_mod_SOURCES): Likewise.
7384 (pci_mod_CFLAGS): Likewise.
7385 (pci_mod_LDFLAGS): Likewise.
7386 (lspci_mod_SOURCES): Likewise.
7387 (lspci_mod_CFLAGS): Likewise.
7388 (lspci_mod_LDFLAGS): Likewise.
7390 * conf/x86_64-efi.rmk: New file.
7392 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7394 (grub_efidisk_write): Likewise.
7396 * include/efi/api.h (efi_call_0): New macro.
7397 (efi_call_1): Likewise.
7398 (efi_call_2): Likewise.
7399 (efi_call_3): Likewise.
7400 (efi_call_4): Likewise.
7401 (efi_call_5): Likewise.
7402 (efi_call_6): Likewise.
7404 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7405 grub_rescue_cmd_chainloader.
7407 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7408 (grub_pe32_optional_header): Change some fields based on i386 or
7410 (GRUB_PE32_PE32_MAGIC): Likewise.
7412 * include/grub/efi/uga_draw.h: New file.
7414 * include/grub/elf.h (STN_ABS): New constant.
7415 (R_X86_64_NONE): Relocation constant for x86_64.
7416 (R_X86_64_64): Likewise.
7417 (R_X86_64_PC32): Likewise.
7418 (R_X86_64_GOT32): Likewise.
7419 (R_X86_64_PLT32): Likewise.
7420 (R_X86_64_COPY): Likewise.
7421 (R_X86_64_GLOB_DAT): Likewise.
7422 (R_X86_64_JUMP_SLOT): Likewise.
7423 (R_X86_64_RELATIVE): Likewise.
7424 (R_X86_64_GOTPCREL): Likewise.
7425 (R_X86_64_32): Likewise.
7426 (R_X86_64_32S): Likewise.
7427 (R_X86_64_16): Likewise.
7428 (R_X86_64_PC16): Likewise.
7429 (R_X86_64_8): Likewise.
7430 (R_X86_64_PC8): Likewise.
7432 * include/grub/i386/efi/pci.h: New file.
7434 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7435 Change it value based on platform.
7436 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7437 (GRUB_E820_RAM): Likewise.
7438 (GRUB_E820_RESERVED): Likewise.
7439 (GRUB_E820_ACPI): Likewise.
7440 (GRUB_E820_NVS): Likewise.
7441 (GRUB_E820_EXEC_CODE): Likewise.
7442 (GRUB_E820_MAX_ENTRY): Likewise.
7443 (grub_e820_mmap): New structure.
7444 (linux_kernel_header): Change the efi field according to different
7445 kernel version, also field from linux_kernel_header.
7447 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7449 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7450 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7451 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7452 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7453 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7454 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7455 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7456 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7457 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7458 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7460 * include/grub/x86_64/efi/kernel.h: New file.
7462 * include/grub/x86_64/efi/loader.h: Likewise.
7464 * include/grub/x86_64/efi/machine.h: Likewise.
7466 * include/grub/x86_64/efi/pci.h: Likewise.
7468 * include/grub/x86_64/efi/time.h: Likewise.
7470 * include/grub/x86_64/linux.h: Likewise.
7472 * include/grub/x86_64/setjmp.h: Likewise.
7474 * include/grub/x86_64/time.h: Likewise.
7476 * include/grub/x86_64/types.h: Likewise.
7478 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7479 GRUB_TARGET_SIZEOF_VOID_P.
7481 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7482 (grub_efi_locate_handle): Likewise.
7483 (grub_efi_open_protocol): Likewise.
7484 (grub_efi_set_text_mode): Likewise.
7485 (grub_efi_stall): Likewise.
7486 (grub_exit): Likewise.
7487 (grub_reboot): Likewise.
7488 (grub_halt): Likewise.
7489 (grub_efi_exit_boot_services): Likewise.
7490 (grub_get_rtc): Likewise.
7492 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7493 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7494 (grub_efi_allocate_pages): Wrap efi calls.
7495 (grub_efi_free_pages): Wrap efi calls.
7496 (grub_efi_get_memory_map): Wrap efi calls.
7498 * kern/x86_64/dl.c: New file.
7500 * kern/x86_64/efi/callwrap.S: Likewise.
7502 * kern/x86_64/efi/startup.S: Likewise.
7504 * loader/efi/appleloader.c: Likewise.
7506 * loader/efi/chainloader.c (cmdline): New variable.
7507 (grub_chainloader_unload): Wrap efi calls.
7508 (grub_chainloader_boot): Likewise.
7509 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7512 * loader/efi/chainloader_normal.c (chainloader_command):
7513 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7516 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7518 (grub_e820_add_region): New function.
7519 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7521 (grub_find_video_card): New function.
7522 (grub_linux_setup_video): New function.
7523 (grub_rescue_cmd_linux): Probe for video information.
7525 * normal/x86_64/setjmp.S: New file.
7527 * term/efi/console.c (map_char): New function.
7528 (grub_console_putchar): Map unicode char.
7529 (grub_console_checkkey): Wrap efi calls.
7530 (grub_console_getkey): Likewise.
7531 (grub_console_getwh): Likewise.
7532 (grub_console_gotoxy): Likewise.
7533 (grub_console_cls): Likewise.
7534 (grub_console_setcolorstate): Likewise.
7535 (grub_console_setcursor): Likewise.
7537 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7539 2008-07-16 Pavel Roskin <proski@gnu.org>
7541 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7544 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7545 pointer, not an integer. This fixes a warning and prevents
7546 precision loss on 64-bit systems.
7547 (relocate_addresses): Remove unneeded cast.
7549 2008-07-15 Pavel Roskin <proski@gnu.org>
7551 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7553 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7555 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7556 Fix comparison between signed and unsigned.
7558 * include/grub/i386/ieee1275/console.h: Declare
7559 grub_console_init() and grub_console_fini().
7561 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7562 It's empty and unused.
7564 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7565 beginning to avoid warnings with some compilers.
7567 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7568 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7570 2008-07-14 Pavel Roskin <proski@gnu.org>
7572 * kern/env.c (grub_register_variable_hook): Don't copy empty
7573 string, it leaks memory. Pass "" to grub_env_set(), it should
7574 handle constant strings.
7576 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7577 * commands/cmp.c (grub_cmd_cmp): Likewise.
7578 * kern/dl.c (grub_dl_flush_cache): Likewise.
7579 (grub_dl_load_core): Likewise.
7580 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7581 (grub_elf64_load_phdrs): Likewise.
7583 2008-07-13 Pavel Roskin <proski@gnu.org>
7585 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7586 between signed and unsigned.
7587 (LzmaEnc_Finish): Fix warning about an unused parameter.
7589 2008-07-13 Bean <bean123ch@gmail.com>
7591 * Makefile.in (enable_lzo): New rule.
7593 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7595 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7597 * boot/i386/pc/lnxboot.S: #include <config.h>.
7599 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7600 its value according to the compression algorithm used, lzo or lzma.
7602 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7603 compression algorithm according to configure macro.
7605 * kern/i386/pc/startup.S (codestart): Likewise.
7607 * kern/i386/pc/lzma_decode.S: New file.
7609 * include/grub/lib/LzFind.h: Likewise.
7611 * include/grub/lib/LzHash.h: Likewise.
7613 * include/grub/lib/LzmaDec.h: Likewise.
7615 * include/grub/lib/LzmaEnc.h: Likewise.
7617 * include/grub/lib/LzmaTypes.h: Likewise.
7619 * lib/LzFind.c: Likewise.
7621 * lib/LzmaDec.c: Likewise.
7623 * lib/LzmaEnc.c: Likewise.
7625 2008-07-13 Bean <bean123ch@gmail.com>
7627 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7628 (grub_ext4_extent_header): New structure.
7629 (grub_ext4_extent): Likewise.
7630 (grub_ext4_extent_idx): Likewise.
7631 (grub_ext4_find_leaf): New function.
7632 (grub_ext2_read_block): Handle extents.
7634 2008-07-12 Robert Millan <rmh@aybabtu.com>
7636 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7638 2008-07-11 Robert Millan <rmh@aybabtu.com>
7640 * util/grub.d/40_custom.in: New file. Example on how to add custom
7641 entries to /etc/grub.d.
7642 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7643 40_custom (implicitly, by merging all the grub.d rules).
7645 2008-07-11 Pavel Roskin <proski@gnu.org>
7647 * commands/read.c (grub_getline): Fix invalid memory access.
7648 Don't add newline to the variable value.
7650 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7651 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7652 (serial_hw_get_port): Check validity of the port number.
7653 (grub_cmd_serial): Check return value of serial_hw_get_port().
7655 2008-07-07 Pavel Roskin <proski@gnu.org>
7657 * boot/i386/pc/diskboot.S (notification_string): Replace
7658 "Loading kernel" with just "loading". This is shorter, less
7659 confusing and saves a few bytes for possible future changes.
7661 2008-07-05 Pavel Roskin <proski@gnu.org>
7663 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7664 size for ATAPI devices, they are undefined. Output sector
7665 number in decimal form.
7667 * disk/ata.c: Use named constants for status bits.
7669 2008-07-04 Pavel Roskin <proski@gnu.org>
7671 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7672 grub_addr_t before casting it to the void pointer to fix a
7673 warning. Non-addressable regions are discarded earlier.
7674 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7675 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7676 (check_signature): Don't shadow table_header.
7677 (grub_linuxbios_table_iterate): Cast numeric constants to
7678 grub_linuxbios_table_header_t.
7679 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7682 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7685 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7686 pointer, which can cause warnings. Support 64-bit addresses.
7688 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7689 of sizeof(long). This fixes PowerPC image generation on x86_64.
7691 2008-07-04 Robert Millan <rmh@aybabtu.com>
7693 This fixes a performance issue when pc & gpt partmap iterators
7694 didn't abort iteration even after our hook found what it was
7695 looking for (often causing expensive probes of non-existent drives).
7697 Some callers relied on previous buggy behaviour, since they would
7698 raise an error when their own hooks caused early abortion of its
7701 * kern/device.c (grub_device_open): Improve error message.
7702 * disk/lvm.c (grub_lvm_open): Likewise.
7703 * disk/raid.c (grub_raid_open): Likewise.
7705 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7706 when hook requests it, independently of grub_errno.
7707 (pc_partition_map_probe): Do not fail when find_func() caused
7708 early abortion of pc_partition_map_iterate().
7710 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7711 when hook requests it, independently of grub_errno.
7712 (gpt_partition_map_probe): Do not fail when find_func() caused
7713 early abortion of gpt_partition_map_iterate().
7715 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7716 when hook requests it, independently of grub_errno. Do not fail when
7717 part_map_iterate_hook() caused early abortion of p->iterate().
7719 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7720 when grub_partition_iterate() returned with non-zero.
7722 2008-07-03 Pavel Roskin <proski@gnu.org>
7724 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7725 like we do in grub_ata_pio_read().
7726 (grub_ata_readwrite): Always write individual sectors. Fix the
7727 sector count for the remainder.
7728 (grub_ata_write): Enable writing to ATA devices. Correctly
7729 report error for ATAPI devices.
7731 2008-07-02 Pavel Roskin <proski@gnu.org>
7733 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7736 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7737 for every read sector, we already increment it for the whole
7738 batch. This fixes reading more than 256 sectors at once.
7740 * util/grub-editenv.c (cmd_info): Cast argument to long
7741 explicitly. ptrdiff_t reduces to int on i386.
7743 * util/grub-editenv.c (main): Be specific which parameter is
7746 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7747 (memdisk): Make memdisk_orig_addr a pointer.
7749 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7750 for file offsets, use grub_off_t instead. Fix printf format
7753 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7754 there. Real unexpected warnings should not drown in the noise
7755 about known problems.
7757 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7758 grub_disk_addr_t for memory addresses.
7760 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7761 explicitly to fix a warning.
7763 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7765 * Makefile.in (MODULE_LDFLAGS): New variable.
7766 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7767 the linker accepts --build-id=none.
7768 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7770 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7772 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7773 those in Linux XFS code. Provide a way to access 64-bit parent
7775 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7776 the end of struct grub_xfs_dir_header.
7778 2008-07-02 Bean <bean123ch@gmail.com>
7780 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7781 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7782 and GRUB_IEEE1275_FLAG_NO_ANSI.
7784 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7785 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7786 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7788 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7789 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7791 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7792 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7794 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7795 esc sequence on non ANSI terminal.
7796 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7798 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7801 2008-07-02 Bean <bean123ch@gmail.com>
7803 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7804 (grub_editenv_SOURCES): New variable.
7805 (pkglib_MODULES): Add loadenv.mod.
7806 (loadenv_mod_SOURCES): New variable.
7807 (loadenv_mod_CFLAGS): Likewise.
7808 (loadenv_mod_LDFLAGS): Likewise.
7810 * include/grub/envblk.h: New file.
7812 * util/envblk.c: New file.
7814 * util/grub-editenv.c: New file.
7816 * commands/loadenv.c: New file.
7818 2008-07-01 Pavel Roskin <proski@gnu.org>
7820 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7821 not unsigned char. This fixes warnings and is consistent with
7824 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7826 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7828 * term/tparm.c (analyze): Always set *popcount.
7830 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7831 cast to fix a warning.
7833 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7834 cast to suppress a warning.
7836 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7837 grub_fshelp_read_file() expects.
7839 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7840 write uuid as a 32-bit value in CPU byte order, so declare and
7843 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7844 long if the format specifier expects it.
7845 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7846 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7847 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7848 long to fix a warning.
7849 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7850 grub_dprintf() arguments to fix warnings.
7852 2008-06-30 Pavel Roskin <proski@gnu.org>
7854 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7855 install_bsd_part immediately before core.img is embedded or
7856 modified on disk. This fixes core.img verification if core.img
7859 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7860 core_path to calculate the blocklist.
7861 Patch from Javier MartÃn <lordhabbit@gmail.com>
7863 2008-06-29 Robert Millan <rmh@aybabtu.com>
7865 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7866 block to disk block.
7867 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7868 Patch from Niels Böhm <bitbucket@arcor.de>
7870 2008-06-29 Robert Millan <rmh@aybabtu.com>
7872 * util/update-grub_lib.in (font_path): Search for fonts in
7873 /boot/grub first, which is more likely to be readable (we aren't
7874 deciding where fonts live, just looking for them).
7876 2008-06-26 Pavel Roskin <proski@gnu.org>
7878 * util/biosdisk.c (read_device_map): Don't leave dead map
7879 entries for devices failing stat() check.
7881 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7882 core_path_dev for the core.img path on the target device.
7884 2008-06-26 Robert Millan <rmh@aybabtu.com>
7886 * disk/fs_uuid.c: New file.
7887 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7888 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7889 (fs_uuid_mod_LDFLAGS): New variables.
7890 * include/grub/disk.h (grub_disk_dev_id): Add
7891 `GRUB_DISK_DEVICE_UUID_ID'.
7892 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7893 implement iterate().
7895 2008-06-26 Robert Millan <rmh@aybabtu.com>
7897 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7898 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7899 Linux image includes no initrd.
7901 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7903 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7904 call to resolve the core image location that effectively appended the
7907 2008-06-21 Robert Millan <rmh@aybabtu.com>
7909 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7912 * util/grub.d/10_hurd.in: ... to here ...
7913 * util/grub.d/10_linux.in: ... and here.
7915 2008-06-19 Robert Millan <rmh@aybabtu.com>
7917 * kern/main.c (grub_main): Export `prefix' variable immediately
7918 after it has been set by grub_machine_set_prefix().
7920 2008-06-19 Robert Millan <rmh@aybabtu.com>
7922 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7923 search result when not saving to variable, not the other way around.
7924 When saving to variable, abort iteration as soon as a match is found.
7926 2008-06-19 Robert Millan <rmh@aybabtu.com>
7928 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7929 check for partition that provides /boot/grub. Its logic is flawed,
7930 as it prevents prepare_grub_to_access_device() from being called
7933 2008-06-19 Robert Millan <rmh@aybabtu.com>
7935 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7936 "insmod" command directly when abstraction modules are needed,
7937 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7938 since it had already been processed).
7940 2008-06-19 Pavel Roskin <proski@gnu.org>
7942 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7943 changed. This is needed in case GRUB_LIBDIR changes.
7944 * conf/i386-ieee1275.rmk: Likewise.
7945 * conf/i386-linuxbios.rmk: Likewise.
7946 * conf/i386-pc.rmk: Likewise.
7947 * conf/powerpc-ieee1275.rmk: Likewise.
7949 2008-06-18 Pavel Roskin <proski@gnu.org>
7951 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7952 kernel_elf_symlist.c to symlist.c for consistency with other
7953 architectures. Update all users.
7954 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7956 2008-06-18 Robert Millan <rmh@aybabtu.com>
7958 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7961 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7962 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7963 a RAID device, run setup() for all members independently on whether
7964 LVM abstraction is being used.
7965 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7966 If grub-mkimage has set `*install_dos_part == -2', don't override this
7968 Perform *install_dos_part adjustments independently on whether
7969 we're embedding or not.
7970 Clarify error message when image is too big for embedding.
7971 Remove duplicate *install_dos_part stanza.
7973 2008-06-17 Robert Millan <rmh@aybabtu.com>
7975 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7976 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7978 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7979 values in grub_ofconsole_normal_color and
7980 grub_ofconsole_highlight_color (they're not directly related to
7981 background and foreground).
7982 (grub_ofconsole_setcolorstate): Extract background and foreground
7983 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7985 2008-06-17 Robert Millan <rmh@aybabtu.com>
7987 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7988 /boot/grub for the check in last commit, not /boot (they could be
7989 different partitions).
7991 2008-06-16 Robert Millan <rmh@aybabtu.com>
7993 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7994 asked to setup access for the same partition that provides /boot,
7995 don't bother using UUIDs since our root already has the value we
7998 2008-06-16 Robert Millan <rmh@aybabtu.com>
8000 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8002 Patch from Sven Mueller <sven@debian.org>.
8004 2008-06-16 Robert Millan <rmh@aybabtu.com>
8006 * util/update-grub.in: Check for $EUID instead of $UID.
8007 Reported by Vincent Zweije.
8009 2008-06-16 Bean <bean123ch@gmail.com>
8011 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8012 (grub_ext2_read_block): Likewise.
8013 (grub_ext2_read_inode): Likewise.
8014 (grub_ext2_mount): Likewise.
8015 (grub_ext2_close): Likewise.
8016 (grub_ext3_get_journal): Removed.
8018 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8019 (grub_reiserfs_read_symlink): Likewise.
8020 (grub_reiserfs_mount): Likewise.
8021 (grub_reiserfs_open): Likewise.
8022 (grub_reiserfs_read): Likewise.
8023 (grub_reiserfs_close): Likewise.
8024 (grub_reiserfs_get_journal): Removed.
8026 * fs/fshelp.c (grub_fshelp_read): Removed.
8027 (grub_fshelp_map_block): Likewise.
8029 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8030 (grub_fshelp_journal): Likewise.
8031 (grub_fshelp_read): Likewise.
8032 (grub_fshelp_map_block): Likewise.
8034 2008-06-16 Pavel Roskin <proski@gnu.org>
8036 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8037 floating point anymore.
8038 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8040 2008-06-15 Pavel Roskin <proski@gnu.org>
8042 * commands/ls.c (grub_ls_list_files): Use integer calculations
8043 for human readable format, avoid floating point use.
8044 * kern/misc.c (grub_ftoa): Remove.
8045 (grub_vsprintf): Remove floating point support.
8047 2008-06-15 Robert Millan <rmh@aybabtu.com>
8049 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8051 Reported by Max Vozeler.
8053 2008-06-15 Robert Millan <rmh@aybabtu.com>
8055 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8056 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8058 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8059 the beginning of the prefix.
8061 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8062 It is assumed that if we have a memdisk, grub-mkimage has set
8063 grub_prefix to include the "(memdisk)" drive in it.
8065 2008-06-15 Robert Millan <rmh@aybabtu.com>
8067 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8068 Initialize keyboard controller after registering the terminal, so that
8069 grub_printf() can be called from grub_keyboard_controller_init().
8071 2008-06-15 Robert Millan <rmh@aybabtu.com>
8073 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
8074 extent-btree which is written as big endian on disk.
8075 Reported by Alain Greppin <al@chilibi.org>.
8077 2008-06-14 Robert Millan <rmh@aybabtu.com>
8079 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
8080 * util/i386/pc/grub-install.in (modules): Likewise.
8082 2008-06-13 Pavel Roskin <proski@gnu.org>
8084 * commands/ls.c (grub_ls_list_files): Fix format warnings.
8086 2008-06-13 Bean <bean123ch@gmail.com>
8088 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
8090 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
8092 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
8093 to indicate sparse block.
8095 2008-06-12 Pavel Roskin <proski@gnu.org>
8097 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
8098 number, grub_fshelp_read() does it for us.
8100 * fs/fshelp.c (grub_fshelp_read): New function. Implement
8101 linear disk read with journal translation.
8102 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
8103 * include/grub/fshelp.h: Declare grub_fshelp_read().
8105 2008-06-09 Pavel Roskin <proski@gnu.org>
8107 * fs/minix.c (grub_minix_mount): Handle error reading
8110 2008-06-08 Robert Millan <rmh@aybabtu.com>
8112 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
8113 don't append the RAID prefix afterwards.
8114 Reported by Clint Adams.
8116 2008-06-08 Robert Millan <rmh@aybabtu.com>
8118 Based on description from Pavel:
8119 * kern/disk.c (grub_disk_check_range): Rename to ...
8120 (grub_disk_adjust_range): ... this. Add a comment explaining the
8121 tasks performed by this function.
8123 2008-06-08 Robert Millan <rmh@aybabtu.com>
8125 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
8126 `num_serial' (for consistency with other variables).
8127 (struct grub_ntfs_data): Add `uuid' member.
8128 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
8129 (grub_ntfs_uuid): New function.
8130 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
8132 2008-06-07 Pavel Roskin <proski@gnu.org>
8134 * util/biosdisk.c (open_device): Revert last change to the
8135 function, it broke installation. The sector needs to be
8136 different dependent on which device is opened.
8138 2008-06-06 Robert Millan <rmh@aybabtu.com>
8140 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
8141 rest of GRUB, and breakage doesn't happen if its value were modified.
8143 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8144 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
8145 a constant (same value).
8146 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
8147 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
8149 2008-06-06 Robert Millan <rmh@aybabtu.com>
8151 * util/biosdisk.c (open_device): Do not modify sector offset when
8152 accessing a partition. kern/disk.c already handles this for us.
8154 2008-06-06 Robert Millan <rmh@aybabtu.com>
8156 * util/grub-emu.c (grub_machine_init): Move code in this function from
8158 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
8159 segfault in case grub_printf() is called).
8161 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
8162 grub_probe. Update all users not to explicitly add it again.
8163 (grub_device): New variable; contains corresponding device for grubdir.
8164 (fs_module, partmap_module, devabstraction_module): Pass
8165 `--device ${grub_device}' to grub_probe to avoid traversing /dev
8168 2008-06-05 Robert Millan <rmh@aybabtu.com>
8170 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
8171 is found, print it (same layout as with labels).
8173 2008-06-04 Robert Millan <rmh@aybabtu.com>
8175 * util/biosdisk.c (get_drive): Rename to ...
8176 (find_grub_drive): ... this. Update all users.
8178 (get_os_disk): Rename to ...
8179 (convert_system_partition_to_system_disk): ... this. Update all users.
8181 (find_drive): Rename to ...
8182 (find_system_device): ... this. Update all users.
8184 2008-06-04 Robert Millan <rmh@aybabtu.com>
8186 * util/biosdisk.c (get_os_disk): Handle IDA devices.
8187 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8188 (make_device_map): Likewise.
8190 2008-06-01 Robert Millan <rmh@aybabtu.com>
8192 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
8193 before dereferencing it.
8195 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
8196 union with fat12/fat16-specific ones. Add some new fields, including
8197 `num_serial' for both versions.
8198 (struct grub_fat_data): Add `uuid' member.
8199 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
8200 names. Initialize `data->uuid' using `num_serial'.
8201 (grub_fat_uuid): New function.
8202 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
8204 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
8205 (grub_reiserfs_uuid): New function.
8206 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
8209 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
8210 (grub_xfs_uuid): New function.
8211 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
8213 2008-06-01 Robert Millan <rmh@aybabtu.com>
8215 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
8216 code that is backward compatible with pre-uuid search command.
8218 2008-05-31 Robert Millan <rmh@aybabtu.com>
8220 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
8221 floppies after everything else, to ensure floppy drive isn't accessed
8222 unnecessarily (patch from Bean).
8224 2008-05-31 Robert Millan <rmh@aybabtu.com>
8226 * commands/search.c (search_label, search_fs_uuid, search_file): Do
8227 not print device names when we were asked to set a variable.
8229 2008-05-31 Robert Millan <rmh@aybabtu.com>
8231 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
8232 using "cursor-on" and "cursor-off" commands (understood at least by
8233 the Open Firmware flavour on OLPC).
8235 2008-05-31 Michael Gorven <michael@gorven.za.net>
8237 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
8238 on and off sequences.
8240 2008-05-31 Robert Millan <rmh@aybabtu.com>
8242 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
8243 * util/update-grub.in: Likewise.
8245 2008-05-30 Pavel Roskin <proski@gnu.org>
8247 * util/biosdisk.c (linux_find_partition): Simplify logic and
8248 make the code more universal. Keep special processing for
8249 devfs, but use a simple rule for all other devices. If the
8250 device ends with a number, append 'p' and the partition number.
8251 Otherwise, append only the partition number.
8253 2008-05-30 Robert Millan <rmh@aybabtu.com>
8255 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
8256 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
8257 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
8258 the `root' parameter to Linux.
8260 2008-05-30 Robert Millan <rmh@aybabtu.com>
8262 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
8263 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
8264 --fs_uuid with --fs-uuid.
8265 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
8266 all filesystems support them).
8268 2008-05-30 Robert Millan <rmh@aybabtu.com>
8270 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
8271 grub_printf() flags, since we're printing in units of 2 bytes.
8273 2008-05-30 Robert Millan <rmh@aybabtu.com>
8275 * util/grub.d/00_header.in: Remove obsolete comment referencing
8276 convert_system_path_to_grub_path().
8277 * util/update-grub.in: Likewise.
8278 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
8279 (convert_system_path_to_grub_path): Add a warning message explaining
8280 that this function is deprecated. Rely on is_path_readable_by_grub()
8281 for the readability checks.
8282 (font_path): Use is_path_readable_by_grub() for the readability
8283 check rather than convert_system_path_to_grub_path().
8285 2008-05-30 Robert Millan <rmh@aybabtu.com>
8287 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
8288 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
8289 converting it first.
8290 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
8291 grub.cfg for access to font file, and afterwards call it again to set
8294 2008-05-30 Robert Millan <rmh@aybabtu.com>
8296 * commands/search.c (options): Add --fs_uuid option.
8297 (search_fs_uuid): New function.
8298 (grub_cmd_search): Fix --set argument passing.
8299 Use search_fs_uuid() when requested via --fs_uuid.
8300 (grub_search_init): Update help message.
8301 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
8302 and redeclare it as an array of 16-bit words.
8303 (grub_ext2_uuid): New function.
8304 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
8305 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
8306 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
8307 (GRUB_DEVICE_BOOT_UUID): New variables.
8308 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
8309 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
8311 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
8312 just assume `root' variable has the right value.
8313 * util/grub.d/10_linux.in: Likewise.
8314 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
8316 (main): Recognise `-t fs_uuid' argument.
8318 2008-05-30 Robert Millan <rmh@aybabtu.com>
8320 * util/biosdisk.c (map): Redefine structure to hold information
8321 about GRUB drive name.
8322 (get_drive): Reimplement without assuming (and verifying) BIOS-like
8324 (call_hook): Remove.
8325 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
8326 member. Assume drive has partitions.
8327 (grub_util_biosdisk_open): Access device names via `.device' struct
8329 (open_device): Likewise.
8330 (find_drive): Likewise.
8331 (read_device_map): Adjust map[] usage to match the new struct
8332 definition. Don't check for duplicates (still possible, but not cheap
8334 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
8335 (make_device_name): Remove assumption of BIOS-like drive names.
8337 2008-05-30 Pavel Roskin <proski@gnu.org>
8339 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
8340 compiling execute.c doesn't need grub_script.tab.h anymore.
8341 (normal/command.c_DEPENDENCIES): Likewise.
8342 (normal/function.c_DEPENDENCIES): Likewise.
8343 * conf/i386-ieee1275.rmk: Likewise.
8344 * conf/i386-linuxbios.rmk: Likewise.
8345 * conf/i386-pc.rmk: Likewise.
8346 * conf/powerpc-ieee1275.rmk: Likewise.
8347 * conf/sparc64-ieee1275.rmk: Likewise.
8349 2008-05-29 Pavel Roskin <proski@gnu.org>
8351 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8352 when scanning metadata for volume group name.
8354 * include/grub/script.h: Don't include grub_script.tab.h. It's
8355 a generated file, which may only be included from the files with
8356 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
8357 use union YYSTYPE, as the later allows forward declaration.
8358 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8360 2008-05-29 Robert Millan <rmh@aybabtu.com>
8362 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8363 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8364 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8365 (grub_console_checkkey): Add grub_dprintf() call to report unknown
8368 2008-05-29 Robert Millan <rmh@aybabtu.com>
8370 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8371 control key combinations.
8373 2008-05-29 Robert Millan <rmh@aybabtu.com>
8375 * util/powerpc/ieee1275/grub-install.in: Move from here ...
8376 * util/ieee1275/grub-install.in: ... to here.
8377 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8378 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8379 (grub_install_SOURCES): Likewise.
8381 2008-05-29 Robert Millan <rmh@aybabtu.com>
8383 * fs/affs.c: Update copyright year.
8384 * fs/ext2.c: Likewise.
8385 * fs/fshelp.c: Likewise.
8386 * fs/hfsplus.c: Likewise.
8387 * fs/ntfs.c: Likewise.
8388 * fs/xfs.c: Likewise.
8389 * include/grub/fshelp.h: Likewise.
8390 * util/grub-mkdevicemap.c: Likewise.
8392 2008-05-28 Robert Millan <rmh@aybabtu.com>
8394 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8395 might need to be fatfs to support some firmware implementations
8398 2008-05-28 Robert Millan <rmh@aybabtu.com>
8400 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8402 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8403 (make_device_map): Likewise.
8405 2008-05-20 Bean <bean123ch@gmail.com>
8407 * fs/fshelp.c (grub_fshelp_map_block): New function.
8408 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8409 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8411 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8412 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8413 (grub_fshelp_journal): New structure.
8414 (grub_fshelp_map_block): New function prototype.
8415 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8416 (grub_fshelp_map_block): Likewise.
8418 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8419 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8420 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8421 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8422 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8423 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8424 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8425 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8426 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8427 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8428 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8429 (grub_ext2_sblock): New members for journal support.
8430 (grub_ext3_journal_header): New structure.
8431 (grub_ext3_journal_revoke_header): Likewise.
8432 (grub_ext3_journal_block_tag): Likewise.
8433 (grub_ext3_journal_sblock): Likewise.
8434 (grub_fshelp_node): New members logfile and journal.
8435 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8436 grub_fshelp_map_block to get real block number.
8437 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8439 (grub_ext2_read_inode): Likewise.
8440 (grub_ext3_get_journal): New function.
8441 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8442 (grub_ext2_close): Release memory used by journal.
8444 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8445 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8446 (grub_reiserfs_transaction_header): Renamed to
8447 grub_reiserfs_description_block, replace field data with real_blocks.
8448 (grub_reiserfs_commit_block): New structure.
8449 (grub_reiserfs_data): New member journal.
8450 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8452 (grub_reiserfs_read_symlink): Likewise.
8453 (grub_reiserfs_iterate_dir): Likewise.
8454 (grub_reiserfs_open): Likewise.
8455 (grub_reiserfs_read): Likewise.
8456 (grub_reiserfs_get_journal): New function.
8457 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8458 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8459 using grub_reiserfs_get_journal.
8460 (grub_reiserfs_close): Release memory used by journal.
8462 * fs/affs.c (grub_affs_read_block): Change block type to
8463 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8465 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8467 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8469 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8471 * fs/udf.c (grub_udf_read_block): Change block type to
8472 grub_disk_addr_t. Use type cast to avoid warning.
8474 * fs/xfs.c (grub_xfs_read_block): Likewise.
8476 2008-05-16 Christian Franke <franke@computer.org>
8478 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8479 to ensure that break with ESC will always work.
8480 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8481 Remove ESC from keyboard queue.
8483 2008-05-16 Christian Franke <franke@computer.org>
8485 * util/biosdisk.c: [__CYGWIN__] Add includes.
8486 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8487 (get_os_disk): Move variable declarations to OS specific
8488 parts to avoid warning.
8489 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8490 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8491 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8493 * util/getroot.c: [__CYGWIN__] Add includes.
8494 (strip_extra_slashes): Fix "/" case.
8495 [__CYGWIN__] (get_win32_path): New function.
8496 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8497 [__CYGWIN__] (find_root_device): Disable.
8498 [__CYGWIN__] (get_bootsec_serial): New function.
8499 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8500 [__linux__] (grub_guess_root_device): Add early returns to simplify
8502 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8503 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8504 check for Linux only.
8506 2008-05-15 Bean <bean123ch@gmail.com>
8508 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8509 keyboard hang problem in apple's intel mac.
8511 2008-05-09 Robert Millan <rmh@aybabtu.com>
8513 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8515 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8516 (make_device_map): Likewise.
8517 Reported by Aurelien Jarno <aurel32@debian.org>
8519 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8521 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8522 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8523 (make_device_map): Output entries for xvd type disks.
8525 2008-05-07 Robert Millan <rmh@aybabtu.com>
8527 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8529 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8530 (make_device_map): Likewise.
8531 Reported by Roland Dreier <rdreier@cisco.com>
8533 2008-05-07 Robert Millan <rmh@aybabtu.com>
8535 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8536 grub_strstr() call. Correct a few mistakes in failure path handling.
8538 2008-05-06 Robert Millan <rmh@aybabtu.com>
8540 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8541 Do not print a trailing slash (therefore, the root directory is an
8543 (convert_system_path_to_grub_path): Do not remove trailing slash
8544 from make_system_path_relative_to_its_root() output.
8546 * util/i386/pc/grub-install.in: Add trailing slash to output from
8547 make_system_path_relative_to_its_root().
8549 2008-05-06 Robert Millan <rmh@aybabtu.com>
8551 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8552 ensures that output lines aren't intermangled with those sent to
8553 stderr (via grub_util_info()).
8554 * util/grub-probe.c (grub_refresh): Likewise.
8555 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8557 2008-05-05 Christian Franke <franke@computer.org>
8559 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8560 Add Cygwin device names.
8561 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8562 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8563 (check_device): Return error instead of success on empty name.
8564 (make_device_map): Move label inside linux specific code to
8565 prevent compiler warning.
8567 2008-04-30 Robert Millan <rmh@aybabtu.com>
8569 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8570 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8572 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8574 2008-04-29 Robert Millan <rmh@aybabtu.com>
8576 * docs/grub.cfg: New file (example GRUB configuration).
8578 2008-04-26 Robert Millan <rmh@aybabtu.com>
8580 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8581 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8582 and `disk/ieee1275/nand.c'.
8584 2008-04-25 Bean <bean123ch@gmail.com>
8586 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8589 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8590 change the buffer size to 4096 for cdrom device.
8592 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8594 (_linux_mod_SOURCES): New variable.
8595 (_linux_mod_CFLAGS): Likewise.
8596 (_linux_mod_LDFLAGS): Likewise.
8597 (linux_mod_SOURCES): Likewise.
8598 (linux_mod_CFLAGS): Likewise.
8599 (linux_mod_LDFLAGS): Likewise.
8600 (nand_mod_SOURCES): Likewise.
8601 (nand_mod_CFLAGS): Likewise.
8602 (nand_mod_LDFLAGS): Likewise.
8604 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8605 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8606 type property. (nand device in olpc don't have this property)
8608 * include/grub/disk.h (grub_disk_dev_id): New macro
8609 GRUB_DISK_DEVICE_NAND_ID.
8611 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8613 (grub_rescue_cmd_initrd): Likewise.
8615 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8616 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8617 ofw_cif_handler and ofw_idt, adjust padding number.
8619 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8620 GRUB_MACHINE_IEEE1275 is defined.
8622 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8623 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8625 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8626 on nested function heap_init.
8627 (grub_upper_mem): New variable for i386-ieee1275.
8628 (grub_get_extended_memory): New function for i386-ieee1275.
8629 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8631 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8632 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8635 * loader/i386/ieee1275/linux.c: New file.
8637 * loader/i386/ieee1275/linux_normal.c: New file.
8639 * disk/ieee1275/nand.c: New file.
8641 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8643 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8645 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8647 2008-04-18 Robert Millan <rmh@aybabtu.com>
8649 Restructures early code path on ieee1275 to unify grub_main() as
8650 the first C function that is executed in every platform.
8652 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8653 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8655 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8656 * kern/ieee1275/cmain.c (cmain): Rename to ...
8657 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8658 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8661 2008-04-18 Robert Millan <rmh@aybabtu.com>
8663 * util/update-grub.in: Fix syntax error when setting
8664 `GRUB_PRELOAD_MODULES'.
8665 Reported by Stephane Chazelas <stephane@artesyncp.com>
8667 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8669 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8670 section into account, newer toolchains generate unique build ids
8671 * configure.ac: remove the test for --build-id=none acceptance,
8672 we want build ids to be preserved
8673 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8674 far from other sections don't cause the raw binary images grow
8677 2008-04-15 Robert Millan <rmh@aybabtu.com>
8679 * disk/lvm.c: Update copyright year.
8680 * kern/misc.c: Likewise.
8682 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8684 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8685 there is no memory left for physical volume name.
8687 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8689 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8690 volume name mapping to support bigger than 9 character names properly.
8692 2008-04-13 Robert Millan <rmh@aybabtu.com>
8694 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8695 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8697 2008-04-13 Christian Franke <franke@computer.org>
8699 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8700 to create a floppy emulation boot CD when non emulation mode
8702 Enable Joliet CD filesystem extension.
8704 2008-04-13 Robert Millan <rmh@aybabtu.com>
8706 * kern/misc.c (grub_strncat): Fix off-by-one error.
8707 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8709 * kern/env.c (grub_env_context_close): Clear current context, not
8711 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8713 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8715 2008-04-13 Robert Millan <rmh@aybabtu.com>
8717 Improve robustness when handling LVM.
8719 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8720 (and leave `*p' unmodified).
8721 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8723 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8724 iterating through it.
8725 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8727 (grub_lvm_scan_device): Check the return value (and fail gracefully
8728 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8729 Don't assume `vg->pvs != NULL' when iterating through it.
8731 2008-04-13 Robert Millan <rmh@aybabtu.com>
8733 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8734 * genmk.rb (partmap): New variable.
8735 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8736 (#{partmap}): New target rule.
8737 * genpartmaplist.sh: New file.
8738 * Makefile.in (pkglib_DATA): Add partmap.lst.
8739 (partmap.lst): New target rule.
8740 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8741 modules (including all partition maps), instead of preloading them.
8743 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8745 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8746 `linux-boot-prober' (if installed) to detect other operating
8747 systems which are installed on the computer and add them to
8749 * conf/common.rmk: Build and install 30_os-prober.
8751 2008-04-12 Robert Millan <rmh@aybabtu.com>
8753 * kern/powerpc/ieee1275/init.c: Move from here ...
8754 * kern/ieee1275/init.c: ... to here. Update all users.
8756 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8757 * kern/ieee1275/cmain.c: ... to here. Update all users.
8759 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8760 * kern/ieee1275/openfw.c: ... to here. Update all users.
8762 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8763 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8765 2008-04-10 Pavel Roskin <proski@gnu.org>
8767 * configure.ac: Always use "_cv_" in cache variables for
8768 compatibility with Autoconf 2.62.
8770 2008-04-07 Robert Millan <rmh@aybabtu.com>
8772 Revert grub/machine/init.h addition by Pavel (since it breaks on
8773 i386-ieee1275 and others):
8774 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8775 * util/powerpc/ieee1275/misc.c: Likewise.
8777 2008-04-07 Robert Millan <rmh@aybabtu.com>
8779 * util/grub-probe.c (probe): Improve error message.
8781 2008-04-07 Robert Millan <rmh@aybabtu.com>
8783 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8784 (this prevents the presence of a bogus entry from ruining the whole
8787 2008-04-06 Pavel Roskin <proski@gnu.org>
8789 * util/biosdisk.c: Include grub/util/biosdisk.h.
8790 * util/grub-fstest.c (execute_command): Make static.
8791 * util/grub-mkdevicemap.c (check_device): Likewise.
8792 * util/i386/pc/misc.c: Include grub/machine/init.h.
8793 * util/powerpc/ieee1275/misc.c: Likewise.
8794 * util/lvm.c: Include grub/util/lvm.h.
8795 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8797 * util/raid.c: Include grub/util/raid.h.
8798 (grub_util_getdiskname): Make static.
8800 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8801 grub_hostfs_fini(), as they are called from grub_init_all() and
8802 grub_fini_all() respectively. This fixes an infinite loop in
8803 grub-fstest due to double registration of hostfs.
8804 Reported by Christian Franke <Christian.Franke@t-online.de>
8806 2008-04-05 Pavel Roskin <proski@gnu.org>
8808 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8809 all 8 functions. Otherwise, probe function 0 only.
8811 2008-04-04 Pavel Roskin <proski@gnu.org>
8813 * commands/lspci.c (grub_lspci_iter): Print the bus number
8816 * commands/lspci.c (grub_pci_classes): Fix typos.
8817 (grub_lspci_iter): Don't print func twice. Print vendor ID
8818 before device ID, as it's normally done.
8820 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8821 Fix signedness warnings.
8822 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8824 * util/ieee1275/get_disk_name.c: Include config.h so that
8825 _GNU_SOURCE is defined and getline() is declared. Mark an
8826 unused argument as such. Fix a signedness warning.
8828 2008-04-02 Pavel Roskin <proski@gnu.org>
8830 * genkernsyms.sh.in: Use more robust assignments for CC and
8831 srcdir. Quote srcdir.
8832 * gensymlist.sh.in: Likewise. Assert at the compile time that
8833 the symbol table is not empty.
8835 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8836 * fs/cpio.c (grub_cpio_read): Likewise.
8838 2008-04-01 Pavel Roskin <proski@gnu.org>
8840 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8841 * disk/host.c (grub_host_open): Likewise.
8842 * disk/loopback.c (grub_loopback_open): Likewise.
8843 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8844 disk->id as in disk/host.c, not a multi-character constant.
8846 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8847 later is obsolete, potentially dangerous and sets a bad example.
8848 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8849 * util/misc.c (grub_util_get_image_size): Likewise.
8851 * disk/loopback.c (options): Improve help for "--partitions".
8853 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8854 options to align them with the short options, e.g. "echo -e".
8856 2008-03-31 Bean <bean123ch@gmail.com>
8858 * video/reader/png.c (grub_png_data): New member is_16bit and
8860 (grub_png_decode_image_header): Detect 16 bit png image.
8861 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8862 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8863 (grub_video_reader_png): Release memory occupied by image_data.
8865 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8867 (grub_nfs_mount): Skip the test for sector per cluster.
8869 * include/grub/ntfs.h (MAX_SPC): Removed.
8871 2008-03-31 Bean <bean123ch@gmail.com>
8873 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8874 (grub_probe_SOURCES): Add fs/afs.c.
8875 (grub_fstest_SOURCES): Likewise.
8876 (afs_mod_SOURCES): New variable.
8877 (afs_mod_CFLAGS): Likewise.
8878 (afs_mod_LDFLAGS): Likewise.
8880 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8881 (grub_emu_SOURCES): Likewise.
8883 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8885 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8887 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8889 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8891 * fs/afs.c: New file.
8893 2008-03-30 Pavel Roskin <proski@gnu.org>
8895 * disk/host.c: Include grub/misc.h to fix a warning.
8896 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8897 warnings about implicit declarations.
8899 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8901 * include/grub/i386/loader.h: Change declaration of
8902 grub_linux_boot() to match what grub_loader_set() expects.
8903 * util/getroot.c (grub_guess_root_device): Return const char* to
8905 * util/grub-probe.c (probe): Fix a warning about uninitialized
8906 abstraction_name variable.
8907 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8908 second argument as unused to fix a warning.
8910 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8911 missing grub_error() call.
8913 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8914 2.60 and newer uses it to define datadir.
8916 * commands/sleep.c: Fix warning about implicit declaration.
8917 * disk/memdisk.c: Likewise.
8918 * loader/aout.c: Likewise.
8919 * loader/i386/bsd_normal.c: Likewise.
8920 * util/grub-probe.c: Likewise.
8922 * commands/i386/cpuid.c (has_longmode): Make static.
8923 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8924 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8926 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8927 GDT. This is more robust, as %ds can change.
8928 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8929 calling real_to_prot().
8930 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8932 2008-03-28 Pavel Roskin <proski@gnu.org>
8934 * kern/i386/pc/startup.S: Assert that uncompressed functions
8935 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8936 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8937 code, as they push parts of the code (error handlers) beyond
8938 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8939 code as correctness and size.
8941 2008-03-28 Pavel Roskin <proski@gnu.org>
8943 * kern/i386/pc/startup.S
8944 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8945 data block address to the real mode, keep offset minimal. This
8946 works around a bug in AWARD BIOS on old Athlon systems, which
8947 makes CD detection hang.
8949 2008-03-26 Pavel Roskin <proski@gnu.org>
8951 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8953 * include/grub/normal.h: Add grub_parse_color_name_pair()
8956 2008-03-24 Bean <bean123ch@gmail.com>
8958 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8959 (cd_count): Removed.
8960 (cd_drive): New variable.
8961 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8962 (grub_biosdisk_call_hook): Likewise.
8963 (grub_biosdisk_iterate): Change cdrom detection method.
8964 (grub_biosdisk_open): Replace cd_start with cd_drive.
8965 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8966 detect cdrom device.
8968 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8970 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8971 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8972 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8973 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8974 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8975 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8976 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8977 (grub_biosdisk_cdrp): New structure.
8978 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8980 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8982 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8985 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8988 2008-03-20 Robert Millan <rmh@aybabtu.com>
8990 Remove 2 TiB limit in ata.mod.
8991 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8992 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8993 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8994 grub_uint64_t instead of grub_uint32_t.
8996 2008-03-05 Bean <bean123ch@gmail.com>
8998 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8999 (grub_multiboot): Set boot device.
9001 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9003 2008-03-02 Bean <bean123ch@gmail.com>
9005 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9008 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
9010 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9013 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9016 * docs/fdl.texi: New file.
9018 * docs/mdate-sh: New file. Copied from gnulib.
9019 * docs/texinfo.tex: Likewise.
9021 * config.guess: Updated from gnulib.
9022 * install-sh: Likewise.
9024 2008-02-28 Robert Millan <rmh@aybabtu.com>
9026 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9027 (aout_mod_SOURCES): New variable.
9028 (aout_mod_CFLAGS): Likewise.
9029 (aout_mod_LDFLAGS): Likewise.
9031 * conf/i386-ieee1275.rmk: Likewise.
9033 2008-02-28 Robert Millan <rmh@aybabtu.com>
9035 * util/update-grub.in: Reorganise terminal validity check. Accept
9036 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9037 Based on suggestion by Franklin PIAT.
9039 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
9041 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9043 * util/getroot.c (grub_util_check_block_device): New function that
9044 returns the given argument if it is a block device and returns NULL else.
9045 * util/grub-probe.c (argument_is_device): New variable.
9046 (probe): Promote device_name from a variable to an argument. Receive
9047 device_name from grub_util_check_block_device() if path is NULL and from
9048 grub_guess_root_device() else. Do not free() device_name anymore.
9049 (options): Introduce new parameter '-d, --device'.
9050 (main): Add description of the new parameter to the help screen.
9051 Rename path variable to argument. Set argument_is_device if the '-d'
9052 option is given. Pass argument to probe() depending on
9055 2008-02-24 Bean <bean123ch@gmail.com>
9057 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9058 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9059 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9060 (GRUB_ISO9660_VOLDESC_PART): Likewise.
9061 (GRUB_ISO9660_VOLDESC_END): Likewise.
9062 (grub_iso9660_primary_voldesc): New member escape.
9063 (grub_iso9660_data): New member joliet.
9064 (grub_iso9660_convert_string): New function.
9065 (grub_iso9660_mount): Detect joliet extension.
9066 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9067 (grub_iso9660_iso9660_label): Likewise.
9069 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
9070 (grub_setup_SOURCES): Add fs/udf.c.
9071 (grub_fstest_SOURCES): Likewise.
9072 (udf_mod_SOURCES): New variable.
9073 (udf_mod_CFLAGS): Likewise.
9074 (udf_mod_LDFLAGS): Likewise.
9076 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
9077 (grub_emu_SOURCES): Likewise.
9079 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9081 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9083 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9085 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9087 * fs/udf.c: New file.
9089 2008-02-24 Robert Millan <rmh@aybabtu.com>
9091 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
9092 (normal/lexer.c_DEPENDENCIES): New variables.
9093 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9094 (normal/lexer.c_DEPENDENCIES): Likewise.
9095 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
9096 (normal/lexer.c_DEPENDENCIES): Likewise.
9097 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
9098 (normal/lexer.c_DEPENDENCIES): Likewise.
9099 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9100 (normal/lexer.c_DEPENDENCIES): Likewise.
9101 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9102 (normal/lexer.c_DEPENDENCIES): Likewise.
9104 2008-02-23 Robert Millan <rmh@aybabtu.com>
9106 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
9107 since they were intended to be in hex. This didn't break previously
9108 because of a bug in gpt_partition_map_iterate() (see below).
9110 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
9111 when checking the validity of GPT header.
9112 Remove `partno', since it always provides the same information as `i'.
9114 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
9116 * include/grub/efi/time.h: Fix a wrong comment.
9118 2008-02-19 Pavel Roskin <proski@gnu.org>
9120 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
9123 2008-02-19 Bean <bean123ch@gmail.com>
9125 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
9126 (aout_mod_SOURCES): New variable.
9127 (aout_mod_CFLAGS): Likewise.
9128 (aout_mod_LDFLAGS): Likewise.
9129 (_bsd_mod_SOURCES): New variable.
9130 (_bsd_mod_CFLAGS): Likewise.
9131 (_bsd_mod_LDFLAGS): Likewise.
9132 (bsd_mod_SOURCES): New variable.
9133 (bsd_mod_CFLAGS): Likewise.
9134 (bsd_mod_LDFLAGS): Likewise.
9136 * include/grub/aout.h: New file.
9138 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
9140 * include/grub/i386/bsd.h: New file.
9142 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
9145 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
9146 function is called, so that it's possible to change it inside the hook.
9147 (grub_elf64_load): Likewise.
9148 (grub_elf_file): Don't close the file if elf header is not found.
9149 (grub_elf_close): Close the file if grub_elf_file fails (The new
9150 grub_elf_file won't close it).
9151 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
9152 (grub_elf64_size): Likewise.
9154 * kern/i386/loader.S (grub_unix_real_boot): New function.
9156 * loader/aout.c: New file.
9158 * loader/i386/bsd.c: New file.
9160 * loader/i386/bsd_normal.c: New file.
9162 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
9164 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
9165 can test other formats.
9167 2008-02-19 Robert Millan <rmh@aybabtu.com>
9169 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
9170 (grub_gpt_partition_type_empty): Redefine with macro from
9171 `<grub/gpt_partition.h>'.
9172 (gpt_partition_map_iterate): Adjust partition type comparison.
9174 Export `entry' as partmap-specific `part.data' struct.
9175 (grub_gpt_header, grub_gpt_partentry): Move from here ...
9177 * include/grub/gpt_partition.h (grub_gpt_header)
9178 (grub_gpt_partentry): ... to here (new file).
9180 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
9182 (grub_gpt_partition_type_bios_boot): New const variable, defined
9183 with macro from `<grub/gpt_partition.h>'.
9185 (setup): Replace `first_start' with `embed_region', which keeps
9186 track of the embed region (and is partmap-agnostic).
9188 Replace find_first_partition_start() with find_usable_region(),
9189 which finds a usable region for embedding using partmap-specific
9190 knowledge (supports PC/MSDOS and GPT).
9192 Fix all assumptions that the embed region start at sector 1, using
9193 `embed_region.start' from now on. Similarly, use `embed_region.end'
9194 rather than `first_start' to calculate available size.
9196 In grub_util_info() message, replace "into after the MBR" with an
9197 indication of the specific sector our embed region starts at.
9199 2008-02-19 Robert Millan <rmh@aybabtu.com>
9201 * DISTLIST: Replace `commands/ieee1275/halt.c' and
9202 `commands/ieee1275/reboot.c' with `commands/halt.c' and
9203 `commands/reboot.c'.
9204 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9205 (halt_mod_SOURCES): Likewise.
9206 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9207 (halt_mod_SOURCES): Likewise.
9209 2008-02-17 Christian Franke <franke@computer.org>
9211 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
9213 2008-02-17 Robert Millan <rmh@aybabtu.com>
9215 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9216 set `first_start' to 0 for non-PC/MSDOS partition maps.
9218 2008-02-16 Robert Millan <rmh@aybabtu.com>
9220 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9221 do not assume partition map is PC/MSDOS before performing checks that
9222 are specific to that layout.
9224 2008-02-13 Robert Millan <rmh@aybabtu.com>
9226 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
9227 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
9228 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
9230 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
9232 * configure.ac: Only a cosmetic change on the handling of
9233 -fno-stack-protector.
9235 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
9237 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
9238 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
9240 (grub_install_SOURCES): Add halt.mod and reboot.mod.
9241 (halt_mod_SOURCES): New variable.
9242 (halt_mod_CFLAGS): Likewise.
9243 (halt_mod_LDFLAGS): Likewise.
9244 (reboot_mod_SOURCES): Likewise.
9245 (reboot_mod_CFLAGS): Likewise.
9246 (reboot_mod_LDFLAGS): Likewise.
9248 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
9249 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
9251 (halt_mod_SOURCES): Likewise.
9252 (reboot_mod_SOURCES): Likewise.
9254 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
9255 commands/i386/pc/reboot.c by commands/reboot.c.
9256 (reboot_mod_SOURCES): Likewise.
9258 * commands/i386/pc/reboot.c: merge this file ...
9260 * commands/ieee1275/reboot.c: ... and this file ...
9262 * commands/reboot.c: ... to this file.
9263 Add some precompiler directive to include the correct header for
9266 * commands/ieee1275/halt.c: move this file ...
9268 * commands/halt.c: ... to here.
9269 Add some precompiler directive to include the correct header for
9272 * include/grub/efi/efi.h (grub_reboot): New function declaration.
9273 (grub_halt): Likewise.
9275 * kern/efi/efi.c (grub_reboot): New function.
9276 (grub_halt): Likewise.
9278 2008-02-12 Robert Millan <rmh@aybabtu.com>
9280 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
9281 /dev (like it is done for /dev/mapper). This doesn't provide support
9282 for EVMS, but at least it is now easy to identify the problem when it
9285 2008-02-11 Robert Millan <rmh@aybabtu.com>
9287 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
9288 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
9289 comparing it with -1, not 0.
9291 2008-02-10 Robert Millan <rmh@aybabtu.com>
9293 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
9295 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9296 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
9298 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
9299 `disk/lvm.c' to the end of the list.
9300 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9301 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9303 2008-02-10 Robert Millan <rmh@aybabtu.com>
9305 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
9306 grub_print_error() instead. This will let user know why we're entering
9308 Based on suggestions from Sam Morris.
9310 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
9312 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
9313 on remaining N args, instead of "--" arg N times.
9315 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
9317 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
9318 (fill_with_default_glyph): Changed to use unknown_glyph for fill
9319 pattern for unknown glyphs.
9321 2008-02-09 Robert Millan <rmh@aybabtu.com>
9323 * configure.ac: Probe for `help2man'.
9324 * Makefile.in (builddir): New variable.
9325 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
9326 or otherwise add a few flags/options to it.
9327 (install-local): For every executable utility or script that is
9328 installed, invoke $(HELP2MAN) to install a manpage based on --help
9331 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
9332 that it doesn't prevent --help from working in build tree.
9334 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
9335 with `bug-grub@gnu.org'.
9336 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
9337 * util/update-grub.in (usage): New function.
9338 Implement proper argument check, with support for --help and --version
9339 (as well as existing -y).
9341 2008-02-09 Christian Franke <franke@computer.org>
9343 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9344 avoid overwriting previous output.
9345 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9347 2008-02-09 Robert Millan <rmh@aybabtu.com>
9349 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9352 2008-02-09 Robert Millan <rmh@aybabtu.com>
9354 * commands/sleep.c: New file.
9355 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9356 (sleep_mod_SOURCES): New variable.
9357 (sleep_mod_CFLAGS): Likewise.
9358 (sleep_mod_LDFLAGS): Likewise.
9360 2008-02-09 Robert Millan <rmh@aybabtu.com>
9362 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9363 situations in which we can deduce the RAID size and the superblock
9366 2008-02-09 Robert Millan <rmh@aybabtu.com>
9368 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
9369 and return a grub_diskmemberlist_t composed of LVM physical volumes.
9370 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9372 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
9373 and return a grub_diskmemberlist_t composed of physical array members.
9374 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9376 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9378 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9379 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9380 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9382 * util/grub-probe.c (probe): Move partmap probing code from here ...
9383 (probe_partmap): ... to here.
9384 (probe): Use probe_partmap() once for the disk we're probing, and
9385 additionally, when such disk contains a memberlist() struct member,
9386 once for each disk that is contained in the structure returned by
9389 2008-02-09 Robert Millan <rmh@aybabtu.com>
9391 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9392 environment variable to 'all' in order to obtain debug output from
9394 * util/i386/pc/grub-setup.c (main): Likewise.
9396 2008-02-08 Robert Millan <rmh@aybabtu.com>
9398 * disk/raid.c (grub_raid_scan_device): Check for
9399 `array->device[sb.this_disk.number]' rather than for
9400 `array->device[sb.this_disk.number]->name', since the latter is not
9401 guaranteed to be accessible.
9403 2008-02-08 Robert Millan <rmh@aybabtu.com>
9405 * disk/raid.c: Update copyright.
9406 * fs/cpio.c: Likewise.
9407 * include/grub/raid.h: Likewise.
9408 * loader/i386/pc/multiboot.c: Likewise.
9409 * util/hostfs.c: Likewise.
9411 2008-02-08 Robert Millan <rmh@aybabtu.com>
9413 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9414 to a grub_disk_t array.
9415 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9417 (grub_raid_scan_device): Replace `device[x].name' accesses with
9418 `device[x]->name'. Simplify initialization of `array->device[x]'.
9420 2008-02-08 Robert Millan <rmh@aybabtu.com>
9422 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9423 grub_dprintf() calls.
9424 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9427 2008-02-07 Christian Franke <franke@computer.org>
9429 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9430 instead of fseek and ftell to support large files.
9431 (grub_hostfs_read): Likewise.
9433 2008-02-07 Robert Millan <rmh@aybabtu.com>
9435 Patch from Jeroen Dekkers.
9436 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
9437 failure, since successfully reading all array members might not be
9440 2008-02-06 Robert Millan <rmh@aybabtu.com>
9442 * util/grub-probe.c (probe): Simplify partmap probing (with the
9443 assumption that the first word up to the underscore equals to
9446 2008-02-06 Christian Franke <franke@computer.org>
9448 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9449 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9450 last block of a cpio or tar stream.
9451 Check for "TRAILER!!!" instead of any empty data
9452 block to detect last block of a cpio stream.
9453 (grub_cpio_dir): Fix constness of variable np.
9454 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9455 cpio or tar trailer is detected. This fixes a crash
9456 on open of a non existing file.
9458 2008-02-05 Bean <bean123ch@gmail.com>
9460 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9462 (grub_multiboot_load_elf64): Likewise.
9463 (grub_multiboot): Initialize mbi structure.
9465 * util/grub-fstest.c: Don't include unused header file script.h.
9467 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9469 (grub_fstest_SOURCES): Likewise.
9471 2008-02-05 Robert Millan <rmh@aybabtu.com>
9473 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9474 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9475 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9476 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9478 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9479 (translation_table): Replace hardcoded values with macros
9480 provided by `<grub/term.h>'.
9482 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9483 (keyboard_map): Correct/add a few values, with macros provided
9485 (keyboard_map_shift): Zero values that don't differ from their
9486 `keyboard_map' equivalents.
9487 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9488 Discard the second scan code that is always sent by Caps lock.
9489 Only use `keyboard_map_shift' when it provides a non-zero value,
9490 otherwise fallback to `keyboard_map'.
9492 2008-02-04 Bean <bean123ch@gmail.com>
9494 * Makefile.in (enable_grub_fstest): New variable.
9496 * conf/common.rmk (grub_fstest_init.lst): New rule.
9497 (grub_fstest_init.h): Likewise.
9498 (grub_fstest_init.c): Likewise.
9499 (util/grub-fstest.c_DEPENDENCIES): New variable.
9500 (grub_fstest_SOURCES): Likewise.
9502 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9504 * util/grub-fstest.c: New file.
9506 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9508 Make grub-setup handle a separate root device.
9510 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9511 so that the root device can be compared with the destination
9513 When embedding the core image, if the root and destination devices
9514 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9516 When not embedding, set ROOT_DRIVE to 0xFF.
9518 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9520 Add support for having a grub directory in a different drive. This
9521 is still only the data handling part.
9523 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9524 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9525 (grub_root_drive): New variable.
9527 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9528 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9529 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9532 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9534 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9536 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9538 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9539 is bogus, because PXE booting does not specify any drive
9542 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9543 am not sure if this is really correct.
9545 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9546 is always identical to the boot drive when booting from a CD.
9548 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9550 (root_drive): New variable.
9551 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9552 (setup_sectors): Push %dx right after popping it, because %dh will
9554 (copy_buffer): Restore %dx.
9556 2008-02-03 Robert Millan <rmh@aybabtu.com>
9558 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9559 use `cdboot.img' for cdrom images.
9561 2008-02-03 Robert Millan <rmh@aybabtu.com>
9563 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9564 only setup gfxterm when `font' command has succeeded.
9566 2008-02-03 Robert Millan <rmh@aybabtu.com>
9568 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9569 (grub_rescue_cmd_multiboot_loader)
9570 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9572 2008-02-03 Pavel Roskin <proski@gnu.org>
9574 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9575 %edx and %esi from stack only after grub_gate_a20() is called.
9576 grub_gate_a20() clobbers %edx.
9578 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9580 * configure.ac (AC_INIT): Bumped to 1.96.
9582 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9583 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9584 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9585 video/readers/png.c.
9587 2008-02-03 Bean <bean123ch@gmail.com>
9589 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9590 (cdboot_img_SOURCES): New variable.
9591 (cdboot_img_ASFLAGS): New variable.
9592 (cdboot_img_LDFLAGS): New variable.
9594 * boot/i386/pc/cdboot.S: New file.
9596 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9597 (cd_count): Likewise.
9598 (grub_biosdisk_get_drive): Add support for cd device.
9599 (grub_biosdisk_call_hook): Likewise.
9600 (grub_biosdisk_iterate): Likewise.
9601 (grub_biosdisk_open): Likewise.
9602 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9603 (grub_biosdisk_rw): Support reading from cd device.
9604 (GRUB_MOD_INIT): Iterate cd devices.
9606 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9607 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9608 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9610 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9612 2008-02-02 Robert Millan <rmh@aybabtu.com>
9614 * commands/read.c: New file.
9615 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9616 (read_mod_SOURCES): New variable.
9617 (read_mod_CFLAGS): Likewise.
9618 (read_mod_LDFLAGS): Likewise.
9620 2008-02-02 Robert Millan <rmh@aybabtu.com>
9622 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9623 determining whether menu has to be displayed.
9625 2008-02-02 Marco Gerards <marco@gnu.org>
9627 * bus/pci.c: New file.
9629 * include/grub/pci.h: Likewise.
9631 * include/grub/i386/pc/pci.h: Likewise.
9633 * commands/lspci.c: Likewise.
9635 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9637 (pci_mod_SOURCES): New variable.
9638 (pci_mod_CFLAGS): Likewise.
9639 (pci_mod_LDFLAGS): Likewise.
9640 (lspci_mod_SOURCES): Likewise.
9641 (lspci_mod_CFLAGS): Likewise.
9642 (lspci_mod_LDFLAGS): Likewise.
9644 2008-02-02 Bean <bean123ch@gmail.com>
9646 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9647 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9649 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9650 (grub_xfs_btree_node): New structure.
9651 (grub_xfs_btree_root): New structure.
9652 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9653 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9654 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9655 (GRUB_XFS_EXTENT_SIZE): Likewise.
9656 (grub_xfs_read_block): Support btree format type.
9657 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9658 Use directory block as basic unit.
9660 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9662 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9663 __attribute__ ((__regparm__ (1))).
9665 2008-02-01 Robert Millan <rmh@aybabtu.com>
9667 Correct a mistake in previous commit.
9669 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9671 (normal/command.c_DEPENDENCIES): New variable.
9673 2008-02-01 Robert Millan <rmh@aybabtu.com>
9675 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9677 (normal/command.c_DEPENDENCIES): New variable.
9678 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9679 * conf/i386-ieee1275.rmk: Likewise.
9680 * conf/i386-linuxbios.rmk: Likewise.
9681 * conf/i386-pc.rmk: Likewise.
9682 * conf/sparc64-ieee1275.rmk: Likewise.
9683 * conf/powerpc-ieee1275.rmk: Likewise.
9684 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9686 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9688 2008-02-01 Robert Millan <rmh@aybabtu.com>
9690 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9691 call at beginning of function.
9693 2008-01-31 Pavel Roskin <proski@gnu.org>
9695 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9696 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9697 (grub_mkrescue_SOURCES): Likewise.
9698 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9700 2008-01-30 Robert Millan <rmh@aybabtu.com>
9702 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9703 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9704 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9705 (grub_probe_SOURCES): ... to here.
9707 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9708 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9709 * conf/i386-ieee1275.rmk: Likewise.
9710 * conf/i386-linuxbios.rmk: Likewise.
9711 * conf/powerpc-ieee1275.rmk: Likewise.
9713 2008-01-30 Tristan Gingold <gingold@free.fr>
9715 * kern/rescue.c: Silently accept empty lines.
9717 2008-01-29 Bean <bean123ch@gmail.com>
9719 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9720 (real_code_2): Code cleanup and change comment style.
9721 (move_memory): Avoid using 32-bit address mode.
9723 2008-01-29 Bean <bean123ch@gmail.com>
9725 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9726 (png_mod_SOURCES): New variable.
9727 (png_mod_CFLAGS): Likewise.
9728 (png_mod_LDFLAGS): Likewise.
9730 * video/readers/png.c: New file.
9732 2008-01-28 Robert Millan <rmh@aybabtu.com>
9734 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9735 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9736 `ifndef GRUB_MOD_GAP' hack.
9737 * util/elf/grub-mkimage.c (add_segments): Likewise.
9739 2008-01-27 Robert Millan <rmh@aybabtu.com>
9741 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9742 `GRUB_MOD_GAP' for platforms in which it's not defined.
9743 * util/elf/grub-mkimage.c (add_segments): Likewise.
9745 2008-01-27 Robert Millan <rmh@aybabtu.com>
9747 Get grub-emu to build again (including parallel builds).
9749 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9751 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9752 (normal/execute.c_DEPENDENCIES): ... this, ...
9753 (grub-emu_DEPENDENCIES): ... and this.
9755 * conf/i386-efi.rmk: Likewise.
9756 * conf/i386-linuxbios.rmk: Likewise.
9757 * conf/i386-ieee1275.rmk: Likewise.
9758 * conf/powerpc-ieee1275.rmk: Likewise.
9759 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9761 2008-01-27 Robert Millan <rmh@aybabtu.com>
9763 * NEWS: Add a few items.
9765 2008-01-27 Robert Millan <rmh@aybabtu.com>
9767 Fix parallel builds with grub-emu. Based on earlier commit for
9768 grub-probe and grub-setup.
9770 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9771 (util/grub-emu.c_DEPENDENCIES): ... this.
9772 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9773 (util/grub-emu.c_DEPENDENCIES): ... this.
9774 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9775 (util/grub-emu.c_DEPENDENCIES): ... this.
9776 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9777 (util/grub-emu.c_DEPENDENCIES): ... this.
9778 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9779 (util/grub-emu.c_DEPENDENCIES): ... this.
9781 2008-01-27 Pavel Roskin <proski@gnu.org>
9783 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9784 to create a gap between _end and the modules added to the image
9785 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9786 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9787 * util/elf/grub-mkimage.c (add_segments): Likewise.
9789 2008-01-26 Pavel Roskin <proski@gnu.org>
9791 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9792 just return an error.
9794 2008-01-26 Bean <bean123ch@gmail.com>
9796 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9797 (grub_reiserfs_get_item): Save offset of the next item.
9798 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9800 2008-01-25 Robert Millan <rmh@aybabtu.com>
9802 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9803 make all filesystem sources appear together (possibly fixing omissions
9805 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9806 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9807 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9808 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9810 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9812 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9813 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9814 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9815 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9817 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9818 (probe): Add a sanity check to make sure of our ability to read
9819 requested files when probing for filesystem type.
9821 * genmk.rb: Update copyright year (2007).
9823 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9824 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9825 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9826 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9827 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9828 : Remove function prototypes.
9830 2008-01-25 Robert Millan <rmh@aybabtu.com>
9832 Revert my previous commits (based on wrong assumption of how grub_errno
9835 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9836 * kern/file.c (grub_file_open): Likewise.
9838 2008-01-24 Pavel Roskin <proski@gnu.org>
9840 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9841 that hang if GRUB tries to setup colors.
9842 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9843 colors for firmwares that don't support it.
9844 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9845 Recognize Open Hack'Ware, set flags to work around its
9848 2008-01-24 Robert Millan <rmh@aybabtu.com>
9850 * kern/file.c (grub_file_open): Do not account previous failures of
9851 unrelated functions when grub_errno is checked for.
9852 Reported by Oleg Strikov.
9854 2008-01-24 Bean <bean123ch@gmail.com>
9856 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9857 (grub_ufs_sblock): New member volume name.
9858 (grub_ufs_find_file): Fix string copy bug.
9859 (grub_ufs_label): Implement this function properly.
9861 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9862 (grub_hfs_iterate_records): Use the correct file number for extents
9863 and catalog file. Fix problem in next index calculation.
9864 (grub_hfs_find_node): Replace recursive function call with loop.
9865 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9867 2008-01-23 Robert Millan <rmh@aybabtu.com>
9869 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9870 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9871 (grub_multiboot2_real_boot): New function prototype.
9873 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9874 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9876 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9877 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9879 2008-01-23 Robert Millan <rmh@aybabtu.com>
9881 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9882 #ifdef'ed out grub_printf().
9884 2008-01-23 Robert Millan <rmh@aybabtu.com>
9886 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9887 grub_dprintf calls, since they make "debug=all" mode unusable.
9888 (grub_console_checkkey): Likewise.
9890 2008-01-23 Robert Millan <rmh@aybabtu.com>
9892 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9893 `term/i386/pc/at_keyboard.c'.
9894 (pkglib_MODULES): Add `serial.mod'.
9895 (serial_mod_SOURCES): New variable.
9896 (serial_mod_CFLAGS): Likewise.
9897 (serial_mod_LDFLAGS): Likewise.
9899 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9900 `<grub/powerpc/ieee1275/console.h>'.
9901 (grub_keyboard_controller_init): New function prototype.
9902 (grub_console_checkkey): Likewise.
9903 (grub_console_getkey): Likewise.
9905 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9908 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9909 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9911 2008-01-23 Robert Millan <rmh@aybabtu.com>
9913 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9914 present, "(memdisk)/boot/grub" becomes the default prefix.
9916 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9917 a memdisk tarball with all the modules. Add --overlay=DIR option that
9918 allows users to overlay additional files into the image.
9920 2008-01-23 Robert Millan <rmh@aybabtu.com>
9922 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9923 and `machine/memory.h'.
9924 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9925 (_multiboot_mod_SOURCES): New variable.
9926 (_multiboot_mod_CFLAGS): Likewise.
9927 (_multiboot_mod_LDFLAGS): Likewise.
9928 (multiboot_mod_SOURCES): Likewise.
9929 (multiboot_mod_CFLAGS): Likewise.
9930 (multiboot_mod_LDFLAGS): Likewise.
9932 * include/grub/i386/ieee1275/loader.h: New file.
9934 * include/grub/i386/ieee1275/machine.h: Likewise.
9936 * include/grub/i386/ieee1275/memory.h: Likewise.
9938 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9939 variable declaration.
9940 (grub_os_area_size): Likewise.
9942 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9943 (grub_lower_mem, grub_upper_mem): New variables.
9944 (grub_stop_floppy): New function (just to make
9945 grub_multiboot2_real_boot() happy).
9947 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9948 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9949 (grub_stop): New function.
9950 Include `"../realmode.S"' and `"../loader.S"'.
9952 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9953 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9955 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9956 rely on grub_multiboot2_real_boot() for final boot.
9958 2008-01-22 Robert Millan <rmh@aybabtu.com>
9960 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9961 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9962 device that doesn't look like an SD card.
9963 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9964 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9965 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9966 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9969 2008-01-22 Robert Millan <rmh@aybabtu.com>
9971 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9972 avoid claiming over our own code.
9974 2008-01-22 Bean <bean123ch@gmail.com>
9976 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9977 (jpeg_mod_SOURCES): New variable.
9978 (jpeg_mod_CFLAGS): Likewise.
9979 (jpeg_mod_LDFLAGS): Likewise.
9981 * video/readers/jpeg.c : New file.
9983 2008-01-22 Bean <bean123ch@gmail.com>
9985 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9986 there are no more items.
9988 2008-01-21 Robert Millan <rmh@aybabtu.com>
9990 * kern/mm.c (grub_mm_init_region): Improve debug message.
9992 2008-01-21 Robert Millan <rmh@aybabtu.com>
9994 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9995 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9997 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9999 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10000 Indicates start of upper memory.
10001 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10002 (generate_image): Abort when image size is big enough to corrupt
10005 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10006 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10007 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10008 instead of hardcoding 0xA0000.
10009 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10010 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10011 instead of hardcoding 0xA0000.
10013 2008-01-21 Robert Millan <rmh@aybabtu.com>
10015 * disk/memdisk.c (memdisk_size): New variable.
10016 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10018 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
10019 image to dynamic memory.
10020 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10021 `memdisk_size'. Free memdisk block.
10023 2008-01-21 Robert Millan <rmh@aybabtu.com>
10025 Fix detection of very small filesystems (like tar).
10027 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10028 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10029 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10030 a problem with this disk).
10032 2008-01-21 Robert Millan <rmh@aybabtu.com>
10034 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10035 on grub_biosdisk_rw_standard() error.
10037 2008-01-21 Robert Millan <rmh@aybabtu.com>
10039 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10041 * kern/elf.c: Likewise.
10042 * kern/ieee1275/ieee1275.c: Likewise.
10043 * kern/powerpc/ieee1275/openfw.c: Likewise.
10044 * term/ieee1275/ofconsole.c: Likewise.
10046 2008-01-21 Robert Millan <rmh@aybabtu.com>
10048 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10050 * include/grub/kernel.h (grub_arch_memdisk_addr)
10051 (grub_arch_memdisk_size): Moved from here ...
10053 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10054 (grub_arch_memdisk_size): ... to here.
10056 2008-01-21 Robert Millan <rmh@aybabtu.com>
10058 Mostly based on bugfix from Bean.
10060 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10061 attribute with hook() parameter.
10062 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10064 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10065 attribute with hook() parameter.
10066 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10069 2008-01-21 Robert Millan <rmh@aybabtu.com>
10071 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
10072 (pkglib_MODULES): Add `memdisk.mod'.
10073 (memdisk_mod_SOURCES): New variable.
10074 (memdisk_mod_CFLAGS): Likewise.
10075 (memdisk_mod_LDFLAGS): Likewise.
10077 * disk/memdisk.c: New file.
10079 * include/grub/disk.h (grub_disk_dev_id): Add
10080 `GRUB_DISK_DEVICE_MEMDISK_ID'.
10082 * include/grub/i386/pc/kernel.h
10083 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
10084 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
10085 (grub_kernel_image_size): New variable declaration.
10086 (grub_total_module_size): Likewise.
10087 (grub_memdisk_image_size): Likewise.
10089 * include/grub/i386/pc/memory.h
10090 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
10092 * include/grub/kernel.h: Include `<grub/symbol.h>'.
10093 (grub_arch_memdisk_addr): New variable declaration.
10094 (grub_arch_memdisk_size): Likewise.
10096 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
10097 (grub_arch_memdisk_size): Likewise.
10099 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
10100 (codestart): Replace hardcoded `0x100000' with
10101 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
10103 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
10104 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
10105 not NULL, append the contents of the file it refers to, at the end of
10106 the compressed kernel image. Initialize `grub_memdisk_image_size'
10107 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
10108 (options): Add "memdisk"|'m' option.
10109 (main): Parse --memdisk|-m option, and pass user-provided path as
10110 parameter to generate_image().
10112 2008-01-20 Robert Millan <rmh@aybabtu.com>
10114 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
10115 grub_dprintf() calls from here ...
10116 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
10118 2008-01-20 Robert Millan <rmh@aybabtu.com>
10120 Fix detection of "real mode" when /options/real-mode? doesn't exist.
10122 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
10124 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
10125 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
10126 `GRUB_IEEE1275_FLAG_REAL_MODE'.
10127 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
10129 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
10130 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
10132 2008-01-19 Robert Millan <rmh@aybabtu.com>
10134 Get rid of confusing function (superseded by
10135 `grub_ieee1275_get_integer_property')
10136 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
10138 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
10140 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
10141 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
10142 in native endianness from grub_ieee1275_get_integer_property().
10144 2008-01-19 Robert Millan <rmh@aybabtu.com>
10146 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
10147 command after "shut-down", since implementations differ on which
10148 the command for halt is.
10150 2008-01-19 Robert Millan <rmh@aybabtu.com>
10152 * include/grub/i386/linuxbios/console.h: Add header protection.
10153 (grub_keyboard_controller_init): New function prototype.
10154 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
10155 (KEYBOARD_COMMAND_READ): Likewise.
10156 (KEYBOARD_COMMAND_WRITE): Likewise.
10157 (KEYBOARD_SCANCODE_SET1): Likewise.
10158 (grub_keyboard_controller_write): New function.
10159 (grub_keyboard_controller_read): Likewise.
10160 (grub_keyboard_controller_init): Likewise.
10162 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
10163 (grub_console_init): On coreboot/LinuxBIOS, call
10164 grub_keyboard_controller_init().
10166 2008-01-19 Robert Millan <rmh@aybabtu.com>
10168 PowerPC changes provided by Pavel Roskin.
10170 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
10171 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
10172 don't rely on cmain() doing it.
10173 * kern/i386/ieee1275/startup.S (_start): Store %eax in
10174 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
10176 2008-01-16 Robert Millan <rmh@aybabtu.com>
10178 * include/grub/i386/linuxbios/memory.h
10179 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
10180 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
10181 receive `table_header' as argument. Instead, probe for it in the
10182 known memory ranges where it can be present.
10183 (grub_available_iterate): Do not pass a fixed `table_header' address
10184 to grub_linuxbios_table_iterate().
10186 2008-01-15 Robert Millan <rmh@aybabtu.com>
10188 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
10189 * conf/i386-ieee1275.rmk: New file.
10190 * include/grub/i386/ieee1275/console.h: Likewise.
10191 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
10192 * include/grub/i386/ieee1275/kernel.h: Likewise.
10193 * include/grub/i386/ieee1275/time.h: Likewise.
10194 * kern/i386/ieee1275/init.c: Likewise.
10195 * kern/i386/ieee1275/startup.S: Likewise.
10197 2008-01-15 Robert Millan <rmh@aybabtu.com>
10199 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
10200 when pointers are 32-bit (but still do set it to one when they are
10203 2008-01-15 Robert Millan <rmh@aybabtu.com>
10205 * include/grub/ieee1275/ieee1275.h
10206 (grub_ieee1275_get_integer_property): New function prototype.
10208 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
10209 (grub_ieee1275_get_integer_property): New function. Wraps around
10210 grub_ieee1275_get_property() to handle endianness.
10212 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
10213 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
10215 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
10216 (grub_map): Likewise.
10217 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
10219 2008-01-15 Bean <bean123ch@gmail.com>
10221 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
10222 (grub_script_execute_cmdline): Reset grub_errno.
10224 * normal/main.c (read_config_file): Reset grub_errno.
10226 * normal/parse.y (script_init): New.
10227 (script): Move function and menuentry here.
10229 (command): Add delimiter at the end of command.
10230 (commands): Adjust to match the new command.
10231 (commandblock): Remove grub_script_lexer_record_start.
10232 (menuentry): Add grub_script_lexer_record_start, use the new commands.
10233 (if): Use the new commands.
10235 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
10237 2008-01-15 Robert Millan <rmh@aybabtu.com>
10239 * normal/menu.c (run_menu): Move timeout message from here ...
10240 (print_timeout): ... to here.
10241 (run_menu): Use print_timeout() once during initial draw to print
10242 the whole message, and again in every clock tick to update only
10243 the number of seconds.
10245 2008-01-15 Robert Millan <rmh@aybabtu.com>
10247 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
10248 actual size of `available' from grub_ieee1275_get_property(), and
10249 restrict parsing to that bound.
10251 2008-01-15 Christian Franke <franke@computer.org>
10253 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
10254 (argp_program_version): Remove variable.
10255 (argp_program_bug_address): Likewise.
10256 (options): Convert from struct argp_option to struct option.
10257 (struct arguments): Remove.
10258 (parse_opt): Remove.
10259 (usage): New function.
10260 (main): Replace struct args members by simple variables.
10261 Replace argp_parse() by getopt_long().
10262 Add switch to evaluate options.
10263 Add missing "(...)" around root_dev in prefix string.
10265 2008-01-14 Robert Millan <rmh@aybabtu.com>
10267 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
10268 for grub_ieee1275_exit(), in order to improve portability.
10270 2008-01-14 Robert Millan <rmh@aybabtu.com>
10272 * util/grub.d/10_linux.in (prefix): Define.
10273 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
10275 2008-01-13 Pavel Roskin <proski@gnu.org>
10277 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
10278 grub_errno if no errors have been detected.
10280 2008-01-12 Robert Millan <rmh@aybabtu.com>
10282 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
10283 (grub_util_get_dev_abstraction): New function prototype.
10285 * util/getroot.c: Include `<grub/util/getroot.h>'
10286 (grub_util_get_grub_dev): Move detection of abstraction type to ...
10287 (grub_util_get_dev_abstraction): ... here (new function).
10289 * util/grub-probe.c: Convert PRINT_* to an enum. Add
10290 `PRINT_ABSTRACTION'.
10291 (probe): Probe for abstraction type when requested.
10292 (main): Understand `--target=abstraction'.
10294 * util/i386/efi/grub-install.in: Add abstraction module to core
10295 image when it is found to be necessary.
10296 * util/i386/pc/grub-install.in: Likewise.
10297 * util/powerpc/ieee1275/grub-install.in: Likewise.
10299 * util/update-grub_lib.in (font_path): Return system path without
10300 converting to GRUB path.
10301 * util/update-grub.in: Convert system path returned by font_path()
10302 to a GRUB path. Use `grub-probe -t abstraction' to determine what
10303 abstraction module is needed for loading fonts (if any). Export
10304 that as `GRUB_PRELOAD_MODULES'.
10305 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
10308 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
10310 Remove some unused code from reiserfs.
10312 * fs/reiserfs.c (struct grub_reiserfs_key)
10313 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
10314 (struct grub_reiserfs_node_body): Removed.
10315 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10317 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10319 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10321 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10323 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10325 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
10327 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10328 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10329 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10331 2008-01-10 Robert Millan <rmh@aybabtu.com>
10333 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
10334 Determines if a file is garbage left by packaging systems, etc.
10335 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
10336 for processing /etc/grub.d scripts.
10337 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
10338 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
10339 as a condition for processing Linux images.
10341 2008-01-10 Pavel Roskin <proski@gnu.org>
10343 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
10344 to compile reiserfs.c on PowerPC.
10346 2008-01-10 Robert Millan <rmh@aybabtu.com>
10348 * kern/device.c (grub_device_iterate): Do not abort device iteration
10349 when one of the devices cannot be opened.
10350 * kern/disk.c (grub_disk_open): Do not account previous failures of
10351 unrelated functions when grub_errno is checked for.
10353 2008-01-08 Robert Millan <rmh@aybabtu.com>
10355 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10356 `! grub_linux_is_bzimage', change order of address comparison to make
10357 it more intuitive, and improve "too big zImage" error message.
10359 2008-01-08 Robert Millan <rmh@aybabtu.com>
10361 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10362 `$(update-grub_DATA)'.
10363 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10366 2008-01-07 Robert Millan <rmh@aybabtu.com>
10368 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10369 which instruction is modified by grub-setup during installation
10370 (since it wasn't obvious by only looking at this file).
10372 2008-01-07 Robert Millan <rmh@aybabtu.com>
10374 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
10375 listing actual TODO items.
10377 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10379 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10381 (grub_reiserfs_get_key_offset): Likewise.
10382 (grub_reiserfs_set_key_offset): Likewise.
10383 (grub_reiserfs_set_key_type): Likewise.
10384 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
10386 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10387 better to remove the bitfield version completely.
10389 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10391 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10392 allocated from the heap, due to the fshelp implementation.
10393 (grub_reiserfs_dir): Free NODE, due to the same reason.
10395 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10397 Mostly from Vincent Pelletier:
10399 * fs/reiserfs.c: New file.
10401 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10402 (reiserfs_mod_SOURCES): New variable.
10403 (reiserfs_mod_CFLAGS): Likewise.
10404 (reiserfs_mod_LDFLAGS): Likewise.
10406 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10407 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10408 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10411 2008-01-06 Robert Millan <rmh@aybabtu.com>
10413 * normal/color.c: Remove `<grub/env.h>'.
10415 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10417 * include/grub/normal.h: Include <grub/env.h>.
10419 2008-01-05 Robert Millan <rmh@aybabtu.com>
10421 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10422 usage example with `(hd0,1)'.
10423 Reported by Samuel Thibault.
10425 2008-01-05 Robert Millan <rmh@aybabtu.com>
10427 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10428 (grub_linux_boot_zimage): Rename to ...
10429 (grub_linux_boot): ... this.
10430 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10431 (grub_linux_boot_zimage): Conditionalize zImage copy.
10433 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10434 (grub_linux_boot_bzimage): Remove prototype.
10435 (grub_linux_boot_zimage): Rename to ...
10436 (grub_linux_boot): ... this.
10438 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10439 (grub_linux_boot): Remove function.
10441 2008-01-05 Robert Millan <rmh@aybabtu.com>
10443 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10444 (grub_env_write_color_highlight): Likewise.
10445 (grub_wait_after_message): Likewise.
10447 * normal/color.c: New file.
10449 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10450 (normal_mod_DEPENDENCIES): Likewise.
10452 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10453 (normal_mod_DEPENDENCIES): Likewise.
10455 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10456 (normal_mod_DEPENDENCIES): Likewise.
10458 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10459 (normal_mod_DEPENDENCIES): Likewise.
10461 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10462 for waiting after a message is printed.
10463 * normal/main.c (read_config_file): Likewise.
10464 (grub_normal_init): Register grub_env_write_color_normal() and
10465 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10466 `color_highlight' variables as global.
10468 * normal/menu.c (grub_wait_after_message): New function.
10469 (grub_color_menu_normal): New variable. Replaces ...
10470 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10471 (grub_color_menu_highlight): New variable. Replaces ...
10472 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10473 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10474 `GRUB_TERM_COLOR_STANDARD'.
10475 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10476 `normal_code' and `highlight_code' to `old_color_normal' and
10477 `old_color_highlight', respectively.
10478 (grub_menu_init_page): Update colors when drawing the menu, based on
10479 `menu_color_normal' and `menu_color_highlight' variables.
10480 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10481 a message is printed.
10483 2008-01-05 Robert Millan <rmh@aybabtu.com>
10485 * kern/env.c (grub_env_context_open): Propagate hooks for global
10486 variables to new context.
10488 * kern/main.c (grub_set_root_dev): Export `root' variable.
10490 2008-01-05 Robert Millan <rmh@aybabtu.com>
10492 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10493 discs unconditionally, since udev and others have options to provide
10496 2008-01-05 Robert Millan <rmh@aybabtu.com>
10498 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10500 2008-01-04 Christian Franke <franke@computer.org>
10502 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10505 2008-01-03 Pavel Roskin <proski@gnu.org>
10507 * kern/i386/linuxbios/init.c: Put "void" to all function
10508 declarations with no arguments.
10509 * kern/powerpc/ieee1275/init.c: Likewise.
10510 * term/i386/pc/at_keyboard.c: Likewise.
10511 * term/i386/pc/vga_text.c: Likewise.
10512 * util/grub-mkdevicemap.c: Likewise.
10514 2008-01-02 Robert Millan <rmh@aybabtu.com>
10516 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10517 message when loaded image is out of bounds.
10518 (grub_multiboot_load_elf64): Likewise.
10520 2008-01-02 Pavel Roskin <proski@gnu.org>
10522 * util/grub.d/10_linux.in: Try version without ".old" when
10523 looking for initrd. It's better to use initrd from the newer
10524 kernel of the same version than no initrd at all.
10526 2008-01-01 Robert Millan <rmh@aybabtu.com>
10528 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10530 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10532 * include/grub/video.h: Added grub_video_unmap_color and
10533 grub_video_get_active_render_target.
10534 (grub_video_adapter): Added unmap_color and get_active_render_target.
10536 * video/video.c: Added grub_video_unmap_color and
10537 grub_video_get_active_render_target.
10538 (grub_video_get_info): Changed method to accept NULL pointer as an
10539 argument to allow detection of active video adapter.
10541 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10542 grub_video_vbe_unmap_color_int.
10543 Added grub_video_vbe_unmap_color and
10544 grub_video_vbe_get_active_render_target.
10545 (grub_video_vbe_adapter): Added unmap_color and
10546 get_active_render_target.
10548 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10549 with grub_video_vbe_unmap_color_int.
10551 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10552 (DEFAULT_NORMAL_COLOR): Likewise.
10553 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10554 (DEFAULT_FG_COLOR): Removed.
10555 (DEFAULT_BG_COLOR): Likewise.
10556 (DEFAULT_CURSOR_COLOR): Changed value.
10557 (grub_virtual_screen): Added standard_color_setting,
10558 normal_color_setting, highlight_color_setting and term_color.
10559 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10560 (bitmap_width): Added.
10561 (bitmap_height): Likewise.
10562 (bitmap): Likewise.
10563 (set_term_color): Likewise.
10564 (grub_virtual_screen_setup): Changed to use new terminal coloring
10566 (grub_gfxterm_init): Added init for bitmap.
10567 (grub_gfxterm_fini): Added destroy for bitmap.
10568 (redraw_screen_rect): Updated to use background bitmap and new
10570 (scroll_up): Added optimization for case when there is no bitmap.
10571 (grub_gfxterm_cls): Fixed to use correct background color.
10572 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10574 (grub_virtual_screen_setcolor): Likewise.
10575 (grub_virtual_screen_getcolor): Added.
10576 (grub_gfxterm_background_image_cmd): Likewise.
10577 (grub_video_term): Added setcolor and getcolor.
10578 (MOD_INIT): Added registration of background_image command.
10579 (MOD_TERM): Added unregistration for background_image command.
10581 2007-12-30 Pavel Roskin <proski@gnu.org>
10583 * loader/multiboot_loader.c: Fix multiboot command
10584 unregistration. Fix all typos in the word "multiboot".
10586 2007-12-29 Pavel Roskin <proski@gnu.org>
10588 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10589 support for initrd names used in Fedora.
10591 2007-12-26 Bean <bean123ch@gmail.com>
10593 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10594 (cpio_mod_SOURCES): New variable.
10595 (cpio_mod_CFLAGS): Likewise.
10596 (cpio_mod_LDFLAGS): Likewise.
10598 * fs/cpio.c: New file.
10600 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10602 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10604 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10608 2007-12-25 Robert Millan <rmh@aybabtu.com>
10610 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10611 (grub_getcolor): New function.
10613 * kern/term.c (grub_getcolor): New function.
10614 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10615 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10616 (print_entry): Set normal and highlight colors to
10617 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10618 respectively, before printing and restore them to old
10620 (grub_menu_init_page): Likewise. Fill an additional colored space
10621 that would otherwise be left blank.
10623 * term/efi/console.c (grub_console_getcolor): New function.
10624 (struct grub_console_term.getcolor): New variable.
10625 * term/i386/pc/console.c (grub_console_getcolor): New function.
10626 (struct grub_console_term.getcolor): New variable.
10627 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10628 (struct grub_console_term.getcolor): New variable.
10630 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10631 (struct grub_console_term.setcolor): Remove variable.
10632 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10633 (struct grub_console_term.setcolor): Remove variable.
10634 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10635 (struct grub_console_term.setcolor): Remove variable.
10636 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10637 (struct grub_console_term.setcolor): Remove variable.
10639 2007-12-25 Robert Millan <rmh@aybabtu.com>
10641 * configure.ac: Search for possible unifont.hex locations, and
10642 define UNIFONT_HEX if found.
10644 * Makefile.in (UNIFONT_HEX): Define variable.
10645 (DATA): Rename to ...
10646 (PKGLIB): ... this. Update all users.
10647 (PKGDATA): New variable.
10648 (pkgdata_IMAGES): Rename to ...
10649 (pkglib_IMAGES): ... this. Update all users.
10650 (pkgdata_MODULES): Rename to ...
10651 (pkglib_MODULES): ... this. Update all users.
10652 (pkgdata_PROGRAMS): Rename to ...
10653 (pkglib_PROGRAMS): ... this. Update all users.
10654 (pkgdata_DATA): Rename to ...
10655 (pkglib_DATA): ... this. Update all users.
10656 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10657 (unicode.pff, ascii.pff): New rules.
10658 (all-local): Add `$(PKGDATA)' dependency.
10659 (install-local): Process `$(PKGDATA)'.
10661 * util/update-grub_lib.in (font_path): Search for *.pff files in
10662 a few more locations, including `${pkgdata}'.
10664 2007-12-23 Robert Millan <rmh@aybabtu.com>
10666 Patch from Bean <bean123ch@gmail.com>:
10667 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10670 2007-12-21 Bean <bean123ch@gmail.com>
10672 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10673 (ntfscomp_mod_SOURCES): New variable.
10674 (ntfscomp_mod_CFLAGS): Likewise.
10675 (ntfscomp_mod_LDFLAGS): Likewise.
10677 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10678 (grub_probe_SOURCES): Likewise.
10679 (grub_emu_SOURCES): Likewise.
10681 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10682 (grub_emu_SOURCES): Likewise.
10684 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10685 (grub_emu_SOURCES): Likewise.
10687 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10688 (grub_emu_SOURCES): Likewise.
10690 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10691 (read_run_list): Renamed to grub_ntfs_read_run_list.
10692 (decomp_nextvcn): Moved to ntfscomp.c.
10693 (decomp_getch): Likewise.
10694 (decomp_get16): Likewise.
10695 (decomp_block): Likewise.
10696 (read_block): Likewise.
10697 (read_data): Partially moved to ntfscomp.c.
10698 (fixup): Change unsigned to grub_uint16_t.
10699 (read_mft): Change unsigned long to grub_uint32_t.
10700 (read_attr): Likewise.
10701 (read_data): Likewise.
10702 (read_run_data): Likewise.
10703 (read_run_list): Likewise.
10704 (read_mft): Likewise.
10706 * fs/ntfscomp.c: New file.
10708 * include/grub/ntfs.h: New file.
10710 2007-12-16 Robert Millan <rmh@aybabtu.com>
10712 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10713 IDE disk check, since Linux is known to support 20 IDE disks.
10714 Reported by Colin Watson.
10716 2007-12-15 Bean <bean123ch@gmail.com>
10718 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10719 (lnxboot_img_SOURCES): New variable.
10720 (lnxboot_img_ASFLAGS): Likewise.
10721 (lnxboot_img_LDFLAGS): Likewise.
10723 * boot/i386/pc/lnxboot.S: New file.
10725 2007-11-24 Pavel Roskin <proski@gnu.org>
10727 * configure.ac: Test if '--build-id=none' is supported by the
10728 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10729 objcopy to generate incorrect binary files (binutils
10730 2.17.50.0.18-1 as shipped by Fedora 8).
10731 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10732 linking, so that build ID doesn't break the test.
10734 2007-11-24 Pavel Roskin <proski@gnu.org>
10736 * include/grub/i386/time.h: use "void" in the argument list
10737 of grub_cpu_idle().
10738 * include/grub/powerpc/time.h: Likewise.
10739 * include/grub/sparc64/time.h: Likewise.
10741 2007-11-18 Christian Franke <franke@computer.org>
10743 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10744 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10745 This fixes the problem that function keys did not work in grub-emu.
10747 2007-11-18 Christian Franke <franke@computer.org>
10749 * disk/host.c (grub_host_open): Remove attribute unused from
10750 name parameter. Add check for "host". This fixes the problem
10751 that grub-emu does not find partitions.
10753 2007-11-18 Christian Franke <franke@computer.org>
10755 * util/hostfs.c (is_dir): New function.
10756 (grub_hostfs_dir): Handle missing dirent.d_type case.
10757 (grub_hostfs_read): Add missing fseek().
10758 (grub_hostfs_label): Clear label pointer. This fixes a crash
10759 of grub-emu on "ls (host)".
10761 2007-11-18 Christian Franke <franke@computer.org>
10763 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10764 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10765 to 64 bit boundary by default.
10767 2007-11-18 Bean <bean123ch@gmail.com>
10769 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10770 (hexdump_mod_SOURCES): New variable.
10771 (hexdump_mod_CFLAGS): Likewise.
10772 (hexdump_mod_LDFLAGS): Likewise.
10774 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10776 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10778 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10782 * include/grub/hexdump.h: New file.
10784 * commands/hexdump.c: New file.
10786 2007-11-10 Robert Millan <rmh@aybabtu.com>
10788 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10789 in grub_outb() calls.
10790 (beep_on): Likewise.
10792 2007-11-10 Christian Franke <franke@computer.org>
10794 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10795 (grub_menu_run): Likewise.
10797 2007-11-10 Robert Millan <rmh@aybabtu.com>
10799 * include/grub/i386/efi/machine.h: New file.
10800 * include/grub/i386/linuxbios/machine.h: Likewise.
10801 * include/grub/i386/pc/machine.h: Likewise.
10802 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10803 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10805 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10806 (serial_hw_io_addr): New variable.
10807 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10808 instead of `(unsigned short *) 0x400'.
10810 2007-11-10 Bean <bean123ch@gmail.com>
10812 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10814 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10816 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10817 (vga_mod_SOURCES): Added.
10818 (vga_mod_CFLAGS): Likewise.
10819 (vga_mod_LDFLAGS): Likewise.
10821 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10823 (set_map_mask): Likewise.
10824 (set_read_map): Likewise.
10825 (set_read_address): Likewise.
10826 (vga_font): Removed variable.
10827 (get_vga_glyph): Removed function.
10828 (invalidate_char): Likewise.
10829 (write_char): Changed to use grub_font_get_glyph() for font
10831 (grub_vga_putchar): Likewise.
10832 (grub_vga_getcharwidth): Likewise.
10834 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10836 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10838 (pxeboot_img_LDFLAGS): Likewise.
10839 (diskboot_img_LDFLAGS): Likewise.
10840 (kernel_img_LDFLAGS): Likewise.
10842 2007-11-06 Robert Millan <rmh@aybabtu.com>
10844 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10845 in grub_outb() calls.
10846 (serial_hw_init): Likewise.
10848 2007-11-05 Robert Millan <rmh@aybabtu.com>
10850 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10851 spaces. Skip non-regular files.
10853 2007-11-05 Robert Millan <rmh@aybabtu.com>
10855 * kern/disk.c (grub_disk_firmware_fini)
10856 (grub_disk_firmware_is_tainted): New variables.
10858 * include/grub/disk.h (grub_disk_firmware_fini)
10859 (grub_disk_firmware_is_tainted): Likewise.
10861 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10862 (grub_disk_biosdisk_fini): ... to here.
10863 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10864 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10865 is set. Register grub_disk_biosdisk_fini() in
10866 `grub_disk_firmware_fini'.
10868 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10869 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10870 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10871 to finish existing firmware disk interface.
10873 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10874 (ata_mod_SOURCES): New variable.
10875 (ata_mod_CFLAGS): Likewise.
10876 (ata_mod_LDFLAGS): Likewise.
10878 2007-11-05 Robert Millan <rmh@aybabtu.com>
10880 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10881 (grub_ata_wait): Reimplement using grub_millisleep().
10883 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10884 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10886 2007-11-03 Marco Gerards <marco@gnu.org>
10888 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10889 (CRTC_ADDR_PORT): New macro.
10890 (CRTC_DATA_PORT): Likewise.
10891 (CRTC_CURSOR): Likewise.
10892 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10893 (CRTC_CURSOR_ADDR_LOW): Likewise.
10894 (update_cursor): New function.
10895 (grub_console_real_putchar): Call `update_cursor'.
10896 (grub_console_gotoxy): Likewise.
10897 (grub_console_cls): Set the default color when clearing the
10899 (grub_console_setcursor): Implemented.
10901 2007-11-03 Marco Gerards <marco@gnu.org>
10903 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10905 (grub_ata_pio_write): Likewise.
10907 (grub_atapi_identify): Wait after issuing an ATA command.
10908 (grub_atapi_packet): Likewise.
10909 (grub_ata_identify): Likewise.
10910 (grub_ata_readwrite): Likewise.
10912 2007-11-03 Marco Gerards <marco@gnu.org>
10914 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10915 (grub_ata_pio_write): Likewise.
10916 (grub_ata_readwrite): Use `grub_error', instead of
10917 returning `grub_errno'.
10919 2007-11-03 Marco Gerards <marco@gnu.org>
10921 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10922 grub_ata_pio_write once for every single sector, instead of for
10925 2007-10-31 Robert Millan <rmh@aybabtu.com>
10927 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10929 * conf/i386-linuxbios.rmk: New file.
10931 * kern/i386/pc/hardware.c: Likewise.
10932 * term/i386/pc/at_keyboard.c: Likewise.
10933 * term/i386/pc/vga_text.c: Likewise.
10935 * include/grub/i386/linuxbios/boot.h: Likewise.
10936 * include/grub/i386/linuxbios/console.h: Likewise.
10937 * include/grub/i386/linuxbios/init.h: Likewise.
10938 * include/grub/i386/linuxbios/kernel.h: Likewise.
10939 * include/grub/i386/linuxbios/loader.h: Likewise.
10940 * include/grub/i386/linuxbios/memory.h: Likewise.
10941 * include/grub/i386/linuxbios/serial.h: Likewise.
10942 * include/grub/i386/linuxbios/time.h: Likewise.
10944 * kern/i386/linuxbios/init.c: Likewise.
10945 * kern/i386/linuxbios/startup.S: Likewise.
10946 * kern/i386/linuxbios/table.c: Likewise.
10948 2007-10-31 Marco Gerards <marco@gnu.org>
10950 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10951 (ata_mod_SOURCES): New variable.
10952 (ata_mod_CFLAGS): Likewise.
10953 (ata_mod_LDFLAGS): Likewise.
10955 * disk/ata.c: New file.
10957 * include/grub/disk.h (grub_disk_dev_id): Add
10958 `GRUB_DISK_DEV_ATA_ID'.
10960 2007-10-31 Robert Millan <rmh@aybabtu.com>
10962 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10963 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10965 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10966 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10968 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10971 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10973 2007-10-27 Robert Millan <rmh@aybabtu.com>
10975 * include/grub/types.h (ULONG_MAX): Define macro.
10977 2007-10-22 Robert Millan <rmh@aybabtu.com>
10979 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10981 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10983 2007-10-22 Robert Millan <rmh@aybabtu.com>
10985 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10986 (pkgdata_MODULES): Add `biosdisk.mod'.
10987 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10990 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10991 (grub_biosdisk_init): Replace with ...
10992 (GRUB_MOD_INIT(biosdisk)): ... this.
10993 (grub_biosdisk_fini): Replace with ...
10994 (GRUB_MOD_FINI(biosdisk)): ... this.
10996 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10997 (grub_machine_init): Remove call to grub_biosdisk_init().
10998 (grub_machine_fini): Remove call to grub_machine_fini().
11000 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11002 2007-10-22 Robert Millan <rmh@aybabtu.com>
11004 * include/grub/time.h: New file.
11005 * include/grub/i386/time.h: Likewise.
11006 * include/grub/powerpc/time.h: Likewise.
11007 * include/grub/sparc64/time.h: Likewise.
11009 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11011 (KERNEL_MACHINE_TIME_HEADER): ... this.
11012 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11014 (KERNEL_MACHINE_TIME_HEADER): ... this.
11015 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11017 (KERNEL_MACHINE_TIME_HEADER): ... this.
11019 * kern/i386/efi/init.c: Include `<grub/time.h>'.
11020 (grub_millisleep): New function.
11021 * kern/i386/pc/init.c: Include `<grub/time.h>'.
11022 (grub_millisleep): New function.
11023 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11024 Remove `grub/machine/time.h' include.
11025 (grub_millisleep): New function.
11026 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11027 Remove `grub/machine/time.h' include.
11028 (grub_millisleep): New function.
11030 * include/grub/misc.h (grub_div_roundup): New function.
11032 * kern/misc.c: Include `<grub/time.h>'.
11033 (grub_millisleep_generic): New function.
11035 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11037 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11039 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11040 `machine/time.h'. Add `time.h'.
11041 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11043 2007-10-21 Robert Millan <rmh@aybabtu.com>
11045 * include/grub/misc.h (grub_max): New function.
11047 2007-10-21 Robert Millan <rmh@aybabtu.com>
11049 * util/misc.c (grub_util_info): Call fflush() before returning.
11051 2007-10-20 Robert Millan <rmh@aybabtu.com>
11053 * genmk.rb (Image): Copy `extra_flags' from here ...
11054 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
11056 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11057 to `argc' and `args' arguments.
11059 2007-10-17 Robert Millan <rmh@aybabtu.com>
11061 * kern/i386/loader.S: New file.
11063 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11064 * kern/i386/loader.S (grub_linux_prot_size)... to here.
11065 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11066 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11067 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11068 * kern/i386/loader.S (grub_linux_real_addr)... to here.
11069 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
11070 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
11071 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
11072 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
11073 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
11074 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
11075 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
11076 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
11078 * kern/i386/realmode.S: New file.
11080 * kern/i386/pc/startup.S (protstack): Moved from here ...
11081 * kern/i386/realmode.S (protstack)... to here.
11082 * kern/i386/pc/startup.S (gdt): Moved from here ...
11083 * kern/i386/realmode.S (gdt)... to here.
11084 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
11085 * kern/i386/realmode.S (prot_to_real)... to here.
11087 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
11088 `kern/i386/realmode.S'.
11090 2007-10-17 Robert Millan <rmh@aybabtu.com>
11092 * include/grub/i386/loader.h: New file.
11094 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
11095 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11096 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11097 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11098 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
11099 * include/grub/i386/loader.h (grub_linux_prot_size)
11100 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11101 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11102 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11103 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
11105 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
11107 2007-10-15 Robert Millan <rmh@aybabtu.com>
11109 * normal/misc.c (grub_normal_print_device_info): Do not probe for
11110 filesystem when dev->disk is unset.
11111 Do probe for filesystem even when dev->disk->has_partitions is set.
11112 In case a filesystem is found, always report it.
11113 In case it isn't, if dev->disk->has_partitions is set, report that
11114 a partition table was found instead of reporting that no filesystem
11115 could be identified.
11117 2007-10-12 Robert Millan <rmh@aybabtu.com>
11119 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
11120 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
11122 * include/grub/types.h (grub_host_to_target16): New macro.
11123 (grub_host_to_target32): Likewise.
11124 (grub_host_to_target64): Likewise.
11125 (grub_target_to_host16): Likewise.
11126 (grub_target_to_host32): Likewise.
11127 (grub_target_to_host64): Likewise.
11129 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11130 Renamed from to ...
11131 (GRUB_MOD_ALIGN): ...this. Update all users.
11133 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
11134 grub_host_to_target32.
11135 Replace grub_be_to_cpu32 with grub_target_to_host32.
11136 (load_modules): Likewise.
11137 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
11138 Replace grub_be_to_cpu32 with grub_target_to_host32.
11139 Replace grub_cpu_to_be16 with grub_host_to_target16.
11140 Replace grub_cpu_to_be32 grub_host_to_target32.
11142 2007-10-12 Robert Millan <rmh@aybabtu.com>
11144 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
11145 * util/elf/grub-mkimage.c: ... here.
11147 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
11148 `util/powerpc/ieee1275/grub-mkimage.c'.
11150 2007-10-07 Robert Millan <rmh@aybabtu.com>
11152 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
11153 and make it easier to figure out.
11154 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
11155 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
11156 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
11157 leave us with less than HEAP_MIN_SIZE total heap.
11158 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
11160 2007-10-03 Robert Millan <rmh@aybabtu.com>
11162 * include/grub/i386/io.h: New file.
11163 * commands/i386/pc/play.c (inb): Removed.
11165 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11167 * term/i386/pc/serial.c (inb): Removed.
11169 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11171 * term/i386/pc/vga.c (inb): Removed.
11173 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11176 2007-10-02 Robert Millan <rmh@aybabtu.com>
11178 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
11179 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11180 Reported by Marcin Kurek.
11182 2007-09-07 Robert Millan <rmh@aybabtu.com>
11184 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
11185 SmartFirmware version updates (as released by Sven Luther), and avoid
11186 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
11187 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
11190 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11192 From Hitoshi Ozeki:
11193 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
11194 when merging two regions.
11196 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11198 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
11199 * normal/completion.c (grub_normal_do_completion): Likewise.
11200 Reported by Hitoshi Ozeki.
11202 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11204 Do not use devices at boot in chainloading.
11206 * loader/i386/pc/chainloader.c (boot_drive): New variable.
11207 (boot_part_addr): Likewise.
11208 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
11209 with BOOT_DRIVE and BOOT_PART_ADDR.
11210 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
11211 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
11213 2007-08-29 Robert Millan <rmh@aybabtu.com>
11215 Patch from Simon Peter <dn.tlp@gmx.net>:
11216 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
11217 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
11218 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
11219 util/i386/pc/grub-setup.c_DEPENDENCIES.
11220 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
11221 util/grub-probe.c_DEPENDENCIES.
11222 * conf/powerpc-ieee1275.rmk: Likewise.
11224 2007-08-28 Robert Millan <rmh@aybabtu.com>
11226 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
11227 to tell grub-mkdevicemap how to name devices.
11228 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
11231 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
11232 util/i386/get_disk_name.c.
11233 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
11234 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
11235 util/ieee1275/get_disk_name.c.
11237 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
11239 * DISTLIST: Add util/i386/get_disk_name.c and
11240 util/ieee1275/get_disk_name.c.
11242 * util/grub-mkdevicemap.c: Replace device naming logic with
11243 grub_util_get_disk_name() calls.
11245 2007-08-20 Robert Millan <rmh@aybabtu.com>
11247 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
11248 (so that it works for both plural and singular quantities).
11250 2007-08-05 Robert Millan <rmh@aybabtu.com>
11252 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
11253 so that [xz] isn't taken into account when determining order.
11255 2007-08-02 Marco Gerards <marco@gnu.org>
11257 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
11258 `include/multiboot2.h', `include/grub/elfload.h',
11259 `include/multiboot.h', `include/grub/multiboot.h',
11260 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
11261 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
11262 `kern/elf.c', `loader/multiboot_loader.c',
11263 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
11264 `loader/i386/pc/multiboot2.c',
11265 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
11266 `util/i386/pc/grub-mkrescue.in'. Remove
11267 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
11268 `include/grub/i386/pc/util/biosdisk.h' and
11269 `include/grub/powerpc/ieee1275/multiboot.h'.
11271 2007-08-02 Bean <bean123ch@gmail.com>
11273 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
11274 (ntfs_mod_SOURCES): New variable.
11275 (ntfs_mod_CFLAGS): Likewise.
11276 (ntfs_mod_LDFLAGS): Likewise.
11278 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
11279 (grub_probe_SOURCES): Likewise.
11280 (grub_emu_SOURCES): Likewise.
11282 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11283 (grub_emu_SOURCES): Likewise.
11285 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11286 (grub_emu_SOURCES): Likewise.
11288 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
11290 * fs/ntfs.c: New file.
11292 2007-08-02 Bean <bean123ch@gmail.com>
11294 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
11296 * file.h (grub_file): Likewise.
11298 * fshelp.h (grub_fshelp_read_file): Likewise.
11300 * util/i386/pc/grub-setup.c (setup): Likewise.
11301 (save_first_sector): Likewise.
11302 (save_blocklists): Likewise.
11304 * fs/affs.c (grub_affs_read_file): Likewise.
11306 * fs/ext2.c (grub_ext2_read_file): Likewise.
11308 * fs/fat.c (grub_fat_read_data): Likewise.
11310 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
11312 * fs/hfs.c (grub_hfs_read_file): Likewise.
11314 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11316 * fs/jfs.c (grub_jfs_read_file): Likewise.
11318 * fs/minix.c (grub_minix_read_file): Likewise.
11320 * fs/sfs.c (grub_sfs_read_file): Likewise.
11322 * fs/ufs.c (grub_ufs_read_file): Likewise.
11324 * fs/xfs.c (grub_xfs_read_file): Likewise.
11326 * command/blocklist.c (read_blocklist): Likewise.
11327 (print_blocklist): Likewise.
11329 2007-08-02 Marco Gerards <marco@gnu.org>
11331 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
11334 * disk/host.c: New file.
11336 * util/hostfs.c: Likewise.
11338 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
11339 return `GRUB_ERR_BAD_FS'.
11340 * fs/sfs.c (grub_sfs_mount): Likewise.
11341 * fs/xfs.c (grub_xfs_mount): Likewise.
11343 * include/grub/disk.h (enum grub_disk_dev_id): Add
11344 `GRUB_DISK_DEVICE_HOST_ID'.
11346 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11348 2007-07-24 Jerone Young <jerone@gmail.com>
11350 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
11351 modules for compilation.
11352 * conf/powerpc-ieee1275.rmk: Likewise.
11354 * include/multiboot.h: Move multiboot definitions to one file. Rename
11355 many definitions to not get grub specific.
11356 * include/multiboot2.h: Create header with multiboot 2 definitions.
11357 * include/grub/multiboot.h: Header for grub specific function
11358 prototypes and definitions.
11359 * include/grub/multiboot2.h: Likewise.
11360 * include/grub/multiboot_loader.h: Likewise.
11361 * include/grub/i386/pc/multiboot.h: Removed.
11362 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11364 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11365 and 2 to allow for one multiboot and module commands.
11366 * loader/multiboot2.c: Add multiboot2 functionality.
11367 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11368 and definition names.
11369 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11371 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11372 ieee1275 specific multiboot2 code.
11374 * kern/i386/pc/startup.S: Change headers and definition names for
11375 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11377 2007-07-22 Robert Millan <rmh@aybabtu.com>
11379 * geninitheader.sh: Process file specified in first parameter rather
11380 than hardcoding grub_modules_init.lst.
11381 * geninit.sh: Likewise. Also, construct header name dynamically rather
11382 than hardcoding grub_modules_init.h.
11384 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11385 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11386 grub_probe_init.[ch] and grub_setup_init.[ch].
11388 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11389 grub_modules_init.h with grub_emu_init.h.
11390 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11391 grub_probe_init.[ch] files.
11392 * conf/i386-efi.rmk: Likewise.
11393 * conf/i386-pc.rmk: Likewise.
11394 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11395 grub_setup_init.[ch] files.
11397 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11398 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11399 to initialize modules rather than a list of hardcoded functions.
11400 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11401 grub_init_all() to initialize modules rather than a list of hardcoded
11404 2007-07-22 Robert Millan <rmh@aybabtu.com>
11406 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11407 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11409 2007-07-22 Robert Millan <rmh@aybabtu.com>
11411 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11412 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11413 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11414 flag when running on SmartFirmware.
11415 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11416 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11419 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11420 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11421 rather than decreasing it.
11423 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11424 there's not enough space to do it, fail in the same way as when it
11425 can't be done because there are no partitions.
11427 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11428 when nvsetenv failed.
11430 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11432 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11433 because this rule is automatically generated.
11434 (grub-mkrescue): Removed for the same reason as above.
11436 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11438 Migrate to GNU General Public License Version 3.
11440 * COPYING: Replaced with the plain text version of GPLv3.
11442 * config.guess: Updated from gnulib.
11443 * config.sub: Likewise.
11445 * geninit.sh: Output a GPLv3 copyright notice.
11446 * geninitheader.sh: Likewise.
11447 * genmodsrc.sh: Likewise.
11448 * gensymlist.sh.in: Likewise.
11450 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11451 * boot/i386/pc/diskboot.S: Likewise.
11452 * boot/i386/pc/pxeboot.S: Likewise.
11453 * commands/blocklist.c: Likewise.
11454 * commands/boot.c: Likewise.
11455 * commands/cat.c: Likewise.
11456 * commands/cmp.c: Likewise.
11457 * commands/configfile.c: Likewise.
11458 * commands/echo.c: Likewise.
11459 * commands/help.c: Likewise.
11460 * commands/ls.c: Likewise.
11461 * commands/search.c: Likewise.
11462 * commands/terminal.c: Likewise.
11463 * commands/test.c: Likewise.
11464 * commands/videotest.c: Likewise.
11465 * commands/i386/cpuid.c: Likewise.
11466 * commands/i386/pc/halt.c: Likewise.
11467 * commands/i386/pc/play.c: Likewise.
11468 * commands/i386/pc/reboot.c: Likewise.
11469 * commands/i386/pc/vbeinfo.c: Likewise.
11470 * commands/i386/pc/vbetest.c: Likewise.
11471 * commands/ieee1275/halt.c: Likewise.
11472 * commands/ieee1275/reboot.c: Likewise.
11473 * commands/ieee1275/suspend.c: Likewise.
11474 * disk/loopback.c: Likewise.
11475 * disk/lvm.c: Likewise.
11476 * disk/raid.c: Likewise.
11477 * disk/efi/efidisk.c: Likewise.
11478 * disk/i386/pc/biosdisk.c: Likewise.
11479 * disk/ieee1275/ofdisk.c: Likewise.
11480 * font/manager.c: Likewise.
11481 * fs/affs.c: Likewise.
11482 * fs/ext2.c: Likewise.
11483 * fs/fat.c: Likewise.
11484 * fs/fshelp.c: Likewise.
11485 * fs/hfs.c: Likewise.
11486 * fs/hfsplus.c: Likewise.
11487 * fs/iso9660.c: Likewise.
11488 * fs/jfs.c: Likewise.
11489 * fs/minix.c: Likewise.
11490 * fs/sfs.c: Likewise.
11491 * fs/ufs.c: Likewise.
11492 * fs/xfs.c: Likewise.
11493 * hello/hello.c: Likewise.
11494 * include/grub/acorn_filecore.h: Likewise.
11495 * include/grub/arg.h: Likewise.
11496 * include/grub/bitmap.h: Likewise.
11497 * include/grub/boot.h: Likewise.
11498 * include/grub/cache.h: Likewise.
11499 * include/grub/device.h: Likewise.
11500 * include/grub/disk.h: Likewise.
11501 * include/grub/dl.h: Likewise.
11502 * include/grub/elfload.h: Likewise.
11503 * include/grub/env.h: Likewise.
11504 * include/grub/err.h: Likewise.
11505 * include/grub/file.h: Likewise.
11506 * include/grub/font.h: Likewise.
11507 * include/grub/fs.h: Likewise.
11508 * include/grub/fshelp.h: Likewise.
11509 * include/grub/gzio.h: Likewise.
11510 * include/grub/hfs.h: Likewise.
11511 * include/grub/kernel.h: Likewise.
11512 * include/grub/loader.h: Likewise.
11513 * include/grub/lvm.h: Likewise.
11514 * include/grub/misc.h: Likewise.
11515 * include/grub/mm.h: Likewise.
11516 * include/grub/net.h: Likewise.
11517 * include/grub/normal.h: Likewise.
11518 * include/grub/parser.h: Likewise.
11519 * include/grub/partition.h: Likewise.
11520 * include/grub/pc_partition.h: Likewise.
11521 * include/grub/raid.h: Likewise.
11522 * include/grub/rescue.h: Likewise.
11523 * include/grub/script.h: Likewise.
11524 * include/grub/setjmp.h: Likewise.
11525 * include/grub/symbol.h: Likewise.
11526 * include/grub/term.h: Likewise.
11527 * include/grub/terminfo.h: Likewise.
11528 * include/grub/tparm.h: Likewise.
11529 * include/grub/types.h: Likewise.
11530 * include/grub/video.h: Likewise.
11531 * include/grub/efi/api.h: Likewise.
11532 * include/grub/efi/chainloader.h: Likewise.
11533 * include/grub/efi/console.h: Likewise.
11534 * include/grub/efi/console_control.h: Likewise.
11535 * include/grub/efi/disk.h: Likewise.
11536 * include/grub/efi/efi.h: Likewise.
11537 * include/grub/efi/pe32.h: Likewise.
11538 * include/grub/efi/time.h: Likewise.
11539 * include/grub/i386/linux.h: Likewise.
11540 * include/grub/i386/setjmp.h: Likewise.
11541 * include/grub/i386/types.h: Likewise.
11542 * include/grub/i386/efi/kernel.h: Likewise.
11543 * include/grub/i386/efi/loader.h: Likewise.
11544 * include/grub/i386/efi/time.h: Likewise.
11545 * include/grub/i386/pc/biosdisk.h: Likewise.
11546 * include/grub/i386/pc/boot.h: Likewise.
11547 * include/grub/i386/pc/chainloader.h: Likewise.
11548 * include/grub/i386/pc/console.h: Likewise.
11549 * include/grub/i386/pc/init.h: Likewise.
11550 * include/grub/i386/pc/kernel.h: Likewise.
11551 * include/grub/i386/pc/loader.h: Likewise.
11552 * include/grub/i386/pc/memory.h: Likewise.
11553 * include/grub/i386/pc/multiboot.h: Likewise.
11554 * include/grub/i386/pc/serial.h: Likewise.
11555 * include/grub/i386/pc/time.h: Likewise.
11556 * include/grub/i386/pc/vbe.h: Likewise.
11557 * include/grub/i386/pc/vbeblit.h: Likewise.
11558 * include/grub/i386/pc/vbefill.h: Likewise.
11559 * include/grub/i386/pc/vbeutil.h: Likewise.
11560 * include/grub/i386/pc/vga.h: Likewise.
11561 * include/grub/ieee1275/ieee1275.h: Likewise.
11562 * include/grub/ieee1275/ofdisk.h: Likewise.
11563 * include/grub/powerpc/libgcc.h: Likewise.
11564 * include/grub/powerpc/setjmp.h: Likewise.
11565 * include/grub/powerpc/types.h: Likewise.
11566 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11567 * include/grub/powerpc/ieee1275/console.h: Likewise.
11568 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11569 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11570 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11571 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11572 * include/grub/powerpc/ieee1275/time.h: Likewise.
11573 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11574 * include/grub/sparc64/libgcc.h: Likewise.
11575 * include/grub/sparc64/setjmp.h: Likewise.
11576 * include/grub/sparc64/types.h: Likewise.
11577 * include/grub/sparc64/ieee1275/console.h: Likewise.
11578 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11579 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11580 * include/grub/sparc64/ieee1275/time.h: Likewise.
11581 * include/grub/util/biosdisk.h: Likewise.
11582 * include/grub/util/getroot.h: Likewise.
11583 * include/grub/util/lvm.h: Likewise.
11584 * include/grub/util/misc.h: Likewise.
11585 * include/grub/util/raid.h: Likewise.
11586 * include/grub/util/resolve.h: Likewise.
11587 * io/gzio.c: Likewise.
11588 * kern/device.c: Likewise.
11589 * kern/disk.c: Likewise.
11590 * kern/dl.c: Likewise.
11591 * kern/elf.c: Likewise.
11592 * kern/env.c: Likewise.
11593 * kern/err.c: Likewise.
11594 * kern/file.c: Likewise.
11595 * kern/fs.c: Likewise.
11596 * kern/loader.c: Likewise.
11597 * kern/main.c: Likewise.
11598 * kern/misc.c: Likewise.
11599 * kern/mm.c: Likewise.
11600 * kern/parser.c: Likewise.
11601 * kern/partition.c: Likewise.
11602 * kern/rescue.c: Likewise.
11603 * kern/term.c: Likewise.
11604 * kern/efi/efi.c: Likewise.
11605 * kern/efi/init.c: Likewise.
11606 * kern/efi/mm.c: Likewise.
11607 * kern/i386/dl.c: Likewise.
11608 * kern/i386/efi/init.c: Likewise.
11609 * kern/i386/efi/startup.S: Likewise.
11610 * kern/i386/pc/init.c: Likewise.
11611 * kern/i386/pc/lzo1x.S: Likewise.
11612 * kern/i386/pc/startup.S: Likewise.
11613 * kern/ieee1275/ieee1275.c: Likewise.
11614 * kern/powerpc/cache.S: Likewise.
11615 * kern/powerpc/dl.c: Likewise.
11616 * kern/powerpc/ieee1275/cmain.c: Likewise.
11617 * kern/powerpc/ieee1275/crt0.S: Likewise.
11618 * kern/powerpc/ieee1275/init.c: Likewise.
11619 * kern/powerpc/ieee1275/openfw.c: Likewise.
11620 * kern/sparc64/cache.S: Likewise.
11621 * kern/sparc64/dl.c: Likewise.
11622 * kern/sparc64/ieee1275/init.c: Likewise.
11623 * kern/sparc64/ieee1275/openfw.c: Likewise.
11624 * loader/efi/chainloader.c: Likewise.
11625 * loader/efi/chainloader_normal.c: Likewise.
11626 * loader/i386/efi/linux.c: Likewise.
11627 * loader/i386/efi/linux_normal.c: Likewise.
11628 * loader/i386/pc/chainloader.c: Likewise.
11629 * loader/i386/pc/chainloader_normal.c: Likewise.
11630 * loader/i386/pc/linux.c: Likewise.
11631 * loader/i386/pc/linux_normal.c: Likewise.
11632 * loader/i386/pc/multiboot.c: Likewise.
11633 * loader/i386/pc/multiboot_normal.c: Likewise.
11634 * loader/powerpc/ieee1275/linux.c: Likewise.
11635 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11636 * normal/arg.c: Likewise.
11637 * normal/cmdline.c: Likewise.
11638 * normal/command.c: Likewise.
11639 * normal/completion.c: Likewise.
11640 * normal/execute.c: Likewise.
11641 * normal/function.c: Likewise.
11642 * normal/lexer.c: Likewise.
11643 * normal/main.c: Likewise.
11644 * normal/menu.c: Likewise.
11645 * normal/menu_entry.c: Likewise.
11646 * normal/misc.c: Likewise.
11647 * normal/parser.y: Likewise.
11648 * normal/script.c: Likewise.
11649 * normal/i386/setjmp.S: Likewise.
11650 * normal/powerpc/setjmp.S: Likewise.
11651 * normal/sparc64/setjmp.S: Likewise.
11652 * partmap/acorn.c: Likewise.
11653 * partmap/amiga.c: Likewise.
11654 * partmap/apple.c: Likewise.
11655 * partmap/gpt.c: Likewise.
11656 * partmap/pc.c: Likewise.
11657 * partmap/sun.c: Likewise.
11658 * term/gfxterm.c: Likewise.
11659 * term/terminfo.c: Likewise.
11660 * term/efi/console.c: Likewise.
11661 * term/i386/pc/console.c: Likewise.
11662 * term/i386/pc/serial.c: Likewise.
11663 * term/i386/pc/vesafb.c: Likewise.
11664 * term/i386/pc/vga.c: Likewise.
11665 * term/ieee1275/ofconsole.c: Likewise.
11666 * util/biosdisk.c: Likewise.
11667 * util/console.c: Likewise.
11668 * util/genmoddep.c: Likewise.
11669 * util/getroot.c: Likewise.
11670 * util/grub-emu.c: Likewise.
11671 * util/grub-mkdevicemap.c: Likewise.
11672 * util/grub-probe.c: Likewise.
11673 * util/lvm.c: Likewise.
11674 * util/misc.c: Likewise.
11675 * util/raid.c: Likewise.
11676 * util/resolve.c: Likewise.
11677 * util/update-grub.in: Likewise.
11678 * util/update-grub_lib.in: Likewise.
11679 * util/grub.d/00_header.in: Likewise.
11680 * util/grub.d/10_hurd.in: Likewise.
11681 * util/grub.d/10_linux.in: Likewise.
11682 * util/i386/efi/grub-install.in: Likewise.
11683 * util/i386/efi/grub-mkimage.c: Likewise.
11684 * util/i386/pc/grub-install.in: Likewise.
11685 * util/i386/pc/grub-mkimage.c: Likewise.
11686 * util/i386/pc/grub-mkrescue.in: Likewise.
11687 * util/i386/pc/grub-setup.c: Likewise.
11688 * util/i386/pc/misc.c: Likewise.
11689 * util/powerpc/ieee1275/grub-install.in: Likewise.
11690 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11691 * util/powerpc/ieee1275/misc.c: Likewise.
11692 * video/bitmap.c: Likewise.
11693 * video/video.c: Likewise.
11694 * video/i386/pc/vbe.c: Likewise.
11695 * video/i386/pc/vbeblit.c: Likewise.
11696 * video/i386/pc/vbefill.c: Likewise.
11697 * video/i386/pc/vbeutil.c: Likewise.
11698 * video/readers/tga.c: Likewise.
11700 2007-07-02 Robert Millan <rmh@aybabtu.com>
11702 * conf/i386-efi.rmk: Replace obsolete reference to
11703 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11704 with util/getroot.c.
11705 * conf/powerpc-ieee1275.rmk: Likewise.
11706 * conf/sparc64-ieee1275.rmk: Likewise.
11708 * util/grub-emu.c (main): Fix unchecked pointer handling.
11710 2007-07-02 Robert Millan <rmh@aybabtu.com>
11712 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11713 invocation to fail, in order to support partition-less media.
11715 * util/i386/pc/grub-install.in: Likewise.
11717 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11718 which fs or partmap modules are needed (akin to its sister scripts).
11720 Also use grub-probe to get rid of unportable /proc/mounts check.
11722 Print the same informational message that the other scripts do, before
11725 2007-06-23 Robert Millan <rmh@aybabtu.com>
11727 * util/update-grub_lib.in (font_path): New function. Determine whether
11728 a font file can be found and, if so, echo the GRUB path to it.
11730 * util/update-grub.in: Handle multiple terminals depending on user
11731 input, platform availability and font file presence. Propagate
11732 variables of our findings to /etc/grub.d/ children.
11734 * util/grub.d/00_header.in: Handle multiple terminals, based on
11735 environment setup by update-grub.
11737 2007-06-23 Robert Millan <rmh@aybabtu.com>
11739 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11741 2007-06-21 Robert Millan <rmh@aybabtu.com>
11743 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11744 indicate end of data section in kernel image.
11745 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11746 GRUB_KERNEL_MACHINE_DATA_END.
11748 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11750 * kern/i386/efi/startup.S: Likewise.
11752 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11753 during image generation. Implement --prefix option to override this
11755 * util/i386/efi/grub-mkimage.c: Likewise.
11757 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11758 code to make path relative to its root into a separate function.
11760 * util/i386/pc/grub-install.in: Use newly provided
11761 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11762 pass the result to grub-install --prefix.
11764 2007-06-13 Robert Millan <rmh@aybabtu.com>
11766 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11767 DEFAULT_DEVICE_MAP.
11768 * util/grub-emu.c: Use above definitions from misc.h instead of
11770 * util/grub-mkdevicemap.c: Likewise.
11771 * util/i386/pc/grub-setup.c: Likewise.
11772 * util/grub-probe.c: Likewise.
11773 (probe): Abort with grub_util_error() when either
11774 grub_guess_root_device or grub_util_get_grub_dev fails.
11776 2007-06-12 Robert Millan <rmh@aybabtu.com>
11778 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11779 "pager" assignment.
11780 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11782 * util/grub-probe.c (probe): Likewise for "drive_name".
11784 2007-06-11 Robert Millan <rmh@aybabtu.com>
11786 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11787 not just the cdrom one.
11789 2007-06-11 Robert Millan <rmh@aybabtu.com>
11791 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11792 Add --pkglibdir=DIR option to override pkglibdir.
11793 Mention --image-type=TYPE in help output.
11794 Fix --grub-mkimage (it was a no-op).
11795 Abort gracefully when no parameter is given.
11797 2007-06-11 Robert Millan <rmh@aybabtu.com>
11799 * util/i386/pc/grub-mkrescue.in: New file.
11800 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11801 * Makefile.in: Handle bin_SCRIPTS.
11803 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11805 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11806 list of video modes.
11808 2007-06-06 Robert Millan <rmh@aybabtu.com>
11810 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11811 file doesn't exist, or if it is in a filesystem grub can't read.
11813 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11814 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11815 header comment to fit in 80 columns when the variables are resolved.
11817 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11818 could be identified by update-grub. Remove redundant check for
11819 unifont.pff existence (since convert_system_path_to_grub_path now
11822 2007-06-04 Robert Millan <rmh@aybabtu.com>
11824 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11826 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11828 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11830 2007-06-04 Robert Millan <rmh@aybabtu.com>
11832 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11834 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11835 grub_apple_partition_map_fini.
11838 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11839 to access >2 TiB disks).
11841 Print disk->total_sectors with %llu instead of %lu, since this
11842 variable is always 64-bit (prevents wrong disk size from being displayed
11843 on either >2 TiB disk or big-endian CPU).
11845 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11846 into a generic case that supports all (sane) partition maps.
11848 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11851 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11852 and grub_apple_partition_map_fini() after that.
11854 2007-06-01 Robert Millan <rmh@aybabtu.com>
11856 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11858 * util/grub.d/00_header.in: Only enable gfxterm when
11859 convert_system_path_to_grub_path() succeeds.
11861 2007-05-20 Robert Millan <rmh@aybabtu.com>
11863 * util/update-grub_lib.in: New file.
11864 * DISTLIST: Add update-grub_lib.in.
11865 * conf/common.rmk: Generate update-grub_lib and install it in
11867 * Makefile.in: Add install routine for $(lib_DATA).
11869 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11870 function provided by update-grub_lib to support arbitrary paths of
11872 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11873 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11875 2007-05-19 Robert Millan <rmh@aybabtu.com>
11877 * commands/i386/cpuid.c: New module.
11878 * DISTLIST: Add it.
11879 * conf/i386-efi.rmk: Enable cpuid.mod.
11880 * conf/i386-pc.rmk: Likewise.
11882 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11884 * kern/disk.c (grub_disk_read): Check return value of
11887 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11889 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11891 * disk/raid.c (grub_raid_open): Likewise.
11893 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11895 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11896 stack instead of on the heap.
11898 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11899 before doing a read on it.
11901 * configure.ac: Only use -fno-stack-protector for the target
11904 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11906 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11907 __attribute_ ((unused)) to mode_type argument.
11909 * util/getroot.c (grub_guess_root_device): Fix #endif.
11911 * kern/misc.c (memcmp): Fix prototype.
11913 * include/grub/partition.h [GRUB_UTIL]
11914 (grub_gpt_partition_map_init): Add prototype.
11915 (grub_gpt_partition_map_fini): Likewise.
11917 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11918 at the right place.
11920 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11921 (grub_fat_read_data): Likewise.
11922 (grub_fat_find_dir): Likewise.
11924 * font/manager.c (find_glyph): Make table a const.
11925 (grub_font_get_glyph): Remove bitmap from if statement.
11927 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11929 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11930 code, first search for device in /dev/mapper, then in /dev.
11931 (grub_util_get_grub_dev): New function.
11932 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11934 * util/grub-probe.c (probe): Remove check for RAID, call
11935 grub_util_get_grub_dev() instead of
11936 grub_util_biosdisk_get_grub_dev().
11937 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11938 grub_util_biosdisk_get_grub_dev().
11939 * util/i386/pc/grub-setup.c (main): Likewise.
11941 2007-05-16 Robert Millan <rmh@aybabtu.com>
11943 * DISTLIST: Update for the latest changes.
11944 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11945 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11946 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11947 grub/util/biosdisk.h.
11948 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11949 grub/util/biosdisk.h.
11951 2007-05-16 Robert Millan <rmh@aybabtu.com>
11953 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11955 2007-05-16 Robert Millan <rmh@aybabtu.com>
11957 * util/i386/efi/grub-install.in: New.
11958 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11959 newly added grub-install.
11960 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11962 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11963 grub/util/biosdisk.h.
11964 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11965 grub/util/biosdisk.h.
11967 2007-05-16 Robert Millan <rmh@aybabtu.com>
11969 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11970 * include/grub/util/biosdisk.h: ... here.
11971 * util/i386/pc/biosdisk.c: Moved to ...
11972 * util/biosdisk.c: ... here.
11973 * util/i386/pc/getroot.c: Moved to ...
11974 * util/getroot.c: ... here.
11975 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11976 * util/grub-mkdevicemap.c: ... here.
11977 * util/i386/pc/grub-probe.c: Moved to ...
11978 * util/grub-probe.c: ... here.
11980 2007-05-15 Robert Millan <rmh@aybabtu.com>
11982 * util/update-grub.in: Remove duplicated line in grub.cfg header
11985 2007-05-13 Robert Millan <rmh@aybabtu.com>
11987 * util/update-grub.in: Fix a few assumptions about the devices holding
11988 /, /boot and /boot/grub being the same.
11989 * util/grub.d/00_header.in: Likewise.
11990 * util/grub.d/10_hurd.in: Likewise.
11991 * util/grub.d/10_linux.in: Likewise.
11993 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11994 patterns. Use that to define the `.old' suffix as older than `'.
11996 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11998 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11999 the grub.cfg header message.
12001 2007-05-11 Robert Millan <rmh@aybabtu.com>
12003 * util/update-grub.in: Create device.map if it doesn't already exist,
12004 before attempting to run grub-probe.
12005 Check for grub-probe and grub-mkdevicemap with the same code
12006 grub-install is using.
12009 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
12011 * Makefile.in: Add the datarootdir autoconf variable.
12013 2007-05-09 Robert Millan <rmh@aybabtu.com>
12015 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12016 fail gracefully if dev->disk->partition == NULL.
12018 2007-05-07 Robert Millan <rmh@aybabtu.com>
12020 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12021 determine partition map module.
12022 * util/i386/pc/grub-install.in: Use this feature to decide which
12023 partition module to load, instead of hardcoding pc and gpt.
12025 2007-05-07 Robert Millan <rmh@aybabtu.com>
12027 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12028 source directory differs from build directory.
12030 2007-05-05 Robert Millan <rmh@aybabtu.com>
12032 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12035 2007-05-05 Robert Millan <rmh@aybabtu.com>
12037 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12039 2007-05-05 Robert Millan <rmh@aybabtu.com>
12041 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12042 command-line arguments via ${GRUB_CMDLINE_LINUX}.
12044 2007-05-05 Robert Millan <rmh@aybabtu.com>
12046 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12047 (grub_probe_SOURCES): Likewise.
12048 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12049 GPT and initialize dos_part and bsd_part accordingly.
12050 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12052 (main): Activate gpt module for use during partition identification,
12053 and deactivate it afterwards.
12054 * util/i386/pc/grub-install.in: Add gpt module to core.img.
12055 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12056 partition identification, and deactivate it afterwards.
12058 2007-05-05 Robert Millan <rmh@aybabtu.com>
12060 * term/i386/pc/console.c (grub_console_fini): Call
12061 grub_term_set_current() before grub_term_unregister().
12063 2007-05-04 Robert Millan <rmh@aybabtu.com>
12065 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12066 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12067 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
12068 and update-grub_DATA.
12069 * conf/common.rmk: Build and install update-grub components.
12070 * conf/common.mk: Regenerate.
12071 * util/update-grub.in: New. Core of update-grub.
12072 * util/grub.d/00_header.in: New. Generates grub.cfg header.
12073 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
12074 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
12075 * util/grub.d/README: New. Document grub.d directory layout.
12077 2007-05-01 Robert Millan <rmh@aybabtu.com>
12079 * util/grub-emu.c: Move initialization functions
12080 grub_util_biosdisk_init() and grub_init_all() before
12081 grub_util_biosdisk_get_grub_dev(), which relies on them.
12083 2007-04-19 Robert Millan <rmh@aybabtu.com>
12085 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
12088 2007-04-18 Jerone Young <jerone@gmail.com>
12090 * kernel/elf.c: Add missing parenthesis for conditional statement
12093 2007-04-10 Jerone Young <jerone@gmail.com>
12095 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
12096 continue on and look for device node with real device name.
12098 2007-04-10 Jerone Young <jerone@gmail.com>
12100 * configure.ac: Add argument for autoconf to use transformation
12102 * Makefile.in: Add autoconf package transformation code.
12103 * util/i386/pc/grub-install.in: Likewise.
12104 * util/powerpc/ieee1275/grub-install.in: Likewise.
12106 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12108 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
12109 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
12110 (EXT2_REVISION): Likewise.
12111 (EXT2_INODE_SIZE): Likewise.
12112 (struct grub_ext2_block_group): Added a missing member
12114 (grub_ext2_read_inode): Divide by the inode size in a superblock
12115 instead of 128 to obtain INODES_PER_BLOCK.
12116 Use the macro EXT2_INODE_SIZE instead of directly using
12117 SBLOCK->INODE_SIZE.
12119 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12121 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
12122 superblock instead of the structure size to compute an
12123 offset. This fixes the problem that GRUB could not read a
12124 filesystem when inode size is different from 128-byte.
12126 2007-03-05 Marco Gerards <marco@gnu.org>
12128 * normal/main.c (read_config_file): When "menu" is not set, create
12129 an initial context.
12131 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12133 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
12134 (HEAP_LIMIT): New macro.
12135 (grub_claim_heap): Claim memory up to `heaplimit'.
12137 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12139 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
12140 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
12141 (_start): Likewise.
12142 (grub_arch_modules_addr): Return address after `_end'.
12143 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
12144 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
12145 (add_segments): Calculate `_end' from phdr size and location.
12146 (ALIGN_UP): Moved to ...
12147 * include/grub/misc.h: here.
12148 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12150 (GRUB_IEEE1275_MODULE_BASE): Removed.
12152 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12154 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
12157 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12159 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
12161 (grub_elf64_load_hook_t): Likewise.
12162 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
12165 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12167 * kern/mm.c: Update copyright.
12168 (grub_mm_debug): Correct syntax error.
12169 (grub_mm_dump_free): New function.
12170 (grub_debug_free): Call `grub_free'.
12171 * include/grub/mm.h: Update copyright.
12172 (grub_mm_dump_free): Add declaration.
12174 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12176 * include/grub/ieee1275/ieee1275.h: Update copyright.
12177 * kern/powerpc/ieee1275/init.c: Likewise.
12178 * kern/powerpc/ieee1275/openfw.c: Likewise.
12180 * loader/powerpc/ieee1275/linux.c: Likewise.
12181 * include/grub/elfload.h: Likewise.
12182 * kern/elf.c: Likewise.
12183 (grub_elf32_load): Pass `base' and `size' parameters. Update all
12185 (grub_elf64_load): Likewise.
12186 (grub_elf32_load_segment): Move to a nested function.
12187 (grub_elf64_load_segment): Likewise.
12189 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12191 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
12193 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
12194 (grub_heap_len): Likewise.
12195 (HEAP_SIZE): New macro.
12196 (grub_claim_heap): New function.
12197 (grub_machine_init): Don't claim heap directly. Call
12199 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
12200 (grub_available_iterate): New function.
12202 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
12204 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
12205 * configure.ac: Use it for testing the HOST and TARGET compilers.
12207 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
12209 * Makefile.in (enable_grub_emu): New variable.
12210 * configure.ac (--enable-grub-emu): New option.
12211 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
12212 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
12213 * conf/i386-pc.rmk: Likewise.
12214 * conf/powerpc-ieee1275.rmk: Likewise.
12215 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
12217 2006-12-12 Marco Gerards <marco@gnu.org>
12219 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
12221 * kern/env.c (grub_env_unset): Don't free the member `value' when
12222 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
12225 * normal/main.c (current_menu): Removed.
12226 (free_menu): Unset the `menu' environment variable.
12227 (grub_normal_menu_addentry): Make use of the environment variable
12228 `menu', instead of using the global `current_menu'. Allocate
12229 memory for the sourcecode of this entry.
12230 (read_config_file): New argument `nested', changed all callers.
12231 Only in the case of a new context, initialize a new menu. Set the
12232 `menu' environment variable.
12233 (grub_normal_execute): Don't set and unset the environment
12234 variable `menu' here anymore. Only free the menu when leaving the
12237 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
12240 2006-12-11 Marco Gerards <marco@gnu.org>
12242 * normal/menu_entry.c (run): Fix off by one bug so the last line
12243 is executed. Move the loader check to outside the loop.
12245 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
12247 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
12249 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
12251 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
12252 the number of sectors. Reported by Andrey Shuvikov
12253 <mr_hyro@yahoo.com>.
12255 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
12257 * kern/disk.c (grub_disk_read): When there is a read error, always
12258 try to read only the necessary data.
12260 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
12262 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
12264 [GRUB_UTIL] (grub_raid_fini): Likewise.
12265 [GRUB_UTIL] (grub_lvm_init): Likewise.
12266 [GRUB_UTIL] (grub_lvm_fini): Likewise.
12267 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
12268 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
12269 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
12270 and grub_raid_fini().
12272 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12274 * include/grub/types.h (__unused): Rename to UNUSED.
12275 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
12276 (grub_elf64_size): Likewise.
12278 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12280 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
12281 grub_error_push and grub_error_pop in the error-handling path.
12282 (grub_elf32_load_segment): Only call grub_file_read with non-zero
12285 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12287 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
12288 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12290 (kernel_elf_SOURCES): Likewise.
12291 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
12292 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
12293 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12294 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12295 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
12296 (elf_mod_SOURCES): New variable.
12297 (elf_mod_CFLAGS): Likewise.
12298 (elf_mod_LDFLAGS): Likewise.
12299 * include/grub/types.h (__unused): New macro.
12300 * include/grub/elfload.h: New file.
12301 * kern/elf.c: Likewise.
12302 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
12303 (ELF32_LOADMASK): New macro.
12304 (ELF64_LOADMASK): Likewise.
12305 (vmlinux): Removed.
12306 (grub_linux_load32): New function.
12307 (grub_linux_load64): Likewise.
12308 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
12309 Use grub_elf_t instead of grub_file_t.
12311 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
12313 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
12314 `catch_result' to struct set_color_args.
12316 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12318 * normal/menu.c: Include grub/script.h.
12319 * normal/menu_entry.c: Likewise.
12320 * include/grub/normal.h: Do not include grub/script.h.
12322 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12324 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
12326 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12328 * kern/disk.c (grub_disk_open): Print debug messages when opening a
12330 (grub_disk_close): Print debug messages when closing a disk.
12331 (grub_disk_read): Print debug messages when disk read fails.
12332 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
12334 * kern/partition.c: Include misc.h.
12335 (grub_partition_iterate): Print debug messages when detecting
12338 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12340 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
12342 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12344 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
12346 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12347 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12349 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
12351 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12352 instead of sizeof(lv). Patch by Michael Guntsche.
12354 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
12356 * disk/lvm.c: Rename VGS to VG_LIST.
12357 (grub_lvm_iterate): Change VGS->LV to VG-LV.
12358 (grub_lvm_open): Likewise.
12359 Thanks to Michael Guntsche for finding this bug.
12361 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12363 * configure.ac (AC_INIT): Bumped to 1.95.
12365 2006-10-14 Robert Millan <rmh@aybabtu.com>
12367 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12368 with "/dev/.static/dev/md".
12370 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12372 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12373 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12374 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12375 DRIVE_NAME are always freed.
12377 * util/i386/pc/biosdisk.c (make_device_name): Add one into
12378 DOS_PART, as a DOS partition is counted from one instead of zero
12379 now. Reported by Robert Millan.
12381 2006-10-14 Robert Millan <rmh@aybabtu.com>
12383 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12384 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12385 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12386 string returned by grub_guess_root_device.
12387 * util/i386/pc/grub-setup.c: Likewise.
12388 * util/i386/pc/grub-probefs.c: Likewise.
12390 * util/i386/pc/grub-probefs.c: Rename to ...
12391 * util/i386/pc/grub-probe.c: ... this.
12392 * DISTLIST: Remove grub-probefs, add grub-probe.
12393 * conf/i386-efi.rmk: Likewise.
12394 * conf/i386-pc.rmk: Likewise.
12395 * util/i386/pc/grub-install.in: Likewise.
12397 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12398 choose which information we want to print.
12400 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12402 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12403 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12404 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12405 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12406 video/readers/tga.c and video/i386/pc/vbeutil.c.
12408 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12410 Added support for RAID and LVM.
12412 * disk/lvm.c: New file.
12413 * disk/raid.c: Likewise.
12414 * include/grub/lvm.h: Likewise.
12415 * include/grub/raid.h: Likewise.
12416 * include/grub/util/lvm.h: Likewise.
12417 * include/grub/util/raid.h: Likewise.
12418 * util/lvm.c: Likewise.
12419 * util/raid.c: Likewise.
12421 * include/grub/disk.h (grub_disk_dev_id): Add
12422 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12423 (grub_disk_get_size): New prototype.
12424 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12425 returns a partition.
12426 (grub_disk_get_size): New function.
12428 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12429 verbatim if grub_install_dos_part is -2.
12431 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12434 * util/i386/pc/grub-setup.c (setup): New argument
12435 MUST_EMBED. Force embedding of GRUB when the argument is
12436 true. Close FILE before returning.
12437 (main): Add support for RAID and LVM.
12439 * conf/common.rmk: Add RAID and LVM modules.
12440 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12442 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12444 * kern/misc.c (grub_strstr): New function.
12445 * include/grub/misc.h (grub_strstr): New prototype.
12447 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12449 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12451 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12453 * kern/misc.c (grub_strtoull): Guess the base only if not
12456 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12458 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12461 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12463 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12465 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12466 Remove `flags' argument. All callers changed.
12467 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12468 (IEEE1275_IHANDLE_INVALID): New variable.
12469 (IEEE1275_CELL_INVALID): New variable.
12470 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12471 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12472 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12473 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12474 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12475 codes from Open Firmware. All callers updated.
12476 (grub_ieee1275_next_property): Directly return Open Firmware return
12478 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12479 Standardize error checking from `grub_ieee1275_get_property'.
12480 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12481 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12483 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12485 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12486 `instance_to_package_args' to `instance_to_path_args'.
12488 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12489 `grub_ieee1275_chosen'.
12491 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12492 `grub_ieee1275_interpret'.
12494 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12496 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12498 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12500 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12501 (__cmpdi): Likewise.
12503 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12504 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12507 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12509 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12510 to type `grub_ssize_t'.
12511 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12513 2006-09-22 Marco Gerards <marco@gnu.org>
12515 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12518 2006-09-22 Marco Gerards <marco@gnu.org>
12520 * commands/echo.c: New file.
12522 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12524 * conf/common.rmk (echo_mod_SOURCES): New variable.
12525 (echo_mod_CFLAGS): Likewise.
12526 (echo_mod_LDFLAGS): Likewise.
12528 2006-09-22 Marco Gerards <marco@gnu.org>
12530 * normal/main.c (get_line): Malloc memory instead of using
12531 preallocated memory. Removed the arguments `cmdline' and
12532 `max_len'. Updated all callers.
12534 2006-09-22 Marco Gerards <marco@gnu.org>
12536 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12537 (normal_mod_DEPENDENCIES): Likewise.
12539 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12540 (normal_mod_DEPENDENCIES): Likewise.
12542 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12544 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12546 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12548 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12549 (normal_mod_DEPENDENCIES): Likewise.
12550 * conf/i386-pc.mk: Regenerate.
12551 * conf/i386-efi.mk: Likewise
12552 * conf/common.mk: Likewise.
12553 * conf/powerpc-ieee1275.mk: Likewise.
12554 * conf/sparc64-ieee1275.mk: Likewise.
12556 2006-09-22 Robert Millan <rmh@aybabtu.com>
12558 Sync with i386 version.
12559 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12560 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12562 2006-09-21 Robert Millan <rmh@aybabtu.com>
12564 Import from GRUB Legacy (lib/device.c):
12565 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12566 (init_device_map) [__linux__]: Add support for I2O devices.
12568 2006-09-14 Marco Gerards <marco@gnu.org>
12570 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12573 2006-09-14 Robert Millan <rmh@aybabtu.com>
12575 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12578 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12580 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12581 before adding it to device.map.
12583 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12585 * genmk.rb: Let GCC generate dependencies the first time it
12586 compiles a file; using the -MD option.
12587 * conf/common.mk: Regenerate.
12588 * conf/i386-pc.mk: Likewise.
12589 * conf/i386-efi.mk: Likewise.
12590 * conf/powerpc-ieee1275.mk: Likewise.
12591 * conf/sparc64-ieee1275.mk: Likewise.
12593 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12595 Move the prototypes of grub_setjmp and grub_longjmp to
12596 cpu/setjmp.h, so that each architecture may specify different
12599 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12600 (grub_longjmp): Likewise.
12601 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12602 (grub_longjmp): Likewise.
12603 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12604 (grub_longjmp): Likewise.
12606 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12607 [!GRUB_UTIL] (grub_longjmp): Removed.
12609 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12611 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12612 "color!" method does not return any value.
12614 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12616 * include/grub/bitmap.h: New file.
12618 * include/grub/i386/pc/vbeutil.h: Likewise.
12620 * video/bitmap.c: Likewise.
12622 * video/readers/tga.c: Likewise.
12624 * video/i386/pc/vbeutil.c: Likewise.
12626 * commands/videotest.c: Code cleanup and updated to reflect to new
12629 * term/gfxterm.c: Likewise.
12631 * video/video.c: Likewise.
12633 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12634 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12635 (bitmap_mod_SOURCES): New entry.
12636 (bitmap_mod_CFLAGS): Likewise.
12637 (bitmap_mod_LDFLAGS): Likewise.
12638 (tga_mod_SOURCES): Likewise.
12639 (tga_mod_CFLAGS): Likewise.
12640 (tga_mod_LDFLAGS): Likewise.
12642 * include/grub/video.h (grub_video_blit_operators): New enum type.
12643 (grub_video_render_target): Changed as forward declaration and moved
12644 actual definition to be video driver specific.
12645 (grub_video_adapter.blit_bitmap): Added blitting operator.
12646 (grub_video_adapter.blit_render_target): Likewise.
12647 (grub_video_blit_bitmap): Likewise.
12648 (grub_video_blit_render_target): Likewise.
12650 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12651 driver specific render target definition.
12652 (grub_video_vbe_map_rgba): Added driver internal helper.
12653 (grub_video_vbe_unmap_color): Updated to use
12654 grub_video_i386_vbeblit_info.
12655 (grub_video_vbe_get_video_ptr): Likewise.
12657 * include/grub/i386/pc/vbeblit.h
12658 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12659 grub_video_i386_vbeblit_info.
12660 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12661 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12662 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12663 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12664 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12665 (grub_video_i386_vbeblit_index_index): Likewise.
12666 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12667 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12668 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12669 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12671 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12674 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12675 include/grub/i386/pc/vbeblit.h.
12677 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12678 Updated to use grub_video_i386_vbeblit_info.
12679 (grub_video_i386_vbefill_R8G8B8): Likewise.
12680 (grub_video_i386_vbefill_index): Likewise.
12681 (grub_video_i386_vbefill): Added generic filler.
12683 * video/i386/pc/vbefill.c: Updated to reflect changes on
12684 include/grub/i386/pc/vbefill.h.
12686 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12687 grub_video_i386_vbeblit_info.
12688 (grub_video_vbe_unmap_color): Likewise.
12689 (grub_video_vbe_blit_glyph): Likewise.
12690 (grub_video_vbe_scroll): Likewise.
12691 (grub_video_vbe_draw_pixel): Removed function.
12692 (grub_video_vbe_get_pixel): Likewise.
12693 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12694 updated code to use it.
12695 (common_blitter): Added common blitter for render target and bitmap.
12696 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12697 (grub_video_vbe_blit_render_target): Likewise.
12699 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12701 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12702 is in text mode if there is no console control protocol instance
12705 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12707 * include/grub/video.h: Code cleanup.
12709 * include/grub/i386/pc/vbe.h: Likewise.
12711 * video/i386/pc/vbe.c: Likewise.
12713 * video/i386/pc/vbeblit.c: Likewise.
12715 * video/i386/pc/vbefill.c: Likewise.
12717 * video/video.c: Likewise. Also added more comments.
12719 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12721 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12722 (struct grub_biosdisk_dap): Likewise.
12724 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12725 linkage settings for all functions.
12727 2006-07-12 Marco Gerards <marco@gnu.org>
12729 * configure.ac (--enable-mm-debug): Fix typo.
12731 * genkernsyms.sh.in: Use proper quoting for `CC'.
12733 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12735 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12736 (normal_mod_ASFLAGS): Remove "-m32".
12738 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12740 * util/misc.c: Include config.h.
12741 [!HAVE_MEMALIGN]: Do not include malloc.h.
12742 (grub_memalign): Use posix_memalign, if present. Then, use
12743 memalign, if present. Otherwise, emit an error.
12745 * util/grub-emu.c: Do not include malloc.h.
12747 * include/grub/util/misc.h: Include unistd.h. This is required for
12748 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12749 D. Eades III <hde@foobar-qux.org>.
12751 * configure.ac (AC_GNU_SOURCE): Added.
12752 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12755 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12757 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12758 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12760 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12762 * include/grub/types.h (grub_host_addr_t): Rename to
12763 grub_target_addr_t.
12764 (grub_host_off_t): Rename to grub_target_off_t.
12765 (grub_host_size_t): Rename to grub_target_size_t.
12766 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12767 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12769 * include/grub/kernel.h (struct grub_module_header): Change type
12770 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12771 (grub_module_info): Likewise.
12773 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12775 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12776 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12777 Velazquez <jesus.velazquez@gmail.com>.
12779 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12781 Count partitions from 1 instead of 0 in the string representation
12782 of partitions. Still use 0-based internally.
12784 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12785 (sun_partition_map_iterate): Use grub_partition_t instead of
12786 struct grub_partition *. Cast DESC->START_CYLINDER to
12787 grub_uint64_t after converting the endian.
12788 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12789 (sun_partition_map_get_name): Add 1 to P->INDEX.
12791 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12793 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12795 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12796 zero instead of one.
12797 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12798 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12800 * partmap/apple.c (apple_partition_map_iterate): Change the type
12801 of POS to unsigned.
12802 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12803 (apple_partition_map_get_name): Add 1 into P->INDEX.
12805 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12806 of POS to unsigned.
12807 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12808 calculate the offset of a partition.
12809 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12810 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12812 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12813 SECTOR to grub_disk_addr_t.
12814 (acorn_partition_map_iterate): Likewise.
12815 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12816 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12818 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12820 * kern/i386/pc/init.c (make_install_device): Add 1 into
12821 GRUB_INSTALL_DOS_PART.
12823 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12826 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12828 Clean up the code to support 64-bit addressing in disks and
12829 files. This change is not enough for filesystems yet.
12831 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12832 type of "start" to grub_uint64_t.
12833 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12834 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12835 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12838 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12839 to grub_disk_addr_t.
12841 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12844 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12846 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12849 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12851 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12853 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12855 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12856 to grub_off_t, to detect an error from grub_file_seek.
12857 (grub_multiboot_load_elf32): Likewise.
12859 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12860 maximum unsigned long value when an overflow is detected.
12861 (grub_strtoull): New function.
12862 (grub_divmod64): Likewise.
12863 (grub_lltoa): use grub_divmod64.
12865 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12867 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12868 the pointer to next character. Use grub_strtoull instead of
12870 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12871 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12874 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12875 return value is signed.
12876 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12877 test if OFFSET is less than zero, as OFFSET is unsigned now.
12879 * kern/disk.c (struct grub_disk_cache): Change the type of
12880 "sector" to grub_disk_addr_t.
12881 (grub_disk_cache_get_index): Change the type of SECTOR to
12882 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12883 unsigned after shifting.
12884 (grub_disk_cache_invalidate): Change the type of SECTOR to
12886 (grub_disk_cache_unlock): Likewise.
12887 (grub_disk_cache_store): Likewise.
12888 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12889 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12890 grub_disk_addr_t and grub_uint64_t, respectively.
12891 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12892 body, as the value of OFFSET is tweaked by
12893 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12894 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12896 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12897 body, as the value of OFFSET is tweaked by
12898 grub_disk_check_range. Change the types of LEN and N to
12901 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12902 and "saved_offset" to grub_off_t.
12903 (test_header): Cast BUF to char *.
12904 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12906 (grub_gzio_read): Change the types of OFFSET and SIZE to
12907 grub_off_t and grub_size_t, respectively.
12909 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12911 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12912 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12913 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12914 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12915 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12917 * include/grub/types.h (grub_off_t): Unconditionally set to
12919 (grub_disk_addr_t): Changed to grub_uint64_t.
12921 * include/grub/partition.h (struct grub_partition): Change the
12922 types of "start", "len" and "offset" to grub_disk_addr_t,
12923 grub_uint64_t and grub_disk_addr_t, respectively.
12924 (grub_partition_get_start): Return grub_disk_addr_t.
12925 (grub_partition_get_len): Return grub_uint64_t.
12927 * include/grub/misc.h (grub_strtoull): New prototype.
12928 (grub_divmod64): Likewise.
12930 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12931 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12932 grub_off_t, respectively.
12933 All callers and references changed.
12935 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12936 grub_size_t in "read".
12937 All callers and references changed.
12939 * include/grub/file.h (struct grub_file): Change the types of
12940 "offset" and "size" to grub_off_t and grub_off_t,
12941 respectively. Change the type of SECTOR to grub_disk_addr_t in
12943 (grub_file_read): Change the type of LEN to grub_size_t.
12944 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12946 (grub_file_size): Return grub_off_t.
12947 (grub_file_tell): Likewise.
12948 All callers and references changed.
12950 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12951 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12953 (struct grub_disk): Change the type of "total_sectors" to
12954 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12956 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12957 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12958 (grub_disk_write): Likewise.
12959 All callers and references changed.
12961 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12962 char * for grub_strncmp to silence gcc.
12963 (grub_iso9660_mount): Likewise.
12964 (grub_iso9660_mount): Likewise.
12965 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12967 (grub_iso9660_iterate_dir): Likewise.
12968 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12970 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12971 LEN to grub_disk_addr_t and grub_size_t, respectively.
12973 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12975 * fs/jfs.c (grub_jfs_read_file): Likewise.
12977 * fs/minix.c (grub_jfs_read_file): Likewise.
12979 * fs/sfs.c (grub_jfs_read_file): Likewise.
12981 * fs/ufs.c (grub_jfs_read_file): Likewise.
12983 * fs/xfs.c (grub_jfs_read_file): Likewise.
12985 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12986 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12989 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12990 BLKNR to -1 instead of returning GRUB_ERRNO.
12991 (grub_ext2_read_file): Change the types of SECTOR and
12992 LEN to grub_disk_addr_t and grub_size_t, respectively.
12994 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12995 LEN to grub_disk_addr_t and grub_size_t, respectively.
12997 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13000 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13001 string. Do not cast SECTOR explicitly.
13003 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13004 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13005 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13006 grub_disk_addr_t and grub_size_t, respectively. If the sector is
13007 over 2TB and LBA mode is not supported, raise an error.
13008 (get_safe_sectors): New function.
13009 (grub_biosdisk_read): Use get_safe_sectors.
13010 (grub_biosdisk_write): Likewise.
13012 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13013 (grub_efidisk_write): Likewise.
13015 * disk/loopback.c (delete_loopback): Cosmetic changes.
13016 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13018 (grub_loopback_open): Likewise.
13019 (grub_loopback_read): Likewise. Also, change the type of POS to
13020 grub_off_t, and fix the usage of grub_memset.
13022 * commands/i386/pc/play.c: Include grub/machine/time.h.
13024 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13027 * commands/configfile.c: Include grub/env.h.
13029 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13030 GRUB_ERRNO directly instead. Change the type of POS to
13031 grub_off_t. Follow the coding standard.
13033 * commands/blocklist.c: Include grub/partition.h.
13034 (grub_cmd_blocklist): Return an error if the underlying device is
13035 not a disk. Take the starting sector of a partition into account,
13036 if a partition is used.
13038 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13040 (lba_mode): Support 64-bit addresses.
13041 (chs_mode): Likewise.
13042 (copy_buffer): Adapted to the new offsets of a length field and a
13044 (blocklist_default_start): Allocate 64-bit space.
13046 * boot/i386/pc/boot.S (force_lba): Removed.
13047 (boot_drive): Moved to under KERNEL_SECTOR.
13048 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13050 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13052 (lba_mode): Refactored to support a 64-bit address. More size
13054 (setup_sectors): Likewise.
13056 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13058 * DISTLIST: Added include/grub/i386/linux.h. Removed
13059 include/grub/i386/pc/linux.h
13061 * configure.ac (AC_INIT): Bumped to 1.94.
13063 * config.guess: Updated from gnulib.
13064 * config.sub: Likewise.
13065 * install-sh: Likewise.
13066 * mkinstalldirs: Likewise.
13068 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13070 * conf/common.rmk (grub_modules_init.lst): Depended on
13071 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
13074 * genmk.rb (PModule::rule): Reverted the previous change.
13076 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13078 * conf/common.rmk (grub_modules_init.lst): Depends on
13079 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
13080 that the target does not exist before producing.
13081 (grub_modules_init.h): Remove the target before generating.
13082 (grub_emu_init.c): Likewise.
13084 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
13086 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
13088 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
13089 for the target-specific tests. Make sure that we also have the
13090 up-to-date target variables for those tests.
13092 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13094 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
13095 (PModule::rule): Likewise.
13097 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13099 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
13100 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
13101 target-specific flags should be prefixed.
13102 (PModule::rule): Likewise.
13104 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
13106 * configure.ac (CMP): Check if cmp is available explicitly.
13108 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
13110 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
13111 (target_cpu): New variable.
13112 (pkglibdir): Use target_cpu instead of host_cpu.
13114 * util/i386/pc/grub-install.in (host_cpu): Removed.
13115 (target_cpu): New variable.
13116 (pkglibdir): Use target_cpu instead of host_cpu.
13118 * util/genmoddep.c: Removed.
13120 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
13121 instead of GRUB_HOST_SIZEOF_VOID_P.
13122 * kern/dl.c: Likewise.
13124 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
13126 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13127 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13128 (GRUB_TARGET_SIZEOF_LONG): ... this.
13129 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13130 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13131 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13133 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13134 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13135 (GRUB_TARGET_SIZEOF_LONG): ... this.
13136 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13137 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13138 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13140 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13141 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13142 (GRUB_TARGET_SIZEOF_LONG): ... this.
13143 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13144 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13146 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
13147 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
13148 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
13149 instead of GRUB_HOST_SIZEOF_LONG.
13150 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
13151 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
13152 GRUB_CPU_WORDS_BIGENDIAN.
13153 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
13154 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
13157 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
13158 (genmoddep_SOURCES): Likewise.
13159 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
13160 (genmoddep_SOURCES): Likewise.
13161 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
13162 (genmoddep_SOURCES): Likewise.
13163 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
13165 (genmoddep_SOURCES): Likewise.
13167 * genmoddep.awk: New file.
13169 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
13170 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
13171 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
13172 (PModule::rule): Likewise.
13173 (Program::rule): Likewise.
13174 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
13175 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
13178 * configure.ac: Rewritten intensively to use host and target
13179 instead of build and host, respectively.
13181 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
13182 (host_cpu): Removed.
13183 (target_cpu): New variable.
13184 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
13185 (BUILD_CC): Removed.
13186 (BUILD_CFLAGS): Likewise.
13187 (BUILD_CPPFLAGS): Likewise.
13188 (TARGET_CC): New variable.
13189 (TARGET_CFLAGS): Likewise.
13190 (TARGET_CPPFLAGS): Likewise.
13191 (TARGET_LDFLAGS): Likewise.
13193 (include): Use target_cpu instead of host_cpu.
13194 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
13196 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
13198 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
13200 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
13201 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
13202 field 'false' to 'exec_on_false'.
13203 (grub_script_create_cmdif): Renamed argument names to reflect above
13206 * normal/execute.c (grub_script_execute_cmdif): Likewise.
13208 * normal/script.c (grub_script_create_cmdif): Likewise.
13210 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
13212 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
13214 (grub_hfsplus_btree_recptr): Likewise.
13215 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
13216 FILEBLOCK both to pass a block number and store next block
13218 (grub_hfsplus_read_block): Rewritten heavily to support an extent
13219 overflow file correctly. Specify errors appropriately, because
13220 fshelp expects that GRUB_ERRNO is set when fails. Reuse
13221 grub_hfsplus_btree_recptr to get the pointer to a found key.
13222 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
13225 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
13227 (_linux_mod_SOURCES): New variable.
13228 (_linux_mod_CFLAGS): Likewise.
13229 (_linux_mod_LDFLAGS): Likewise.
13230 (linux_mod_SOURCES): Likewise.
13231 (linux_mod_CFLAGS): Likewise.
13232 (linux_mod_LDFLAGS): Likewise.
13234 * DISTLIST: Added loader/i386/efi/linux.c,
13235 loader/i386/efi/linux_normal.c and
13236 include/grub/i386/efi/loader.h.
13238 * loader/i386/efi/linux.c: New file.
13239 * loader/i386/efi/linux_normal.c: Likewise.
13240 * include/grub/i386/efi/loader.h: Likewise.
13242 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
13244 * commands/blocklist.c: New file.
13246 * DISTLIST: Added commands/blocklist.c.
13248 * term/efi/console.c (grub_console_highlight_color): Use a lighter
13249 color for the background, and a darker color for the foreground.
13250 (grub_console_checkkey): Return READ_KEY.
13251 (grub_console_cls): Set the background to
13252 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
13254 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
13256 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
13257 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
13259 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
13262 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
13263 BG. The spec is wrong again.
13265 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
13267 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
13269 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13270 commands/blocklist.c.
13271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13273 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
13274 (blocklist_mod_SOURCES): New variable.
13275 (blocklist_mod_CFLAGS): Likewise.
13276 (blocklist_mod_LDFLAGS): Likewise.
13278 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
13280 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
13282 (lba_mode): Use %eax more intensively to reduce the code size.
13284 2006-05-20 Marco Gerards <marco@gnu.org>
13286 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
13288 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
13290 (script): Accept leading newlines.
13291 (newlines): New rule to describe 0 or more newlines.
13292 (commands): Accept `command' with trailing newline. Fixed the
13293 order in which arguments were passed to `grub_script_add_cmd'.
13294 Accept commands separated by newlines.
13295 (function): Changed to accept newlines.
13296 (menuentry) Rewritten.
13298 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
13299 front of the list, instead of to the end.
13301 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
13303 * util/i386/pc/grub-install.in (bindir): New variable.
13304 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
13305 Shaver <lbgwjl@gmail.com>.
13307 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
13309 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
13310 grub/machine/linux.h
13311 * loader/i386/pc/linux.c: Likewise.
13313 * include/grub/i386/pc/linux.h: Moved to ...
13314 * include/grub/i386/linux.h: ... here.
13316 * include/grub/i386/linux.h (struct linux_kernel_params): New
13319 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
13321 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
13323 (grub_video_vbe_blit_glyph): Likewise.
13324 (grub_video_vbe_blit_bitmap): Likewise.
13325 (grub_video_vbe_blit_render_target): Likewise.
13327 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
13329 * configure.ac (--with-platform): Properly quote the square
13332 2006-05-08 Marco Gerards <marco@gnu.org>
13334 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
13336 (kernel_elf_HEADERS): ...to this. Updated all users.
13337 (grubof_symlist.c): Renamed from this...
13338 (kernel_elf_symlist.c): ...to this. Updated all users.
13339 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13340 (grubof_SOURCES): Renamed from this...
13341 (kernel_elf_SOURCES): ...to this.
13342 (grubof_HEADERS): Renamed from this...
13343 (kernel_elf_HEADERS): ...to this.
13344 (grubof_CFLAGS): Renamed from this...
13345 (kernel_elf_CFLAGS): ...to this.
13346 (grubof_ASFLAGS): Renamed from this...
13347 (kernel_elf_ASFLAGS): ...to this.
13348 (grubof_LDFLAGS): Renamed from this...
13349 (kernel_elf_LDFLAGS): ...to this.
13351 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13353 (kernel_elf_HEADERS): ...to this. Updated all users.
13354 (grubof_symlist.c): Renamed from this...
13355 (kernel_elf_symlist.c): ...to this. Updated all users.
13356 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13357 (grubof_SOURCES): Renamed from this...
13358 (kernel_elf_SOURCES): ...to this.
13359 (grubof_HEADERS): Renamed from this...
13360 (kernel_elf_HEADERS): ...to this.
13361 (grubof_CFLAGS): Renamed from this...
13362 (kernel_elf_CFLAGS): ...to this.
13363 (grubof_ASFLAGS): Renamed from this...
13364 (kernel_elf_ASFLAGS): ...to this.
13365 (grubof_LDFLAGS): Renamed from this...
13366 (kernel_elf_LDFLAGS): ...to this.
13368 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13369 `kernel.elf' instead of `grubof'.
13371 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
13373 Add --with-platform to configure. Use pkglibdir instead of
13374 pkgdatadir. This is reported by Roger Leigh.
13376 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13377 (host_vendor): Likewise.
13378 (host_os): Likewise.
13379 (pkgdatadir): Likewise.
13380 (platform): New variable.
13381 (pkglibdir): Likewise.
13382 Use PKGLIBDIR instead of PKGDATADIR.
13384 * util/i386/pc/grub-install.in (datadir): Removed.
13385 (host_vendor): Likewise.
13386 (host_os): Likewise.
13387 (pkgdatadir): Likewise.
13388 (platform): New variable.
13389 (pkglibdir): Likewise.
13390 Use PKGLIBDIR instead of PKGDATADIR.
13392 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13393 instead of GRUB_DATADIR.
13395 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13397 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13400 * configure.ac (--with-platform): New option.
13401 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13403 * Makefile.in: Include a makefile based on PLATFORM instead of
13405 (pkgdatadir): Not appended by the machine type.
13406 (pkglibdir): Appended by the machine type.
13407 (host_vendor): Removed.
13408 (platform): New variable.
13409 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13410 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13411 (uninstall): Likewise.
13413 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13415 Use the environment context in the menu. Remove the commands
13416 "default" and "timeout", and use variables instead.
13418 * normal/menu.c: Include grub/env.h.
13419 (print_entry): Cast TITLE to silence gcc.
13420 (get_timeout): New function.
13421 (set_timeout): Likewise.
13422 (get_entry_number): Likewise.
13423 (run_menu): Use a default entry, a fallback entry and a timeout
13424 in the environment variables "default", "fallback" and
13425 "timeout". Also, tweak the default entry if it is not within the
13426 current menu entries.
13427 (grub_menu_run): Use a fallback entry in the environment variable
13430 * normal/main.c (read_config_file): Do not initialize
13431 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13433 (grub_normal_execute): Use a data slot to store the menu.
13435 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13436 fallback_entry and timeout.
13437 (struct grub_menu_list): Removed.
13438 (grub_menu_list_t): Likewise.
13439 (struct grub_context): Likewise.
13440 (grub_context_t): Likewise.
13441 (grub_context_get): Likewise.
13442 (grub_context_get_current_menu): Likewise.
13443 (grub_context_push_menu): Likewise.
13444 (grub_context_pop_menu): Likewise.
13445 (grub_default_init): Likewise.
13446 (grub_default_fini): Likewise.
13447 (grub_timeout_init): Likewise.
13448 (grub_timeout_fini): Likewise.
13450 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13452 (normal_mod_SOURCES): Removed normal/context.c.
13454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13455 commands/default.c, commands/timeout.c and normal/context.c.
13456 (normal_mod_SOURCES): Removed normal/context.c.
13458 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13459 commands/timeout.c and normal/context.c.
13460 (normal_mod_SOURCES): Removed normal/context.c.
13462 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13463 commands/default.c, commands/timeout.c and normal/context.c.
13464 (normal_mod_SOURCES): Removed normal/context.c.
13466 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13468 (default_mod_SOURCES): Removed.
13469 (default_mod_CFLAGS): Likewise.
13470 (default_mod_LDFLAGS): Likewise.
13471 (timeout_mod_SOURCES): Removed.
13472 (timeout_mod_CFLAGS): Likewise.
13473 (timeout_mod_LDFLAGS): Likewise.
13475 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13478 * commands/default.c: Removed.
13479 * commands/timeout.c: Likewise.
13480 * normal/context.c: Likewise.
13482 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13484 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13486 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13488 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13489 "next" to "prev" for readability.
13490 (struct grub_env_sorted_var): New struct.
13491 (grub_env_context): Renamed to ...
13492 (initial_context): ... this.
13493 (grub_env_var_context): Renamed to ...
13494 (current_context): ... this.
13495 (grub_env_find): Look only at CURRENT_CONTEXT.
13496 (grub_env_context_open): Rewritten to copy exported variables from
13498 (grub_env_context_close): Rewritten according to the new
13499 scheme. Also, add an assertion to prevent the initial context from
13501 (grub_env_insert): Removed the code for the sorted list.
13502 (grub_env_remove): Likewise.
13503 (grub_env_export): Simply mark the variable with
13504 GRUB_ENV_VAR_GLOBAL.
13505 (grub_env_set): A cosmetic change for naming consistency.
13506 (grub_env_get): Likewise.
13507 (grub_env_unset): Likewise.
13508 (grub_env_iterate): Rewritten to sort variables within this
13510 (grub_register_variable_hook): Fixed for naming consistency. Call
13511 grub_env_find again, only if NAME is not found at the first time.
13512 (mangle_data_slot_name): New function.
13513 (grub_env_set_data_slot): Likewise.
13514 (grub_env_get_data_slot): Likewise.
13515 (grub_env_unset_data_slot): Likewise.
13517 * include/grub/env.h (grub_env_var_type): New enum.
13518 (GRUB_ENV_VAR_LOCAL): New constant.
13519 (GRUB_ENV_VAR_GLOBAL): Likewise.
13520 (GRUB_ENV_VAR_DATA): Likewise.
13521 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13523 (grub_env_set): Replace VAR with NAME for consistency.
13524 (grub_register_variable_hook): Likewise.
13525 (grub_env_export): Specify the name of the argument.
13526 (grub_env_set_data_slot): New prototype.
13527 (grub_env_get_data_slot): Likewise.
13528 (grub_env_unset_data_slot): Likewise.
13530 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13532 Extend the loader so that GRUB can accept a loader which comes
13533 back to GRUB when a loaded image exits. Also, this change adds
13534 support for a chainloader on EFI.
13536 * term/efi/console.c: Include grub/misc.h.
13537 (grub_console_checkkey): Display a scan code on the top for
13538 debugging. This will be removed once the EFI port gets stable.
13539 Correct the scan code mapping.
13541 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13542 allocate memory from larger regions, in order to reduce the number
13543 of allocated regions. Otherwise, the MacOSX loader panics.
13544 (filter_memory_map): Avoid less than 1MB for compatibility with
13546 (add_memory_regions): Allocate from the tail of a region, if
13547 possible, to avoid allocating a region near to 1MB, for the MacOSX
13550 * kern/efi/init.c (grub_efi_set_prefix): Specify
13551 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13553 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13554 argument IMAGE_HANDLE and specify it to get a loaded image.
13555 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13556 grub_efi_get_loaded_image.
13557 (grub_efi_get_filename): Divide the length by the size of
13559 (grub_efi_get_device_path): New function.
13560 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13561 the length by the size of grub_efi_char16_t for a file path device
13564 * kern/loader.c (grub_loader_noreturn): New variable.
13565 (grub_loader_set): Accept a new argument NORETURN. Set
13566 GRUB_LOADER_NORETURN to NORETURN.
13567 All callers changed.
13568 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13571 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13573 (grub_efi_get_loaded_image): Take an argument to specify an image
13576 * include/grub/loader.h (grub_loader_set): Added one more argument
13579 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13580 instead of grub_efi_open_protocol.
13581 (grub_efidisk_get_device_name): Likewise.
13582 (grub_efidisk_close): Print a newline.
13583 (grub_efidisk_get_device_handle): Fixed to use
13584 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13585 GRUB_EFI_DEVICE_PATH_TYPE.
13587 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13588 * kern/efi/efi.c (device_path_guid): ... here.
13590 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13592 (kernel_mod_HEADERS): Added efi/disk.h.
13593 (_chain_mod_SOURCES): New variable.
13594 (_chain_mod_CFLAGS): Likewise.
13595 (_chain_mod_LDFLAGS): Likewise.
13596 (chain_mod_SOURCES): Likewise.
13597 (chain_mod_CFLAGS): Likewise.
13598 (chain_mod_LDFLAGS): Likewise.
13600 * DISTLIST: Added include/grub/efi/chainloader.h,
13601 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13603 * include/grub/efi/chainloader.h: New file.
13604 * loader/efi/chainloader.c: Likewise.
13605 * loader/efi/chainloader_normal.c: Likewise.
13607 2006-04-30 Marco Gerards <marco@gnu.org>
13609 * commands/configfile.c (grub_cmd_source): New function.
13610 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13611 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13613 2006-04-30 Marco Gerards <marco@gnu.org>
13615 * normal/execute.c (grub_script_execute_cmd): Change the return
13616 type to `grub_err_t'. Correctly return the error.
13617 (grub_script_execute_cmdline): In case a command line is not a
13618 command or a function, try to interpret it as an assignment.
13620 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13622 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13623 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13624 skip a node whose name is obviously invalid as UTF-16,
13625 i.e. contains a NUL character. Stop the iteration when the last
13626 directory entry is found. Instead of using the return value of
13627 grub_hfsplus_btree_iterate_node, store the value in RET and use
13628 it, because the iterator can be stopped by the last directory
13631 2006-04-30 Marco Gerards <marco@gnu.org>
13633 * include/grub/env.h (grub_env_export): New prototype. Reported
13634 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13636 2006-04-30 Marco Gerards <marco@gnu.org>
13638 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13639 size of the extents in a catalog file record.
13641 2006-04-29 Marco Gerards <marco@gnu.org>
13643 * commands/configfile.c (grub_cmd_configfile): Execute the
13644 configfile within its own context.
13646 * include/grub/env.h (grub_env_context_open): New prototype.
13647 (grub_env_context_close): Likewise.
13649 * kern/env.c (grub_env): Removed.
13650 (grub_env_sorted): Likewise.
13651 (grub_env_context): New variable.
13652 (grub_env_var_context): Likewise.
13653 (grub_env_find): Search both the active context and the global
13655 (grub_env_context_open): New function.
13656 (grub_env_context_close): Likewise.
13657 (grub_env_insert): Likewise.
13658 (grub_env_remove): Likewise.
13659 (grub_env_export): Likewise.
13660 (grub_env_set): Changed to use helper functions to avoid code
13662 (grub_env_iterate): Rewritten so both the current context and the
13663 global context are being used.
13665 * normal/command.c (export_command): New function.
13666 (grub_command_init): Register the `export' function.
13668 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13670 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13671 explicitly to suppress gcc's warnings.
13672 * fs/fat.c (grub_fat_find_dir): Likewise.
13673 (grub_fat_label): Likewise.
13674 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13675 (grub_xfs_mount): Likewise.
13676 (grub_xfs_label): Likewise.
13677 * fs/affs.c (grub_affs_mount): Likewise.
13678 (grub_affs_label): Likewise.
13679 (grub_affs_iterate_dir): Likewise.
13680 * fs/sfs.c (grub_sfs_mount): Likewise.
13681 (grub_sfs_iterate_dir): Likewise.
13682 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13683 * fs/hfs.c (grub_hfs_mount): Likewise.
13684 (grub_hfs_cmp_catkeys): Likewise.
13685 (grub_hfs_find_dir): Likewise.
13686 (grub_hfs_dir): Likewise.
13687 (grub_hfs_label): Likewise.
13688 * fs/jfs.c (grub_jfs_mount): Likewise.
13689 (grub_jfs_opendir): Likewise.
13690 (grub_jfs_getent): Likewise.
13691 (grub_jfs_lookup_symlink): Likewise.
13692 (grub_jfs_label): Likewise.
13693 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13694 (grub_hfsplus_iterate_dir): Likewise.
13695 (grub_hfsplus_btree_iterate_node): Made static.
13697 * util/grub-emu.c (prefix): New variable.
13698 (grub_machine_set_prefix): New function.
13699 (main): Do not set the environment variable "prefix" here. Only
13700 set PREFIX, which is used later by grub_machine_set_prefix.
13702 * include/grub/video.h: Do not include grub/symbol.h.
13703 (grub_video_register): Not exported. This symbol is not defined in
13705 (grub_video_unregister): Likewise.
13706 (grub_video_iterate): Likewise.
13707 (grub_video_setup): Likewise.
13708 (grub_video_restore): Likewise.
13709 (grub_video_get_info): Likewise.
13710 (grub_video_get_blit_format): Likewise.
13711 (grub_video_set_palette): Likewise.
13712 (grub_video_get_palette): Likewise.
13713 (grub_video_set_viewport): Likewise.
13714 (grub_video_get_viewport): Likewise.
13715 (grub_video_map_color): Likewise.
13716 (grub_video_map_rgb): Likewise.
13717 (grub_video_map_rgba): Likewise.
13718 (grub_video_fill_rect): Likewise.
13719 (grub_video_blit_glyph): Likewise.
13720 (grub_video_blit_bitmap): Likewise.
13721 (grub_video_blit_render_target): Likewise.
13722 (grub_video_scroll): Likewise.
13723 (grub_video_swap_buffers): Likewise.
13724 (grub_video_create_render_target): Likewise.
13725 (grub_video_delete_render_target): Likewise.
13726 (grub_video_set_active_render_target): Likewise.
13728 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13730 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13732 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13733 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13734 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13735 instead of $(srcdir)/genkernsyms.sh.
13737 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13738 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13739 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13740 instead of $(srcdir)/genkernsyms.sh.
13742 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13743 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13744 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13745 instead of $(srcdir)/genkernsyms.sh.
13747 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13748 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13749 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13750 instead of $(srcdir)/genkernsyms.sh.
13752 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13755 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13757 (gensymlist.sh): New target.
13758 (genkernsyms.sh): Likewise.
13760 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13761 genkernsyms.sh.in and gensymlist.sh.in.
13763 * genkernsyms.sh: Removed.
13764 * gensymlist.sh: Likewise.
13766 * genkernsyms.sh.in: New file.
13767 * gensymlist.sh.in: Likewise.
13769 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13771 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13772 clobber "prefix", since we may have already set it manually.
13774 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13776 * kern/misc.c (abort): New alias for grub_abort.
13778 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13780 A new machine-specific function "grub_machine_set_prefix" is
13781 defined. This is called after loading modules, so that a prefix
13782 initialization can use modules. Also, this change adds an
13783 intensive debugging feature for the memory manager via the
13784 configure option "--enable-mm-debug".
13786 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13789 * kern/sparc64/ieee1275/init.c (abort): Removed.
13790 (grub_stop): Likewise.
13791 (grub_exit): New function.
13792 (grub_set_prefix): Renamed to ...
13793 (grub_machine_set_prefix): ... this.
13794 (grub_machine_init): Do not call grub_set_prefix.
13796 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13797 (grub_machine_set_prefix): ... this.
13798 (grub_machine_init): Do not call grub_set_prefix.
13800 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13801 (grub_machine_init): Do not set the prefix here.
13803 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13805 * kern/efi/init.c: Include grub/mm.h.
13806 (grub_efi_set_prefix): New function.
13808 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13809 (grub_efi_get_filename): New function.
13810 (grub_print_device_path): Renamed to ...
13811 (grub_efi_print_device_path): ... this.
13813 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13814 [MM_DEBUG] (grub_realloc): Likewise.
13815 [MM_DEBUG] (grub_free): Likewise.
13816 [MM_DEBUG] (grub_memalign): Likewise.
13817 [MM_DEBUG] (grub_mm_debug): New variable.
13818 [MM_DEBUG] (grub_debug_malloc): New function.
13819 [MM_DEBUG] (grub_debug_free): New function.
13820 [MM_DEBUG] (grub_debug_realloc): New function.
13821 [MM_DEBUG] (grub_debug_memalign): New function.
13823 * kern/misc.c (grub_abort): Print a newline to distinguish
13826 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13827 grub_set_root_dev after loading modules. This is necessary when
13828 setting a prefix depends on modules.
13830 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13831 (grub_efi_print_device_path): ... this.
13832 (grub_efi_get_filename): New prototype.
13833 (grub_efi_set_prefix): Likewise.
13835 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13837 (grub_efidisk_get_device_handle): New prototype.
13838 (grub_efidisk_get_device_name): Likewise.
13840 * include/grub/mm.h: Include config.h.
13841 (MM_DEBUG): Removed.
13842 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13843 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13844 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13845 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13846 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13847 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13848 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13849 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13850 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13852 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13854 * disk/efi/efidisk.c: Include grub/partition.h.
13855 (iterate_child_devices): New function.
13856 (add_device): First, compare only last device path nodes, so that
13857 devices are sorted by the types.
13858 (grub_efidisk_get_device_handle): New function.
13859 (grub_efidisk_get_device_name): Likewise.
13861 * configure.ac (--enable-mm-debug): New option to enable the
13862 memory manager debugging feature. This makes the binary much
13863 bigger, so is disabled by default.
13865 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13867 Use grub_abort instead of grub_stop, and grub_exit must be
13868 define in each architecture now. Also, this change adds support
13871 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13872 (grub_getkey): New function.
13873 (grub_term_get_current): Likewise.
13875 * util/i386/pc/grub-setup.c: Include grub/term.h.
13876 (grub_getkey): New function.
13877 (grub_term_get_current): Likewise.
13879 * util/misc.c (grub_stop): Renamed to ...
13880 (grub_exit): ... this.
13882 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13883 (grub_exit): ... this.
13884 (grub_machine_init): Use grub_abort instead of abort.
13885 (grub_stop): Removed.
13887 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13890 * kern/i386/pc/startup.S (grub_exit): New function.
13891 (cold_reboot): New label.
13893 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13894 (grub_efi_init): Call grub_efidisk_init.
13895 (grub_efi_fini): Call grub_efidisk_fini.
13897 * kern/efi/efi.c: Include grub/mm.h.
13898 (grub_efi_console_control_guid): Renamed to ...
13899 (console_control_guid): ... this.
13900 (grub_efi_loaded_image_guid): Renamed to ...
13901 (loaded_image_guid): ... this.
13902 (grub_efi_locate_handle): New function.
13903 (grub_efi_open_protocol): Likewise.
13904 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13905 GRUB_EFI_CONSOLE_CONTROL_GUID.
13906 (grub_efi_exit): Removed.
13907 (grub_stop): Likewise.
13908 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13909 (grub_exit): New function.
13910 (grub_print_device_path): Likewise.
13912 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13913 (grub_enter_rescue_mode): Register "exit".
13915 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13916 (grub_abort): New function.
13918 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13920 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13922 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13924 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13925 (grub_print_device_path): New prototype.
13926 (grub_efi_locate_handle): Likewise.
13927 (grub_efi_open_protocol): Likewise.
13929 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13930 * disk/efi/efidisk.c: Likewise.
13932 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13934 * include/grub/efi/console_control.h
13935 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13937 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13938 last 8 bytes as an array.
13939 (GRUB_EFI_DISK_IO_GUID): New macro.
13940 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13941 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13942 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13944 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13945 (struct grub_efi_device_path): Rename the member "sub_type" to
13947 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13948 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13949 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13950 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13951 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13952 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13953 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13954 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13955 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13956 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13957 (struct grub_efi_pci_device_path): New structure.
13958 (grub_efi_pci_device_path_t): New type.
13959 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13960 (struct grub_efi_pccard_device_path): New structure.
13961 (grub_efi_pccard_device_path_t): New type.
13962 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13963 (struct grub_efi_memory_mapped_device_path): New structure.
13964 (grub_efi_memory_mapped_device_path_t): New type.
13965 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13966 (struct grub_efi_vendor_device_path): New structure.
13967 (grub_efi_vendor_device_path_t): New type.
13968 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13969 (struct grub_efi_controller_device_path): New structure.
13970 (grub_efi_controller_device_path_t): New type.
13971 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13972 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13973 (struct grub_efi_acpi_device_path): New structure.
13974 (grub_efi_acpi_device_path_t): New type.
13975 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13976 (struct grub_efi_expanded_acpi_device_path): New structure.
13977 (grub_efi_expanded_acpi_device_path_t): New type.
13978 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13979 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13980 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13981 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13982 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13983 (struct grub_efi_atapi_device_path): New structure.
13984 (grub_efi_atapi_device_path_t): New type.
13985 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13986 (struct grub_efi_fibre_channel_device_path): New structure.
13987 (grub_efi_fibre_channel_device_path_t): New type.
13988 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13989 (struct grub_efi_1394_device_path): New structure.
13990 (grub_efi_1394_device_path_t): New type.
13991 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13992 (struct grub_efi_usb_device_path): New structure.
13993 (grub_efi_usb_device_path_t): New type.
13994 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13995 (struct grub_efi_usb_class_device_path): New structure.
13996 (grub_efi_usb_class_device_path_t): New type.
13997 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13998 (struct grub_efi_i2o_device_path): New structure.
13999 (grub_efi_i2o_device_path_t): New type.
14000 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14001 (struct grub_efi_mac_address_device_path): New structure.
14002 (grub_efi_mac_address_device_path_t): New type.
14003 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14004 (struct grub_efi_ipv4_device_path): New structure.
14005 (grub_efi_ipv4_device_path_t): New type.
14006 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14007 (struct grub_efi_ipv6_device_path): New structure.
14008 (grub_efi_ipv6_device_path_t): New type.
14009 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14010 (struct grub_efi_infiniband_device_path): New structure.
14011 (grub_efi_infiniband_device_path_t): New type.
14012 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14013 (struct grub_efi_uart_device_path): New structure.
14014 (grub_efi_uart_device_path_t): New type.
14015 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14016 (struct grub_efi_vendor_messaging_device_path): New structure.
14017 (grub_efi_vendor_messaging_device_path_t): New type.
14018 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14019 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14020 (struct grub_efi_hard_drive_device_path): New structure.
14021 (grub_efi_hard_drive_device_path_t): New type.
14022 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14023 (struct grub_efi_cdrom_device_path): New structure.
14024 (grub_efi_cdrom_device_path_t): New type.
14025 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14026 (struct grub_efi_vendor_media_device_path): New structure.
14027 (grub_efi_vendor_media_device_path_t): New type.
14028 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14029 (struct grub_efi_file_path_device_path): New structure.
14030 (grub_efi_file_path_device_path_t): New type.
14031 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14032 (struct grub_efi_protocol_device_path): New structure.
14033 (grub_efi_protocol_device_path_t): New type.
14034 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14035 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14036 (struct grub_efi_bios_device_path): New structure.
14037 (grub_efi_bios_device_path_t): New type.
14038 (struct grub_efi_disk_io): New structure.
14039 (grub_efi_disk_io_t): New type.
14040 (struct grub_efi_block_io_media): New structure.
14041 (grub_efi_block_io_media_t): New type.
14042 (struct grub_efi_block_io): New structure.
14043 (grub_efi_block_io_t): New type.
14045 * include/grub/misc.h (grub_stop): Removed.
14046 (grub_exit): New prototype.
14047 (grub_abort): Likewise.
14049 * include/grub/disk.h (enum grub_disk_dev_id): Added
14050 GRUB_DISK_DEVICE_EFIDISK_ID.
14052 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14053 disk/efi/efidisk.c.
14054 (kernel_syms.lst): Remove the target if an error occurs.
14056 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
14058 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14059 as it was simply too buggy.
14061 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
14063 * kern/misc.c (grub_lltoa): New function.
14064 (grub_vsprintf): Added support for the long long suffix,
14067 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
14069 * Makefile.in (LDFLAGS): Add variable.
14070 (LD): Remove variable.
14071 * configure.ac: Add -m32 to LDFLAGS.
14072 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
14073 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
14074 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
14075 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
14076 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
14078 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
14079 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
14080 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
14082 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
14084 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
14085 length for unknown glyph.
14087 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14089 Add support for pre-loaded modules into the EFI port.
14091 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
14092 completely. Accept one more argument DIR. The caller has changed.
14094 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
14096 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
14097 (grub_efi_loaded_image_guid): New variable.
14098 (grub_efi_get_loaded_image): New function.
14099 (grub_arch_modules_addr): Likewise.
14101 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
14104 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
14105 (struct grub_efi_loaded_image): New structure.
14106 (grub_efi_loaded_image_t): New type.
14108 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14110 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
14111 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
14112 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
14114 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
14116 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
14118 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
14120 * DISTLIST: Added include/grub/efi/console.h,
14121 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
14122 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14124 * include/grub/efi/console.h: New file.
14125 * include/grub/efi/time.h: Likewise.
14126 * include/grub/i386/efi/kernel.h: Likewise.
14127 * kern/efi/init.c: Likewise.
14128 * kern/efi/mm.c: Likewise.
14129 * term/efi/console.c: Likewise.
14131 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
14132 (grub_stop): Removed.
14133 (grub_get_rtc): Likewise.
14134 (grub_machine_init): Simply call grub_efi_init.
14135 (grub_machine_fini): Call grub_efi_fini.
14137 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
14138 (grub_efi_output_string): Removed.
14139 (grub_efi_stall): New function.
14140 (grub_stop): Likewise.
14141 (grub_get_rtc): Likewise.
14143 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
14144 (grub_efi_stall): New prototype.
14145 (grub_efi_allocate_pages): Likewise.
14146 (grub_efi_free_pages): Likewise.
14147 (grub_efi_get_memory_map): Likewise.
14148 (grub_efi_mm_init): Likewise.
14149 (grub_efi_mm_fini): Likewise.
14150 (grub_efi_init): Likewise.
14151 (grub_efi_fini): Likewise.
14153 * include/grub/i386/efi/time.h: Do not include
14154 grub/symbol.h. Include grub/efi/time.h.
14155 (GRUB_TICKS_PER_SECOND): Removed.
14156 (grub_get_rtc): Likewise.
14158 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
14159 Added padding. The EFI spec is buggy.
14160 (GRUB_EFI_BLACK): New macro.
14161 (GRUB_EFI_BLUE): Likewise.
14162 (GRUB_EFI_GREEN): Likewise.
14163 (GRUB_EFI_CYAN): Likewise.
14164 (GRUB_EFI_RED): Likewise.
14165 (GRUB_EFI_MAGENTA): Likewise.
14166 (GRUB_EFI_BROWN): Likewise.
14167 (GRUB_EFI_LIGHTGRAY): Likewise.
14168 (GRUB_EFI_BRIGHT): Likewise.
14169 (GRUB_EFI_DARKGRAY): Likewise.
14170 (GRUB_EFI_LIGHTBLUE): Likewise.
14171 (GRUB_EFI_LIGHTGREEN): Likewise.
14172 (GRUB_EFI_LIGHTCYAN): Likewise.
14173 (GRUB_EFI_LIGHTRED): Likewise.
14174 (GRUB_EFI_LIGHTMAGENTA): Likewise.
14175 (GRUB_EFI_YELLOW): Likewise.
14176 (GRUB_EFI_WHITE): Likewise.
14177 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
14178 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
14179 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
14180 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
14181 (GRUB_EFI_BACKGROUND_RED): Likewise.
14182 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
14183 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
14184 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
14185 (GRUB_EFI_TEXT_ATTR): Likewise.
14187 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
14188 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14189 (kernel_mod_HEADERS): Added efi/time.h.
14191 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
14193 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
14194 include/grub/efi/api.h, include/grub/efi/console_control.h,
14195 include/grub/efi/efi.h, include/grub/efi/pe32.h,
14196 include/grub/i386/efi/time.h, kern/efi/efi.c,
14197 kern/i386/efi/init.c, kern/i386/efi/startup.S,
14198 and util/i386/efi/grub-mkimage.c.
14200 * Makefile.in (RMKFILES): Added i386-efi.rmk.
14202 * genmk.rb (PModule#rule): Do not export symbols if
14203 #{prefix}_EXPORTS is set to "no".
14205 * conf/i386-efi.mk: New file.
14206 * conf/i386-efi.rmk: Likewise.
14207 * include/grub/efi/api.h: Likewise.
14208 * include/grub/efi/console_control.h: Likewise.
14209 * include/grub/efi/efi.h: Likewise.
14210 * include/grub/efi/pe32.h: Likewise.
14211 * include/grub/i386/efi/time.h: Likewise.
14212 * kern/efi/efi.c: Likewise.
14213 * kern/i386/efi/init.c: Likewise.
14214 * kern/i386/efi/startup.S: Likewise.
14215 * util/i386/efi/grub-mkimage.c: Likewise.
14217 2006-04-17 Marco Gerards <marco@gnu.org>
14219 * include/grub/script.h: Include <grub/parser.h> and
14220 "grub_script.tab.h".
14221 (struct grub_lexer_param): New struct.
14222 (struct grub_parser_param): Likewise.
14223 (grub_script_create_arglist): Pass the state in an argument.
14224 (grub_script_add_arglist): Likewise.
14225 (grub_script_create_cmdline): Likewise.
14226 (grub_script_create_cmdblock): Likewise.
14227 (grub_script_create_cmdif): Likewise.
14228 (grub_script_create_cmdmenu): Likewise.
14229 (grub_script_add_cmd): Likewise.
14230 (grub_script_arg_add): Likewise.
14231 (grub_script_lexer_ref): Likewise.
14232 (grub_script_lexer_deref): Likewise.
14233 (grub_script_lexer_record_start): Likewise.
14234 (grub_script_lexer_record_stop): Likewise.
14235 (grub_script_mem_record): Likewise.
14236 (grub_script_mem_record_stop): Likewise.
14237 (grub_script_malloc): Likewise.
14238 (grub_script_yylex): Likewise.
14239 (grub_script_yyparse): Likewise.
14240 (grub_script_yyerror): Likewise.
14241 (grub_script_yylex): Likewise.
14242 (grub_script_lexer_init): Return the state.
14244 * normal/lexer.c (grub_script_lexer_state): Removed variable.
14245 (grub_script_lexer_done): Likewise.
14246 (grub_script_lexer_getline): Likewise.
14247 (grub_script_lexer_refs): Likewise.
14248 (script): Likewise.
14249 (newscript): Likewise.
14250 (record): Likewise.
14251 (recording): Likewise.
14252 (recordpos): Likewise.
14253 (recordlen): Likewise.
14254 (grub_script_lexer_init): Return the state instead of setting
14256 (grub_script_lexer_ref): Use the newly added argument for state
14257 instead of globals.
14258 (grub_script_lexer_deref): Likewise.
14259 (grub_script_lexer_record_start): Likewise.
14260 (grub_script_lexer_record_stop): Likewise.
14261 (recordchar): Likewise.
14262 (nextchar): Likewise.
14263 (grub_script_yylex2): Likewise.
14264 (grub_script_yylex): Likewise.
14265 (grub_script_yyerror): Likewise.
14267 * normal/parser.y (func_mem): Removed variable.
14268 (menu_entry): Likewise.
14270 (%lex-param): New parser option.
14271 (%parse-param): Likewise.
14272 (script): Always return the AST.
14273 (argument): Pass the state around.
14274 (arguments): Likewise.
14275 (grubcmd): Likewise.
14276 (commands): Likewise.
14277 (function): Likewise.
14278 (menuentry): Likewise.
14279 (if_statement): Likewise.
14282 * normal/script.c (grub_script_memused): Removed variable.
14283 (grub_script_parsed): Likewise.
14284 (grub_script_malloc): Added a state argument. Use that instead of
14286 (grub_script_mem_record): Likewise.
14287 (grub_script_mem_record_stop): Likewise.
14288 (grub_script_arg_add): Likewise.
14289 (grub_script_add_arglist): Likewise.
14290 (grub_script_create_cmdline): Likewise.
14291 (grub_script_create_cmdif): Likewise.
14292 (grub_script_create_cmdmenu): Likewise.
14293 (grub_script_add_cmd): Likewise.
14294 (grub_script_parse): Setup the state before calling the parser.
14296 2006-04-16 Marco Gerards <marco@gnu.org>
14298 * normal/command.c (grub_command_init): Remove the title command.
14300 * normal/lexer.c (grub_script_yylex): Renamed from this...
14301 (grub_script_yylex2): ... to this.
14302 (grub_script_yylex): New function. Temporary
14303 introduced to filter some tokens.
14304 (grub_script_yyerror): Print a newline.
14306 * normal/main.c (read_config_file): Output information about the
14307 lines that contain errors. Wait for a key after all lines have
14308 been processed. Don't return an empty menu.
14310 * normal/parser.y (func_mem): Don't initialize.
14311 (menu_entry): Likewise.
14312 (err): New variable.
14313 (script): Don't return anything when an error was encountered.
14314 (ws, returns): Removed rules.
14315 (argument): Disabled concatenated variable support.
14316 (arguments): Remove explicit separators.
14317 (grubcmd): Likewise.
14318 (function): Likewise.
14319 (menuentry): Likewise.
14321 (commands): Likewise. Add error handling.
14323 * normal/script.c (grub_script_create_cmdline): If
14324 `grub_script_parsed' is 0, assume the parser encountered an error.
14326 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
14328 * configure.ac: Add support for EFI. Fix the typo
14329 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
14331 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14333 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
14334 foreign multibyte characters should be shown correctly.
14336 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14338 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
14340 (read_config_file): Made it to close file before returning.
14342 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
14344 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14345 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14346 video/i386/pc/vbefill.c.
14348 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14349 video/i386/pc/vbefill.c.
14351 * include/grub/video.h (grub_video_blit_format): New enum.
14352 (grub_video_mode_info): Added new member blit_format.
14353 (grub_video_get_blit_format): New function prototype.
14355 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14356 function prototype.
14357 (grub_video_vbe_map_rgb): Likewise.
14358 (grub_video_vbe_unmap_color): Likewise.
14360 * include/grub/i386/pc/vbeblit.h: New file.
14362 * include/grub/i386/pc/vbefill.h: New file.
14364 * video/video.c (grub_video_get_blit_format): New function.
14365 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14366 (grub_video_vbe_map_rgb): Likewise.
14367 (grub_video_vbe_unmap_color): Likewise.
14369 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14371 (grub_video_vbe_blit_render_target): Changed to use more optimized
14373 (grub_video_vbe_setup): Added detection for optimized settings.
14374 (grub_video_vbe_create_render_target): Likewise.
14376 * video/i386/pc/vbeblit.c: New file.
14378 * video/i386/pc/vbefill.c: New file.
14380 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
14382 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14385 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14386 parsing to support both hex and dec ranges. If filename was missing
14387 show usage information.
14389 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14391 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14392 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14394 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14395 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14396 (video_mod_SOURCES): Added.
14397 (video_mod_CFLAGS): Likewise.
14398 (video_mod_LDFLAGS): Likewise.
14399 (gfxterm_mod_SOURCES): Likewise.
14400 (gfxterm_mod_CFLAGS): Likewise.
14401 (gfxterm_mod_LDFLAGS): Likewise.
14402 (videotest_mod_SOURCES): Likewise.
14403 (videotest_mod_CFLAGS): Likewise.
14404 (videotest_mod_LDFLAGS): Likewise.
14405 (vesafb_mod_SOURCES): Removed.
14406 (vesafb_mod_CFLAGS): Likewise.
14407 (vesafb_mod_LDFLAGS): Likewise.
14408 (vga_mod_SOURCES): Likewise.
14409 (vga_mod_CFLAGS): Likewise.
14410 (vga_mod_LDFLAGS): Likewise.
14412 * commands/videotest.c: New file.
14414 * font/manager.c (fill_with_default_glyph): Modified to use
14416 (grub_font_get_glyph): Likewise.
14417 (fontmanager): Renamed from this...
14418 (font_manager): ... to this.
14420 * include/grub/font.h (grub_font_glyph): Added new structure.
14421 (grub_font_get_glyph): Modified to use grub_font_glyph.
14423 * include/grub/misc.h (grub_abs): Added as inline function.
14425 * include/grub/video.h: New file.
14427 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14428 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14429 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14430 (grub_vbe_get_controller_info): Renamed from this...
14431 (grub_vbe_bios_get_controller_info): ... to this.
14432 (grub_vbe_get_mode_info): Renamed from this...
14433 (grub_vbe_bios_get_mode_info): ... to this.
14434 (grub_vbe_set_mode): Renamed from this...
14435 (grub_vbe_bios_set_mode): ... to this.
14436 (grub_vbe_get_mode): Renamed from this...
14437 (grub_vbe_bios_get_mode): ... to this.
14438 (grub_vbe_set_memory_window): Renamed from this...
14439 (grub_vbe_bios_set_memory_window): ... to this.
14440 (grub_vbe_get_memory_window): Renamed from this...
14441 (grub_vbe_bios_get_memory_window): ... to this.
14442 (grub_vbe_set_scanline_length): Renamed from this...
14443 (grub_vbe_set_scanline_length): ... to this.
14444 (grub_vbe_get_scanline_length): Renamed from this...
14445 (grub_vbe_bios_get_scanline_length): ... to this.
14446 (grub_vbe_set_display_start): Renamed from this...
14447 (grub_vbe_bios_set_display_start): ... to this.
14448 (grub_vbe_get_display_start): Renamed from this...
14449 (grub_vbe_bios_get_display_start): ... to this.
14450 (grub_vbe_set_palette_data): Renamed from this...
14451 (grub_vbe_bios_set_palette_data): ... to this.
14452 (grub_vbe_set_pixel_rgb): Removed.
14453 (grub_vbe_set_pixel_index): Likewise.
14455 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14457 (grub_vbe_bios_get_controller_info): ... to this.
14458 (grub_vbe_get_mode_info): Renamed from this...
14459 (grub_vbe_bios_get_mode_info): ... to this.
14460 (grub_vbe_set_mode): Renamed from this...
14461 (grub_vbe_bios_set_mode): ... to this.
14462 (grub_vbe_get_mode): Renamed from this...
14463 (grub_vbe_bios_get_mode): ... to this.
14464 (grub_vbe_set_memory_window): Renamed from this...
14465 (grub_vbe_bios_set_memory_window): ... to this.
14466 (grub_vbe_get_memory_window): Renamed from this...
14467 (grub_vbe_bios_get_memory_window): ... to this.
14468 (grub_vbe_set_scanline_length): Renamed from this...
14469 (grub_vbe_set_scanline_length): ... to this.
14470 (grub_vbe_get_scanline_length): Renamed from this...
14471 (grub_vbe_bios_get_scanline_length): ... to this.
14472 (grub_vbe_set_display_start): Renamed from this...
14473 (grub_vbe_bios_set_display_start): ... to this.
14474 (grub_vbe_get_display_start): Renamed from this...
14475 (grub_vbe_bios_get_display_start): ... to this.
14476 (grub_vbe_set_palette_data): Renamed from this...
14477 (grub_vbe_bios_set_palette_data): ... to this.
14478 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14479 getting corrupted after calling it. Added more pushes and pops.
14480 (grub_vbe_bios_set_mode): Likewise.
14481 (grub_vbe_bios_get_mode): Likewise.
14482 (grub_vbe_bios_get_memory_window): Likewise.
14483 (grub_vbe_bios_set_scanline_length): Likewise.
14484 (grub_vbe_bios_get_scanline_length): Likewise.
14485 (grub_vbe_bios_get_display_start): Likewise.
14486 (grub_vbe_bios_set_palette_data): Likewise.
14488 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14489 (cl_insert): Likewise.
14490 (cl_delete): Likewise.
14492 * term/gfxterm.c: New file.
14494 * term/i386/pc/vesafb.c: Removed file.
14496 * video/video.c: New file.
14498 * video/i386/pc/vbe.c (real2pm): Added new function.
14499 (grub_video_vbe_draw_pixel): Likewise.
14500 (grub_video_vbe_get_video_ptr): Likewise.
14501 (grub_video_vbe_get_pixel): Likewise
14502 (grub_video_vbe_init): Likewise.
14503 (grub_video_vbe_fini): Likewise.
14504 (grub_video_vbe_setup): Likewise.
14505 (grub_video_vbe_get_info): Likewise.
14506 (grub_video_vbe_set_palette): Likewise.
14507 (grub_video_vbe_get_palette): Likewise.
14508 (grub_video_vbe_set_viewport): Likewise.
14509 (grub_video_vbe_get_viewport): Likewise.
14510 (grub_video_vbe_map_color): Likewise.
14511 (grub_video_vbe_map_rgb): Likewise.
14512 (grub_video_vbe_map_rgba): Likewise.
14513 (grub_video_vbe_unmap_color): Likewise.
14514 (grub_video_vbe_fill_rect): Likewise.
14515 (grub_video_vbe_blit_glyph): Likewise.
14516 (grub_video_vbe_blit_bitmap): Likewise.
14517 (grub_video_vbe_blit_render_target): Likewise.
14518 (grub_video_vbe_scroll): Likewise.
14519 (grub_video_vbe_swap_buffers): Likewise.
14520 (grub_video_vbe_create_render_target): Likewise.
14521 (grub_video_vbe_delete_render_target): Likewise.
14522 (grub_video_vbe_set_active_render_target): Likewise.
14523 (grub_vbe_set_pixel_rgb): Remove function.
14524 (grub_vbe_set_pixel_index): Likewise.
14525 (index_color_mode): Remove static variable.
14526 (active_mode): Likewise.
14527 (framebuffer): Likewise.
14528 (bytes_per_scan_line): Likewise.
14529 (grub_video_vbe_adapter): Added new static variable.
14530 (framebuffer): Likewise.
14531 (render_target): Likewise.
14532 (initial_mode): Likewise.
14533 (mode_in_use): Likewise.
14534 (mode_list): Likewise.
14536 2006-03-10 Marco Gerards <marco@gnu.org>
14538 * configure.ac (AC_INIT): Bumped to 1.93.
14540 * DISTLIST: Added `include/grub/hfs.h'.
14542 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14544 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14545 18H, which might help the BIOS falling back to next boot media.
14547 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14549 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14550 Poe Chen <poe.poechen@gmail.com>.
14552 2006-01-17 Marco Gerards <marco@gnu.org>
14554 * include/grub/normal.h: Include <grub/script.h>.
14555 (grub_command_list): Removed struct.
14556 (grub_command_list_t): Removed type.
14557 (grub_menu_entry): Remove members `num' and `command_list'. Add
14558 members `commands' and `sourcecode'.
14559 * include/grub/script.h: Add inclusion guards.
14560 (grub_script_cmd_menuentry): New struct.
14561 (grub_script_execute_menuentry): New prototype.
14562 (grub_script_lexer_record_start): Likewise.
14563 (grub_script_lexer_record_stop): Likewise.
14564 * normal/execute.c (grub_script_execute_menuentry): New function.
14565 * normal/lexer.c (record, recording, recordpos, recordlen): New
14567 (grub_script_lexer_record_start): New function.
14568 (grub_script_lexer_record_stop): Likewise.
14569 (recordchar): Likewise.
14570 (nextchar): Likewise.
14571 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14572 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14573 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14574 (current_menu): New variable.
14575 (free_menu): Mainly rewritten.
14576 (grub_normal_menu_addentry): New function.
14577 (read_config_file): Rewritten.
14578 * normal/menu.c (run_menu_entry): Mainly rewritten.
14579 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14581 (run): Mainly rewritten.
14582 * normal/parser.y (menu_entry): New variable.
14583 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14584 (menuentry): New rule.
14585 (command): Add `menuentry'.
14586 (if_statement): Allow additional returns before `fi'.
14587 * normal/script.c (grub_script_create_cmdmenu): New function.
14589 2006-01-03 Marco Gerards <marco@gnu.org>
14591 * INSTALL: GNU Bison is required.
14592 * configure.ac: Rewritten the test to detect Bison.
14593 * Makefile.in (YACC): New variable. Reported by Xun Sun
14594 <xun.sun.cn@gmail.com>.
14596 2006-01-03 Marco Gerards <marco@gnu.org>
14598 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14599 the HFS+ filesystem to filesystem blocks.
14600 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14601 GCC warning is silenced.
14603 2006-01-03 Marco Gerards <marco@gnu.org>
14605 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14606 read from disk from big endian to host byte order.
14608 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14610 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14612 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14613 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14614 embedded HFS+ filesystem.
14615 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14616 (grub_hfs_sblock): Move from here...
14617 * include/grub/hfs.h: To here... New file.
14618 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14620 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14622 (grub_hfsplus_volheader): Change type of member `magic' to
14624 (grub_hfsplus_data): Add new member `embedded_offset'.
14625 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14627 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14628 Calculate the offset.
14630 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14632 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14634 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14636 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14638 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14639 ENV->NAME is NULL after allocating ENV->VALUE.
14641 2005-12-25 Marco Gerards <marco@gnu.org>
14643 * kern/env.c (grub_env_set): Rewritten the error handling code.
14645 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14647 * geninit.sh: Made more robust, and more portable.
14649 2005-12-25 Marco Gerards <marco@gnu.org>
14651 Add support for Apple HFS+ filesystems.
14653 * fs/hfsplus.c: New file.
14655 * DISTLIST: Added `fs/hfsplus.c'.
14657 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14658 (hfsplus_mod_SOURCES): New variable.
14659 (hfsplus_mod_CFLAGS): Likewise.
14660 (hfsplus_mod_LDFLAGS): Likewise.
14661 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14662 (grub_setup_SOURCES): Likewise.
14663 (grub_mkdevicemap_SOURCES): Likewise.
14664 (grub_emu_SOURCES): Likewise.
14665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14667 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14669 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14671 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14673 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14674 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14675 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14676 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14677 normal/lexer.c, normal/parser.y, normal/script.c, and
14679 Removed kern/sparc64/cache.c.
14681 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14682 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14685 * configure.ac (AC_INIT): Bumped to 1.92.
14687 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14689 * kern/err.c (grub_error_push): Added new function to support error
14691 (grub_error_pop): Likewise.
14692 (grub_error_stack_items): New local variable to support error stacks.
14693 (grub_error_stack_pos): Likewise.
14694 (grub_error_stack_assert): Likewise.
14695 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14697 (grub_print_error): Added support to print errors from error stack.
14699 * include/grub/err.h (grub_error_push): Added function prototype.
14700 (grub_error_pop): Likewise.
14702 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14704 * configure.ac: Accept `powerpc64' as host_cpu.
14705 (amd64): Rename to `biarch32'.
14707 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14708 non-cacheline-aligned addresses.
14710 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14711 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14712 if `size' is non-zero.
14714 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14716 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14717 and `cd' to make sure the filename is not prefixed with a
14719 (pkgdata_MODULES): Add `gpt.mod'.
14720 (gpt_mod_SOURCES): New variable.
14721 (gpt_mod_CFLAGS): Likewise.
14722 (gpt_mod_LDFLAGS): Likewise.
14724 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14726 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14729 * partmap/gpt.c: New file.
14731 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14732 GPT partition map is detected.
14734 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14736 * commands/i386/pc/play.c: New file.
14737 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14738 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14741 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14743 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14744 ((unused))' to silence gcc warning.
14746 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14748 * configure.ac: Correct `AC_PROG_YACC' test.
14750 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14752 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14753 check before installing files.
14755 2005-11-22 Mike Small <smallm@panix.com>
14757 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14758 number regex so multidigit numbers are recognized correctly.
14760 2005-11-22 Mike Small <smallm@panix.com>
14762 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14763 debugging message before attempting to claim memory.
14764 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14765 multiple addresses in case of failure.
14767 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14769 * term/tparm.c (get_space): Remove empty `if' statement.
14771 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14773 * kern/parser.c (check_varstate): Rename `state' to 's'.
14775 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14777 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14778 variable definitions to the beginning of each function. Sort stack
14780 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14781 `buf' argument to `char *'.
14783 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14785 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14786 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14787 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14788 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14789 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14790 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14791 configfile.mod, search.mod, gzio.mod and test.mod.
14792 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14793 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14794 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14795 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14796 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14797 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14798 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14799 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14800 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14801 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14802 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14803 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14804 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14805 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14806 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14807 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14808 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14809 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14810 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14811 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14812 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14813 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14814 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14816 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14818 (pkgdata_MODULES): Add test.mod.
14820 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14822 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14823 appending to variables with "+=".
14824 (PModule): Use full pathname to generate *.lst filenames.
14826 * Makefile.in: Fixed list rules moved from genmk.rb.
14827 (.DELETE_ON_ERROR): New special target.
14828 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14830 * conf/i386-pc.rmk: Include conf/common.mk.
14831 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14832 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14833 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14834 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14835 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14836 configfile.mod, search.mod, gzio.mod and test.mod.
14837 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14838 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14839 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14840 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14841 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14842 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14843 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14844 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14845 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14846 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14847 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14848 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14849 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14850 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14851 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14852 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14853 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14854 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14855 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14856 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14857 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14858 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14859 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14861 * conf/common.rmk: ... to here. New file.
14863 * conf/common.mk: New file.
14865 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14867 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14868 (grub_script.tab.c): ... here.
14870 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14871 (grub_script.tab.c): ... here.
14873 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14874 (grub_script.tab.c): ... here.
14876 * normal/command.c (grub_command_find): Fixed a memory leak of
14877 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14879 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14881 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14882 "@" which marks the start of a comment on ARM.
14883 (VARIABLE): Likewise.
14885 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14887 Add support for Linux/ADFS partition tables.
14889 * partmap/acorn.c: New file.
14891 * include/grub/acorn_filecore.h: Likewise.
14893 * DISTLIST: Added `partmap/acorn.c' and
14894 `include/grub/acorn_filecore.h'.
14896 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14898 (pkgdata_MODULES): Add `acorn.mod'.
14899 (acorn_mod_SOURCES): New variable.
14900 (acorn_mod_CFLAGS): Likewise.
14902 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14904 (pkgdata_MODULES): Add `acorn.mod'.
14905 (acorn_mod_SOURCES): New variable.
14906 (acorn_mod_CFLAGS): Likewise.
14908 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14909 (pkgdata_MODULES): Add `acorn.mod'.
14910 (acorn_mod_SOURCES): New variable.
14911 (acorn_mod_CFLAGS): Likewise.
14912 (acorn_mod_LDFLAGS): Likewise.
14914 * include/types.h (grub_disk_addr_t): New typedef.
14916 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14918 * geninit.sh: New file.
14920 * geninitheader.sh: Likewise.
14922 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14923 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14924 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14925 * commands/configfile.c (grub_configfile_init)
14926 (grub_configfile_fini): Likewise.
14927 * commands/default.c (grub_default_init, grub_default_fini):
14929 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14930 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14931 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14932 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14934 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14935 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14937 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14938 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14940 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14942 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14944 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14945 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14946 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14947 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14948 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14949 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14950 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14951 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14952 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14953 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14954 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14955 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14956 * partmap/amiga.c (grub_amiga_partition_map_init)
14957 (grub_amiga_partition_map_fini): Likewise.
14958 * partmap/apple.c (grub_apple_partition_map_init)
14959 (grub_apple_partition_map_fini): Likewise.
14960 * partmap/pc.c (grub_pc_partition_map_init)
14961 (grub_pc_partition_map_fini): Likewise.
14962 * partmap/sun.c (grub_sun_partition_map_init,
14963 grub_sun_partition_map_fini): Likewise.
14964 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14967 * util/grub-emu.c: Include <grub_modules_init.h>.
14968 (main): Don't initialize and de-initialize any modules directly,
14969 use `grub_init_all' and `grub_fini_all' instead.
14971 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14972 `grub_vesafb_mod_init'.
14973 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14975 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14976 `grub_vga_mod_init'. Updated all users.
14977 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14979 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14980 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14983 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14984 Generate a function to initialize the module in utilities.
14985 Updated all callers.
14986 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14987 initialize the module in utilities. Updated all callers.
14989 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14991 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14992 escape sequence and a literal ^L to clear the screen.
14994 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14995 when returning from Open Firmware.
14997 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14999 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15000 (grub_ofconsole_height): Likewise.
15001 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15002 manually insert a '\n'.
15003 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15004 `grub_ofconsole_height'. Return early if these are already set.
15006 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
15008 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15009 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15010 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15011 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15012 and `normal/script.c'.
15013 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15014 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15015 (test_mod_SOURCES): New variable.
15016 (test_mod_CFLAGS): Likewise.
15017 (test_mod_LDFLAGS): Likewise.
15018 (pkgdata_MODULES): Add `test.mod'.
15019 (grub_script.tab.c): New rule.
15020 (grub_script.tab.h): Likewise.
15022 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
15024 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15025 `commands/test.c', `normal/execute.c', `normal/lexer.c',
15026 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15027 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15028 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15029 (test_mod_SOURCES): New variable.
15030 (test_mod_CFLAGS): Likewise.
15031 (pkgdata_MODULES): Add `test.mod'.
15032 (grub_script.tab.c): New rule.
15033 (grub_script.tab.h): Likewise.
15035 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
15037 Add initial scripting support.
15039 * commands/test.c: New file.
15040 * include/grub/script.h: Likewise.
15041 * normal/execute.c: Likewise.
15042 * normal/function.c: Likewise.
15043 * normal/lexer.c: Likewise.
15044 * normal/parser.y: Likewise.
15045 * normal/script.c: Likewise.
15047 * configure.ac: Add `AC_PROG_YACC' test.
15049 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15050 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15051 `normal/function.c' and `normal/script.c'.
15052 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15053 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15054 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15056 (pkgdata_MODULES): Add `test.mod'.
15057 (grub_script.tab.c): New rule.
15058 (grub_script.tab.h): Likewise.
15060 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15062 * include/grub/normal.h (grub_test_init): New prototype.
15063 (grub_test_fini): Likewise.
15065 * normal/command.c: Include <grub/script.h>.
15066 (grub_command_execute): Rewritten.
15068 * util/grub-emu.c (main): Call `grub_test_init' and
15071 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15073 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
15075 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
15076 there are no pending characters.
15078 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15080 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
15081 `grub_strndup' to drop device arguments. Replace unnecessary
15082 `grub_strndup' with `grub_strdup'.
15084 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15086 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
15087 `debug' environment variable has been set.
15089 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
15091 * Makefile.in (install-local): Use $(DATA).
15092 (uninstall): Likewise.
15093 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
15094 (sbin_UTILITIES): ... to here.
15095 (sbin_SCRIPTS): New variable.
15096 (grub_install_SOURCES): New variable.
15097 * util/powerpc/ieee1275/grub-install.in: New file.
15098 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
15100 (add_segments): Call `grub_util_get_path'.
15102 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
15104 From Timothy Baldwin:
15105 * commands/ls.c (grub_ls_list_files): Close FILE with
15107 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
15109 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
15111 * include/grub/parser.h: New file.
15113 * kern/parser.c: Likewise.
15115 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
15116 (grub_setup_SOURCES): Likewise.
15117 (grub_probefs_SOURCES): Likewise.
15118 (grub_emu_SOURCES): Likewise.
15119 (kernel_img_HEADERS): Add `parser.h'.
15121 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15122 (grub_emu_SOURCES): Add `kern/parser.c'.
15123 (grubof_SOURCES): Likewise.
15125 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15126 (grubof_SOURCES): Add `kern/parser.c'.
15128 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
15130 * kern/misc.c (grub_split_cmdline): Removed function.
15132 * kern/rescue.c: Include <grub/parser.h>.
15133 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
15134 of `grub_split_cmdline'.
15136 * normal/command.c: Include <grub/parser.h>.
15137 (grub_command_execute): Use `grub_parser_split_cmdline' instead
15138 of `grub_split_cmdline'.
15140 * normal/completion.c: Include <grub/parser.h>.
15141 (cmdline_state): New variable.
15142 (iterate_dir): End the filename with a quote depending on the
15143 command line state.
15144 (get_state): new function.
15145 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
15146 split the arguments and determine the current argument. When the
15147 argument string is not quoted, escape all spaces.
15149 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15151 * normal/sparc64/setjmp.S: New file.
15153 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15155 * include/grub/sparc64/libgcc.h: New file.
15156 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
15157 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
15158 normal/sparc64/setjmp.c.
15160 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15162 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
15163 * kern/sparc64/cache.S: New file.
15164 * kern/sparc64/cache.c: Removed.
15165 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
15166 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
15168 (COMMON_LDFLAGS): Add -melf64_sparc.
15169 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
15170 (grubof_SOURCES): Use cache.S instead of cache.c.
15171 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
15172 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
15173 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
15175 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
15176 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
15177 (linux_mod_CFLAGS): Commented out.
15178 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
15179 out because module isn't built.
15180 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
15181 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
15182 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
15183 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
15184 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
15185 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15186 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15187 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
15188 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
15189 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
15190 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15191 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15192 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
15193 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
15195 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
15197 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
15198 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
15199 longer, because HFS should not be used on PC.
15201 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15203 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
15204 consistently within the loop.
15206 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
15208 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
15209 directory can not be read.
15211 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15213 * configure.ac (AC_INIT): Increase the version number to 1.91.
15215 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
15216 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
15217 term/i386/pc/serial.c.
15219 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15221 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
15222 file size must be permitted.
15224 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
15225 between %ah and %al.
15227 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15229 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
15231 Call the hook with a NUL-terminated filename.
15232 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
15235 * kern/term.c (cursor_state): New variable.
15236 (grub_term_set_current): Reset the cursor state on a new
15238 (grub_setcursor): Rewritten to use CURSOR_STATE.
15239 (grub_getcursor): New function.
15241 * include/grub/term.h (grub_getcursor): New prototype.
15243 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
15244 integers on ARM. Reported by Timothy Baldwin
15245 <T.E.Baldwin99@members.leeds.ac.uk>.
15247 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
15249 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
15251 (grub_sfs_dir): Likewise.
15253 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
15255 Add support for the SFS filesystem.
15257 * fs/sfs.c: New file.
15259 * DISTLIST: Added `fs/sfs.c'.
15261 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
15262 (grub_probefs_SOURCES): Likewise.
15263 (grub_emu_SOURCES): Likewise.
15264 (pkgdata_MODULES): Add `sfs.mod'.
15265 (sfs_mod_SOURCES): New variable.
15266 (sfs_mod_CFLAGS): Likewise.
15267 (sfs_mod_LDFLAGS): Likewise.
15269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
15270 (pkgdata_MODULES): Add `sfs.mod'.
15271 (sfs_mod_SOURCES): New variable.
15272 (sfs_mod_CFLAGS): Likewise.
15274 * util/grub-emu.c (main): Call `grub_sfs_init' and
15277 * include/grub/fs.h (grub_sfs_init): New prototype.
15278 (grub_sfs_fini): Likewise.
15280 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
15282 Add support for the AFFS filesystem.
15284 * fs/affs.c: New file.
15286 * DISTLIST: Added `fs/affs.c'.
15288 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
15289 (grub_probefs_SOURCES): Likewise.
15290 (grub_emu_SOURCES): Likewise.
15291 (pkgdata_MODULES): Add `affs.mod'.
15292 (affs_mod_SOURCES): New variable.
15293 (affs_mod_CFLAGS): Likewise.
15294 (affs_mod_LDFLAGS): Likewise.
15296 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
15297 (pkgdata_MODULES): Add `affs.mod'.
15298 (affs_mod_SOURCES): New variable.
15299 (affs_mod_CFLAGS): Likewise.
15301 * util/grub-emu.c (main): Call `grub_affs_init' and
15304 * include/grub/fs.h (grub_affs_init): New prototype.
15305 (grub_affs_fini): Likewise.
15307 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15309 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
15311 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15313 * configure.ac: Accept `x86_64' as host_cpu. In that case add
15316 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
15319 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
15320 (COMMON_LDFLAGS): New variable.
15321 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
15322 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
15323 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
15324 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15325 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
15326 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
15327 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
15328 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
15329 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
15330 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
15331 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15332 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15333 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
15334 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
15335 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
15337 (normal_mod_ASFLAGS): Add `-m32'.
15339 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
15340 (grub_host_size_t, grub_host_ssize_t): New types.
15341 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
15342 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
15343 `GRUB_HOST_SIZEOF_VOID_P'.
15345 * include/grub/kernel.h (struct grub_module_header): Type of
15346 member offset changed to `grub_host_off_t'. Type of member size
15347 changed to `grub_host_size_t'.
15348 (struct grub_module_info): Type of member offset changed to
15349 `grub_host_off_t'. Type of member size changed to
15350 `grub_host_size_t'.
15352 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
15354 Make GRUB's kernel compliant to Multiboot Specification.
15356 * kern/i386/pc/startup.S (multiboot_header): New label.
15357 (multiboot_entry): Likewise.
15358 (multiboot_trampoline): Likewise.
15360 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15361 Increased to 0x4A0.
15363 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15364 put parentheses after a question mark.
15365 [!GRUB_UTIL] (my_mod): New variable.
15367 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15369 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
15371 Adds support for the XFS filesystem. Btrees are not supported
15374 * fs/xfs.c: New file.
15376 * DISTLIST: Added `fs/xfs.c'.
15378 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15379 (grub_probefs_SOURCES): Likewise.
15380 (grub_emu_SOURCES): Likewise.
15381 (pkgdata_MODULES): Add `xfs.mod'.
15382 (xfs_mod_SOURCES): New variable.
15383 (xfs_mod_CFLAGS): Likewise.
15385 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15386 (pkgdata_MODULES): Add `xfs.mod'.
15387 (xfs_mod_SOURCES): New variable.
15388 (xfs_mod_CFLAGS): Likewise.
15390 * util/grub-emu.c (main): Call `grub_xfs_init' and
15393 * include/grub/fs.h (grub_xfs_init): New prototype.
15394 (grub_xfs_fini): Likewise.
15397 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15399 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15400 color modes, allow greater than 16 colors to be configured as
15403 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15405 * normal/completion.c (complete_arguments): Add the qualifier
15406 const into OPTIONS.
15408 From Omniflux <omniflux+lists@omniflux.com>:
15409 * include/grub/terminfo.h: New file.
15410 * include/grub/tparm.h: Likewise.
15411 * include/grub/i386/pc/serial.h: Likewise.
15412 * term/terminfo.c: Likewise.
15413 * term/tparm.c: Likewise.
15414 * term/i386/pc/serial.c: Likewise.
15415 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15417 (terminfo_mod_SOURCES): New variable.
15418 (terminfo_mod_CFLAGS): Likewise.
15419 (serial_mod_SOURCES): Likewise.
15420 (serial_mod_CFLAGS): Likewise.
15422 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15424 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15425 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15426 and kern/powerpc/ieee1275/cmain.c, respectively.
15428 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15429 * kern/powerpc/ieee1275/crt0.S: ... here.
15431 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15432 * kern/powerpc/ieee1275/cmain.c: ... here.
15434 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15435 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15436 instead of boot/powerpc/ieee1275/crt0.S and
15437 boot/powerpc/ieee1275/cmain.c, respectively.
15439 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15440 sectors. It was not used anyway.
15442 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15444 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15445 `unused parameter' warning.
15447 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15449 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15451 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15454 2005-08-28 Marco Gerards <metgerards@student.han.nl>
15456 * include/grub/normal.h (enum grub_completion_type): Added
15457 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15459 * normal/cmdline.c (print_completion): Handle
15460 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15461 * normal/menu_entry.c (store_completion): Likewise.
15463 * normal/completion.c (complete_arguments): New function.
15464 (grub_normal_do_completion): Call `complete_arguments' when the
15465 current words start with a dash.
15467 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15469 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15470 `gzio.mod' instead of `io.mod').
15472 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15474 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15475 (DISTDIRS): Added io and video.
15476 Rewrite the search routine to make an output consistently.
15478 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15479 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15480 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15481 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15482 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15483 util/powerpc/ieee1275/misc.c.
15485 * include/grub/gzio.h: New file.
15486 * io/gzio.c: Likewise.
15488 * kern/file.c (grub_file_close): Call grub_device_close only if
15489 FILE->DEVICE is not NULL.
15491 * include/grub/mm.h [!NULL] (NULL): New macro.
15493 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15495 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15496 (pkgdata_MODULES): Added gzio.mod.
15497 (gzio_mod_SOURCES): New variable.
15498 (gzio_mod_CFLAGS): Likewise.
15500 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15501 (pkgdata_MODULES): Added gzio.mod.
15502 (gzio_mod_SOURCES): New variable.
15503 (gzio_mod_CFLAGS): Likewise.
15505 * commands/cat.c: Include grub/gzio.h.
15506 (grub_cmd_cat): Use grub_gzfile_open instead of
15509 * commands/cmp.c: Include grub/gzio.h.
15510 (grub_cmd_cmp): Use grub_gzfile_open instead of
15513 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15514 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15516 (grub_rescue_cmd_module): Likewise.
15518 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15520 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15521 kern/sparc64/ieee1275/init.c because it contains _start.
15522 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15524 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15526 * configure.ac: Add support for sparc64 host with ieee1275
15528 * configure: Generated from configure.ac.
15529 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15531 (grub_ofdisk_read): Likewise.
15532 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15533 pointers as (void *) to remove a warning.
15534 (grub_ofdisk_close): Likewise.
15535 (grub_ofdisk_read): Likewise.
15536 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15537 returns, so make it return void to remove a warning.
15538 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15539 Corresponding prototype change.
15540 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15541 values, and cast the pointers as (void *) to remove a warning.
15542 (grub_mm_dump): Likewise.
15543 * conf/sparc64-ieee1275.mk: New file.
15544 * conf/sparc64-ieee1275.rmk: Likewise.
15545 * include/grub/sparc64/setjmp.h: Likewise.
15546 * include/grub/sparc64/types.h: Likewise.
15547 * include/grub/sparc64/ieee1275/console.h: Likewise.
15548 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15549 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15550 * include/grub/sparc64/ieee1275/time.h: Likewise.
15551 * kern/sparc64/cache.c: Likewise.
15552 * kern/sparc64/dl.c: Likewise.
15553 * kern/sparc64/ieee1275/init.c: Likewise.
15554 * kern/sparc64/ieee1275/openfw.c: Likewise.
15556 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15558 * util/console.c (grub_ncurses_putchar): If C is greater than
15559 0x7f, set C to a question mark.
15560 (grub_ncurses_getcharwidth): New function.
15561 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15564 * normal/menu.c (print_entry): Made aware of Unicode. First,
15565 convert TITLE to UCS-4, and predict the cursor position by
15568 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15570 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15572 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15574 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15575 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15578 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15579 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15580 grub_strcpy and grub_strlen. Take it into account that a space
15581 character is inserted as a delimiter.
15583 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15585 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15586 invalid magic in the error.
15588 * commands/search.c: New file.
15590 * util/grub-emu.c (main): Call grub_search_init and
15593 * kern/rescue.c (grub_rescue_print_disks): Removed.
15594 (grub_rescue_print_devices): New function.
15595 (grub_rescue_cmd_ls): Use grub_device_iterate with
15596 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15597 grub_rescue_print_disks.
15599 * kern/partition.c (grub_partition_iterate): Return the result of
15600 PARTMAP->ITERATE instead of GRUB_ERRNO.
15602 * kern/device.c: Include grub/partition.h.
15603 (grub_device_iterate): New function.
15605 * include/grub/partition.h (grub_partition_iterate): Return int
15606 instead of grub_err_t.
15608 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15610 [GRUB_UTIL] (grub_search_fini): Likewise.
15612 * include/grub/device.h (grub_device_iterate): New prototype.
15614 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15616 (pkgdata_MODULES): Added search.mod.
15617 (search_mod_SOURCES): New variable.
15618 (search_mod_CFLAGS): Likewise.
15620 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15621 (pkgdata_MODULES): Added search.mod.
15622 (search_mod_SOURCES): New variable.
15623 (search_mod_CFLAGS): Likewise.
15625 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15626 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15627 All callers changed.
15629 * DISTLIST: Added commands/search.c.
15631 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15633 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15635 (grub_getcharwidth): New function.
15637 * kern/misc.c (grub_utf8_to_ucs4): New function.
15639 * include/grub/term.h (struct grub_term): Added a new member
15641 (grub_getcharwidth): New prototype.
15643 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15645 * term/i386/pc/console.c (map_char): New function. Segregated from
15646 grub_console_putchar.
15647 (grub_console_putchar): Use map_char.
15648 (grub_console_getcharwidth): New function.
15649 (grub_console_term): Specified grub_console_getcharwidth as
15652 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15653 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15655 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15657 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15658 on grub_strtoul completely.
15659 (write_char): Declare local variables in the beginning of the
15661 (grub_vesafb_getcharwidth): New function.
15662 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15665 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15667 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15668 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15669 commands/i386/pc/vbetest.c.
15671 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15672 call grub_vbe_get_controller_info again, because the returned
15673 information is volatile.
15674 (grub_vbe_set_video_mode): Mostly rewritten.
15675 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15676 grub_vbe_status_t correctly.
15677 (grub_vbe_get_video_mode_info): Likewise.
15678 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15679 several if statements.
15681 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15682 * commands/i386/pc/vbeinfo.c: ... this.
15684 * commands/i386/pc/vbe_test.c: Renamed to ...
15685 * commands/i386/pc/vbetest.c: ... this.
15687 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15689 (grub_cmd_vbeinfo): ... this. Save video modes before
15690 iterating. Skip a video mode, if it is not available, not enough
15691 information is given or it is monochrome. Show the memory
15692 model. Leave the interpretation of MODEVAR to grub_strtoul
15694 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15695 (GRUB_MOD_FINI): Likewise.
15697 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15698 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15699 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15700 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15701 grub_strtoul completely.
15702 (real2pm): Removed.
15703 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15704 (GRUB_MOD_FINI): Likewise.
15706 * normal/misc.c: Include grub/mm.h.
15708 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15709 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15710 (vbe_list_modes_mod_SOURCES): Removed.
15711 (vbe_list_modes_mod_CFLAGS): Likewise.
15712 (vbe_test_mod_SOURCES): Likewise.
15713 (vbe_test_mod_CFLAGS): Likewise.
15714 (vbeinfo_mod_SOURCES): New variable.
15715 (vbeinfo_mod_CFLAGS): Likewise.
15716 (vbetest_mod_SOURCES): Likewise.
15717 (vbetest_mod_CFLAGS): Likewise.
15719 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15721 * normal/misc.c: New file.
15723 * DISTLIST: Added normal/misc.c.
15725 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15726 DISK to HOOK. Call HOOK with DISK.
15727 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15728 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15729 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15731 * normal/menu_entry.c (struct screen): Added a new member
15732 "completion_shown".
15733 (completion_buffer): New global variable.
15734 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15735 (store_completion): New function.
15736 (complete): Likewise.
15737 (clear_completions): Likewise.
15738 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15739 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15740 a tab, call complete.
15742 * normal/completion.c (disk_dev): Removed.
15743 (print_simple_completion): Likewise.
15744 (print_partition_completion): Likewise.
15745 (print_func): New global variable.
15746 (add_completion): Do not take the arguments WHAT or PRINT any
15747 longer. Added a new argument TYPE. Instead of printing directly,
15748 call PRINT_FUNC if not NULL.
15749 All callers changed.
15750 (complete_device): Use a local variable DEV instead of
15751 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15752 (grub_normal_do_completion): Take a new argument HOOK. Do not
15753 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15754 empty string, return NULL instead.
15755 All callers changed.
15757 * normal/cmdline.c (print_completion): New function.
15759 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15761 All callers changed.
15763 * kern/disk.c (grub_print_partinfo): Removed.
15765 * include/grub/partition.h (struct grub_partition_map): Add a new
15766 argument DISK into HOOK of ITERATE.
15767 (grub_partition_iterate): Add a new argument DISK to HOOK.
15769 * include/grub/normal.h (enum grub_completion_type): New enum.
15770 (grub_completion_type_t): New type.
15771 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15772 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15773 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15774 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15775 (grub_normal_do_completion): Added a new argument HOOK.
15776 (grub_normal_print_device_info): New prototype.
15778 * include/grub/disk.h (grub_print_partinfo): Removed.
15780 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15781 (normal_mod_SOURCES): Likewise.
15782 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15783 (normal_mod_SOURCES): Likewise.
15785 * commands/ls.c (grub_ls_list_disks): Use
15786 grub_normal_print_device_info instead of grub_print_partinfo. Free
15788 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15789 duplicating the code.
15791 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15793 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15794 follow GCS more precisely.
15795 * commands/i386/pc/vbe_test.c: Likewise.
15796 * include/grub/i386/pc/vbe.h: Likewise.
15797 * term/i386/pc/vesafb.c: Likewise.
15798 * video/i386/pc/vbe.c: Likewise.
15800 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15802 * DISTLIST: Added term/i386/pc/vesafb.c
15803 DISTLIST: Added video/i386/pc/vbe.c
15804 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15805 DISTLIST: Added commands/i386/pc/vbe_test.c.
15806 * commands/i386/pc/vbe_list_modes.c: New file.
15807 * commands/i386/pc/vbe_test.c: Likewise.
15808 * term/i386/pc/vesafb.c: Likewise.
15809 * video/i386/pc/vbe.c: Likewise.
15810 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15811 (grub_vbe_probe) Added prototype.
15812 (grub_vbe_set_video_mode) Likewise.
15813 (grub_vbe_get_video_mode) Likewise.
15814 (grub_vbe_get_video_mode_info) Likewise.
15815 (grub_vbe_set_pixel_rgb) Likewise.
15816 (grub_vbe_set_pixel_index) Likewise.
15817 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15818 (pkgdata_MODULES): Added vesafb.mod.
15819 (pkgdata_MODULES): Added vbe_list_modes.mod.
15820 (pkgdata_MODULES): Added vbe_test.mod.
15821 (vbe_mod_SOURCES): Added.
15822 (vbe_mod_CFLAGS): Likewise.
15823 (vesafb_mod_SOURCES): Likewise.
15824 (vesafb_mod_CFLAGS): Likewise.
15825 (vbe_list_modes_mod_SOURCES): Likewise.
15826 (vbe_list_modes_mod_CFLAGS): Likewise.
15827 (vbe_test_mod_SOURCES): Likewise.
15828 (vbe_test_mod_CFLAGS): Likewise.
15830 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15832 * normal/command.c (grub_command_execute): If INTERACTIVE is
15833 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15834 CMDLINE. Disable the pager if INTERACTIVE is true.
15835 All callers are changed.
15837 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15838 before reading a config file.
15839 * normal/main.c (read_config_file): Even if a command is not
15840 found, register it if it is within an entry.
15842 * util/grub-emu.c: Include sys/types.h and unistd.h.
15843 (options): Added --hold.
15844 (struct arguments): Added a new member "hold".
15845 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15847 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15848 cleared by a debugger, if it is not zero.
15850 * include/grub/normal.h (grub_command_execute): Add an argument
15853 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15855 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15857 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15859 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15860 program with another one, because the old one didn't detect a bug
15861 in gcc-3.4. Always use regparm 2, because the new test is still
15862 not enough for gcc-4.0. Someone must investigate a simple test
15863 case which detects a bug in gcc-4.0.
15865 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15867 * DISTLIST: Added normal/completion.c.
15869 * normal/completion.c: New file.
15871 * term/i386/pc/console.c (grub_console_getwh): New function.
15872 (grub_console_term): Assign grub_console_getwh to getwh.
15874 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15875 function is defined in normal/completion.c as
15876 grub_normal_do_completion.
15877 (grub_cmdline_get): Use grub_normal_do_completion instead of
15880 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15881 returns non-zero, otherwise return 0.
15882 (grub_partition_iterate): First, probe the partition map. Then,
15883 call ITERATE only for this partition map.
15885 * kern/misc.c (grub_strncmp): Rewritten.
15887 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15888 returns non-zero. Otherwise return 0.
15890 * include/grub/partition.h (grub_partition_map_iterate): Return
15891 int instead of void.
15893 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15895 * include/grub/misc.h (grub_strncmp): Change the type of N to
15898 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15901 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15902 unsigned explicitly before comparing it with I.
15904 * kern/main.c (grub_env_write_root): Add the attribute unused into
15907 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15908 normal/completion.c.
15909 (normal_mod_SOURCES): Likewise.
15910 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15911 (normal_mod_SOURCES): Likewise.
15913 * normal/command.c (grub_iterate_commands): If ITERATE returns
15914 non-zero, return one immediately.
15916 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15918 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15919 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15921 (grub_vbe_get_controller_info): New function.
15922 (grub_vbe_get_mode_info): Likewise.
15923 (grub_vbe_set_mode): Likewise.
15924 (grub_vbe_get_mode): Likewise.
15925 (grub_vbe_set_memory_window): Likewise.
15926 (grub_vbe_get_memory_window): Likewise.
15927 (grub_vbe_set_scanline_length): Likewise.
15928 (grub_vbe_get_scanline_length): Likewise.
15929 (grub_vbe_set_display_start): Likewise.
15930 (grub_vbe_get_display_start): Likewise.
15931 (grub_vbe_set_palette_data): Likewise.
15932 * include/grub/i386/pc/vbe.h: New file.
15934 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15936 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15937 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15938 * DISTLIST: Likewise.
15939 * kern/ieee1275/of.c: Moved to ...
15940 * kern/ieee1275/ieee1275.c: ... here.
15942 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15944 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15945 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15946 Pass 0 as `end' parameter to grub_strtoul().
15948 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15950 * include/grub/powerpc/ieee1275/console.h: Do not include
15951 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15953 (grub_console_cur_color): Remove i386-specific prototype.
15954 (grub_console_real_putchar): Likewise.
15955 (grub_console_checkkey): Likewise.
15956 (grub_console_getkey): Likewise.
15957 (grub_console_getxy): Likewise.
15958 (grub_console_gotoxy): Likewise.
15959 (grub_console_cls): Likewise.
15960 (grub_console_setcursor): Likewise.
15961 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15962 Include <grub/machine/console.h>.
15963 * term/ieee1275/ofconsole.c: Likewise.
15965 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15967 * Makefile.in (LIBLZO): New variable.
15969 * configure.ac: Check for LZO version 2.
15971 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15972 lzo/lzo1x.h instead of lzo1x.h.
15974 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15977 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15978 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15980 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15981 copying the data from PARTITION to P.
15983 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15985 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15986 negative, unload the module.
15988 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15989 map is "pc_partition_map" but not "pc".
15990 (usage): Fix the description. The options are --boot-image and
15991 --core-image but not --boot-file or --core-file.
15992 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15993 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15996 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15997 --core-file. Specify INSTALL_DEVICE as an argument.
15999 * util/console.c: Include config.h.
16000 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16001 [HAVE_NCURSES_H]: Include ncurses.h.
16002 [HAVE_CURSES_H]: Include curses.h.
16003 [!A_NORMAL] (A_NORMAL): Defined as zero.
16004 [!A_STANDOUT] (A_STANDOUT): Likewise.
16006 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16008 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16010 * configure.ac: Check for curses libraries and headers.
16012 * Makefile.in (LIBCURSES): New variable.
16014 * genmk.rb (Script::rule): Set the executable bits.
16016 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16017 name of the PC partition map is "pc_partition_map" but not "pc".
16019 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16021 * util/i386/pc/grub-install.in (grub_probefs): New variable.
16022 (modules): Likewise.
16023 (usage): Added descriptions for --modules and --grub-probefs.
16024 Handle --modules and --grub-probefs. Save the arguments in MODULES
16025 and GRUB_PROBEFS, respectively.
16026 Auto-detect a filesystem module against GRUBDIR. If the result is
16027 empty and modules are not specified explicitly, abort the
16028 installation. Add the result to MODULES.
16030 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16031 disk/powerpc/ieee1275/ofdisk.c,
16032 include/grub/powerpc/ieee1275/init.h and
16033 term/powerpc/ieee1275/ofconsole.c.
16034 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16035 term/ieee1275/ofconsole.c.
16037 * include/grub/powerpc/ieee1275/console.h: Resurrected.
16039 * COPYING: Upgraded to the latest version. Only the address of the
16040 FSF office has changed.
16042 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16044 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16045 kern/ieee1275.c with kern/ieee1275/of.c.
16047 * kern/ieee1275.c: Moved to ...
16048 * kern/ieee1275/of.c: ... here.
16050 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
16052 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16055 * config.guess: Updated to the latest version from gnulib.
16056 * config.sub: Likewise.
16057 * install.sh: Likewise.
16058 * mkinstalldirs: Likewise.
16060 * include/grub/console.h: Removed. This file is arch-specific. Do
16061 not put this in include/grub.
16063 * include/grub/i386/pc/console.h: Resurrected.
16065 * util/console.c: Include grub/machine/console.h instead of
16067 * util/grub-emu.c: Likewise.
16069 2005-08-04 Marco Gerards <metgerards@student.han.nl>
16071 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
16074 From Vincent Pelletier <subdino2004@yahoo.fr>
16075 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
16076 Redefined to use grub_getwh.
16077 (grub_term): New member named getwh.
16078 (grub_getwh): New prototype.
16079 * kern/term.c (grub_getwh): New function.
16080 * term/i386/pc/console.c (grub_console_getwh): New function.
16081 (grub_console_term): New member `getwh'.
16082 * term/i386/pc/vga.c (grub_vga_getwh): New function.
16083 (grub_vga_term): New member `getwh'.
16084 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
16086 (grub_ofconsole_getw): New function.
16087 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
16088 (grub_ofconsole_term): New field named getwh and new initial
16091 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
16093 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
16094 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
16095 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
16096 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
16097 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
16098 of <grub/machine/ieee1275.h>.
16099 * commands/ieee1275/reboot.c: Likewise.
16100 * boot/powerpc/ieee1275/ieee1275.c: Move ...
16101 * kern/ieee1275.c: ... to here. All users updated. Change all
16102 parameter structs to use new type `grub_ieee1275_cell_t'.
16103 * term/powerpc/ieee1275/ofconsole.c: Move ...
16104 * term/ieee1275/ofconsole.c: ... to here. All users updated.
16105 * disk/powerpc/ieee1275/ofdisk.c: Move ...
16106 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
16107 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
16109 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
16110 Remove unused prototypes. All users updated.
16111 * include/grub/powerpc/ieee1275/console.h: Removed.
16112 * include/grub/powerpc/ieee1275/ieee1275.h: Define
16113 `grub_ieee1275_cell_t'.
16114 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
16115 Cast comparisons with -1 to the correct type.
16116 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
16117 type to match `grub_ieee1275_entry_fn'.
16119 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
16121 * DISTLIST: Added util/i386/pc/grub-probefs.c.
16123 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
16124 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
16126 (grub_probefs_SOURCES): New variable.
16128 * util/i386/pc/grub-probefs.c: New file.
16130 * util/i386/pc/grub-setup.c (main): Call
16131 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
16132 grub_hfs_init and grub_jfs_init to initialize the system. Call
16133 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
16134 grub_pc_partition_map_fini to finish the system.
16136 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
16138 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
16140 (grub_multiboot_load_elf32): Likewise.
16141 (grub_multiboot_is_elf64): Likewise.
16142 (grub_multiboot_load_elf64): Likewise.
16143 (grub_multiboot_load_elf): Likewise.
16144 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
16145 an ELF32 or ELF64 file.
16146 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
16148 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
16149 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
16150 NULL before calling FS->LABEL.
16151 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
16152 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
16153 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
16154 before calling FS->LABEL.
16156 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
16158 * util/i386/pc/grub-install.in (datadir): New variable.
16160 (pkgdatadir): New variable.
16161 (pkglibdir): Removed.
16163 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
16165 * DISTLIST: Added util/i386/pc/grub-install.in.
16167 * util/i386/pc/grub-install.in: New file.
16169 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
16170 (grub_install_SOURCES): Likewise.
16172 * genmk.rb: Added support for scripts.
16173 (Script): New class.
16174 (scripts): New variable.
16176 * Makefile.in (install-local): Install sbin_SCRIPTS by
16178 (uninstall): Remove sbin_SCRIPTS.
16180 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
16181 device, try to get a GRUB device by
16182 grub_util_biosdisk_get_grub_dev.
16185 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
16186 description for --device-map.
16188 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16190 Change the semantics of variable hooks. They now return strings
16191 instead of error values.
16193 * util/i386/pc/grub-setup.c: Include grub/env.h.
16194 (setup): Use grub_device_set_root instead of grub_env_set.
16196 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
16197 grub_env_get instead of grub_device_set_root and
16198 grub_device_get_root, respectively.
16200 * kern/main.c (grub_env_write_root): New function.
16201 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
16202 grub_env_set instead of grub_device_set_root.
16204 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
16206 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
16207 rather than calling ENV->WRITE_HOOK afterwards.
16208 (grub_env_get): Return the result of ENV->READ_HOOK rather than
16209 passing a pointer of a pointer.
16210 (grub_register_variable_hook): Change the types of "read_hook" and
16211 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
16213 Allocate the default empty string on the heap, because this string
16214 may be freed later.
16216 * kern/device.c: Include grub/env.h.
16217 (grub_device_set_root): Removed.
16218 (grub_device_get_root): Likewise.
16219 (grub_device_open): Use grub_env_get instead of
16220 grub_device_get_root.
16222 * include/grub/env.h (grub_env_read_hook_t): New type.
16223 (grub_env_write_hook_t): Likewise.
16224 (grub_env_var): Change the types of "read_hook" and "write_hook"
16225 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
16226 (grub_register_variable_hook): Likewise.
16228 * include/grub/device.h (grub_device_set_root): Removed.
16229 (grub_device_set_root): Likewise.
16231 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
16232 make sure that DIRNAME terminates with '/', so that
16233 grub_fat_find_dir will fail if PATH is not a directory.
16235 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
16237 Use the qualifier auto for print_files and print_files_long.
16238 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
16240 Put a newline only if there is no error.
16241 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
16244 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16246 * kern/partition.c (grub_partition_probe): Initialize PART to
16247 NULL. Otherwise, when no partition map is registered, this returns
16250 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
16252 * partmap/apple.c (apple_partition_map_iterate): Check if POS
16253 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
16256 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
16258 * commands/ls.c (grub_ls_list_disks): Print the filesystem
16259 information on each device, if it does not have partitions. Print
16260 "Device" instead of "Disk", because this function is not specific
16263 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
16264 static to ensure that it is put on the memory rather than a
16267 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16269 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
16270 (grub_cat_init): Likewise.
16271 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
16272 (options): Likewise.
16273 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
16274 (grub_configfile_init): Likewise.
16275 * font/manager.c (GRUB_MOD_INIT): Likewise.
16276 * commands/help.c (GRUB_MOD_INIT): Likewise.
16277 (grub_help_init): Likewise.
16278 * normal/command.c (grub_command_init): Likewise.
16279 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
16280 * disk/loopback.c (grub_loop_init): Likewise.
16281 (GRUB_MOD_INIT): Likewise.
16282 * commands/ls.c (grub_ls_init): Likewise.
16283 (GRUB_MOD_INIT): Likewise.
16284 (options): Likewise.
16285 * commands/boot.c (grub_boot_init): Likewise.
16286 (GRUB_MOD_INIT): Likewise.
16287 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
16288 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
16289 (GRUB_MOD_INIT): Likewise.
16290 * commands/cmp.c (grub_cmp_init): Likewise.
16291 (GRUB_MOD_INIT): Likewise.
16293 * normal/arg.c: Use <> instead of "" to include header files.
16294 (SHORT_ARG_HELP): New macro.
16295 (SHORT_ARG_USAGE): Likewise.
16296 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
16297 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
16299 (find_short): Check if C is 'h' or 'u' explicitly.
16300 (grub_arg_show_help): Use space characters instead of tabs. Treat
16301 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
16302 are shown with --help and --usage only if they are not used for
16303 the command itself.
16304 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
16307 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
16308 const into "longarg". Change the type of "shortarg" to int.
16310 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16312 * boot/i386/pc/boot.S (boot_drive_check): New label.
16314 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
16317 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
16318 which do not pass a boot drive correctly. Copied from GRUB Legacy.
16320 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16322 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
16323 When turning off Gate A20, skip the check and return immediately,
16324 because this is not fatal usually.
16326 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16328 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
16329 be 0x7C00 instead of 0x8000.
16331 * boot/i386/pc/pxeboot.S: Rewritten.
16333 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
16335 (gate_a20_check_state): Read a byte from 0x108000. Invert the
16338 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
16340 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
16341 robustness. This routine now supports a BIOS call and System
16342 Control Port A to modify the gate A20.
16344 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16345 Increased to 0x440.
16347 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
16349 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16350 device path and resulting ihandle.
16351 (grub_ofdisk_close): dprintf the ihandle being closed.
16352 (grub_ofdisk_read): dprintf function parameters.
16353 * kern/mm.c (grub_mm_init_region): Likewise.
16354 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16355 (grub_linux_boot): dprintf the Linux entry point, initrd address and
16356 size, and boot arguments.
16357 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16358 before loading into memory.
16359 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16360 before loading into memory.
16362 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
16364 * kern/mm.c: Added much documentation.
16365 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16366 8, set to 5 instead of 8.
16368 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16370 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16372 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16373 (grub_mkdevicemap_SOURCES): New variable.
16375 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16376 lib/device.c of GRUB Legacy.
16378 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16380 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16381 instead of PATH is NULL.
16383 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16385 * commands/cmp.c (BUFFER_SIZE): New macro.
16386 (grub_cmd_cmp): Close the right file at the right time. Compare
16387 only data just read. Don't report files of different size as
16388 identical. Dynamically allocate buffers. Move variable
16389 declarations at the beginning of function.
16391 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
16393 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16396 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16398 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16399 when backspace is pressed at beginning of line.
16401 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
16403 * DISTLIST: Added genfslist.sh.
16405 * normal/main.c (fs_module_list): New variable.
16406 (autoload_fs_module): New function.
16407 (read_fs_list): Likewise.
16408 (grub_normal_execute): Call read_fs_list.
16410 * kern/fs.c (grub_fs_autoload_hook): New variable.
16411 (grub_fs_probe): Added support for auto-loading.
16413 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16414 (grub_fs_module_list_t): New type.
16416 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16417 (grub_fs_autoload_hook): New prototype.
16419 * genfslist.sh: New file.
16421 * genmk.rb: Added a rule to generate a filesystem list.
16423 2005-06-30 Marco Gerards <metgerards@student.han.nl>
16425 * configure.ac: Fix the test for cross-compiling.
16427 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16428 define GRUB_UTIL anymore.
16430 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16431 so this function works on other systems than just big endian.
16432 (load_modules): Likewise.
16433 (add_segments): Likewise.
16435 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16437 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16438 contains `l' modifier, get a long from va_arg().
16440 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16442 * kern/mm.c (grub_free): If the next free block which is being
16443 merged is the first free block, set the first block to the block
16445 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16447 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16449 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16450 `grub_ieee1275_chosen'.
16452 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16454 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16455 (grub_ieee1275_chosen): New variable.
16456 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16458 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16459 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16460 Rename first argument to `phandle' for consistency.
16461 (grub_ieee1275_get_property_length): Likewise.
16462 (grub_ieee1275_next_property): Likewise. Change type of first argument
16463 to grub_ieee1275_phandle_t.
16464 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16465 Move export next to declaration.
16466 (grub_ieee1275_chosen): New variable.
16467 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16468 Correct cosmetic typo.
16469 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16470 `grub_ieee1275_chosen'.
16471 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16472 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16473 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16474 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16475 `grub_ieee1275_chosen'.
16477 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16479 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16481 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16482 /chosen/bootargs as "variable=value" pairs.
16484 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16486 * include/grub/misc.h (grub_dprintf): New macro.
16487 (grub_real_dprintf): New prototype.
16488 (grub_strword): Likewise.
16489 (grub_iswordseparator): Likewise.
16490 * kern/misc.c (grub_real_dprintf): New function.
16491 (grub_strword): Likewise.
16492 (grub_iswordseparator): Likewise.
16494 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16496 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16497 (roundup): Remove macro.
16498 (grub_ieee1275_flags): Make static.
16499 (grub_ieee1275_realmode): Remove.
16500 (grub_ieee1275_test_flag): New function.
16501 (grub_ieee1275_set_flag): Likewise.
16502 (find_options): Rename to `grub_ieee1275_find_options'; update
16503 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16504 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16505 (cmain): New prototype.
16506 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16507 `grub_ieee1275_flags' directly.
16508 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16509 machine/biosdisk.h.
16510 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16511 Don't include grub/machine/init.h.
16512 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16513 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16515 (grub_ieee1275_realmode): Likewise.
16516 (grub_ieee1275_flag): New enum.
16517 (grub_ieee1275_test_flag): New prototype.
16518 (grub_ieee1275_set_flag): New prototype.
16519 * include/grub/powerpc/ieee1275/init.h: Remove file.
16520 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16521 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16522 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16523 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16525 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16526 `grub_ieee1275_test_flag'.
16527 (grub_ieee1275_encode_devname): Likewise.
16529 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16531 * include/grub/powerpc/ieee1275/ieee1275.h
16532 (grub_ieee1275_encode_devname): New prototype.
16533 (grub_ieee1275_get_filename): Likewise.
16534 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16536 (grub_set_prefix): Likewise.
16537 (grub_machine_init): Call grub_set_prefix.
16538 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16539 (grub_parse_type): New enum.
16540 (grub_ieee1275_get_devargs): New function.
16541 (grub_ieee1275_get_devname): Likewise.
16542 (grub_ieee1275_parse_args): Likewise.
16543 (grub_ieee1275_get_filename): Likewise.
16544 (grub_ieee1275_encode_devname): Likewise.
16546 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16548 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16549 `grub_loader_unset'.
16551 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16553 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16554 instead of grub_ieee1275_interpret.
16555 (grub_halt_init): New function.
16556 (grub_halt_fini): Likewise.
16557 (GRUB_MOD_INIT): Correct message grammar.
16558 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16559 instead of grub_ieee1275_interpret.
16560 (grub_reboot_init): New function.
16561 (grub_reboot_fini): Likewise.
16562 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16563 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16564 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16565 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16566 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16568 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16570 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16572 (grub_halt): Likewise.
16573 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16574 (cmain): Remove __attribute__((unused)).
16575 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16576 (grub_heap_len): Likewise.
16577 (grub_machine_fini): New function.
16578 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16579 (grub_halt): Likewise.
16580 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16582 * util/powerpc/ieee1275/misc.c: New file.
16584 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16586 * DISTLIST: New file.
16587 * gendistlist.sh: Likewise.
16589 * Makefile.in (COMMON_DISTFILES): Removed.
16590 (BOOT_DISTFILES): Likewise.
16591 (CONF_DISTFILES): Likewise.
16592 (DISK_DISTFILES): Likewise.
16593 (FS_DISTFILES): Likewise.
16594 (INCLUDE_DISTFILES): Likewise.
16595 (KERN_DISTFILES): Likewise.
16596 (LOADER_DISTFILES): Likewise.
16597 (TERM_DISTFILES): Likewise.
16598 (UTIL_DISTFILES): Likewise.
16599 (DISTFILES): Likewise.
16600 (uninstall): Uninstall files in $(pkgdata_DATA).
16601 (DISTLIST): New target.
16602 (distdir): Use the contents of the file DISTLIST to get a list of
16605 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16607 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16608 descriptor. This is ported from GRUB Legacy.
16610 * gencmdlist.sh: Added an extra semicolon to make it work with
16611 old sed versions. Reported by Robert Bihlmeyer
16612 <robbe@orcus.priv.at>.
16614 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16616 Automatic loading of commands is supported.
16618 * normal/main.c (read_command_list): New function.
16619 (grub_normal_execute): Call read_command_list.
16621 * normal/command.c (grub_register_command): Return zero or CMD.
16622 Allocate CMD->NAME from the heap.
16623 Initialize CMD->MODULE_NAME to zero.
16624 Find the same name as well. If the same command is found and it is
16625 a dummy command, overwrite members. If it is not a dummy command,
16627 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16628 (grub_command_find): If a dummy command is found, load a module
16629 and retry to find a command only once.
16631 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16632 make sure that each command is loaded.
16634 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16636 (struct grub_command): Remove const from the member `name'.
16637 Add a new member `module_name'.
16638 (grub_register_command): Return grub_command_t.
16640 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16641 sure that each command is loaded.
16643 * genmk.rb (PModule::rule): Specify a module name without the
16644 suffix ".mod" to gencmdlist.sh.
16646 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16648 * gencmdlist.sh: New file.
16650 * genmk.rb (PModule::rule): Generate a rule for a command list.
16652 Generate command.lst from $(COMMANDFILES).
16654 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16655 (DATA): Added $(pkgdata_DATA).
16656 (install-local): Install files in $(pkgdata_DATA).
16658 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16660 * term/i386/pc/vga.c (debug_command): Removed.
16661 (GRUB_MOD_INIT): Do not register the command "debug".
16663 From Hollis Blanchard:
16664 * commands/configfile.c: New file.
16665 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16666 commands/configfile.c.
16667 (pkgdata_MODULES): Added configfile.mod.
16668 (configfile_mod_SOURCES): New variable.
16669 (configfile_mod_CFLAGS): Likewise.
16670 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16671 commands/configfile.c.
16672 (pkgdata_MODULES): Added configfile.mod.
16673 (configfile_mod_SOURCES): New variable.
16674 (configfile_mod_CFLAGS): Likewise.
16675 * util/grub-emu.c (main): Call grub_configfile_init and
16676 grub_configfile_fini.
16677 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16679 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16681 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16683 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16686 * commands/help.c (grub_cmd_help): Do not print newlines after
16687 the last command in print_command_help.
16689 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16691 * commands/default.h: New file.
16692 * commands/timeout.h: Likewise.
16693 * normal/context.c: Likewise.
16695 * util/misc.c: Do not include sys/times.h.
16696 Include sys/time.h and grub/machine/time.h.
16697 (grub_get_rtc): Rewritten with gettimeofday.
16699 * util/grub-emu.c (main): Call grub_default_init and
16700 grub_timeout_init before grub_normal_init, and call
16701 grub_timeout_fini and grub_default_fini after grub_main.
16703 * util/console.c (grub_ncurses_checkkey): Return the read
16706 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16709 * normal/main.c (read_config_file): Push MENU. If this fails,
16710 print an error and wait for a user input.
16711 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16712 If a menu is empty or an error occurs, pop MENU.
16713 (grub_normal_execute): Pop and free MENU after grub_menu_run
16716 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16718 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16720 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16722 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16724 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16727 * include/grub/normal.h (struct grub_menu_list): New struct.
16728 (grub_menu_list_t): New type.
16729 (struct grub_context): New struct.
16730 (grub_context_t): New type.
16731 (grub_register_command): Got rid of EXPORT_FUNC.
16732 (grub_unregister_command): Likewise.
16733 (grub_context_get): New prototype.
16734 (grub_context_get_current_menu): Likewise.
16735 (grub_context_push_menu): Likewise.
16736 (grub_context_pop_menu): Likewise.
16737 [GRUB_UTIL] (grub_default_init): Likewise.
16738 [GRUB_UTIL] (grub_default_fini): Likewise.
16739 [GRUB_UTIL] (grub_timeout_init): Likewise.
16740 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16742 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16743 commands/timeout.c and normal/context.c.
16744 (pkgdata_MODULES): Added default.mod and timeout.mod.
16745 (normal_mod_SOURCES): Added normal/context.c.
16746 (default_mod_SOURCES): New variable.
16747 (default_mod_CFLAGS): Likewise.
16748 (timeout_mod_SOURCES): Likewise.
16749 (timeout_mod_CFLAGS): Likewise.
16750 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16752 (pkgdata_MODULES): Added default.mod and timeout.mod.
16753 (normal_mod_SOURCES): Added normal/context.c.
16754 (default_mod_SOURCES): New variable.
16755 (default_mod_CFLAGS): Likewise.
16756 (timeout_mod_SOURCES): Likewise.
16757 (timeout_mod_CFLAGS): Likewise.
16759 * Makefile.in (all-local): Added $(MKFILES).
16761 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16763 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16764 (grub_emu_SOURCES): Likewise.
16765 (pkgdata_MODULES): Add `sun.mod'.
16766 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16767 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16769 (pkgdata_MODULES): Add `sun.mod'.
16770 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16771 * include/grub/partition.h (grub_sun_partition_map_init): New
16773 (grub_sun_partition_map_fini): Likewise.
16774 * partmap/sun.c: New file.
16775 * util/grub-emu.c (main): Initialize and de-initialize the sun
16776 partitionmap support.
16778 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16780 This implements an Emacs-like menu entry editor.
16782 * normal/menu_entry.c: New file.
16784 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16785 characters to ASCII.
16786 (saved_char): New variable.
16787 (grub_ncurses_checkkey): Rewritten completely.
16788 (grub_ncurses_getkey): Likewise.
16789 (grub_ncurses_init): Call raw instead of cbreak.
16791 * normal/menu.c (print_entry): Do not put a space.
16792 (init_page): Renamed to ...
16793 (grub_menu_init_page): ... this. All callers changed.
16794 (edit_menu_entry): Removed.
16795 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16797 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16799 * kern/misc.c (grub_vprintf): Call grub_refresh.
16801 * normal/menu.c (DISP_LEFT): Renamed to ...
16802 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16803 * normal/menu.c (DISP_UP): Renamed to ...
16804 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16805 * normal/menu.c (DISP_RIGHT): Renamed to ...
16806 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16807 * normal/menu.c (DISP_DOWN): Renamed to ...
16808 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16809 * normal/menu.c (DISP_HLINE): Renamed to ...
16810 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16811 * normal/menu.c (DISP_VLINE): Renamed to ...
16812 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16813 * normal/menu.c (DISP_UL): Renamed to ...
16814 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16815 * normal/menu.c (DISP_UR): Renamed to ...
16816 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16817 * normal/menu.c (DISP_LL): Renamed to ...
16818 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16819 * normal/menu.c (DISP_LR): Renamed to ...
16820 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16821 * normal/menu.c (TERM_WIDTH): Renamed to ...
16822 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16823 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16824 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16825 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16826 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16827 * normal/menu.c (TERM_MARGIN): Renamed to ...
16828 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16829 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16830 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16831 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16832 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16833 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16834 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16835 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16836 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16837 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16838 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16839 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16840 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16841 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16842 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16843 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16844 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16845 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16846 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16847 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16848 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16849 All callers changed.
16851 * include/grub/normal.h: New prototype.
16853 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16854 normal/menu_entry.c.
16855 (normal_mod_SOURCES): Likewise.
16856 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16857 (normal_mod_SOURCES): Likewise.
16859 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16861 * include/grub/normal.h (grub_halt_init): New prototype.
16862 (grub_halt_fini): Likewise.
16863 (grub_reboot_init): Likewise.
16864 (grub_reboot_fini): Likewise.
16866 * util/grub-emu.c: Include signal.h.
16867 (main_env): New global variable.
16868 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16870 (grub_machine_fini): New function.
16871 (main): Call grub_halt_init and grub_reboot_init before
16872 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16873 Call setjmp with MAIN_ENV to go back afterwards.
16874 Call grub_machine_fini right before return.
16876 * include/grub/util/misc.h: Include setjmp.h.
16877 (main_env): New prototype.
16879 * include/grub/kernel.h (grub_machine_fini): New prototype.
16880 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16881 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16883 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16884 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16885 * term/i386/pc/console.c (grub_console_fini): Likewise.
16887 * util/i386/pc/misc.c: New file.
16889 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16890 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16891 commands/i386/pc/reboot.c.
16893 2005-02-14 Guillem Jover <guillem@hadrons.org>
16895 * include/grub/dl.h (grub_dl_check_header): New prototype.
16896 (grub_arch_dl_check_header): Change return type to grub_err_t,
16897 remove size parameter and export function. Update all callers.
16898 * kern/dl.c (grub_dl_check_header): New function.
16899 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16900 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16901 are inside the core.
16902 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16903 independent ELF header checks.
16904 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16905 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16906 `grub_dl_check_header' instead of explicit checks. Check for the
16908 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16909 `grub_dl_check_header' instead of explicit checks. Remove arch
16910 specific ELF header checks.
16912 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16915 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16917 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16918 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16920 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16922 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16923 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16924 (part_map_iterate): Clear `grub_errno' and return 0 if
16925 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16926 * partmap/amiga.c (amiga_partition_map_iterate): Return
16927 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16928 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16930 2005-02-01 Guillem Jover <guillem@hadrons.org>
16932 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16935 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16937 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16939 (grub_rescue_cmd_linux): New prototype.
16940 (grub_rescue_cmd_initrd): Likewise.
16941 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16943 (grub_linux_release_mem): Release the memory for the initrd.
16944 (grub_load_linux): Renamed from this...
16945 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16946 Changed `entry' not to be static. Loop over memory regions to
16947 find another one when the default fails.
16948 (grub_rescue_cmd_initrd): New function.
16949 (grub_linux_init): Remove function.
16950 (grub_linux_fini): Likewise.
16951 (GRUB_MOD_INIT): Register `initrd'.
16952 (GRUB_MOD_FINI): Unregister `initrd'.
16953 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16955 (grub_linux_normal_fini): Likewise.
16956 (GRUB_MOD_INIT): Register `initrd'.
16957 (GRUB_MOD_FINI): Unregister `initrd'.
16959 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16961 * commands/help.c: New file.
16962 * normal/arg.c (show_help): Renamed to...
16963 (grub_arg_show_help): ... this.
16964 * commands/i386/pc/halt.c: New file.
16965 * commands/i386/pc/reboot.c: Likewise.
16966 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16967 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16968 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16969 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16973 (pkgdata_MODULES): Add `help.mod'.
16974 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16975 * grub/i386/pc/init.h (grub_reboot): New prototype.
16976 (grub_halt): Likewise.
16977 * include/grub/normal.h (grub_arg_show_help): New prototype.
16978 (grub_help_init): Likewise.
16979 (grub_help_fini): Likewise.
16980 * util/grub-emu.c (main): Initialize and deinitialize the help
16983 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16985 * normal/command.c (grub_command_init): Fixed the description of
16986 the `set' and `unset' commands.
16988 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16990 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16992 * commands/ieee1275/halt.c: New file.
16993 * commands/ieee1275/reboot.c: Likewise.
16994 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16995 `__attribute__ ((unused))'. Some GCS related fixed.
16996 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16997 (grub_suspend_fini): Likewise.
16998 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17000 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17001 (halt_mod_CFLAGS): New variables.
17002 * include/grub/powerpc/ieee1275/ieee1275.h
17003 (grub_ieee1275_interpret): New prototype.
17005 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
17007 * include/grub/misc.h (memmove): New prototype.
17008 (memcpy): Likewise.
17010 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
17012 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17013 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
17015 2005-01-22 Marco Gerards <metgerards@student.han.nl>
17017 * kern/misc.c (grub_strndup): Function rewritten.
17019 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
17021 * normal/menu.c (TERM_WIDTH): Macro redefined.
17022 (TERM_TOP_BORDER_Y): Likewise.
17023 (draw_border): Replaced while-loop by a for-loop. Make the number
17024 of lines consistent with the number of lines displayed in
17025 print_entries. Added a margin below the rectangle.
17026 (print_entry): Make the entry fit in the rectangle.
17027 (print_entries): Display the scroll arrows next to the right
17030 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17032 * fs/minix.c (grub_minix_find_file): Reserve more space for
17033 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
17034 `grub_strncpy' to copy `path' into it.
17036 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17038 Add the loopback device, a device via which files can be accessed
17041 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17042 (pkgdata_MODULES): Add loopback.mod.
17043 (loopback_mod_SOURCES): New variable.
17044 (loopback_mod_CFLAGS): Likewise.
17045 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17047 (pkgdata_MODULES): Add loopback.mod.
17048 (loopback_mod_SOURCES): New variable.
17049 (loopback_mod_CFLAGS): Likewise.
17050 * disk/loopback.c: new file.
17051 * include/grub/normal.h (grub_loop_init): New prototype.
17052 (grub_loop_fini): New prototype.
17053 * util/grub-emu.c (main): Initialize and de-initialize loopback
17055 * include/grub/disk.h (grub_disk_dev_id): Add
17056 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17058 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
17060 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17062 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17063 (suspend_mod_SOURCES): New variable.
17064 (suspend_mod_CFLAGS): Likewise.
17065 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17067 * commands/ieee1275/suspend.c: New file.
17069 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17071 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
17072 ((unused))' to `__attribute__ ((used))'.
17073 (GRUB_MOD_FINI): Likewise.
17074 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
17075 * genmk.rb (PModule): Assign space to common symbols when linking
17078 2005-01-20 Marco Gerards <metgerards@student.han.nl>
17080 * include/grub/mm.h (grub_mm_init_region): Change the type of the
17081 `unsigned' arguments to `grub_size_t'.
17082 (grub_malloc): Likewise.
17083 (grub_realloc): Likewise.
17084 (grub_memalign): Likewise.
17085 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
17086 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17087 * util/misc.c (grub_malloc): Likewise.
17088 (grub_realloc): Likewise.
17089 * kern/mm.c (get_header_from_pointer): Change the casts to
17090 `unsigned' into a cast to `grub_size_t'.
17092 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
17093 point to `currnode' when `currnode' is changed.
17095 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
17096 Schottelius <nico-linux@schottelius.org>.
17098 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
17100 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
17101 (note_path): Remove variable.
17102 (GRUB_IEEE1275_NOTE_NAME): New macro.
17103 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
17104 (grub_ieee1275_note_hdr): New structure.
17105 (grub_ieee1275_note_desc): Likewise.
17106 (grub_ieee1275_note): Likewise.
17107 (load_note): Remove `dir' argument. All callers updated. Remove
17108 `note_img' and `path'. Do not load a file from `note_path'.
17109 Initialize a struct grub_ieee1275_note and write that to `out'.
17110 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
17112 2005-01-05 Marco Gerards <metgerards@student.han.nl>
17114 * util/misc.c (grub_util_read_image): Revert last change. It
17115 called `grub_util_read_at', which seeks from the beginning of the
17118 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
17120 * TODO: Add note about endianness in grub-mkimage.
17121 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
17123 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
17124 (grub_mkimage_SOURCES): New target.
17125 * include/grub/kernel.h (grub_start_addr): Remove variable.
17126 (grub_end_addr): Likewise.
17127 (grub_total_module_size): Likewise.
17128 (grub_kernel_image_size): Likewise.
17129 (GRUB_MODULE_MAGIC): New constant.
17130 (grub_module_info): New structure.
17131 (grub_arch_modules_addr): New prototype.
17132 (grub_get_end_addr): Remove prototype.
17133 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
17134 * include/grub/powerpc/ieee1275/kernel.h: New file.
17135 * include/grub/util/misc.h (grub_util_get_fp_size): New
17137 (grub_util_read_at): Likewise.
17138 (grub_util_write_image_at): Likewise.
17139 * kern/main.c (grub_get_end_addr): Remove function.
17140 (grub_load_modules): Call grub_arch_modules_addr instead of using
17141 grub_end_addr. Look for a grub_module_info struct in memory. Use
17142 the grub_module_info fields instead of calling grub_get_end_addr
17143 as loop conditions. Move grub_add_unused_region code here.
17144 (grub_add_unused_region): Remove function.
17145 * kern/i386/pc/init.c: Include grub/cache.h.
17146 (grub_machine_init): Remove call to grub_get_end_addr. Remove
17147 one call to add_mem_region.
17148 (grub_arch_modules_addr): New function.
17149 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
17150 (grub_total_module_size): Likewise.
17151 Include grub/machine/kernel.h.
17152 (grub_arch_modules_addr): New function.
17153 * util/grub-emu.c (grub_end_addr): Remove variable.
17154 (grub_total_module_size): Likewise.
17155 (grub_arch_modules_addr): New function.
17156 * util/misc.c: Include unistd.h.
17157 (grub_util_get_fp_size): New function.
17158 (grub_util_read_at): Likewise.
17159 (grub_util_write_image_at): Likewise.
17160 (grub_util_read_image): Call grub_util_read_at.
17161 (grub_util_write_image): Call grub_util_write_image_at.
17162 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
17163 additional memory in kernel_img for a struct grub_module_info.
17164 Fill in that grub_module_info.
17165 * util/powerpc/ieee1275/grub-mkimage.c: New file.
17167 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17169 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
17171 * include/grub/powerpc/ieee1275/ieee1275.h
17172 (grub_ieee1275_milliseconds): New prototype.
17173 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
17175 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
17176 grub_ieee1275_milliseconds.
17178 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17180 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
17182 (find_options): New function.
17183 (cmain): Call find_options.
17184 * include/grub/powerpc/ieee1275/ieee1275.h
17185 (grub_ieee1275_realmode): New extern variable.
17186 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
17187 grub_map if grub_ieee1275_realmode is false.
17189 2004-12-29 Marco Gerards <metgerards@student.han.nl>
17191 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
17192 lines are inserted and make it work like readline. Reported by
17193 Vincent Pelletier <subdino2004@yahoo.fr>.
17195 2004-12-28 Marco Gerards <metgerards@student.han.nl>
17197 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
17199 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
17200 `kern/powerpc/cache.S'.
17202 2004-12-27 Marco Gerards <metgerards@student.han.nl>
17204 * genmk.rb: Handle the `Program' class in the main loop. Written
17205 by Johan Rydberg <jrydberg@gnu.org>.
17206 (Program): New class.
17207 (programs): New variable.
17208 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
17209 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
17210 instead of "grub/kernel.h". Include <grub/machine/init.h>.
17211 (help_arch): Function removed.
17212 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
17213 `powerpc/libgcc.h' and `loader.h'.
17214 (pkgdata_PROGRAMS): New variable.
17215 (sbin_UTILITIES): Variable removed.
17216 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
17217 (grubof_SOURCES): Variable re-defined so it only includes the
17218 core functionality.
17219 (grubof_CFLAGS): Remove `-DGRUBOF'.
17220 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
17221 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
17222 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
17223 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
17224 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
17225 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
17226 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
17227 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
17228 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
17229 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
17230 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17231 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
17232 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
17233 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
17234 (pc_mod_CFLAGS): New variables.
17235 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
17236 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
17237 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
17238 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
17240 * include/grub/i386/pc/init.h (grub_os_area_addr)
17241 (rub_os_area_size): ... to here.
17242 * include/grub/powerpc/ieee1275/ieee1275.h
17243 (grub_ieee1275_entry_fn): Export symbol.
17244 * include/grub/powerpc/ieee1275/init.h: New file.
17245 * include/grub/powerpc/libgcc.h: Likewise.
17246 * include/grub/cache.h: Likewise.
17247 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
17248 <hollis@penguinppc.org>.
17249 * kern/dl.c: Include <grub/cache.h>.
17250 (grub_dl_flush_cache): New function.
17251 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
17253 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
17254 (grub_console_init): Removed prototypes.
17255 (grub_machine_init): Don't initialize the modules anymore.
17256 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
17258 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
17259 Macro undef removed.
17260 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
17261 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
17262 relocation `R_PPC_REL32'. Return an error when the relocation is
17264 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
17265 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
17266 * util/misc.c (grub_arch_sync_caches): Likewise.
17268 2004-12-19 Marco Gerards <metgerards@student.han.nl>
17270 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
17271 `symlist.c', add `grubof_symlist.c'.
17272 (symlist.c): Variable removed.
17273 (grubof_HEADERS): Variable added.
17274 (grubof_symlist.c): New target.
17275 (kernel_syms.lst): Use `grubof_HEADERS' instead of
17276 `kernel_img_HEADERS'.
17277 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
17278 * kern/powerpc/dl.c: New file.
17279 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
17281 (grub_arch_dl_relocate_symbols): Likewise.
17282 (grub_register_exported_symbols): Likewise.
17284 2004-12-13 Marco Gerards <metgerards@student.han.nl>
17286 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
17287 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
17288 to fail instead. Reported by Vincent Pelletier
17289 <subdino2004@yahoo.fr>.
17291 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
17292 it is not allocated. Reported by Vincent Pelletier
17293 <subdino2004@yahoo.fr>.
17295 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
17296 output so the output looks better.
17298 2004-12-04 Marco Gerards <metgerards@student.han.nl>
17300 Modulize the partition map support and add support for the amiga
17303 * commands/ls.c: Include <grub/partition.h> instead of
17304 <grub/machine/partition.h>.
17305 * kern/disk.c: Likewise.
17306 * kern/rescue.c: Likewise.
17307 * loader/i386/pc/chainloader.c: Likewise.
17308 * normal/cmdline.c: Likewise.
17309 * kern/powerpc/ieee1275/init.c: Likewise.
17310 (grub_machine_init): Call `grub_pc_partition_map_init',
17311 `grub_amiga_partition_map_init' and
17312 `grub_apple_partition_map_init'.
17313 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
17314 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
17315 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
17316 `partition.h' and `pc_partition.h'.
17317 (grub_setup_SOURCES): Remove
17318 `disk/i386/pc/partition.c'. Add `kern/partition.c',
17319 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17320 (grub_emu_SOURCES): Likewise.
17321 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
17322 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
17323 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
17324 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17325 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
17326 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17327 (grubof_SOURCES): Likewise.
17328 * disk/i386/pc/partition.c: File removed.
17329 * disk/powerpc/ieee1275/partition.c: Likewise.
17330 * include/grub/powerpc/ieee1275/partition.h: Likewise.
17331 * include/grub/i386/pc/partition.h: Likewise.
17332 * kern/partition.c: New file.
17333 * partmap/amiga.c: Likewise.
17334 * partmap/apple.c: Likewise.
17335 * partmap/pc.c: Likewise.
17336 * include/grub/partition.h: Likewise..
17337 * include/grub/pc_partition.h: Likewise.
17338 * util/grub-emu.c: Include <grub/partition.h> instead of
17339 <grub/machine/partition.h>.
17340 (main): Call `grub_pc_partition_map_init',
17341 `grub_amiga_partition_map_init' and
17342 `grub_apple_partition_map_init' and deinitialize afterwards.
17343 * util/i386/pc/biosdisk.c: Include `#include
17344 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17345 `<grub/machine/partition.h>'.
17346 * util/i386/pc/grub-setup.c: Likewise.
17347 * util/i386/pc/biosdisk.c: Likewise.
17348 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17349 partition information in case of a PC partition.
17350 * util/i386/pc/grub-setup.c: Include `#include
17351 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17352 `<grub/machine/partition.h>'.
17353 (setup): Only access the PC specific partition information in case
17356 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
17358 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17359 (grub_longjmp): Likewise.
17360 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17362 * normal/powerpc/setjmp.S: New file.
17363 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17364 `normal/powerpc/setjmp.S'.
17365 (grubof_CFLAGS): Add `-DGRUBOF'.
17366 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17367 [GRUB_UTIL && !GRUBOF].
17369 2004-11-16 Marco Gerards <metgerards@student.han.nl>
17371 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17372 property named `name'. Correctly handle the error returned by
17373 `grub_ieee1275_finddevice' if a device can not be opened.
17375 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
17377 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17378 `actual' for negativity.
17379 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17382 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17384 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17385 (PAGE_OFFSET): New macro.
17386 (CRTC_ADDR_PORT): Likewise.
17387 (CRTC_DATA_PORT): Likewise.
17388 (START_ADDR_HIGH_REGISTER): Likewise.
17389 (START_ADDR_LOW_REGISTER): Likewise.
17390 (GRAPHICS_ADDR_PORT): Likewise.
17391 (GRAPHICS_DATA_PORT): Likewise.
17392 (READ_MAP_REGISTER): Likewise.
17393 (INPUT_STATUS1_REGISTER): Likewise.
17394 (INPUT_STATUS1_VERTR_BIT): Likewise.
17395 (page): New variable.
17396 (wait_vretrace): New function.
17397 (set_read_map): Likewise.
17398 (set_start_address): Likewise.
17399 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17401 (check_vga_mem): Take the page into account.
17402 (write_char): Likewise.
17403 (write_cursor): Likewise.
17404 (scroll_up): Likewise. Copy the page to the page that is not
17405 shown and switch between both pages.
17406 (grub_vga_putchar): Fix off by one error.
17407 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17410 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17412 Add support for iso9660 (including rockridge).
17414 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17415 (iso9660_mod_SOURCES): New variable.
17416 (iso9660_mod_CFLAGS): Likewise.
17417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17418 * include/grub/fs.h (grub_iso9660_init): New prototype.
17419 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17420 * fs/iso9660.c: New file.
17422 * include/grub/misc.h (grub_strncat): New prototype.
17423 * kern/misc.c (grub_strncat): New function.
17425 * fs/hfs.c (grub_hfs_mount): Translate the error
17426 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17427 * fs/jfs.c (grub_jfs_mount): Likewise.
17428 * fs/ufs.c (grub_ufs_mount): Likewise.
17430 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17432 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17433 which initialized BAT registers.
17434 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17435 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17437 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17438 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17440 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17441 (grub_mapclaim): Likewise.
17442 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17443 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17446 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17448 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17449 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17450 -ffreestanding and -msoft-float.
17452 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17454 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17455 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17456 set in grub_ieee1275_flags.
17458 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17460 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17462 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17463 grub_console_init first.
17464 Change the memory range used for grub_ieee1275_claim and
17465 grub_mm_init_region.
17466 Print an error message if the claim fails.
17467 Include <grub/misc.h>.
17469 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17471 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17472 Call grub_children_iterate for device nodes of type `scsi',
17474 (grub_ofdisk_open): Remove manual device alias resolution.
17475 Fix memory leak when device cannot be opened.
17476 * include/grub/powerpc/ieee1275/ieee1275.h
17477 (grub_children_iterate): New prototype.
17478 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17480 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17481 Return -1 if args.size was -1.
17483 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17485 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17486 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17487 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17488 Open Firmware's memory for it; claim memory from _start to _end.
17489 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17490 (_end): New extern.
17491 (_start): Zero BSS from __bss_start to _end.
17492 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17494 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17496 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17498 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17499 -1 if args.base was -1.
17501 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17503 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17504 escape sequence instead of a literal ^L. Also call
17505 grub_ofconsole_gotoxy.
17507 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17509 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17510 void * arguments to grub_addr_t. All callers updated. Also make
17511 the `result' argument optional.
17512 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17513 All callers updated.
17515 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17517 * commands/ls.c (grub_ls_list_files): Use the string following the
17518 initial ')', if present, as the filesystem path.
17519 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17521 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17523 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17525 Make the source code of the menu interface more readable.
17527 * normal/menu.c: Include grub/mm.h.
17528 (TERM_WIDTH): New macro.
17529 (TERM_HEIGHT): Likewise.
17530 (TERM_INFO_HEIGHT): Likewise.
17531 (TERM_MARGIN): Likewise.
17532 (TERM_SCROLL_WIDTH): Likewise.
17533 (TERM_TOP_BORDER_Y): Likewise.
17534 (TERM_LEFT_BORDER_X): Likewise.
17535 (TERM_BORDER_WIDTH): Likewise.
17536 (TERM_MESSAGE_HEIGHT): Likewise.
17537 (TERM_BORDER_HEIGHT): Likewise.
17538 (TERM_NUM_ENTRIES): Likewise.
17539 (TERM_FIRST_ENTRY_Y): Likewise.
17540 (TERM_ENTRY_WIDTH): Likewise.
17541 (TERM_CURSOR_X): Likewise.
17542 (draw_border): Use macros instead of magic numbers.
17543 (print_entry): Likewise.
17544 (print_entries): Likewise.
17545 (run_menu): Likewise. Also, handle the key 'e'.
17546 (run_menu_entry): Ignore empty command lines.
17547 (print_message): Added a new argument EDIT. If EDIT is true,
17548 print a different message.
17549 (init_page): Likewise.
17550 (edit_menu_entry): New function. Not implemented yet.
17552 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17554 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17555 can be loaded from normal mode.
17557 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17559 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17560 (multiboot_mod_CFLAGS): New variables.
17561 * loader/i386/pc/linux_normal.c: New file.
17562 * loader/i386/pc/multiboot_normal.c: Likewise.
17564 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17565 attribute `unused'.
17567 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17568 `fdiro' to read the mode information from instead of `diro'.
17570 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17571 looking up a symlink.
17573 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17575 * normal/command.c (grub_command_execute): Don't parse the
17576 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17577 flags of the command.
17579 * normal/menu.c (grub_menu_run): Fix typo.
17581 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17583 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17585 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17586 `y + 1' instead of `y - 1'.
17588 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17590 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17592 From Hollis Blanchard <hollis@penguinppc.org>:
17593 * kern/misc.c (memmove): New alias for grub_memmove.
17594 (memcmp): New alias for grub_memcmp.
17595 (memset): New alias for grub_memset.
17596 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17597 Change "int handle" to "grub_ieee1275_phandle_t handle".
17598 * include/grub/powerpc/ieee1275/ieee1275.h
17599 (grub_ieee1275_get_property): Likewise.
17601 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17603 Added normal mode command `chainloader' as module chain.mod, which
17604 depends on normal.mod and _chain.mod.
17606 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17607 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17608 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17610 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17611 but arguments parsing moved to ...
17612 (grub_chainloader_cmd): ... here. New function.
17613 * include/grub/i386/pc/chainloader.h: New file.
17614 * loader/i386/pc/chainloader_normal.c: Likewise.
17616 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17618 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17619 (grub_mkimage_LDFLAGS): Likewise.
17620 (grub_emu_SOURCES): Likewise.
17621 (kernel_img_HEADERS): Added fshelp.h.
17622 * fs/ext2.c: Include <grub/fshelp.h>.
17623 (FILETYPE_REG): New macro.
17624 (FILETYPE_INO_REG): Likewise.
17625 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17627 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17629 (grub_fshelp_node): New struct.
17630 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17632 (grub_ext2_get_file_block): Removed function.
17633 (grub_ext2_read_block): New function.
17634 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17635 This function was written.
17636 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17637 (grub_ext2_find_file): Removed function.
17638 (grub_ext2_read_symlink): New function.
17639 (grub_ext2_iterate_dir): Likewise.
17640 (grub_ext2_open): Rewritten.
17641 (grub_ext2_dir): Rewritten.
17642 * include/grub/fshelp.h: New file.
17643 * fs/fshelp.c: Likewise.
17645 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17647 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17648 (print_message): Add a missing newline.
17649 (run_menu): Added timeout support.
17650 (run_menu_entry): New local function.
17651 (grub_menu_run): Added support for booting.
17653 * kern/loader.c (grub_loader_is_loaded): New function.
17655 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17656 (grub_get_rtc): Exported.
17658 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17659 (grub_get_rtc): Exported.
17661 * include/grub/normal.h (struct grub_command_list): Remove
17662 constant from the member `command'.
17664 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17666 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17668 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17670 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17672 Add support for the JFS filesystem.
17674 * fs/jfs.c: New file.
17675 * include/grub/fs.h (grub_jfs_init): New prototype.
17676 (grub_jfs_fini): New prototype.
17677 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17678 (grub_emu_SOURCES): Likewise.
17679 (pkgdata_MODULES): Add jfs.mod.
17680 (jfs_mod_SOURCES): New variable.
17681 (jfs_mod_CFLAGS): Likewise.
17682 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17683 (grubof_SOURCES): Likewise.
17684 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17686 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17687 endian to the host endian.
17688 (grub_fat_utf16_to_utf8): Move function from there...
17689 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17690 the endianness of the source string anymore.
17691 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17693 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17695 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17696 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17697 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17698 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17700 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17701 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17702 for `node_found' and `it_dir'.
17703 (grub_hfs_dir): Add prototype for `dir_hook'.
17705 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17706 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17707 and `indir32' to silence a gcc warning.
17709 * include/grub/fs.h (grub_hfs_init): New prototype.
17710 (grub_hfs_fini): Likewise.
17713 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17715 Each disk device has its own id now. This is useful to make use
17716 of multiple disk devices.
17718 * include/grub/disk.h (grub_disk_dev_id): New enum.
17719 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17720 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17722 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17723 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17725 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17726 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17728 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17729 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17731 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17732 "id" which is used by the cache manager.
17734 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17737 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17739 * fs/hfs.c: New file.
17740 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17741 (grub_emu_SOURCES): Likewise.
17742 (pkgdata_MODULES): Add hfs.mod.
17743 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17744 (grubof_SOURCES): Likewise.
17745 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17747 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17748 * kern/misc.c (grub_strncasecmp): Add function.
17750 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17752 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17755 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17756 (grub_ext2_dir): In case the directory entry type is unknown, read
17759 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17761 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17762 grub_load_linux instead of grub_rescue_cmd_linux as second
17763 argument of grub_rescue_register_command.
17765 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17767 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17769 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17771 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17772 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17773 `loader/powerpc/ieee1275/linux.c',
17774 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17775 * include/grub/powerpc/ieee1275/ieee1275.h
17776 (grub_ieee1275_release): New prototype.
17777 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17778 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17779 normal, boot, linux and linux_normal.
17780 * loader/powerpc/ieee1275/linux.c: New file.
17781 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17783 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17785 * normal/arg.c (grub_arg_parse): Correct error handling after
17786 reallocating the argumentlist (check if `argl' is not null instead
17787 of checking if `args' is not null).
17788 * kern/mm.c (grub_realloc): Return the same pointer when using the
17789 same region, instead of returning the header address.
17791 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17793 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17794 one block instead of two when looking for the initial partition.
17795 (grub_partition_probe): Initialize the local variable `p' with 0.
17796 Use base 10 for the grub_strtoul call.
17797 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17798 need for one local variable.
17799 (grub_strtoul): Don't add the new value to `num', instead of that
17802 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17804 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17805 (pxeboot_img_SOURCES): New variable.
17806 (pxeboot_img_ASFLAGS): Likewise.
17807 (pxeboot_img_LDFLAGS): Likewise.
17808 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17809 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17810 <lode_leroy@hotmail.com>.
17812 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17814 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17815 there was no input.
17817 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17819 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17820 the history buffer logic.
17822 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17824 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17825 (FILETYPE_INO_SYMLINK): New macros.
17826 (grub_ext2_find_file): Check if the node is a directory using the
17827 inode stat information instead of using the filetype in the
17828 dirent. Exclude the first character of an absolute symlink.
17829 (grub_ext2_dir): Mask out the filetype part of the mode member of
17832 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17834 Add support for UFS version 1 and 2. Add support for the minix
17835 filesystem version 1 and 2, both the variants with 14 and 30 long
17838 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17840 (grub_emu_SOURCES): Likewise.
17841 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17842 (ufs_mod_SOURCES): New variable.
17843 (ufs_mod_CFLAGS): Likewise.
17844 (minix_mod_SOURCES): Likewise.
17845 (minix_mod_CFLAGS): Likewise.
17846 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17848 (grubof_SOURCES): Likewise.
17849 * fs/ufs.c: New file.
17850 * fs/minix.c: New file.
17851 * include/grub/fs.h (grub_ufs_init): New prototype.
17852 (grub_ufs_fini): Likewise.
17853 (grub_minix_init): Likewise.
17854 (grub_minix_fini): Likewise.
17855 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17858 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17860 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17861 commands/ls.c, commands/terminal.c, commands/boot.c,
17862 commands/cmp.c and commands/cat.c.
17863 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17865 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17868 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17870 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17871 and grub_, respectively. Because the conversion is trivial and
17872 mechanical, I omit the details here. Please refer to the CVS
17873 if you need more information.
17875 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17877 * include/pupa: Renamed to ...
17878 * include/grub: ... this.
17879 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17880 * util/i386/pc/grub-mkimage.c: ... this.
17881 * util/i386/pc/pupa-setup.c: Renamed to ...
17882 * util/i386/pc/grub-setup.c: ... this.
17883 * util/pupa-emu.c: Renamed to ...
17884 * util/grub-emu.c: ... this.
17886 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17888 Add support for the newworld apple macintosh (PPC). This has been
17889 tested on the powerbook 2000 only. It only adds support for
17890 generic ieee1275 functions, console and disk support. This should
17891 be easy to port to other architectures with support for Open
17894 * configure.ac: Accept the powerpc as host_cpu. In the case of
17895 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17896 specific tests are only executed while building for the i386.
17897 Inverse test for crosscompile.
17898 * genmk.rb (Utility): Allow assembler files.
17899 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17900 * conf/powerpc-ieee1275.rmk: New file.
17901 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17902 * disk/powerpc/ieee1275/partition.c: Likewise.
17903 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17904 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17905 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17906 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17907 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17908 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17909 * include/pupa/powerpc/ieee1275/loader.h
17910 * include/pupa/powerpc/setjmp.h: Likewise.
17911 * include/pupa/powerpc/types.h: Likewise.
17912 * kern/powerpc/ieee1275/init.c: Likewise.
17913 * kern/powerpc/ieee1275/openfw.c: Likewise.
17914 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17916 These files were written by Johan Rydberg
17917 (jrydberg@night.trouble.net) and I only modified them slightly.
17919 * boot/powerpc/ieee1275/cmain.c: New file.
17920 * boot/powerpc/ieee1275/crt0.S: Likewise.
17921 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17922 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17924 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17926 * Makefile.in: Update copyright.
17927 * genmodsrc.sh: Likewise.
17928 * gensymlist.sh: Likewise.
17929 * term/i386/pc/vga.c: Indent correctly.
17931 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17932 bugreporting address.
17933 * util/i386/pc/pupa-setup.c (usage): Likewise,
17934 (main): Call pupa_ext2_init and pupa_ext2_fini.
17936 * fs/fat.c (log2): Renamed to ...
17937 (fat_log2): ... this.
17938 All callers changed.
17939 * kern/misc.c (memcpy): Alias to pupa_memmove.
17940 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17942 * util/console.c (pupa_ncurses_fini): Return 0.
17944 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17945 Move fail label here.
17946 [__GNU__]: Don't warn when using stat.
17947 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17948 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17949 long int. Use strtol instead of strtoul.
17951 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17953 * commands/boot.c: New file.
17954 * commands/cat.c: Likewise.
17955 * commands/cmp.c: Likewise.
17956 * commands/ls.c: Likewise.
17957 * commands/terminal.c: Likewise.
17958 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17959 (pupa_register_command): Changed interface to match the new
17961 (pupa_command_execute): Changed (almost rewritten) so it uses
17962 pupa_split_command. Added support for setting variables using the
17964 (rescue_command): Changed to work with the new argument parser.
17965 (terminal_command): Moved from here to commands/terminal.c.
17966 (set_command): New function.
17967 (unset_command): New function.
17968 (insmod_command): New function.
17969 (rmmod_command): New function.
17970 (lsmod_command): New function.
17971 (pupa_command_init): Don't initialize the command terminal
17972 anymore. Initialize the commands set, unset, insmod, rmmod and
17974 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17975 (kernel_img_HEADERS): Add arg.h and env.h.
17976 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17977 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17978 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17980 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17982 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17983 (boot_mod_SOURCES): New variable.
17984 (terminal_mod_SOURCES): Likewise.
17985 (ls_mod_SOURCES): Likewise.
17986 (cmp_mod_SOURCES): Likewise.
17987 (cat_mod_SOURCES): Likewise.
17989 * normal/arg.c: New file.
17990 * kern/env.c: Likewise.
17991 * include/pupa/arg.h: Likewise.
17992 * include/pupa/env.h: Likewise.
17993 * font/manager.c (font_command): Changed to match argument parsing
17995 (PUPA_MOD_INIT): Likewise.
17996 * hello/hello.c (pupa_cmd_hello): Likewise.
17997 (PUPA_MOD_INIT): Likewise.
17998 * include/pupa/disk.h: Include <pupa/device.h>.
17999 (pupa_print_partinfo): New prototype.
18000 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18001 (pupa_dl_get_prefix): Likewise.
18002 * include/pupa/misc.h: Include <pupa/err.h>.
18003 (pupa_isgraph): New prototype.
18004 (pupa_isdigit): Likewise.
18005 (pupa_split_cmdline): Likewise.
18006 * include/pupa/normal.h: Include <pupa/arg.h>.
18007 (pupa_command): Changed the prototype of the member `func' to
18008 match the argument parsing interface. Added member `options'.
18009 (pupa_register_command): Updated to match function.
18010 (pupa_arg_parse): New prototype.
18011 (pupa_hello_init) [PUPA_UTIL]: New prototype.
18012 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18013 (pupa_ls_init) [PUPA_UTIL]: Likewise.
18014 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18015 (pupa_cat_init) [PUPA_UTIL]: Likewise.
18016 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18017 (pupa_boot_init) [PUPA_UTIL]: Likewise.
18018 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18019 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18020 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18021 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18022 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18023 * kern/disk.c: Include <pupa/file.h>.
18024 (pupa_print_partinfo): New function.
18025 * kern/dl.c: Include <pupa/env.h>.
18026 (pupa_dl_dir): Variable removed.
18027 (pupa_dl_load): Use the environment variable `prefix' instead of
18028 the variable pupa_dl_dir.
18029 (pupa_dl_set_prefix): Function removed.
18030 (pupa_dl_get_prefix): Likewise.
18031 * kern/i386/pc/init.c: Include <pupa/env.h>.
18032 (pupa_machine_init): Use the environment variable `prefix' instead of
18033 using pupa_dl_set_prefix to set the prefix.
18034 * kern/main.c: Include <pupa/env.h>.
18035 (pupa_set_root_dev): Use the environment variable `prefix' instead of
18036 using pupa_dl_get_prefix to get the prefix.
18037 * kern/misc.c: Include <pupa/env.h>.
18038 (pupa_isdigit): New function.
18039 (pupa_isgraph): Likewise.
18040 (pupa_ftoa): Likewise.
18041 (pupa_vsprintf): Added support for printing values of the type
18042 `double'. Make it possible to format variable output when using
18043 formatting like `%1.2%f'.
18044 (pupa_split_cmdline): New function.
18045 * kern/rescue.c: Include <pupa/env.h>.
18046 (next_word): Removed function.
18047 (pupa_rescue_cmd_prefix): Likewise.
18048 (pupa_rescue_cmd_set): New function.
18049 (pupa_rescue_cmd_unset): New function.
18050 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18051 split the command line instead of splitting it here. Added
18052 support for setting variables using the syntax `foo=bar'. Don't
18053 initialize the prefix command anymore. Initialized the set and
18055 * normal/cmdline.c: Include <pupa/env.h>.
18056 (pupa_tab_complete): Added prototypes for print_simple_completion,
18057 print_partition_completion, add_completion, iterate_commands,
18058 iterate_dev, iterate_part and iterate_dir. Moved code to print
18059 partition information from here to kern/disk.c.
18060 (pupa_cmdline_run): Don't check if the function exists anymore.
18061 * normal/main.c: Include <pupa/env.h>.
18062 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18063 instead of using pupa_dl_get_prefix to get the prefix.
18064 * term/i386/pc/vga.c: Include <pupa/arg.h>.
18065 (check_vga_mem): Cast pointers to `void *' to silence a gcc
18067 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18068 (pupa_vga_setcolor): Declare unused variables with `__attribute__
18069 ((unused))' to silence a gcc warning.
18070 (pupa_vga_setcolor): Likewise.
18071 (debug_command): Changed to match argument parsing
18073 * util/pupa-emu.c: Include <pupa/env.h>.
18074 (options): Added 0's for unused fields to silence a gcc warning.
18076 (main): Use the environment variable `prefix' instead of using
18077 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
18078 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
18081 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
18082 * util/misc.c: Include <malloc.h>.
18083 (pupa_malloc): Rewritten so errors are correctly reported.
18084 (pupa_realloc): Likewise.
18085 (pupa_memalign): Likewise.
18086 (pupa_mm_init_region): Declare unused variables with
18087 `__attribute__ ((unused))' to silence a gcc warning.
18088 * normal/i386/setjmp.S: Remove tab at the end of the file to
18089 silence a gcc warning.
18090 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
18091 variables with `__attribute__ ((unused))' to silence a gcc
18093 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
18094 local variable i unsigned to silence a gcc warning.
18096 * kern/term.c: Include <pupa/misc.h>.
18097 (pupa_more_lines): New variable.
18098 (pupa_more): Likewise.
18099 (pupa_putcode): When the pager is active pause at the end of every
18101 (pupa_set_more): New function.
18102 * include/pupa/term.h (pupa_set_more): New prototype.
18105 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
18107 Now this project is GRUB 2 rather than PUPA. The location of
18108 the CVS repository was moved to GRUB's.
18110 * configure.ac: Use bug-grub as the reporting address.
18111 Use GRUB instead of PUPA.
18112 Change the version number to 1.90.
18114 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
18116 * genkernsyms.sh: Updated copyright information.
18117 * genmk.rb: Likewise.
18118 * genmodsrc.sh: Likewise.
18119 * gensymlist.sh: Likewise.
18120 * boot/i386/pc/boot.S: Likewise.
18121 * boot/i386/pc/diskboot.S: Likewise.
18122 * disk/i386/pc/biosdisk.c: Likewise.
18123 * disk/i386/pc/partition.c: Likewise.
18124 * font/manager.c: Likewise.
18125 * fs/ext2.c: Likewise.
18126 * fs/fat.c: Likewise.
18127 * include/pupa/boot.h: Likewise.
18128 * include/pupa/device.h: Likewise.
18129 * include/pupa/disk.h: Likewise.
18130 * include/pupa/dl.h: Likewise.
18131 * include/pupa/elf.h: Likewise.
18132 * include/pupa/err.h: Likewise.
18133 * include/pupa/file.h: Likewise.
18134 * include/pupa/font.h: Likewise.
18135 * include/pupa/fs.h: Likewise.
18136 * include/pupa/kernel.h: Likewise.
18137 * include/pupa/loader.h: Likewise.
18138 * include/pupa/misc.h: Likewise.
18139 * include/pupa/mm.h: Likewise.
18140 * include/pupa/net.h: Likewise.
18141 * include/pupa/normal.h: Likewise.
18142 * include/pupa/rescue.h: Likewise.
18143 * include/pupa/setjmp.h: Likewise.
18144 * include/pupa/symbol.h: Likewise.
18145 * include/pupa/term.h: Likewise.
18146 * include/pupa/types.h: Likewise.
18147 * include/pupa/i386/setjmp.h: Likewise.
18148 * include/pupa/i386/types.h: Likewise.
18149 * include/pupa/i386/pc/biosdisk.h: Likewise.
18150 * include/pupa/i386/pc/boot.h: Likewise.
18151 * include/pupa/i386/pc/console.h: Likewise.
18152 * include/pupa/i386/pc/init.h: Likewise.
18153 * include/pupa/i386/pc/kernel.h: Likewise.
18154 * include/pupa/i386/pc/linux.h: Likewise.
18155 * include/pupa/i386/pc/loader.h: Likewise.
18156 * include/pupa/i386/pc/memory.h: Likewise.
18157 * include/pupa/i386/pc/multiboot.h: Likewise.
18158 * include/pupa/i386/pc/partition.h: Likewise.
18159 * include/pupa/i386/pc/time.h: Likewise.
18160 * include/pupa/i386/pc/vga.h: Likewise.
18161 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
18162 * include/pupa/util/getroot.h: Likewise.
18163 * include/pupa/util/misc.h: Likewise.
18164 * include/pupa/util/resolve.h: Likewise.
18165 * kern/device.c: Likewise.
18166 * kern/disk.c: Likewise.
18167 * kern/dl.c: Likewise.
18168 * kern/err.c: Likewise.
18169 * kern/file.c: Likewise.
18170 * kern/fs.c: Likewise.
18171 * kern/loader.c: Likewise.
18172 * kern/main.c: Likewise.
18173 * kern/misc.c: Likewise.
18174 * kern/mm.c: Likewise.
18175 * kern/rescue.c: Likewise.
18176 * kern/term.c: Likewise.
18177 * kern/i386/dl.c: Likewise.
18178 * kern/i386/pc/init.c: Likewise.
18179 * kern/i386/pc/lzo1x.S: Likewise.
18180 * kern/i386/pc/startup.S: Likewise.
18181 * loader/i386/pc/chainloader.c: Likewise.
18182 * loader/i386/pc/linux.c: Likewise.
18183 * loader/i386/pc/multiboot.c: Likewise.
18184 * normal/cmdline.c: Likewise.
18185 * normal/command.c: Likewise.
18186 * normal/main.c: Likewise.
18187 * normal/menu.c: Likewise.
18188 * normal/i386/setjmp.S: Likewise.
18189 * term/i386/pc/console.c: Likewise.
18190 * term/i386/pc/vga.c: Likewise.
18191 * util/console.c: Likewise.
18192 * util/genmoddep.c: Likewise.
18193 * util/misc.c: Likewise.
18194 * util/pupa-emu.c: Likewise.
18195 * util/resolve.c: Likewise.
18196 * util/unifont2pff.rb: Likewise.
18197 * util/i386/pc/biosdisk.c: Likewise.
18198 * util/i386/pc/getroot.c: Likewise.
18199 * util/i386/pc/pupa-mkimage.c: Likewise.
18200 * util/i386/pc/pupa-setup.c: Likewise.
18202 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
18204 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
18205 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
18206 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
18207 reading and reset it after reading.
18208 (pupa_ext2_close): Return PUPA_ERR_NONE.
18210 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
18212 (struct linux_kernel_header): Add kernel_version and
18214 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
18215 pupa_file_read succeeds.
18216 (pupa_rescue_cmd_initrd): Implement.
18218 2003-12-03 Marco Gerards <metgerards@student.han.nl>
18220 * fs/ext2.c (pupa_ext2_label): New function.
18221 (pupa_ext2_fs): Added label.
18222 * fs/fat.c (pupa_fat_label): New function.
18223 (pupa_fat_fs): Added label.
18224 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
18226 * kern/misc.c (pupa_strndup): New function.
18227 * include/pupa/misc.h (pupa_strndup): New prototype.
18229 * include/pupa/normal.h: Include <pupa/err.h>.
18230 (pupa_set_history): New prototype.
18231 (pupa_iterate_commands): New prototype.
18232 * normal/cmdline.c: Include <pupa/machine/partition.h>,
18233 <pupa/disk.h>, <pupa/file.h>.
18234 (hist_size): New variable.
18235 (hist_lines): Likewise.
18236 (hist_end): Likewise.
18237 (hist_used): Likewise.
18238 (pupa_set_history): New function.
18239 (pupa_history_get): Likewise.
18240 (pupa_history_add): Likewise.
18241 (pupa_history_replace): Likewise.
18242 (pupa_tab_complete): Likewise.
18243 (pupa_cmdline_run): Added tab completion and history buffer. Tab
18244 completion shows partitionnames while completing partitions, this
18245 feature was suggested by Jeff Bailey.
18246 * normal/command.c (pupa_iterate_commands): New function.
18247 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
18248 (pupa_normal_init): Initialize history buffer.
18249 (PUPA_MOD_INIT): Likewise.
18250 (pupa_normal_fini): Free the history buffer.
18251 (PUPA_MOD_FINI): Likewise.
18253 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
18256 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
18257 * configure.ac [i386]: Check for regparam bug.
18258 (NESTED_FUNC_ATTR) [! i386]: Defined.
18260 2003-11-17 Marco Gerards <metgerards@student.han.nl>
18262 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
18263 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
18264 (pupa_emu_SOURCES): New variable.
18265 (pupa_emu_LDFLAGS): Likewise.
18266 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
18267 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
18268 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
18269 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18270 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
18271 (pupa_jmp_buf): New typedef.
18272 (pupa_setjmp) [PUPA_UTIL]: New macro.
18273 (pupa_longjmp) [PUPA_UTIL]: Likewise.
18274 * include/pupa/term.h (struct pupa_term): New member `refresh'.
18275 (pupa_refresh): New prototype.
18276 * include/pupa/util/getroot.h: New file.
18277 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
18279 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
18280 (pupa_rescue_cmd_cat): Likewise.
18281 (pupa_rescue_cmd_ls): Likewise.
18282 (pupa_rescue_cmd_testload): Likewise.
18283 (pupa_rescue_cmd_lsmod): Likewise.
18284 * normal/cmdline.c (pupa_cmdline_get): Likewise.
18285 * normal/menu.c (run_menu): Likewise.
18286 * kern/term.c (pupa_cls): Likewise.
18287 (pupa_refresh): New function.
18288 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
18289 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18290 * util/console.c: New file.
18292 * util/i386/pc/getroot.c: New file.
18293 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
18294 (pupa_putchar): New function.
18295 (pupa_refresh): Likewise.
18296 (xgetcwd): Function moved to ...
18297 (strip_extra_slashes): Likewise.
18298 (get_prefix): Likewise.
18299 * util/i386/pc/getroot.c: ... here.
18300 (find_root_device): Function moved and renamed to...
18301 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
18302 Changed all callers.
18303 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
18305 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
18306 Changed all callers.
18307 * util/misc.c (pupa_memalign): New function.
18308 (pupa_mm_init_region): Likewise.
18309 (pupa_register_exported_symbols): Likewise.
18310 (pupa_putchar): Function removed.
18311 * util/pupa-emu.c: New file.
18313 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
18315 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
18316 (_multiboot_mod_SOURCES): New variable.
18317 (_multiboot_mod_CFLAGS): Likewise.
18318 * loader/i386/pc/multiboot.c: New file.
18319 * include/pupa/i386/pc/multiboot.h: Likewise.
18320 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
18321 (pupa_multiboot_real_boot): New function.
18322 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
18323 (pupa_multiboot_real_boot): New prototype.
18324 (pupa_rescue_cmd_multiboot): Likewise
18325 (pupa_rescue_cmd_module): Likewise.
18327 * kern/loader.c (pupa_loader_set): Continue when
18328 pupa_loader_unload_func() fails.
18329 (pupa_loader_unset): New function.
18330 * include/pupa/loader.h (pupa_loader_unset): New prototype.
18332 * kern/misc.c (pupa_stpcpy): New function.
18333 * include/pupa/misc.h (pupa_stpcpy): New prototype.
18335 2003-11-12 Marco Gerards <metgerards@student.han.nl>
18337 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
18338 for available extensions.
18340 * include/pupa/i386/pc/time.h: New file.
18341 * kern/disk.c: Include <pupa/machine/time.h>.
18342 (PUPA_CACHE_TIMEOUT): New macro.
18343 (pupa_last_time): New variable.
18344 (pupa_disk_open): Flush the cache when there was a timeout.
18345 (pupa_disk_close): Reset the timer.
18346 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18348 * util/misc.c: Include <sys/times.h>
18349 (pupa_get_rtc): New function.
18351 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
18353 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18355 (pupa_ext2_get_file_block): Use blocks member.
18357 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18358 first block. Return -1 instead of pupa_errno on error.
18360 2003-10-27 Marco Gerards <metgerards@student.han.nl>
18362 * README: In the pupa-mkimage example use _chain instead of chain
18363 and ext2 instead of fat.
18364 * TODO: Replace ext2fs with jfs as an example. Add an item for
18365 adding journal playback for ext2fs.
18366 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18367 (pkgdata_MODULES): Added ext2.mod.
18368 (ext2_mod_SOURCES): New variable.
18369 (ext2_mod_CFLAGS): Likewise.
18370 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18371 * include/pupa/misc.h (pupa_strncpy): New prototype.
18372 (pupa_strcat): Likewise.
18373 (pupa_strncmp): Likewise.
18374 * kern/misc.c (pupa_strcat): Enable function.
18375 (pupa_strncpy): New function.
18376 (pupa_strncmp): Likewise.
18377 * fs/ext2.c: New file.
18379 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18380 when the read failed before retrying.
18381 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18382 (_FILE_OFFSET_BITS): Likewise.
18383 * configure.ac: Added AC_SYS_LARGEFILE.
18385 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18387 * genmk.rb (PModule#rule): Make sure to get only symbol names
18388 from the output of nm.
18389 Reported by Robert Millan <zeratul2@wanadoo.es>.
18391 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18393 I forgot to check in these changes for a long time. This adds
18394 incomplete support for VGA console, and this is still very
18395 buggy. Also, a lot of consideration is required for I18N,
18396 UNICODE, and VGA font issues. Therefore, assume that this is
18397 such that "better than nothing".
18399 * font/manager.c: New file.
18400 * include/pupa/font.h: Likewise.
18401 * include/pupa/i386/pc/vga.h: Likewise.
18402 * term/i386/pc/vga.c: Likewise.
18403 * util/unifont2pff.rb: Likewise.
18405 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18406 (pkgdata_MODULES): Added vga.mod and font.mod.
18407 (vga_mod_SOURCES): New variables.
18408 (vga_mod_CFLAGS): Likewise.
18409 (font_mod_SOURCES): Likewise.
18410 (font_mod_CFLAGS): Likewise.
18412 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18414 * include/pupa/term.h: Include pupa/err.h.
18415 (struct pupa_term): Added init and fini.
18416 Changed the argument of putchar to pupa_uint32_t.
18418 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18419 (pupa_console_real_putchar): New prototype.
18420 (pupa_console_putchar): Removed.
18421 (pupa_console_checkkey): Exported.
18422 (pupa_console_getkey): Likewise.
18424 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18427 * kern/term.c (pupa_term_set_current): Rewritten.
18428 (pupa_putchar): Likewise.
18429 (pupa_putcode): New function.
18431 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18432 (pupa_console_real_putchar): ... this.
18433 (pupa_vga_set_mode): New function.
18434 (pupa_vga_get_font): Likewise.
18436 * normal/command.c: Include pupa/term.h.
18437 (terminal_command): New function.
18438 (pupa_command_init): Register the command "terminal".
18440 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18441 (DISP_UP): Likewise.
18442 (DISP_RIGHT): Likewise.
18443 (DISP_DOWN): Likewise.
18444 (DISP_HLINE): Likewise.
18445 (DISP_VLINE): Likewise.
18446 (DISP_UL): Likewise.
18447 (DISP_UR): Likewise.
18448 (DISP_LL): Likewise.
18449 (DISP_LR): Likewise.
18451 * term/i386/pc/console.c (pupa_console_putchar): New function.
18453 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18455 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18456 FIX. Reverse the path_list.
18458 * include/pupa/normal.h: Export pupa_register_command and
18459 pupa_unregister_command.
18461 * hello/hello.c (pupa_cmd_hello): New module.
18462 * conf/i386-pc.rmk: Added hello.mod.
18464 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18466 * kern/i386/pc/lzo1x.S: New file.
18468 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18469 (compress_kernel): New variable.
18470 (generate_image): Heavily modified to support compressing a
18471 large part of the core image.
18473 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18475 (pupa_util_load_image): New function.
18477 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18478 (pupa_compressed_size): New variable.
18479 (codestart): Enable Gate A20 here.
18480 Decompress the compressed part of the core image.
18481 Rearrange the code to put functions and variables which are
18482 required for initialization in the non-compressed part.
18485 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18488 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18490 * include/pupa/i386/pc/kernel.h
18491 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18492 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18493 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18494 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18495 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18497 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18499 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18500 (Utility#rule): Likewise.
18502 * configure.ac: Check if LZO is available.
18504 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18506 * include/pupa/normal.h: New file.
18507 * include/pupa/setjmp.h: Likewise.
18508 * include/pupa/i386/setjmp.h: Likewise.
18509 * normal/cmdline.c: Likewise.
18510 * normal/command.c: Likewise.
18511 * normal/main.c: Likewise.
18512 * normal/menu.c: Likewise.
18513 * normal/i386/setjmp.S: Likewise.
18515 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18516 (pupa_rescue_cmd_initrd): Likewise.
18518 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18521 * kern/i386/pc/startup.S (translation_table): New variable.
18522 (translate_keycode): New function.
18523 (pupa_console_getkey): Call translate_keycode.
18525 * kern/rescue.c (attempt_normal_mode): New function.
18526 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18527 it failed, print a message.
18529 * kern/mm.c (pupa_real_malloc): Print more information when a
18530 free magic is broken.
18531 (pupa_free): If the first free header is not free actually, set
18534 * kern/main.c (pupa_load_normal_mode): Just load the module
18536 (pupa_main): Don't print the message
18537 "Entering into rescue mode..." here.
18539 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18541 (pupa_rescue_cmd_initrd): Likewise.
18542 (pupa_rescue_cmd_initrd): Likewise.
18544 * include/pupa/symbol.h (FUNCTION): Specify the type.
18545 (VARIABLE): Likewise.
18547 * include/pupa/err.h (pupa_err_t): Added
18548 PUPA_ERR_UNKNOWN_COMMAND.
18550 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18551 (pupa_dl_get_prefix): Likewise.
18553 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18554 Added _chain.mod and _linux.mod instead of chain.mod and
18556 (chain_mod_SOURCES): Renamed to ...
18557 (_chain_mod_SOURCES): ... this.
18558 (chain_mod_CFLAGS): Renamed to ...
18559 (_chain_mod_CFLAGS): ... this.
18560 (linux_mod_SOURCES): Renamed to ...
18561 (_linux_mod_SOURCES): ... this.
18562 (linux_mod_CFLAGS): Renamed to ...
18563 (_linux_mod_CFLAGS): ... this.
18564 (normal_mod_SOURCES): New variable.
18565 (normal_mod_CFLAGS): Likewise.
18566 (normal_mod_ASFLAGS): Likewise.
18568 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18570 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18573 * kern/dl.c (pupa_dl_ref): Refer depending modules
18575 (pupa_dl_unref): Unrefer depending modules recursively.
18576 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18577 a module is unloaded before one depending on that module is
18579 (pupa_dl_unload): Unload depending modules explicitly,
18582 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18584 * include/pupa/i386/pc/linux.h: New file.
18585 * loader/i386/pc/linux.c: Likewise.
18587 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18589 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18590 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18591 of PUPA_CHAINLOADER_BOOT_SECTOR.
18593 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18594 (pupa_linux_prot_size): New variable.
18595 (pupa_linux_tmp_addr): Likewise.
18596 (pupa_linux_real_addr): Likewise.
18597 (pupa_linux_boot_zimage): New function.
18598 (pupa_linux_boot_bzimage): Likewise.
18600 * kern/i386/pc/init.c (struct mem_region): New structure.
18601 (MAX_REGIONS): New macro.
18602 (mem_regions): New variable.
18603 (num_regions): Likewise.
18604 (pupa_os_area_addr): Likewise.
18605 (pupa_os_area_size): Likewise.
18606 (pupa_lower_mem): Likewise.
18607 (pupa_upper_mem): Likewise.
18608 (add_mem_region): New function.
18609 (compact_mem_regions): Likewise.
18610 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18611 the size of the conventional memory and that of so-called upper
18612 memory (before the first memory hole).
18613 Instead of adding each found region to free memory, use
18614 add_mem_region and add them after removing overlaps.
18615 Also, add only 1/4 of the upper memory to free memory. The rest
18616 is used for loading OS images. Maybe this is ad hoc, but this
18617 makes it much easier to relocate OS images when booting.
18619 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18620 (pupa_enter_rescue_mode): Don't register initrd and module.
18622 * kern/mm.c: Include pupa/dl.h.
18624 * kern/main.c: Include pupa/file.h and pupa/device.h.
18626 * kern/loader.c (pupa_loader_load_module_func): Removed.
18627 (pupa_loader_load_module): Likewise.
18629 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18632 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18633 (pupa_linux_tmp_addr): Likewise.
18634 (pupa_linux_real_addr): Likewise.
18635 (pupa_linux_boot_zimage): Likewise.
18636 (pupa_linux_boot_bzimage): Likewise.
18638 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18639 (pupa_upper_mem): Likewise.
18640 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18641 module is too dangerous.
18643 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18644 (pupa_os_area_size): Likewise.
18645 (pupa_loader_set): Remove the first argument. Loader doesn't
18646 manage modules or initrd any longer.
18647 (pupa_loader_load_module): Removed.
18649 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18650 (linux_mod_SOURCES): New variable.
18651 (linux_mod_CFLAGS): Likewise.
18653 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18655 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18656 the length of a blocklist correctly.
18658 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18659 Use ioctl only if the OS file is a block device.
18660 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18661 not very useful for normal files.
18663 * kern/main.c (pupa_set_root_dev): New function.
18664 (pupa_load_normal_mode): Likewise.
18665 (pupa_main): Call those above.
18667 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18670 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18672 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18674 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18675 (setup): Configure the installed partition information and the
18678 * loader/i386/pc/chainloader.c (my_mod): New variable.
18679 (pupa_chainloader_unload): New function.
18680 (pupa_rescue_cmd_chainloader): Refer itself.
18681 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18683 * kern/i386/pc/startup.S (install_partition): Removed.
18684 (version_string): Likewise.
18685 (config_file): Likewise.
18686 (pupa_install_dos_part): New variable.
18687 (pupa_install_bsd_part): Likewise.
18688 (pupa_prefix): Likewise.
18689 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18691 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18693 (make_install_device): New function.
18694 (pupa_machine_init): Set the dl prefix.
18696 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18697 (buf): Renamed to ...
18698 (linebuf): ... this.
18699 (pupa_rescue_cmd_prefix): New function.
18700 (pupa_rescue_cmd_insmod): Likewise.
18701 (pupa_rescue_cmd_rmmod): Likewise.
18702 (pupa_rescue_cmd_lsmod): Likewise.
18703 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18706 * kern/mm.c (pupa_memalign): If failed even after invalidating
18707 disk caches, unload unneeded modules and retry.
18709 * kern/misc.c (pupa_memmove): New function.
18710 (pupa_memcpy): Removed.
18711 (pupa_strcpy): New function.
18712 (pupa_itoa): Made static.
18714 * kern/dl.c (pupa_dl_iterate): New function.
18715 (pupa_dl_ref): Likewise.
18716 (pupa_dl_unref): Likewise.
18717 (pupa_dl_unload): Return if succeeded or not.
18718 (pupa_dl_unload_unneeded): New function.
18719 (pupa_dl_unload_all): Likewise.
18720 (pupa_dl_init): Renamed to ...
18721 (pupa_dl_set_prefix): ... this.
18722 (pupa_dl_get_prefix): New function.
18724 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18725 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18726 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18727 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18728 (pupa_install_dos_part): Declared.
18729 (pupa_install_bsd_part): Likewise.
18730 (pupa_prefix): Likewise.
18731 (pupa_boot_drive): Likewise.
18733 * include/pupa/types.h: Fix a typo.
18735 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18737 (pupa_memmove): Declared.
18738 (pupa_strcpy): Likewise.
18740 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18741 pupa_mod_init takes one argument, its own module.
18742 (pupa_dl_unload_unneeded): Declared.
18743 (pupa_dl_unload_all): Likewise.
18744 (pupa_dl_ref): Likewise.
18745 (pupa_dl_unref): Likewise.
18746 (pupa_dl_iterate): Likewise.
18747 (pupa_dl_init): Renamed to ...
18748 (pupa_dl_set_prefix): ... this.
18749 (pupa_dl_get_prefix): Declared.
18751 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18752 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18754 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18755 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18757 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18758 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18760 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18762 * util/i386/pc/pupa-setup.c (setup): Define the internal
18763 function find_first_partition_start at the top level, because GCC
18764 3.0.x cannot compile internal functions in deeper scopes
18766 (find_root_device): Use lstat instead of stat.
18767 Don't follow symbolic links.
18768 Fix the path-constructing code.
18770 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18771 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18772 by a BLKGETSIZE ioctl first, because block devices don't fill
18773 the member st_mode of the structure stat on Linux.
18774 [__linux__] (linux_find_partition): Use a temporary buffer
18775 REAL_DEV for the working space. Copy it to DEV before returning.
18776 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18777 buffer cache consistent.
18778 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18779 strncmp. The previous value was merely wrong.
18780 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18782 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18783 FAT size is 12. The previous value was merely wrong.
18785 * kern/main.c (pupa_main): Don't split the starting message from
18788 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18789 LF, because BIOS goes crazy about character attributes in this
18792 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18794 * include/i386/pc/util/biosdisk.h: New file.
18795 * util/i386/pc/biosdisk.c: Likewise.
18796 * util/i386/pc/pupa-setup.c: Likewise.
18798 * Makefile.in (INCLUDE_DISTFILES): Added
18799 include/pupa/i386/pc/util/biosdisk.h.
18800 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18801 directory util/i386/pc.
18802 (install-local): Added a rule for sbin_UTILITIES.
18803 (uninstall): Likewise.
18805 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18807 * util/misc.c (xrealloc): New function.
18808 (pupa_malloc): Likewise.
18809 (pupa_free): Likewise.
18810 (pupa_realloc): Likewise.
18811 (pupa_stop): Likewise.
18812 (pupa_putchar): Likewise.
18814 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18816 * include/pupa/util/misc.h (xrealloc): Declared.
18818 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18820 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18821 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18823 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18824 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18826 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18827 way should be implemented.
18828 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18830 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18831 the size of NAME for safety.
18832 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18835 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18836 (pupa_setup_SOURCES): Likewise.
18838 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18840 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18842 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18843 bunch of pushl's from pusha, because this destroys the return
18846 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18848 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18849 This means that any missing prototypes could be fatal. Also, you
18850 must take care when writing assembly code. See the comments at
18851 the beginning of startup.S, for more details.
18853 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18854 compilation mechanism.
18855 (pupa_chainloader_real_boot): Likewise.
18856 (pupa_biosdisk_rw_int13_extensions): Likewise.
18857 (pupa_biosdisk_rw_standard): Likewise.
18858 (pupa_biosdisk_check_int13_extensions): Likewise.
18859 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18860 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18861 (pupa_get_memsize): Likewise.
18862 (pupa_get_mmap_entry): Likewise.
18863 (pupa_console_putchar): Likewise.
18864 (pupa_console_setcursor): Likewise.
18865 (pupa_getrtsecs): Use pushl instead of push.
18867 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18868 memory instead of the stack for a mmap entry, because some
18869 BIOSes may ignore the maximum size and overflow.
18871 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18873 * genmk.rb (PModule#rule): Compile automatically generated
18874 sources with module-specific CFLAGS as well as other sources.
18876 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18878 * configure.ac: Check ld.
18879 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18880 respectively, before checking endianness and sizes.
18882 * Makefile.in (LD): New variable.
18884 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18886 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18888 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18890 * Changelog: New file.